diff --git a/CHANGELOG.md b/CHANGELOG.md index c6f916f365..ff8b13efa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,67 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/). +## 2.82.0 - 2025-03-25 +### Added +- Support for pipelines in the OpenSearch service +- Support for uploading and downloading the model metadata artifacts in the Data Science service +- Support for model references via native API in the Data Science service +- Support for scheduling cross-region database backups in the HeatWave service +- Support for specifying backup retention days for manual cross-region backups in the HeatWave service +- Support for IPv6 addresses for dedicated infrastructure in the Database service +- Support for NewDev edition for the development community in the Database service +- Support for grouping sensitive types across the tenancies and reuse of groups in the discovery workflow in the Data Safe service +- Support for generating custom assessment reports in the Data Safe service +- Support for user quotas on file system resources in the File Storage service +- Support for long term retention backups in the Autonomous Recovery service +- Support for Cross Region Replication(CRR) in the PostgreSQL service +- Support for subscriptions and cluster placement groups on exascale infrastructure in the Database service +- Support for multiple standby databases for autonomous dataguard associations in the Database service +- Support for major version upgrade of clusters in the OpenSearch service +- Support for Customer Service Identifier(CSI) number in list assigned subscriptions response in the Organizations service +- Support for Managed Services for Mac service +- Support for scheduling customer-initiated backups in the GoldenGate service +- Support for GPU memory clusters and fabrics in the Compute service +- Support for agent platforms and Retrieval Augmented Generation (RAG) agents in the Generative AI Agent service +- Support for knowledge based metadata summaries in the Generative AI Agent service +- Support for create and update operations on onboard configurations in the Stack Monitoring service +- Support for automatic activation of the management agents on compute instance launch in the Stack Monitoring service +- Support for importing collectd resources in the Stack Monitoring service +- Support for updating the handler configurations for collected resources in Stack Monitoring service +- Support for monitored resource types based on source type and resource category in the Stack Monitoring service +- Support for adding tags in maintenance windows in the Stack Monitoring service +- Support for host API feature in the Compute service + +### Fixed +- Java 8 incompatibility introduced in the previous release: NoSuchMethodError for ByteBuffer.flip() + +### Breaking Changes +- Method public java.lang.String getOpcRetryToken() has been removed from com.oracle.bmc.tenantmanagercontrolplane.responses.CreateSubscriptionMappingResponse in the Organizations service +- Method public java.lang.Integer getMaxMemoryGB() has been removed from the model com.oracle.bmc.opensearch.model.CreateOpensearchClusterPipelineDetails in the OpenSearch service +- Method public java.lang.Integer getMaxOcpuCount() has been removed from the model com.oracle.bmc.opensearch.model.CreateOpensearchClusterPipelineDetails in the OpenSearch service +- Method public java.lang.Integer getMinMemoryGB() has been removed from the model com.oracle.bmc.opensearch.model.CreateOpensearchClusterPipelineDetails in the OpenSearch service +- Method public java.lang.Integer getMinOcpuCount() has been removed from the model com.oracle.bmc.opensearch.model.CreateOpensearchClusterPipelineDetails in the OpenSearch service +- Method public java.util.Map getSystemTags() has been removed from the model com.oracle.bmc.opensearch.model.CreateOpensearchClusterPipelineDetails in the OpenSearch service +- Method public java.lang.Integer getMaxMemoryGB() has been removed from the model com.oracle.bmc.opensearch.model.OpensearchClusterPipeline in the OpenSearch service +- Method public java.lang.Integer getMaxOcpuCount() has been removed from the model com.oracle.bmc.opensearch.model.OpensearchClusterPipeline in the OpenSearch service +- Method public java.lang.Integer getMinMemoryGB() has been removed from the model com.oracle.bmc.opensearch.model.OpensearchClusterPipeline in the OpenSearch service +- Method public java.lang.Integer getMinOcpuCount() has been removed from the model com.oracle.bmc.opensearch.model.OpensearchClusterPipeline in the OpenSearch service +- Method public java.lang.Integer getMaxMemoryGB() has been removed from the model com.oracle.bmc.opensearch.model.OpensearchClusterPipelineSummary in the OpenSearch service +- Method public java.lang.Integer getMaxOcpuCount() has been removed from the model com.oracle.bmc.opensearch.model.OpensearchClusterPipelineSummary in the OpenSearch service +- Method public java.lang.Integer getMinMemoryGB() has been removed from the model com.oracle.bmc.opensearch.model.OpensearchClusterPipelineSummary in the OpenSearch service +- Method public java.lang.Integer getMinOcpuCount() has been removed from the model com.oracle.bmc.opensearch.model.OpensearchClusterPipelineSummary in the OpenSearch service +- Class com.oracle.bmc.opensearch.model.OpensearchPipelineValidationResponse has been removed from the OpenSearch service +- Class com.oracle.bmc.opensearch.model.PipelineValidationErrorDetails has been removed from the OpenSearch service +- Method public java.lang.Integer getMaxMemoryGB() has been removed from the model com.oracle.bmc.opensearch.model.UpdateOpensearchClusterPipelineDetails in the OpenSearch service +- Method public java.lang.Integer getMaxOcpuCount() has been removed from the model com.oracle.bmc.opensearch.model.UpdateOpensearchClusterPipelineDetails in the OpenSearch service +- Method public java.lang.Integer getMinMemoryGB() has been removed from the model com.oracle.bmc.opensearch.model.UpdateOpensearchClusterPipelineDetails in the OpenSearch service +- Method public java.lang.Integer getMinOcpuCount() has been removed from the model com.oracle.bmc.opensearch.model.UpdateOpensearchClusterPipelineDetails in the OpenSearch service +- Class com.oracle.bmc.opensearch.model.ValidateOpensearchPipelineDetails has been removed from the OpenSearch service +- Method public java.lang.String getIpAnycastId() has been removed from the model com.oracle.bmc.core.model.CreateByoipRangeDetails in the Core service +- Method public java.lang.String getMonitorIp() has been removed from the model com.oracle.bmc.core.model.CreateByoipRangeDetails in the Core service +- Method public java.lang.String getIpAnycastId() has been removed from the model com.oracle.bmc.core.model.UpdateByoipRangeDetails in the Core service +- Method public java.lang.String getMonitorIp() has been removed from the model com.oracle.bmc.core.model.UpdateByoipRangeDetails in the Core service + ## 2.81.0 - 2025-02-25 ### Added - Support for backup retention locks on autonomous database create and update operations in the Database service diff --git a/bmc-accessgovernancecp/pom.xml b/bmc-accessgovernancecp/pom.xml index a19dfdc18e..18456411a5 100644 --- a/bmc-accessgovernancecp/pom.xml +++ b/bmc-accessgovernancecp/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-accessgovernancecp @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.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 f910c81759..2692e995d7 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.81.0 + 2.82.0 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-addons/bmc-graalvm-addon/pom.xml b/bmc-addons/bmc-graalvm-addon/pom.xml index e5277897ad..9f0a5f5790 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.81.0 + 2.82.0 ../pom.xml oci-java-sdk-addons-graalvm @@ -127,24 +127,24 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 com.oracle.oci.sdk oci-java-sdk-objectstorage-extensions - 2.81.0 + 2.82.0 test com.oracle.oci.sdk oci-java-sdk-identity - 2.81.0 + 2.82.0 test com.oracle.oci.sdk oci-java-sdk-core - 2.81.0 + 2.82.0 test diff --git a/bmc-addons/bmc-graalvm-addon/src/main/java/com/oracle/bmc/graalvm/BouncyCastleFeature.java b/bmc-addons/bmc-graalvm-addon/src/main/java/com/oracle/bmc/graalvm/BouncyCastleFeature.java deleted file mode 100644 index a699727876..0000000000 --- a/bmc-addons/bmc-graalvm-addon/src/main/java/com/oracle/bmc/graalvm/BouncyCastleFeature.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. - */ -package com.oracle.bmc.graalvm; - -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.graalvm.nativeimage.ImageSingletons; -import org.graalvm.nativeimage.hosted.Feature; -import org.graalvm.nativeimage.hosted.RuntimeClassInitialization; -import org.graalvm.nativeimage.impl.RuntimeClassInitializationSupport; - -import java.security.Security; - -/** - * Configures bouncy castle. - */ -final class BouncyCastleFeature implements Feature { - - @Override - public void afterRegistration(AfterRegistrationAccess access) { - RuntimeClassInitialization.initializeAtBuildTime("org.bouncycastle"); - RuntimeClassInitializationSupport classInitSupport = - ImageSingletons.lookup(RuntimeClassInitializationSupport.class); - classInitSupport.rerunInitialization( - "org.bouncycastle.jcajce.provider.drbg.DRBG$Default", - "Register the BouncyCastle provider at build time"); - classInitSupport.rerunInitialization( - "org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV", - "Register the BouncyCastle provider at build time"); - Security.addProvider(new BouncyCastleProvider()); - } -} 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 efa5649f59..d9f8188442 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 @@ -97,6 +97,7 @@ "com.oracle.bmc.marketplaceprivateoffer.SdkClientsMetadata", "com.oracle.bmc.marketplacepublisher.SdkClientsMetadata", "com.oracle.bmc.mediaservices.SdkClientsMetadata", + "com.oracle.bmc.mngdmac.SdkClientsMetadata", "com.oracle.bmc.monitoring.SdkClientsMetadata", "com.oracle.bmc.mysql.SdkClientsMetadata", "com.oracle.bmc.networkfirewall.SdkClientsMetadata", diff --git a/bmc-addons/bmc-oke-workload-identity/pom.xml b/bmc-addons/bmc-oke-workload-identity/pom.xml index 0a38ad8fe6..19b5afe00b 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.81.0 + 2.82.0 4.0.0 @@ -38,7 +38,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-addons/bmc-resteasy-client-configurator/pom.xml b/bmc-addons/bmc-resteasy-client-configurator/pom.xml index 2c43783332..707b8094f3 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.81.0 + 2.82.0 ../pom.xml @@ -25,7 +25,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-addons/bmc-sasl/pom.xml b/bmc-addons/bmc-sasl/pom.xml index 0a0b503d64..23a625e122 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.81.0 + 2.82.0 ../pom.xml @@ -62,7 +62,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-addons/pom.xml b/bmc-addons/pom.xml index 141ef07c69..c65f359be4 100644 --- a/bmc-addons/pom.xml +++ b/bmc-addons/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml diff --git a/bmc-adm/pom.xml b/bmc-adm/pom.xml index 1c6a8a42be..798a649e81 100644 --- a/bmc-adm/pom.xml +++ b/bmc-adm/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-adm @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-aianomalydetection/pom.xml b/bmc-aianomalydetection/pom.xml index 4f768fd58a..c614e38fdc 100644 --- a/bmc-aianomalydetection/pom.xml +++ b/bmc-aianomalydetection/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-aianomalydetection @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-aidocument/pom.xml b/bmc-aidocument/pom.xml index 913d9a281e..f653755f81 100644 --- a/bmc-aidocument/pom.xml +++ b/bmc-aidocument/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-aidocument @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-ailanguage/pom.xml b/bmc-ailanguage/pom.xml index c186fd231b..1f212a636d 100644 --- a/bmc-ailanguage/pom.xml +++ b/bmc-ailanguage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-ailanguage @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-aispeech/pom.xml b/bmc-aispeech/pom.xml index 1f9a034619..8432c3628c 100644 --- a/bmc-aispeech/pom.xml +++ b/bmc-aispeech/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-aispeech @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-aivision/pom.xml b/bmc-aivision/pom.xml index 43b0d5e02c..d9053c3cb6 100644 --- a/bmc-aivision/pom.xml +++ b/bmc-aivision/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-aivision @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-analytics/pom.xml b/bmc-analytics/pom.xml index 521ff17183..b42fbe52eb 100644 --- a/bmc-analytics/pom.xml +++ b/bmc-analytics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-analytics @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-announcementsservice/pom.xml b/bmc-announcementsservice/pom.xml index e993989ad3..f01ff5db10 100644 --- a/bmc-announcementsservice/pom.xml +++ b/bmc-announcementsservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-announcementsservice @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-apigateway/pom.xml b/bmc-apigateway/pom.xml index c398cad9a2..ad616af551 100644 --- a/bmc-apigateway/pom.xml +++ b/bmc-apigateway/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-apigateway @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-apmconfig/pom.xml b/bmc-apmconfig/pom.xml index 7d29c4b2e0..2306ba00b4 100644 --- a/bmc-apmconfig/pom.xml +++ b/bmc-apmconfig/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-apmconfig @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-apmcontrolplane/pom.xml b/bmc-apmcontrolplane/pom.xml index fd311ba3ad..b135abfa24 100644 --- a/bmc-apmcontrolplane/pom.xml +++ b/bmc-apmcontrolplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-apmcontrolplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-apmsynthetics/pom.xml b/bmc-apmsynthetics/pom.xml index 0f4b27c56a..275306b098 100644 --- a/bmc-apmsynthetics/pom.xml +++ b/bmc-apmsynthetics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-apmsynthetics @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSynthetic.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSynthetic.java index 7b852b4fcc..8ceab666a4 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSynthetic.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSynthetic.java @@ -8,7 +8,7 @@ import com.oracle.bmc.apmsynthetics.responses.*; /** - * Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see [Application Performance Monitoring](https://docs.oracle.com/iaas/application-performance-monitoring/index.html). + * Use the APM Availability Monitoring API to query Scripts, Monitors, Dedicated Vantage Points and On-Premise Vantage Points resources. For more information, see [Application Performance Monitoring](https://docs.oracle.com/iaas/application-performance-monitoring/index.html). * 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: 20200630") diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSyntheticAsync.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSyntheticAsync.java index 6980c90b51..85c0ccc7af 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSyntheticAsync.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSyntheticAsync.java @@ -8,7 +8,7 @@ import com.oracle.bmc.apmsynthetics.responses.*; /** - * Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see [Application Performance Monitoring](https://docs.oracle.com/iaas/application-performance-monitoring/index.html). + * Use the APM Availability Monitoring API to query Scripts, Monitors, Dedicated Vantage Points and On-Premise Vantage Points resources. For more information, see [Application Performance Monitoring](https://docs.oracle.com/iaas/application-performance-monitoring/index.html). */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") public interface ApmSyntheticAsync extends AutoCloseable { diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSyntheticAsyncClient.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSyntheticAsyncClient.java index c94b7f6a96..619a7dc06c 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSyntheticAsyncClient.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSyntheticAsyncClient.java @@ -472,10 +472,7 @@ public java.util.concurrent.Future aggregateNetwor com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "AggregateNetworkData", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/AggregatedNetworkDataResult/AggregateNetworkData"); + "ApmSynthetic", "AggregateNetworkData", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = AggregateNetworkDataConverter.fromResponse( @@ -530,7 +527,7 @@ protected void beforeRetryAction() {} "ApmSynthetic", "CreateDedicatedVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/DedicatedVantagePoint/CreateDedicatedVantagePoint"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, CreateDedicatedVantagePointResponse> transformer = @@ -581,10 +578,7 @@ public java.util.concurrent.Future createMonitor( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "CreateMonitor", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Monitor/CreateMonitor"); + "ApmSynthetic", "CreateMonitor", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = CreateMonitorConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -637,7 +631,7 @@ protected void beforeRetryAction() {} "ApmSynthetic", "CreateOnPremiseVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/OnPremiseVantagePoint/CreateOnPremiseVantagePoint"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, CreateOnPremiseVantagePointResponse> transformer = @@ -688,10 +682,7 @@ public java.util.concurrent.Future createScript( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "CreateScript", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Script/CreateScript"); + "ApmSynthetic", "CreateScript", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = CreateScriptConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -738,10 +729,7 @@ public java.util.concurrent.Future createWorker( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "CreateWorker", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Worker/CreateWorker"); + "ApmSynthetic", "CreateWorker", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = CreateWorkerConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -793,7 +781,7 @@ protected void beforeRetryAction() {} "ApmSynthetic", "DeleteDedicatedVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/DedicatedVantagePoint/DeleteDedicatedVantagePoint"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, DeleteDedicatedVantagePointResponse> transformer = @@ -838,10 +826,7 @@ public java.util.concurrent.Future deleteMonitor( DeleteMonitorConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "DeleteMonitor", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Monitor/DeleteMonitor"); + "ApmSynthetic", "DeleteMonitor", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = DeleteMonitorConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -888,7 +873,7 @@ protected void beforeRetryAction() {} "ApmSynthetic", "DeleteOnPremiseVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/OnPremiseVantagePoint/DeleteOnPremiseVantagePoint"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, DeleteOnPremiseVantagePointResponse> transformer = @@ -933,10 +918,7 @@ public java.util.concurrent.Future deleteScript( DeleteScriptConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "DeleteScript", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Script/DeleteScript"); + "ApmSynthetic", "DeleteScript", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = DeleteScriptConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -977,10 +959,7 @@ public java.util.concurrent.Future deleteWorker( DeleteWorkerConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "DeleteWorker", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Worker/DeleteWorker"); + "ApmSynthetic", "DeleteWorker", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = DeleteWorkerConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1025,7 +1004,7 @@ public java.util.concurrent.Future getDedicate "ApmSynthetic", "GetDedicatedVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/DedicatedVantagePoint/GetDedicatedVantagePoint"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, GetDedicatedVantagePointResponse> transformer = @@ -1068,10 +1047,7 @@ public java.util.concurrent.Future getMonitor( GetMonitorConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "GetMonitor", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Monitor/GetMonitor"); + "ApmSynthetic", "GetMonitor", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetMonitorConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1113,10 +1089,7 @@ public java.util.concurrent.Future getMonitorResult( GetMonitorResultConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "GetMonitorResult", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/MonitorResult/GetMonitorResult"); + "ApmSynthetic", "GetMonitorResult", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetMonitorResultConverter.fromResponse( @@ -1162,7 +1135,7 @@ public java.util.concurrent.Future getOnPremis "ApmSynthetic", "GetOnPremiseVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/OnPremiseVantagePoint/GetOnPremiseVantagePoint"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, GetOnPremiseVantagePointResponse> transformer = @@ -1205,10 +1178,7 @@ public java.util.concurrent.Future getScript( GetScriptConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "GetScript", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Script/GetScript"); + "ApmSynthetic", "GetScript", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetScriptConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1247,10 +1217,7 @@ public java.util.concurrent.Future getWorker( GetWorkerConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "GetWorker", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Worker/GetWorker"); + "ApmSynthetic", "GetWorker", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetWorkerConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1296,7 +1263,7 @@ protected void beforeRetryAction() {} "ApmSynthetic", "ListDedicatedVantagePoints", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/DedicatedVantagePointCollection/ListDedicatedVantagePoints"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, ListDedicatedVantagePointsResponse> transformer = @@ -1341,10 +1308,7 @@ public java.util.concurrent.Future listMonitors( ListMonitorsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "ListMonitors", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/MonitorCollection/ListMonitors"); + "ApmSynthetic", "ListMonitors", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListMonitorsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1391,7 +1355,7 @@ protected void beforeRetryAction() {} "ApmSynthetic", "ListOnPremiseVantagePoints", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/OnPremiseVantagePointCollection/ListOnPremiseVantagePoints"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, ListOnPremiseVantagePointsResponse> transformer = @@ -1440,7 +1404,7 @@ public java.util.concurrent.Future listPublicVa "ApmSynthetic", "ListPublicVantagePoints", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/PublicVantagePointCollection/ListPublicVantagePoints"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, ListPublicVantagePointsResponse> transformer = @@ -1484,10 +1448,7 @@ public java.util.concurrent.Future listScripts( ListScriptsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "ListScripts", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/ScriptCollection/ListScripts"); + "ApmSynthetic", "ListScripts", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListScriptsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1528,10 +1489,7 @@ public java.util.concurrent.Future listWorkers( ListWorkersConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "ListWorkers", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/WorkerCollection/ListWorkers"); + "ApmSynthetic", "ListWorkers", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListWorkersConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1578,7 +1536,7 @@ protected void beforeRetryAction() {} "ApmSynthetic", "UpdateDedicatedVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/DedicatedVantagePoint/UpdateDedicatedVantagePoint"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, UpdateDedicatedVantagePointResponse> transformer = @@ -1628,10 +1586,7 @@ public java.util.concurrent.Future updateMonitor( UpdateMonitorConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "UpdateMonitor", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Monitor/UpdateMonitor"); + "ApmSynthetic", "UpdateMonitor", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = UpdateMonitorConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1683,7 +1638,7 @@ protected void beforeRetryAction() {} "ApmSynthetic", "UpdateOnPremiseVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/OnPremiseVantagePoint/UpdateOnPremiseVantagePoint"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, UpdateOnPremiseVantagePointResponse> transformer = @@ -1733,10 +1688,7 @@ public java.util.concurrent.Future updateScript( UpdateScriptConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "UpdateScript", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Script/UpdateScript"); + "ApmSynthetic", "UpdateScript", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = UpdateScriptConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1782,10 +1734,7 @@ public java.util.concurrent.Future updateWorker( UpdateWorkerConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "UpdateWorker", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Worker/UpdateWorker"); + "ApmSynthetic", "UpdateWorker", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = UpdateWorkerConverter.fromResponse(java.util.Optional.of(serviceDetails)); diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSyntheticClient.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSyntheticClient.java index 213fa29662..025334deb1 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSyntheticClient.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/ApmSyntheticClient.java @@ -489,10 +489,7 @@ public AggregateNetworkDataResponse aggregateNetworkData(AggregateNetworkDataReq com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "AggregateNetworkData", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/AggregatedNetworkDataResult/AggregateNetworkData"); + "ApmSynthetic", "AggregateNetworkData", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = AggregateNetworkDataConverter.fromResponse( @@ -535,7 +532,7 @@ public CreateDedicatedVantagePointResponse createDedicatedVantagePoint( "ApmSynthetic", "CreateDedicatedVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/DedicatedVantagePoint/CreateDedicatedVantagePoint"); + ""); java.util.function.Function transformer = CreateDedicatedVantagePointConverter.fromResponse( @@ -575,10 +572,7 @@ public CreateMonitorResponse createMonitor(CreateMonitorRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "CreateMonitor", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Monitor/CreateMonitor"); + "ApmSynthetic", "CreateMonitor", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = CreateMonitorConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -619,7 +613,7 @@ public CreateOnPremiseVantagePointResponse createOnPremiseVantagePoint( "ApmSynthetic", "CreateOnPremiseVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/OnPremiseVantagePoint/CreateOnPremiseVantagePoint"); + ""); java.util.function.Function transformer = CreateOnPremiseVantagePointConverter.fromResponse( @@ -659,10 +653,7 @@ public CreateScriptResponse createScript(CreateScriptRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "CreateScript", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Script/CreateScript"); + "ApmSynthetic", "CreateScript", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = CreateScriptConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -699,10 +690,7 @@ public CreateWorkerResponse createWorker(CreateWorkerRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "CreateWorker", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Worker/CreateWorker"); + "ApmSynthetic", "CreateWorker", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = CreateWorkerConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -742,7 +730,7 @@ public DeleteDedicatedVantagePointResponse deleteDedicatedVantagePoint( "ApmSynthetic", "DeleteDedicatedVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/DedicatedVantagePoint/DeleteDedicatedVantagePoint"); + ""); java.util.function.Function transformer = DeleteDedicatedVantagePointConverter.fromResponse( @@ -777,10 +765,7 @@ public DeleteMonitorResponse deleteMonitor(DeleteMonitorRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "DeleteMonitor", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Monitor/DeleteMonitor"); + "ApmSynthetic", "DeleteMonitor", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = DeleteMonitorConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -817,7 +802,7 @@ public DeleteOnPremiseVantagePointResponse deleteOnPremiseVantagePoint( "ApmSynthetic", "DeleteOnPremiseVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/OnPremiseVantagePoint/DeleteOnPremiseVantagePoint"); + ""); java.util.function.Function transformer = DeleteOnPremiseVantagePointConverter.fromResponse( @@ -852,10 +837,7 @@ public DeleteScriptResponse deleteScript(DeleteScriptRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "DeleteScript", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Script/DeleteScript"); + "ApmSynthetic", "DeleteScript", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = DeleteScriptConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -888,10 +870,7 @@ public DeleteWorkerResponse deleteWorker(DeleteWorkerRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "DeleteWorker", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Worker/DeleteWorker"); + "ApmSynthetic", "DeleteWorker", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = DeleteWorkerConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -928,7 +907,7 @@ public GetDedicatedVantagePointResponse getDedicatedVantagePoint( "ApmSynthetic", "GetDedicatedVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/DedicatedVantagePoint/GetDedicatedVantagePoint"); + ""); java.util.function.Function transformer = GetDedicatedVantagePointConverter.fromResponse( @@ -961,10 +940,7 @@ public GetMonitorResponse getMonitor(GetMonitorRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "GetMonitor", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Monitor/GetMonitor"); + "ApmSynthetic", "GetMonitor", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetMonitorConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -996,10 +972,7 @@ public GetMonitorResultResponse getMonitorResult(GetMonitorResultRequest request com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "GetMonitorResult", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/MonitorResult/GetMonitorResult"); + "ApmSynthetic", "GetMonitorResult", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetMonitorResultConverter.fromResponse( @@ -1037,7 +1010,7 @@ public GetOnPremiseVantagePointResponse getOnPremiseVantagePoint( "ApmSynthetic", "GetOnPremiseVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/OnPremiseVantagePoint/GetOnPremiseVantagePoint"); + ""); java.util.function.Function transformer = GetOnPremiseVantagePointConverter.fromResponse( @@ -1070,10 +1043,7 @@ public GetScriptResponse getScript(GetScriptRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "GetScript", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Script/GetScript"); + "ApmSynthetic", "GetScript", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetScriptConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1104,10 +1074,7 @@ public GetWorkerResponse getWorker(GetWorkerRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "GetWorker", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Worker/GetWorker"); + "ApmSynthetic", "GetWorker", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetWorkerConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1143,7 +1110,7 @@ public ListDedicatedVantagePointsResponse listDedicatedVantagePoints( "ApmSynthetic", "ListDedicatedVantagePoints", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/DedicatedVantagePointCollection/ListDedicatedVantagePoints"); + ""); java.util.function.Function transformer = ListDedicatedVantagePointsConverter.fromResponse( @@ -1177,10 +1144,7 @@ public ListMonitorsResponse listMonitors(ListMonitorsRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "ListMonitors", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/MonitorCollection/ListMonitors"); + "ApmSynthetic", "ListMonitors", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListMonitorsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1216,7 +1180,7 @@ public ListOnPremiseVantagePointsResponse listOnPremiseVantagePoints( "ApmSynthetic", "ListOnPremiseVantagePoints", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/OnPremiseVantagePointCollection/ListOnPremiseVantagePoints"); + ""); java.util.function.Function transformer = ListOnPremiseVantagePointsConverter.fromResponse( @@ -1254,7 +1218,7 @@ public ListPublicVantagePointsResponse listPublicVantagePoints( "ApmSynthetic", "ListPublicVantagePoints", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/PublicVantagePointCollection/ListPublicVantagePoints"); + ""); java.util.function.Function transformer = ListPublicVantagePointsConverter.fromResponse( @@ -1288,10 +1252,7 @@ public ListScriptsResponse listScripts(ListScriptsRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "ListScripts", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/ScriptCollection/ListScripts"); + "ApmSynthetic", "ListScripts", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListScriptsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1323,10 +1284,7 @@ public ListWorkersResponse listWorkers(ListWorkersRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "ListWorkers", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/WorkerCollection/ListWorkers"); + "ApmSynthetic", "ListWorkers", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListWorkersConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1362,7 +1320,7 @@ public UpdateDedicatedVantagePointResponse updateDedicatedVantagePoint( "ApmSynthetic", "UpdateDedicatedVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/DedicatedVantagePoint/UpdateDedicatedVantagePoint"); + ""); java.util.function.Function transformer = UpdateDedicatedVantagePointConverter.fromResponse( @@ -1401,10 +1359,7 @@ public UpdateMonitorResponse updateMonitor(UpdateMonitorRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "UpdateMonitor", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Monitor/UpdateMonitor"); + "ApmSynthetic", "UpdateMonitor", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = UpdateMonitorConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1444,7 +1399,7 @@ public UpdateOnPremiseVantagePointResponse updateOnPremiseVantagePoint( "ApmSynthetic", "UpdateOnPremiseVantagePoint", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/OnPremiseVantagePoint/UpdateOnPremiseVantagePoint"); + ""); java.util.function.Function transformer = UpdateOnPremiseVantagePointConverter.fromResponse( @@ -1483,10 +1438,7 @@ public UpdateScriptResponse updateScript(UpdateScriptRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "UpdateScript", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Script/UpdateScript"); + "ApmSynthetic", "UpdateScript", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = UpdateScriptConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1522,10 +1474,7 @@ public UpdateWorkerResponse updateWorker(UpdateWorkerRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ApmSynthetic", - "UpdateWorker", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/20200630/Worker/UpdateWorker"); + "ApmSynthetic", "UpdateWorker", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = UpdateWorkerConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpMonitorConfiguration.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpMonitorConfiguration.java index 08a0f4a81d..1a707bb10f 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpMonitorConfiguration.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpMonitorConfiguration.java @@ -77,13 +77,13 @@ public Builder ftpRequestType(FtpRequestType ftpRequestType) { return this; } /** - * If enabled, Active mode will be used for the FTP connection. + * If enabled, Active mode will be used for the FTP connection. Not supported for SFTP protocol. **/ @com.fasterxml.jackson.annotation.JsonProperty("isActiveMode") private Boolean isActiveMode; /** - * If enabled, Active mode will be used for the FTP connection. + * If enabled, Active mode will be used for the FTP connection. Not supported for SFTP protocol. * @param isActiveMode the value to set * @return this builder **/ @@ -307,13 +307,13 @@ public FtpRequestType getFtpRequestType() { } /** - * If enabled, Active mode will be used for the FTP connection. + * If enabled, Active mode will be used for the FTP connection. Not supported for SFTP protocol. **/ @com.fasterxml.jackson.annotation.JsonProperty("isActiveMode") private final Boolean isActiveMode; /** - * If enabled, Active mode will be used for the FTP connection. + * If enabled, Active mode will be used for the FTP connection. Not supported for SFTP protocol. * @return the value **/ public Boolean getIsActiveMode() { diff --git a/bmc-apmtraces/pom.xml b/bmc-apmtraces/pom.xml index 22d106ccc6..634ab263e0 100644 --- a/bmc-apmtraces/pom.xml +++ b/bmc-apmtraces/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-apmtraces @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-appmgmtcontrol/pom.xml b/bmc-appmgmtcontrol/pom.xml index 6f7eef6722..633dcf1101 100644 --- a/bmc-appmgmtcontrol/pom.xml +++ b/bmc-appmgmtcontrol/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-appmgmtcontrol @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-artifacts/pom.xml b/bmc-artifacts/pom.xml index 46b66a9dc9..5cb14ba244 100644 --- a/bmc-artifacts/pom.xml +++ b/bmc-artifacts/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-artifacts @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-audit/pom.xml b/bmc-audit/pom.xml index 0bcb4d5ee9..9246193580 100644 --- a/bmc-audit/pom.xml +++ b/bmc-audit/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-autoscaling/pom.xml b/bmc-autoscaling/pom.xml index 77b047e8ab..fd9040cd9a 100644 --- a/bmc-autoscaling/pom.xml +++ b/bmc-autoscaling/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-autoscaling @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-bastion/pom.xml b/bmc-bastion/pom.xml index 7f728d78e7..6efb2b5807 100644 --- a/bmc-bastion/pom.xml +++ b/bmc-bastion/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-bastion @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-bds/pom.xml b/bmc-bds/pom.xml index 83d467a9d3..43ea8b8c88 100644 --- a/bmc-bds/pom.xml +++ b/bmc-bds/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-bds @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-blockchain/pom.xml b/bmc-blockchain/pom.xml index 20077bebbd..ea63b7c035 100644 --- a/bmc-blockchain/pom.xml +++ b/bmc-blockchain/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-blockchain @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-bom/pom.xml b/bmc-bom/pom.xml index 9ce76bd4fc..3531bf0047 100644 --- a/bmc-bom/pom.xml +++ b/bmc-bom/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-bom @@ -19,947 +19,965 @@ com.oracle.oci.sdk oci-java-sdk-circuitbreaker - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-enforcer-rules - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-shaded-full - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-audit - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-containerengine - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-core - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-database - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-dns - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-email - 2.81.0 + 2.82.0 + false + + + com.oracle.oci.sdk + oci-java-sdk-objectstorage-generated + 2.82.0 + false + + + com.oracle.oci.sdk + oci-java-sdk-objectstorage-extensions + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-filestorage - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-identity - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-loadbalancer - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-objectstorage - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-addons-resteasy-client-configurator - 2.81.0 + 2.82.0 com.oracle.oci.sdk oci-java-sdk-addons-sasl - 2.81.0 + 2.82.0 com.oracle.oci.sdk oci-java-sdk-addons-oke-workload-identity - 2.81.0 + 2.82.0 com.oracle.oci.sdk oci-java-sdk-addons-graalvm - 2.81.0 + 2.82.0 com.oracle.oci.sdk oci-java-sdk-resourcesearch - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-addons-apache - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-keymanagement - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-announcementsservice - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-healthchecks - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-waas - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-streaming - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-resourcemanager - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-monitoring - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-ons - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-autoscaling - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-budget - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-workrequests - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-limits - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-functions - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-events - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-dts - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-oce - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-oda - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-analytics - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-integration - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-osmanagement - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-marketplace - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-apigateway - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-datacatalog - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-dataflow - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-datascience - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-nosql - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-secrets - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-vault - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-bds - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-encryption - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-cims - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-datasafe - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-mysql - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-dataintegration - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-ocvp - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-usageapi - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-blockchain - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-loggingingestion - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-logging - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-loganalytics - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-managementdashboard - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-sch - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-loggingsearch - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-managementagent - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-cloudguard - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-opsi - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-computeinstanceagent - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-optimizer - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-tenantmanagercontrolplane - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-rover - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-databasemanagement - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-artifacts - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-apmsynthetics - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-goldengate - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-apmcontrolplane - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-apmtraces - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-networkloadbalancer - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-vulnerabilityscanning - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-databasemigration - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-servicecatalog - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-ailanguage - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-operatoraccesscontrol - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-bastion - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-genericartifactscontent - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-jms - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-devops - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-aianomalydetection - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-datalabelingservice - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-datalabelingservicedataplane - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-apmconfig - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-waf - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-certificates - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-certificatesmanagement - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-usage - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-databasetools - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-servicemanagerproxy - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-appmgmtcontrol - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-ospgateway - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-identitydataplane - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-visualbuilder - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-osubusage - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-osubsubscription - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-osuborganizationsubscription - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-osubbillingschedule - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-dashboardservice - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-threatintelligence - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-aivision - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-aispeech - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-stackmonitoring - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-servicemesh - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-adm - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-licensemanager - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-onesubscription - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-governancerulescontrolplane - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-waa - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-networkfirewall - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-vnmonitoring - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-emwarehouse - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-lockbox - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-fusionapps - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-mediaservices - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-opa - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-opensearch - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-cloudmigrations - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-cloudbridge - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-disasterrecovery - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-containerinstances - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-aidocument - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-queue - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-recovery - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-vbsinst - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-identitydomains - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-accessgovernancecp - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-ocicontrolcenter - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-osmanagementhub - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-fleetsoftwareupdate - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-computecloudatcustomer - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-marketplacepublisher - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-redis - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-jmsjavadownloads - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-psql - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-generativeai - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-generativeaiinference - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-capacitymanagement - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-globallydistributeddatabase - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-desktops - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-emaildataplane - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-clusterplacementgroups - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-marketplaceprivateoffer - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-resourcescheduler - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-demandsignal - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-fleetappsmanagement - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-delegateaccesscontrol - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-generativeaiagent - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-generativeaiagentruntime - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-securityattribute - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-zpr - 2.81.0 + 2.82.0 false com.oracle.oci.sdk oci-java-sdk-dblm - 2.81.0 + 2.82.0 + false + + + com.oracle.oci.sdk + oci-java-sdk-mngdmac + 2.82.0 false diff --git a/bmc-budget/pom.xml b/bmc-budget/pom.xml index 8ad104ad83..96d78bddb0 100644 --- a/bmc-budget/pom.xml +++ b/bmc-budget/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-budget @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-capacitymanagement/pom.xml b/bmc-capacitymanagement/pom.xml index 9aa5332d57..3bda74dcbd 100644 --- a/bmc-capacitymanagement/pom.xml +++ b/bmc-capacitymanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-capacitymanagement @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-certificates/pom.xml b/bmc-certificates/pom.xml index 8fb8f73791..b78e27acf0 100644 --- a/bmc-certificates/pom.xml +++ b/bmc-certificates/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-certificates @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-certificatesmanagement/pom.xml b/bmc-certificatesmanagement/pom.xml index 4a42919c56..b9b9b03cff 100644 --- a/bmc-certificatesmanagement/pom.xml +++ b/bmc-certificatesmanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-certificatesmanagement @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-cims/pom.xml b/bmc-cims/pom.xml index c9e6e4239f..6172b1f693 100644 --- a/bmc-cims/pom.xml +++ b/bmc-cims/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-cims @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-circuitbreaker/pom.xml b/bmc-circuitbreaker/pom.xml index 9ab3ee5c53..5e21514c6b 100644 --- a/bmc-circuitbreaker/pom.xml +++ b/bmc-circuitbreaker/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-circuitbreaker diff --git a/bmc-cloudbridge/pom.xml b/bmc-cloudbridge/pom.xml index 8f2d614aa2..8ba23bfe62 100644 --- a/bmc-cloudbridge/pom.xml +++ b/bmc-cloudbridge/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-cloudbridge @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-cloudguard/pom.xml b/bmc-cloudguard/pom.xml index a062631307..95b47711e1 100644 --- a/bmc-cloudguard/pom.xml +++ b/bmc-cloudguard/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-cloudguard @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-cloudmigrations/pom.xml b/bmc-cloudmigrations/pom.xml index 0d2b22d1e6..7390f58356 100644 --- a/bmc-cloudmigrations/pom.xml +++ b/bmc-cloudmigrations/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-cloudmigrations @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-clusterplacementgroups/pom.xml b/bmc-clusterplacementgroups/pom.xml index 29fbbfacdd..eb9bb9f212 100644 --- a/bmc-clusterplacementgroups/pom.xml +++ b/bmc-clusterplacementgroups/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-clusterplacementgroups @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-common/pom.xml b/bmc-common/pom.xml index fd54bf4604..6d069ad49d 100644 --- a/bmc-common/pom.xml +++ b/bmc-common/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml @@ -92,7 +92,7 @@ com.oracle.oci.sdk oci-java-sdk-circuitbreaker - 2.81.0 + 2.82.0 diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/signing/pki/Utf8.java b/bmc-common/src/main/java/com/oracle/bmc/http/signing/pki/Utf8.java index 239f06b74b..b1ae6ddb5e 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/signing/pki/Utf8.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/signing/pki/Utf8.java @@ -8,6 +8,7 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.nio.CharBuffer; +import java.nio.Buffer; import java.nio.channels.Channels; import java.nio.channels.ReadableByteChannel; import java.nio.channels.WritableByteChannel; @@ -51,11 +52,15 @@ static Utf8 of(ReadableByteChannel content) throws IOException { if (bytesRead == -1) { break; // End of stream } - buffer.flip(); + // cast is necessary to avoid NoSuchMethodError in Java 8 + // see https://stackoverflow.com/questions/48693695/java-nio-buffer-not-loading-clear-method-on-runtime + ((Buffer) buffer).flip(); while (buffer.hasRemaining()) { sink.write(buffer); // Write to the sink channel } - buffer.clear(); + // cast is necessary to avoid NoSuchMethodError in Java 8 + // see https://stackoverflow.com/questions/48693695/java-nio-buffer-not-loading-clear-method-on-runtime + ((Buffer) buffer).clear(); } } catch (IOException e) { throw new RuntimeException( @@ -66,7 +71,9 @@ static Utf8 of(ReadableByteChannel content) throws IOException { // Wait for the task to complete readTask.join(); - buffer.flip(); + // cast is necessary to avoid NoSuchMethodError in Java 8 + // see https://stackoverflow.com/questions/48693695/java-nio-buffer-not-loading-clear-method-on-runtime + ((Buffer) buffer).flip(); while (buffer.hasRemaining()) { sink.write(buffer); } @@ -248,7 +255,9 @@ private CharBuffer copyOf(CharBuffer existing) { final CharBuffer copy = CharBuffer.allocate(existing.remaining()); final CharBuffer temp = existing.asReadOnlyBuffer(); copy.put(temp); - copy.flip(); + // cast is necessary to avoid NoSuchMethodError in Java 8 + // see https://stackoverflow.com/questions/48693695/java-nio-buffer-not-loading-clear-method-on-runtime + ((Buffer) copy).flip(); return copy; } @@ -266,7 +275,9 @@ public Utf8 removeWhitespace() { modified.put(c); } } - modified.flip(); + // cast is necessary to avoid NoSuchMethodError in Java 8 + // see https://stackoverflow.com/questions/48693695/java-nio-buffer-not-loading-clear-method-on-runtime + ((Buffer) modified).flip(); return new Chars(modified); } diff --git a/bmc-common/src/test/java/com/oracle/bmc/http/signing/pki/Utf8Test.java b/bmc-common/src/test/java/com/oracle/bmc/http/signing/pki/Utf8Test.java index d4eefca19e..e316929b29 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/http/signing/pki/Utf8Test.java +++ b/bmc-common/src/test/java/com/oracle/bmc/http/signing/pki/Utf8Test.java @@ -6,6 +6,11 @@ import org.junit.Test; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; + import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -42,4 +47,12 @@ public void testRemoveWhitespace() { final Utf8 actual = utf8.removeWhitespace(); assertEquals("HelloWorldAgain", Text.of(actual)); } + + @Test + public void testWithChannel() throws IOException { + ReadableByteChannel channel = + Channels.newChannel(new ByteArrayInputStream("Hello world!".getBytes())); + Utf8 utf8 = Utf8.of(channel); + assertEquals("Hello world!", Text.of(utf8)); + } } diff --git a/bmc-computecloudatcustomer/pom.xml b/bmc-computecloudatcustomer/pom.xml index 87227ab834..f86d106514 100644 --- a/bmc-computecloudatcustomer/pom.xml +++ b/bmc-computecloudatcustomer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-computecloudatcustomer @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-computeinstanceagent/pom.xml b/bmc-computeinstanceagent/pom.xml index d736406636..326c175576 100644 --- a/bmc-computeinstanceagent/pom.xml +++ b/bmc-computeinstanceagent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-computeinstanceagent @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-containerengine/pom.xml b/bmc-containerengine/pom.xml index 7631f9d84f..42a7d5c960 100644 --- a/bmc-containerengine/pom.xml +++ b/bmc-containerengine/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-containerinstances/pom.xml b/bmc-containerinstances/pom.xml index eb0baab63b..80cf371a7e 100644 --- a/bmc-containerinstances/pom.xml +++ b/bmc-containerinstances/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-containerinstances @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-containerinstances/src/main/java/com/oracle/bmc/containerinstances/model/ContainerCommandHealthCheck.java b/bmc-containerinstances/src/main/java/com/oracle/bmc/containerinstances/model/ContainerCommandHealthCheck.java deleted file mode 100644 index 06df5bb9ac..0000000000 --- a/bmc-containerinstances/src/main/java/com/oracle/bmc/containerinstances/model/ContainerCommandHealthCheck.java +++ /dev/null @@ -1,278 +0,0 @@ -/** - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. - */ -package com.oracle.bmc.containerinstances.model; - -/** - * Container Health Check with command type. - *
- * 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: 20210415") -@com.fasterxml.jackson.databind.annotation.JsonDeserialize( - builder = ContainerCommandHealthCheck.Builder.class -) -@com.fasterxml.jackson.annotation.JsonTypeInfo( - use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, - include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, - property = "healthCheckType" -) -@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) -public final class ContainerCommandHealthCheck extends ContainerHealthCheck { - @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("initialDelayInSeconds") - private Integer initialDelayInSeconds; - - public Builder initialDelayInSeconds(Integer initialDelayInSeconds) { - this.initialDelayInSeconds = initialDelayInSeconds; - this.__explicitlySet__.add("initialDelayInSeconds"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonProperty("intervalInSeconds") - private Integer intervalInSeconds; - - public Builder intervalInSeconds(Integer intervalInSeconds) { - this.intervalInSeconds = intervalInSeconds; - this.__explicitlySet__.add("intervalInSeconds"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonProperty("failureThreshold") - private Integer failureThreshold; - - public Builder failureThreshold(Integer failureThreshold) { - this.failureThreshold = failureThreshold; - this.__explicitlySet__.add("failureThreshold"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonProperty("successThreshold") - private Integer successThreshold; - - public Builder successThreshold(Integer successThreshold) { - this.successThreshold = successThreshold; - this.__explicitlySet__.add("successThreshold"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonProperty("timeoutInSeconds") - private Integer timeoutInSeconds; - - public Builder timeoutInSeconds(Integer timeoutInSeconds) { - this.timeoutInSeconds = timeoutInSeconds; - this.__explicitlySet__.add("timeoutInSeconds"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonProperty("status") - private Status status; - - public Builder status(Status status) { - this.status = status; - this.__explicitlySet__.add("status"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonProperty("statusDetails") - private String statusDetails; - - public Builder statusDetails(String statusDetails) { - this.statusDetails = statusDetails; - this.__explicitlySet__.add("statusDetails"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonProperty("failureAction") - private ContainerHealthCheckFailureAction failureAction; - - public Builder failureAction(ContainerHealthCheckFailureAction failureAction) { - this.failureAction = failureAction; - this.__explicitlySet__.add("failureAction"); - return this; - } - /** - * The list of strings that will be simplified to a single command for checking the status of the container. - * - **/ - @com.fasterxml.jackson.annotation.JsonProperty("command") - private java.util.List command; - - /** - * The list of strings that will be simplified to a single command for checking the status of the container. - * - * @param command the value to set - * @return this builder - **/ - public Builder command(java.util.List command) { - this.command = command; - this.__explicitlySet__.add("command"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonIgnore - private final java.util.Set __explicitlySet__ = new java.util.HashSet(); - - public ContainerCommandHealthCheck build() { - ContainerCommandHealthCheck model = - new ContainerCommandHealthCheck( - this.name, - this.initialDelayInSeconds, - this.intervalInSeconds, - this.failureThreshold, - this.successThreshold, - this.timeoutInSeconds, - this.status, - this.statusDetails, - this.failureAction, - this.command); - for (String explicitlySetProperty : this.__explicitlySet__) { - model.markPropertyAsExplicitlySet(explicitlySetProperty); - } - return model; - } - - @com.fasterxml.jackson.annotation.JsonIgnore - public Builder copy(ContainerCommandHealthCheck model) { - if (model.wasPropertyExplicitlySet("name")) { - this.name(model.getName()); - } - if (model.wasPropertyExplicitlySet("initialDelayInSeconds")) { - this.initialDelayInSeconds(model.getInitialDelayInSeconds()); - } - if (model.wasPropertyExplicitlySet("intervalInSeconds")) { - this.intervalInSeconds(model.getIntervalInSeconds()); - } - if (model.wasPropertyExplicitlySet("failureThreshold")) { - this.failureThreshold(model.getFailureThreshold()); - } - if (model.wasPropertyExplicitlySet("successThreshold")) { - this.successThreshold(model.getSuccessThreshold()); - } - if (model.wasPropertyExplicitlySet("timeoutInSeconds")) { - this.timeoutInSeconds(model.getTimeoutInSeconds()); - } - if (model.wasPropertyExplicitlySet("status")) { - this.status(model.getStatus()); - } - if (model.wasPropertyExplicitlySet("statusDetails")) { - this.statusDetails(model.getStatusDetails()); - } - if (model.wasPropertyExplicitlySet("failureAction")) { - this.failureAction(model.getFailureAction()); - } - if (model.wasPropertyExplicitlySet("command")) { - this.command(model.getCommand()); - } - return this; - } - } - - /** - * Create a new builder. - */ - public static Builder builder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder().copy(this); - } - - @Deprecated - public ContainerCommandHealthCheck( - String name, - Integer initialDelayInSeconds, - Integer intervalInSeconds, - Integer failureThreshold, - Integer successThreshold, - Integer timeoutInSeconds, - Status status, - String statusDetails, - ContainerHealthCheckFailureAction failureAction, - java.util.List command) { - super( - name, - initialDelayInSeconds, - intervalInSeconds, - failureThreshold, - successThreshold, - timeoutInSeconds, - status, - statusDetails, - failureAction); - this.command = command; - } - - /** - * The list of strings that will be simplified to a single command for checking the status of the container. - * - **/ - @com.fasterxml.jackson.annotation.JsonProperty("command") - private final java.util.List command; - - /** - * The list of strings that will be simplified to a single command for checking the status of the container. - * - * @return the value - **/ - public java.util.List getCommand() { - return command; - } - - @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("ContainerCommandHealthCheck("); - sb.append("super=").append(super.toString(includeByteArrayContents)); - sb.append(", command=").append(String.valueOf(this.command)); - sb.append(")"); - return sb.toString(); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof ContainerCommandHealthCheck)) { - return false; - } - - ContainerCommandHealthCheck other = (ContainerCommandHealthCheck) o; - return java.util.Objects.equals(this.command, other.command) && super.equals(other); - } - - @Override - public int hashCode() { - final int PRIME = 59; - int result = super.hashCode(); - result = (result * PRIME) + (this.command == null ? 43 : this.command.hashCode()); - return result; - } -} diff --git a/bmc-containerinstances/src/main/java/com/oracle/bmc/containerinstances/model/CreateContainerCommandHealthCheckDetails.java b/bmc-containerinstances/src/main/java/com/oracle/bmc/containerinstances/model/CreateContainerCommandHealthCheckDetails.java deleted file mode 100644 index d22f391b46..0000000000 --- a/bmc-containerinstances/src/main/java/com/oracle/bmc/containerinstances/model/CreateContainerCommandHealthCheckDetails.java +++ /dev/null @@ -1,250 +0,0 @@ -/** - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. - */ -package com.oracle.bmc.containerinstances.model; - -/** - * Container Health Check Command type. - *
- * 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: 20210415") -@com.fasterxml.jackson.databind.annotation.JsonDeserialize( - builder = CreateContainerCommandHealthCheckDetails.Builder.class -) -@com.fasterxml.jackson.annotation.JsonTypeInfo( - use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, - include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, - property = "healthCheckType" -) -@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) -public final class CreateContainerCommandHealthCheckDetails - extends CreateContainerHealthCheckDetails { - @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("initialDelayInSeconds") - private Integer initialDelayInSeconds; - - public Builder initialDelayInSeconds(Integer initialDelayInSeconds) { - this.initialDelayInSeconds = initialDelayInSeconds; - this.__explicitlySet__.add("initialDelayInSeconds"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonProperty("intervalInSeconds") - private Integer intervalInSeconds; - - public Builder intervalInSeconds(Integer intervalInSeconds) { - this.intervalInSeconds = intervalInSeconds; - this.__explicitlySet__.add("intervalInSeconds"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonProperty("failureThreshold") - private Integer failureThreshold; - - public Builder failureThreshold(Integer failureThreshold) { - this.failureThreshold = failureThreshold; - this.__explicitlySet__.add("failureThreshold"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonProperty("successThreshold") - private Integer successThreshold; - - public Builder successThreshold(Integer successThreshold) { - this.successThreshold = successThreshold; - this.__explicitlySet__.add("successThreshold"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonProperty("timeoutInSeconds") - private Integer timeoutInSeconds; - - public Builder timeoutInSeconds(Integer timeoutInSeconds) { - this.timeoutInSeconds = timeoutInSeconds; - this.__explicitlySet__.add("timeoutInSeconds"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonProperty("failureAction") - private ContainerHealthCheckFailureAction failureAction; - - public Builder failureAction(ContainerHealthCheckFailureAction failureAction) { - this.failureAction = failureAction; - this.__explicitlySet__.add("failureAction"); - return this; - } - /** - * The list of strings that will be simplified to a single command for checking the status of the container. - * - **/ - @com.fasterxml.jackson.annotation.JsonProperty("command") - private java.util.List command; - - /** - * The list of strings that will be simplified to a single command for checking the status of the container. - * - * @param command the value to set - * @return this builder - **/ - public Builder command(java.util.List command) { - this.command = command; - this.__explicitlySet__.add("command"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonIgnore - private final java.util.Set __explicitlySet__ = new java.util.HashSet(); - - public CreateContainerCommandHealthCheckDetails build() { - CreateContainerCommandHealthCheckDetails model = - new CreateContainerCommandHealthCheckDetails( - this.name, - this.initialDelayInSeconds, - this.intervalInSeconds, - this.failureThreshold, - this.successThreshold, - this.timeoutInSeconds, - this.failureAction, - this.command); - for (String explicitlySetProperty : this.__explicitlySet__) { - model.markPropertyAsExplicitlySet(explicitlySetProperty); - } - return model; - } - - @com.fasterxml.jackson.annotation.JsonIgnore - public Builder copy(CreateContainerCommandHealthCheckDetails model) { - if (model.wasPropertyExplicitlySet("name")) { - this.name(model.getName()); - } - if (model.wasPropertyExplicitlySet("initialDelayInSeconds")) { - this.initialDelayInSeconds(model.getInitialDelayInSeconds()); - } - if (model.wasPropertyExplicitlySet("intervalInSeconds")) { - this.intervalInSeconds(model.getIntervalInSeconds()); - } - if (model.wasPropertyExplicitlySet("failureThreshold")) { - this.failureThreshold(model.getFailureThreshold()); - } - if (model.wasPropertyExplicitlySet("successThreshold")) { - this.successThreshold(model.getSuccessThreshold()); - } - if (model.wasPropertyExplicitlySet("timeoutInSeconds")) { - this.timeoutInSeconds(model.getTimeoutInSeconds()); - } - if (model.wasPropertyExplicitlySet("failureAction")) { - this.failureAction(model.getFailureAction()); - } - if (model.wasPropertyExplicitlySet("command")) { - this.command(model.getCommand()); - } - return this; - } - } - - /** - * Create a new builder. - */ - public static Builder builder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder().copy(this); - } - - @Deprecated - public CreateContainerCommandHealthCheckDetails( - String name, - Integer initialDelayInSeconds, - Integer intervalInSeconds, - Integer failureThreshold, - Integer successThreshold, - Integer timeoutInSeconds, - ContainerHealthCheckFailureAction failureAction, - java.util.List command) { - super( - name, - initialDelayInSeconds, - intervalInSeconds, - failureThreshold, - successThreshold, - timeoutInSeconds, - failureAction); - this.command = command; - } - - /** - * The list of strings that will be simplified to a single command for checking the status of the container. - * - **/ - @com.fasterxml.jackson.annotation.JsonProperty("command") - private final java.util.List command; - - /** - * The list of strings that will be simplified to a single command for checking the status of the container. - * - * @return the value - **/ - public java.util.List getCommand() { - return command; - } - - @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("CreateContainerCommandHealthCheckDetails("); - sb.append("super=").append(super.toString(includeByteArrayContents)); - sb.append(", command=").append(String.valueOf(this.command)); - sb.append(")"); - return sb.toString(); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof CreateContainerCommandHealthCheckDetails)) { - return false; - } - - CreateContainerCommandHealthCheckDetails other = - (CreateContainerCommandHealthCheckDetails) o; - return java.util.Objects.equals(this.command, other.command) && super.equals(other); - } - - @Override - public int hashCode() { - final int PRIME = 59; - int result = super.hashCode(); - result = (result * PRIME) + (this.command == null ? 43 : this.command.hashCode()); - return result; - } -} diff --git a/bmc-core/pom.xml b/bmc-core/pom.xml index 2bed3ade27..8e199b5810 100644 --- a/bmc-core/pom.xml +++ b/bmc-core/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 2.81.0 + 2.82.0 diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java b/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java index 376c23ac12..440ee0435a 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java @@ -211,6 +211,51 @@ ChangeComputeCapacityTopologyCompartmentResponse changeComputeCapacityTopologyCo ChangeComputeClusterCompartmentResponse changeComputeClusterCompartment( ChangeComputeClusterCompartmentRequest request); + /** + * Moves a compute GPU memory cluster into a different compartment. 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 ChangeComputeGpuMemoryClusterCompartment API. + */ + ChangeComputeGpuMemoryClusterCompartmentResponse changeComputeGpuMemoryClusterCompartment( + ChangeComputeGpuMemoryClusterCompartmentRequest request); + + /** + * Moves a compute GPU memory fabric into a different compartment. 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 ChangeComputeGpuMemoryFabricCompartment API. + */ + ChangeComputeGpuMemoryFabricCompartmentResponse changeComputeGpuMemoryFabricCompartment( + ChangeComputeGpuMemoryFabricCompartmentRequest request); + + /** + * Moves a compute host into a different compartment. 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 ChangeComputeHostCompartment API. + */ + ChangeComputeHostCompartmentResponse changeComputeHostCompartment( + ChangeComputeHostCompartmentRequest request); + /** * Moves a compute image capability schema into a different compartment within the same tenancy. * For information about moving resources between compartments, see @@ -369,6 +414,20 @@ CreateComputeCapacityTopologyResponse createComputeCapacityTopology( */ CreateComputeClusterResponse createComputeCluster(CreateComputeClusterRequest request); + /** + * Create a compute GPU memory cluster instance on a specific compute GPU memory fabric + * + * @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 CreateComputeGpuMemoryCluster API. + */ + CreateComputeGpuMemoryClusterResponse createComputeGpuMemoryCluster( + CreateComputeGpuMemoryClusterRequest request); + /** * Creates compute image capability schema. * @@ -508,6 +567,19 @@ DeleteComputeCapacityTopologyResponse deleteComputeCapacityTopology( */ DeleteComputeClusterResponse deleteComputeCluster(DeleteComputeClusterRequest request); + /** + * Terminates and deletes the specified compute GPU memory cluster and underlying 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 DeleteComputeGpuMemoryCluster API. + */ + DeleteComputeGpuMemoryClusterResponse deleteComputeGpuMemoryCluster( + DeleteComputeGpuMemoryClusterRequest request); + /** * Deletes the specified Compute Image Capability Schema * @@ -769,6 +841,47 @@ GetComputeGlobalImageCapabilitySchemaResponse getComputeGlobalImageCapabilitySch getComputeGlobalImageCapabilitySchemaVersion( GetComputeGlobalImageCapabilitySchemaVersionRequest request); + /** + * Gets information about the specified compute GPU memory cluster + * + * @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 GetComputeGpuMemoryCluster API. + */ + GetComputeGpuMemoryClusterResponse getComputeGpuMemoryCluster( + GetComputeGpuMemoryClusterRequest request); + + /** + * Gets information about the specified compute GPU memory fabric + * + * @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 GetComputeGpuMemoryFabric API. + */ + GetComputeGpuMemoryFabricResponse getComputeGpuMemoryFabric( + GetComputeGpuMemoryFabricRequest request); + + /** + * Gets information about the specified compute host + * + * @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 GetComputeHost API. + */ + GetComputeHostResponse getComputeHost(GetComputeHostRequest request); + /** * Gets the specified Compute Image Capability Schema * @@ -1274,6 +1387,60 @@ ListComputeCapacityTopologiesResponse listComputeCapacityTopologies( ListComputeGlobalImageCapabilitySchemasResponse listComputeGlobalImageCapabilitySchemas( ListComputeGlobalImageCapabilitySchemasRequest request); + /** + * List all of the GPU memory cluster 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 ListComputeGpuMemoryClusterInstances API. + */ + ListComputeGpuMemoryClusterInstancesResponse listComputeGpuMemoryClusterInstances( + ListComputeGpuMemoryClusterInstancesRequest request); + + /** + * List all of the compute GPU memory clusters. + * + * @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 ListComputeGpuMemoryClusters API. + */ + ListComputeGpuMemoryClustersResponse listComputeGpuMemoryClusters( + ListComputeGpuMemoryClustersRequest request); + + /** + * Lists the compute GPU memory fabrics that match the specified criteria and compartmentId. + * @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 ListComputeGpuMemoryFabrics API. + */ + ListComputeGpuMemoryFabricsResponse listComputeGpuMemoryFabrics( + ListComputeGpuMemoryFabricsRequest request); + + /** + * Generates a list of summary host details + * + * @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 ListComputeHosts API. + */ + ListComputeHostsResponse listComputeHosts(ListComputeHostsRequest request); + /** * Lists Compute Image Capability Schema in the specified compartment. You can also query by a specific imageId. * @@ -1589,6 +1756,47 @@ UpdateComputeCapacityTopologyResponse updateComputeCapacityTopology( */ UpdateComputeClusterResponse updateComputeCluster(UpdateComputeClusterRequest request); + /** + * Updates a compute gpu memory cluster 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 UpdateComputeGpuMemoryCluster API. + */ + UpdateComputeGpuMemoryClusterResponse updateComputeGpuMemoryCluster( + UpdateComputeGpuMemoryClusterRequest request); + + /** + * Customer can update displayName and tags for compute GPU memory fabric record + * + * @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 UpdateComputeGpuMemoryFabric API. + */ + UpdateComputeGpuMemoryFabricResponse updateComputeGpuMemoryFabric( + UpdateComputeGpuMemoryFabricRequest request); + + /** + * Customer can update the some fields for ComputeHost record + * + * @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 UpdateComputeHost API. + */ + UpdateComputeHostResponse updateComputeHost(UpdateComputeHostRequest request); + /** * Updates the specified Compute Image Capability Schema * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java index 483bec59dc..dee855b277 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java @@ -247,6 +247,65 @@ java.util.concurrent.Future captureConsoleHistory ChangeComputeClusterCompartmentResponse> handler); + /** + * Moves a compute GPU memory cluster into a different compartment. 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 + changeComputeGpuMemoryClusterCompartment( + ChangeComputeGpuMemoryClusterCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeComputeGpuMemoryClusterCompartmentRequest, + ChangeComputeGpuMemoryClusterCompartmentResponse> + handler); + + /** + * Moves a compute GPU memory fabric into a different compartment. 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 + changeComputeGpuMemoryFabricCompartment( + ChangeComputeGpuMemoryFabricCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeComputeGpuMemoryFabricCompartmentRequest, + ChangeComputeGpuMemoryFabricCompartmentResponse> + handler); + + /** + * Moves a compute host into a different compartment. 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 changeComputeHostCompartment( + ChangeComputeHostCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeComputeHostCompartmentRequest, + ChangeComputeHostCompartmentResponse> + handler); + /** * Moves a compute image capability schema into a different compartment within the same tenancy. * For information about moving resources between compartments, see @@ -442,6 +501,25 @@ java.util.concurrent.Future createComputeCluster( CreateComputeClusterRequest, CreateComputeClusterResponse> handler); + /** + * Create a compute GPU memory cluster instance on a specific compute GPU memory fabric + * + * + * @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 + createComputeGpuMemoryCluster( + CreateComputeGpuMemoryClusterRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateComputeGpuMemoryClusterRequest, + CreateComputeGpuMemoryClusterResponse> + handler); + /** * Creates compute image capability schema. * @@ -615,6 +693,24 @@ java.util.concurrent.Future deleteComputeCluster( DeleteComputeClusterRequest, DeleteComputeClusterResponse> handler); + /** + * Terminates and deletes the specified compute GPU memory cluster and underlying 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 + deleteComputeGpuMemoryCluster( + DeleteComputeGpuMemoryClusterRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteComputeGpuMemoryClusterRequest, + DeleteComputeGpuMemoryClusterResponse> + handler); + /** * Deletes the specified Compute Image Capability Schema * @@ -945,6 +1041,56 @@ java.util.concurrent.Future getComputeCluster( GetComputeGlobalImageCapabilitySchemaVersionResponse> handler); + /** + * Gets information about the specified compute GPU memory cluster + * + * + * @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 getComputeGpuMemoryCluster( + GetComputeGpuMemoryClusterRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetComputeGpuMemoryClusterRequest, GetComputeGpuMemoryClusterResponse> + handler); + + /** + * Gets information about the specified compute GPU memory fabric + * + * + * @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 getComputeGpuMemoryFabric( + GetComputeGpuMemoryFabricRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetComputeGpuMemoryFabricRequest, GetComputeGpuMemoryFabricResponse> + handler); + + /** + * Gets information about the specified compute host + * + * + * @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 getComputeHost( + GetComputeHostRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Gets the specified Compute Image Capability Schema * @@ -1568,6 +1714,75 @@ java.util.concurrent.Future listComputeClusters( ListComputeGlobalImageCapabilitySchemasResponse> handler); + /** + * List all of the GPU memory cluster 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 + listComputeGpuMemoryClusterInstances( + ListComputeGpuMemoryClusterInstancesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListComputeGpuMemoryClusterInstancesRequest, + ListComputeGpuMemoryClusterInstancesResponse> + handler); + + /** + * List all of the compute GPU memory clusters. + * + * + * @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 listComputeGpuMemoryClusters( + ListComputeGpuMemoryClustersRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListComputeGpuMemoryClustersRequest, + ListComputeGpuMemoryClustersResponse> + handler); + + /** + * Lists the compute GPU memory fabrics that match the specified criteria and compartmentId. + * + * @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 listComputeGpuMemoryFabrics( + ListComputeGpuMemoryFabricsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListComputeGpuMemoryFabricsRequest, ListComputeGpuMemoryFabricsResponse> + handler); + + /** + * Generates a list of summary host details + * + * + * @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 listComputeHosts( + ListComputeHostsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Lists Compute Image Capability Schema in the specified compartment. You can also query by a specific imageId. * @@ -1965,6 +2180,60 @@ java.util.concurrent.Future updateComputeCluster( UpdateComputeClusterRequest, UpdateComputeClusterResponse> handler); + /** + * Updates a compute gpu memory cluster 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 + updateComputeGpuMemoryCluster( + UpdateComputeGpuMemoryClusterRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateComputeGpuMemoryClusterRequest, + UpdateComputeGpuMemoryClusterResponse> + handler); + + /** + * Customer can update displayName and tags for compute GPU memory fabric record + * + * + * @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 updateComputeGpuMemoryFabric( + UpdateComputeGpuMemoryFabricRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateComputeGpuMemoryFabricRequest, + UpdateComputeGpuMemoryFabricResponse> + handler); + + /** + * Customer can update the some fields for ComputeHost record + * + * + * @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 updateComputeHost( + UpdateComputeHostRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateComputeHostRequest, UpdateComputeHostResponse> + handler); + /** * Updates the specified Compute Image Capability Schema * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java index b6edea4305..8ff764bac0 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java @@ -955,6 +955,187 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + changeComputeGpuMemoryClusterCompartment( + ChangeComputeGpuMemoryClusterCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeComputeGpuMemoryClusterCompartmentRequest, + ChangeComputeGpuMemoryClusterCompartmentResponse> + handler) { + LOG.trace("Called async changeComputeGpuMemoryClusterCompartment"); + final ChangeComputeGpuMemoryClusterCompartmentRequest interceptedRequest = + ChangeComputeGpuMemoryClusterCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeComputeGpuMemoryClusterCompartmentConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "ChangeComputeGpuMemoryClusterCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/ChangeComputeGpuMemoryClusterCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeComputeGpuMemoryClusterCompartmentResponse> + transformer = + ChangeComputeGpuMemoryClusterCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeComputeGpuMemoryClusterCompartmentRequest, + ChangeComputeGpuMemoryClusterCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeComputeGpuMemoryClusterCompartmentRequest, + ChangeComputeGpuMemoryClusterCompartmentResponse>, + java.util.concurrent.Future< + ChangeComputeGpuMemoryClusterCompartmentResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getChangeComputeGpuMemoryClusterCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeComputeGpuMemoryClusterCompartmentRequest, + ChangeComputeGpuMemoryClusterCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeComputeGpuMemoryFabricCompartment( + ChangeComputeGpuMemoryFabricCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeComputeGpuMemoryFabricCompartmentRequest, + ChangeComputeGpuMemoryFabricCompartmentResponse> + handler) { + LOG.trace("Called async changeComputeGpuMemoryFabricCompartment"); + final ChangeComputeGpuMemoryFabricCompartmentRequest interceptedRequest = + ChangeComputeGpuMemoryFabricCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeComputeGpuMemoryFabricCompartmentConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "ChangeComputeGpuMemoryFabricCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryFabric/ChangeComputeGpuMemoryFabricCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeComputeGpuMemoryFabricCompartmentResponse> + transformer = + ChangeComputeGpuMemoryFabricCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeComputeGpuMemoryFabricCompartmentRequest, + ChangeComputeGpuMemoryFabricCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeComputeGpuMemoryFabricCompartmentRequest, + ChangeComputeGpuMemoryFabricCompartmentResponse>, + java.util.concurrent.Future< + ChangeComputeGpuMemoryFabricCompartmentResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getChangeComputeGpuMemoryFabricCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeComputeGpuMemoryFabricCompartmentRequest, + ChangeComputeGpuMemoryFabricCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeComputeHostCompartment( + ChangeComputeHostCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeComputeHostCompartmentRequest, + ChangeComputeHostCompartmentResponse> + handler) { + LOG.trace("Called async changeComputeHostCompartment"); + final ChangeComputeHostCompartmentRequest interceptedRequest = + ChangeComputeHostCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeComputeHostCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "ChangeComputeHostCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/ChangeComputeHostCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeComputeHostCompartmentResponse> + transformer = + ChangeComputeHostCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeComputeHostCompartmentRequest, ChangeComputeHostCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeComputeHostCompartmentRequest, + ChangeComputeHostCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeComputeHostCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeComputeHostCompartmentRequest, ChangeComputeHostCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeComputeImageCapabilitySchemaCompartment( @@ -1468,6 +1649,63 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + createComputeGpuMemoryCluster( + CreateComputeGpuMemoryClusterRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateComputeGpuMemoryClusterRequest, + CreateComputeGpuMemoryClusterResponse> + handler) { + LOG.trace("Called async createComputeGpuMemoryCluster"); + final CreateComputeGpuMemoryClusterRequest interceptedRequest = + CreateComputeGpuMemoryClusterConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateComputeGpuMemoryClusterConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "CreateComputeGpuMemoryCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/CreateComputeGpuMemoryCluster"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateComputeGpuMemoryClusterResponse> + transformer = + CreateComputeGpuMemoryClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateComputeGpuMemoryClusterRequest, CreateComputeGpuMemoryClusterResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateComputeGpuMemoryClusterRequest, + CreateComputeGpuMemoryClusterResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateComputeGpuMemoryClusterDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateComputeGpuMemoryClusterRequest, CreateComputeGpuMemoryClusterResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createComputeImageCapabilitySchema( @@ -1891,6 +2129,57 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + deleteComputeGpuMemoryCluster( + DeleteComputeGpuMemoryClusterRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteComputeGpuMemoryClusterRequest, + DeleteComputeGpuMemoryClusterResponse> + handler) { + LOG.trace("Called async deleteComputeGpuMemoryCluster"); + final DeleteComputeGpuMemoryClusterRequest interceptedRequest = + DeleteComputeGpuMemoryClusterConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteComputeGpuMemoryClusterConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "DeleteComputeGpuMemoryCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/DeleteComputeGpuMemoryCluster"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteComputeGpuMemoryClusterResponse> + transformer = + DeleteComputeGpuMemoryClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteComputeGpuMemoryClusterRequest, DeleteComputeGpuMemoryClusterResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteComputeGpuMemoryClusterRequest, + DeleteComputeGpuMemoryClusterResponse>, + 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< + DeleteComputeGpuMemoryClusterRequest, DeleteComputeGpuMemoryClusterResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteComputeImageCapabilitySchema( @@ -2739,26 +3028,171 @@ protected void beforeRetryAction() {} javax.ws.rs.core.Response, GetComputeGlobalImageCapabilitySchemaVersionResponse> transformer = - GetComputeGlobalImageCapabilitySchemaVersionConverter.fromResponse( - java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - GetComputeGlobalImageCapabilitySchemaVersionRequest, - GetComputeGlobalImageCapabilitySchemaVersionResponse> + GetComputeGlobalImageCapabilitySchemaVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetComputeGlobalImageCapabilitySchemaVersionRequest, + GetComputeGlobalImageCapabilitySchemaVersionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetComputeGlobalImageCapabilitySchemaVersionRequest, + GetComputeGlobalImageCapabilitySchemaVersionResponse>, + java.util.concurrent.Future< + GetComputeGlobalImageCapabilitySchemaVersionResponse>> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetComputeGlobalImageCapabilitySchemaVersionRequest, + GetComputeGlobalImageCapabilitySchemaVersionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getComputeGpuMemoryCluster( + GetComputeGpuMemoryClusterRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetComputeGpuMemoryClusterRequest, + GetComputeGpuMemoryClusterResponse> + handler) { + LOG.trace("Called async getComputeGpuMemoryCluster"); + final GetComputeGpuMemoryClusterRequest interceptedRequest = + GetComputeGpuMemoryClusterConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetComputeGpuMemoryClusterConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "GetComputeGpuMemoryCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/GetComputeGpuMemoryCluster"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetComputeGpuMemoryClusterResponse> + transformer = + GetComputeGpuMemoryClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetComputeGpuMemoryClusterRequest, GetComputeGpuMemoryClusterResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetComputeGpuMemoryClusterRequest, + GetComputeGpuMemoryClusterResponse>, + 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< + GetComputeGpuMemoryClusterRequest, GetComputeGpuMemoryClusterResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getComputeGpuMemoryFabric( + GetComputeGpuMemoryFabricRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetComputeGpuMemoryFabricRequest, GetComputeGpuMemoryFabricResponse> + handler) { + LOG.trace("Called async getComputeGpuMemoryFabric"); + final GetComputeGpuMemoryFabricRequest interceptedRequest = + GetComputeGpuMemoryFabricConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetComputeGpuMemoryFabricConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "GetComputeGpuMemoryFabric", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryFabric/GetComputeGpuMemoryFabric"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetComputeGpuMemoryFabricResponse> + transformer = + GetComputeGpuMemoryFabricConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetComputeGpuMemoryFabricRequest, GetComputeGpuMemoryFabricResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetComputeGpuMemoryFabricRequest, + GetComputeGpuMemoryFabricResponse>, + 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< + GetComputeGpuMemoryFabricRequest, GetComputeGpuMemoryFabricResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getComputeHost( + GetComputeHostRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetComputeHostRequest, GetComputeHostResponse> + handler) { + LOG.trace("Called async getComputeHost"); + final GetComputeHostRequest interceptedRequest = + GetComputeHostConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetComputeHostConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "GetComputeHost", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/GetComputeHost"); + final java.util.function.Function + transformer = + GetComputeHostConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetComputeGlobalImageCapabilitySchemaVersionRequest, - GetComputeGlobalImageCapabilitySchemaVersionResponse>, - java.util.concurrent.Future< - GetComputeGlobalImageCapabilitySchemaVersionResponse>> + GetComputeHostRequest, GetComputeHostResponse>, + 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< - GetComputeGlobalImageCapabilitySchemaVersionRequest, - GetComputeGlobalImageCapabilitySchemaVersionResponse>( + GetComputeHostRequest, GetComputeHostResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4293,6 +4727,208 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + listComputeGpuMemoryClusterInstances( + ListComputeGpuMemoryClusterInstancesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListComputeGpuMemoryClusterInstancesRequest, + ListComputeGpuMemoryClusterInstancesResponse> + handler) { + LOG.trace("Called async listComputeGpuMemoryClusterInstances"); + final ListComputeGpuMemoryClusterInstancesRequest interceptedRequest = + ListComputeGpuMemoryClusterInstancesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListComputeGpuMemoryClusterInstancesConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "ListComputeGpuMemoryClusterInstances", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryClusterInstanceSummary/ListComputeGpuMemoryClusterInstances"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListComputeGpuMemoryClusterInstancesResponse> + transformer = + ListComputeGpuMemoryClusterInstancesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListComputeGpuMemoryClusterInstancesRequest, + ListComputeGpuMemoryClusterInstancesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListComputeGpuMemoryClusterInstancesRequest, + ListComputeGpuMemoryClusterInstancesResponse>, + 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< + ListComputeGpuMemoryClusterInstancesRequest, + ListComputeGpuMemoryClusterInstancesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listComputeGpuMemoryClusters( + ListComputeGpuMemoryClustersRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListComputeGpuMemoryClustersRequest, + ListComputeGpuMemoryClustersResponse> + handler) { + LOG.trace("Called async listComputeGpuMemoryClusters"); + final ListComputeGpuMemoryClustersRequest interceptedRequest = + ListComputeGpuMemoryClustersConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListComputeGpuMemoryClustersConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "ListComputeGpuMemoryClusters", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryClusterCollection/ListComputeGpuMemoryClusters"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListComputeGpuMemoryClustersResponse> + transformer = + ListComputeGpuMemoryClustersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListComputeGpuMemoryClustersRequest, ListComputeGpuMemoryClustersResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListComputeGpuMemoryClustersRequest, + ListComputeGpuMemoryClustersResponse>, + 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< + ListComputeGpuMemoryClustersRequest, ListComputeGpuMemoryClustersResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listComputeGpuMemoryFabrics( + ListComputeGpuMemoryFabricsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListComputeGpuMemoryFabricsRequest, + ListComputeGpuMemoryFabricsResponse> + handler) { + LOG.trace("Called async listComputeGpuMemoryFabrics"); + final ListComputeGpuMemoryFabricsRequest interceptedRequest = + ListComputeGpuMemoryFabricsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListComputeGpuMemoryFabricsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "ListComputeGpuMemoryFabrics", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryFabric/ListComputeGpuMemoryFabrics"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListComputeGpuMemoryFabricsResponse> + transformer = + ListComputeGpuMemoryFabricsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListComputeGpuMemoryFabricsRequest, ListComputeGpuMemoryFabricsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListComputeGpuMemoryFabricsRequest, + ListComputeGpuMemoryFabricsResponse>, + 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< + ListComputeGpuMemoryFabricsRequest, ListComputeGpuMemoryFabricsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listComputeHosts( + ListComputeHostsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListComputeHostsRequest, ListComputeHostsResponse> + handler) { + LOG.trace("Called async listComputeHosts"); + final ListComputeHostsRequest interceptedRequest = + ListComputeHostsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListComputeHostsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "ListComputeHosts", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/ListComputeHosts"); + final java.util.function.Function + transformer = + ListComputeHostsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListComputeHostsRequest, ListComputeHostsResponse>, + 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< + ListComputeHostsRequest, ListComputeHostsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listComputeImageCapabilitySchemas( @@ -5283,6 +5919,171 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + updateComputeGpuMemoryCluster( + UpdateComputeGpuMemoryClusterRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateComputeGpuMemoryClusterRequest, + UpdateComputeGpuMemoryClusterResponse> + handler) { + LOG.trace("Called async updateComputeGpuMemoryCluster"); + final UpdateComputeGpuMemoryClusterRequest interceptedRequest = + UpdateComputeGpuMemoryClusterConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateComputeGpuMemoryClusterConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "UpdateComputeGpuMemoryCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/UpdateComputeGpuMemoryCluster"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateComputeGpuMemoryClusterResponse> + transformer = + UpdateComputeGpuMemoryClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateComputeGpuMemoryClusterRequest, UpdateComputeGpuMemoryClusterResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateComputeGpuMemoryClusterRequest, + UpdateComputeGpuMemoryClusterResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateComputeGpuMemoryClusterDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateComputeGpuMemoryClusterRequest, UpdateComputeGpuMemoryClusterResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + updateComputeGpuMemoryFabric( + UpdateComputeGpuMemoryFabricRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateComputeGpuMemoryFabricRequest, + UpdateComputeGpuMemoryFabricResponse> + handler) { + LOG.trace("Called async updateComputeGpuMemoryFabric"); + final UpdateComputeGpuMemoryFabricRequest interceptedRequest = + UpdateComputeGpuMemoryFabricConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateComputeGpuMemoryFabricConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "UpdateComputeGpuMemoryFabric", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryFabric/UpdateComputeGpuMemoryFabric"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateComputeGpuMemoryFabricResponse> + transformer = + UpdateComputeGpuMemoryFabricConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateComputeGpuMemoryFabricRequest, UpdateComputeGpuMemoryFabricResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateComputeGpuMemoryFabricRequest, + UpdateComputeGpuMemoryFabricResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateComputeGpuMemoryFabricDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateComputeGpuMemoryFabricRequest, UpdateComputeGpuMemoryFabricResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateComputeHost( + UpdateComputeHostRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateComputeHostRequest, UpdateComputeHostResponse> + handler) { + LOG.trace("Called async updateComputeHost"); + final UpdateComputeHostRequest interceptedRequest = + UpdateComputeHostConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateComputeHostConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "UpdateComputeHost", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/UpdateComputeHost"); + final java.util.function.Function + transformer = + UpdateComputeHostConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateComputeHostRequest, UpdateComputeHostResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateComputeHostDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateComputeHostRequest, UpdateComputeHostResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateComputeImageCapabilitySchema( diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java index 9e52c10c40..35c4ccb55e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java @@ -934,6 +934,143 @@ public ChangeComputeClusterCompartmentResponse changeComputeClusterCompartment( }); } + @Override + public ChangeComputeGpuMemoryClusterCompartmentResponse + changeComputeGpuMemoryClusterCompartment( + ChangeComputeGpuMemoryClusterCompartmentRequest request) { + LOG.trace("Called changeComputeGpuMemoryClusterCompartment"); + final ChangeComputeGpuMemoryClusterCompartmentRequest interceptedRequest = + ChangeComputeGpuMemoryClusterCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeComputeGpuMemoryClusterCompartmentConverter.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( + "Compute", + "ChangeComputeGpuMemoryClusterCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/ChangeComputeGpuMemoryClusterCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeComputeGpuMemoryClusterCompartmentResponse> + transformer = + ChangeComputeGpuMemoryClusterCompartmentConverter.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 + .getChangeComputeGpuMemoryClusterCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeComputeGpuMemoryFabricCompartmentResponse changeComputeGpuMemoryFabricCompartment( + ChangeComputeGpuMemoryFabricCompartmentRequest request) { + LOG.trace("Called changeComputeGpuMemoryFabricCompartment"); + final ChangeComputeGpuMemoryFabricCompartmentRequest interceptedRequest = + ChangeComputeGpuMemoryFabricCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeComputeGpuMemoryFabricCompartmentConverter.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( + "Compute", + "ChangeComputeGpuMemoryFabricCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryFabric/ChangeComputeGpuMemoryFabricCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeComputeGpuMemoryFabricCompartmentResponse> + transformer = + ChangeComputeGpuMemoryFabricCompartmentConverter.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 + .getChangeComputeGpuMemoryFabricCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeComputeHostCompartmentResponse changeComputeHostCompartment( + ChangeComputeHostCompartmentRequest request) { + LOG.trace("Called changeComputeHostCompartment"); + final ChangeComputeHostCompartmentRequest interceptedRequest = + ChangeComputeHostCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeComputeHostCompartmentConverter.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( + "Compute", + "ChangeComputeHostCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/ChangeComputeHostCompartment"); + java.util.function.Function + transformer = + ChangeComputeHostCompartmentConverter.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 + .getChangeComputeHostCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeComputeImageCapabilitySchemaCompartmentResponse changeComputeImageCapabilitySchemaCompartment( @@ -1334,6 +1471,51 @@ public CreateComputeClusterResponse createComputeCluster(CreateComputeClusterReq }); } + @Override + public CreateComputeGpuMemoryClusterResponse createComputeGpuMemoryCluster( + CreateComputeGpuMemoryClusterRequest request) { + LOG.trace("Called createComputeGpuMemoryCluster"); + final CreateComputeGpuMemoryClusterRequest interceptedRequest = + CreateComputeGpuMemoryClusterConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateComputeGpuMemoryClusterConverter.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( + "Compute", + "CreateComputeGpuMemoryCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/CreateComputeGpuMemoryCluster"); + java.util.function.Function< + javax.ws.rs.core.Response, CreateComputeGpuMemoryClusterResponse> + transformer = + CreateComputeGpuMemoryClusterConverter.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 + .getCreateComputeGpuMemoryClusterDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateComputeImageCapabilitySchemaResponse createComputeImageCapabilitySchema( CreateComputeImageCapabilitySchemaRequest request) { @@ -1664,6 +1846,46 @@ public DeleteComputeClusterResponse deleteComputeCluster(DeleteComputeClusterReq }); } + @Override + public DeleteComputeGpuMemoryClusterResponse deleteComputeGpuMemoryCluster( + DeleteComputeGpuMemoryClusterRequest request) { + LOG.trace("Called deleteComputeGpuMemoryCluster"); + final DeleteComputeGpuMemoryClusterRequest interceptedRequest = + DeleteComputeGpuMemoryClusterConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteComputeGpuMemoryClusterConverter.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( + "Compute", + "DeleteComputeGpuMemoryCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/DeleteComputeGpuMemoryCluster"); + java.util.function.Function< + javax.ws.rs.core.Response, DeleteComputeGpuMemoryClusterResponse> + transformer = + DeleteComputeGpuMemoryClusterConverter.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 DeleteComputeImageCapabilitySchemaResponse deleteComputeImageCapabilitySchema( DeleteComputeImageCapabilitySchemaRequest request) { @@ -2350,6 +2572,117 @@ public GetComputeGlobalImageCapabilitySchemaResponse getComputeGlobalImageCapabi }); } + @Override + public GetComputeGpuMemoryClusterResponse getComputeGpuMemoryCluster( + GetComputeGpuMemoryClusterRequest request) { + LOG.trace("Called getComputeGpuMemoryCluster"); + final GetComputeGpuMemoryClusterRequest interceptedRequest = + GetComputeGpuMemoryClusterConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetComputeGpuMemoryClusterConverter.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( + "Compute", + "GetComputeGpuMemoryCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/GetComputeGpuMemoryCluster"); + java.util.function.Function + transformer = + GetComputeGpuMemoryClusterConverter.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 GetComputeGpuMemoryFabricResponse getComputeGpuMemoryFabric( + GetComputeGpuMemoryFabricRequest request) { + LOG.trace("Called getComputeGpuMemoryFabric"); + final GetComputeGpuMemoryFabricRequest interceptedRequest = + GetComputeGpuMemoryFabricConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetComputeGpuMemoryFabricConverter.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( + "Compute", + "GetComputeGpuMemoryFabric", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryFabric/GetComputeGpuMemoryFabric"); + java.util.function.Function + transformer = + GetComputeGpuMemoryFabricConverter.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 GetComputeHostResponse getComputeHost(GetComputeHostRequest request) { + LOG.trace("Called getComputeHost"); + final GetComputeHostRequest interceptedRequest = + GetComputeHostConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetComputeHostConverter.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( + "Compute", + "GetComputeHost", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/GetComputeHost"); + java.util.function.Function transformer = + GetComputeHostConverter.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 GetComputeImageCapabilitySchemaResponse getComputeImageCapabilitySchema( GetComputeImageCapabilitySchemaRequest request) { @@ -3514,6 +3847,159 @@ public ListComputeGlobalImageCapabilitySchemasResponse listComputeGlobalImageCap }); } + @Override + public ListComputeGpuMemoryClusterInstancesResponse listComputeGpuMemoryClusterInstances( + ListComputeGpuMemoryClusterInstancesRequest request) { + LOG.trace("Called listComputeGpuMemoryClusterInstances"); + final ListComputeGpuMemoryClusterInstancesRequest interceptedRequest = + ListComputeGpuMemoryClusterInstancesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListComputeGpuMemoryClusterInstancesConverter.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( + "Compute", + "ListComputeGpuMemoryClusterInstances", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryClusterInstanceSummary/ListComputeGpuMemoryClusterInstances"); + java.util.function.Function< + javax.ws.rs.core.Response, ListComputeGpuMemoryClusterInstancesResponse> + transformer = + ListComputeGpuMemoryClusterInstancesConverter.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 ListComputeGpuMemoryClustersResponse listComputeGpuMemoryClusters( + ListComputeGpuMemoryClustersRequest request) { + LOG.trace("Called listComputeGpuMemoryClusters"); + final ListComputeGpuMemoryClustersRequest interceptedRequest = + ListComputeGpuMemoryClustersConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListComputeGpuMemoryClustersConverter.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( + "Compute", + "ListComputeGpuMemoryClusters", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryClusterCollection/ListComputeGpuMemoryClusters"); + java.util.function.Function + transformer = + ListComputeGpuMemoryClustersConverter.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 ListComputeGpuMemoryFabricsResponse listComputeGpuMemoryFabrics( + ListComputeGpuMemoryFabricsRequest request) { + LOG.trace("Called listComputeGpuMemoryFabrics"); + final ListComputeGpuMemoryFabricsRequest interceptedRequest = + ListComputeGpuMemoryFabricsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListComputeGpuMemoryFabricsConverter.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( + "Compute", + "ListComputeGpuMemoryFabrics", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryFabric/ListComputeGpuMemoryFabrics"); + java.util.function.Function + transformer = + ListComputeGpuMemoryFabricsConverter.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 ListComputeHostsResponse listComputeHosts(ListComputeHostsRequest request) { + LOG.trace("Called listComputeHosts"); + final ListComputeHostsRequest interceptedRequest = + ListComputeHostsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListComputeHostsConverter.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( + "Compute", + "ListComputeHosts", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/ListComputeHosts"); + java.util.function.Function + transformer = + ListComputeHostsConverter.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 ListComputeImageCapabilitySchemasResponse listComputeImageCapabilitySchemas( ListComputeImageCapabilitySchemasRequest request) { @@ -4279,6 +4765,136 @@ public UpdateComputeClusterResponse updateComputeCluster(UpdateComputeClusterReq }); } + @Override + public UpdateComputeGpuMemoryClusterResponse updateComputeGpuMemoryCluster( + UpdateComputeGpuMemoryClusterRequest request) { + LOG.trace("Called updateComputeGpuMemoryCluster"); + final UpdateComputeGpuMemoryClusterRequest interceptedRequest = + UpdateComputeGpuMemoryClusterConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateComputeGpuMemoryClusterConverter.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( + "Compute", + "UpdateComputeGpuMemoryCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/UpdateComputeGpuMemoryCluster"); + java.util.function.Function< + javax.ws.rs.core.Response, UpdateComputeGpuMemoryClusterResponse> + transformer = + UpdateComputeGpuMemoryClusterConverter.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 + .getUpdateComputeGpuMemoryClusterDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateComputeGpuMemoryFabricResponse updateComputeGpuMemoryFabric( + UpdateComputeGpuMemoryFabricRequest request) { + LOG.trace("Called updateComputeGpuMemoryFabric"); + final UpdateComputeGpuMemoryFabricRequest interceptedRequest = + UpdateComputeGpuMemoryFabricConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateComputeGpuMemoryFabricConverter.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( + "Compute", + "UpdateComputeGpuMemoryFabric", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryFabric/UpdateComputeGpuMemoryFabric"); + java.util.function.Function + transformer = + UpdateComputeGpuMemoryFabricConverter.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 + .getUpdateComputeGpuMemoryFabricDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateComputeHostResponse updateComputeHost(UpdateComputeHostRequest request) { + LOG.trace("Called updateComputeHost"); + final UpdateComputeHostRequest interceptedRequest = + UpdateComputeHostConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateComputeHostConverter.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( + "Compute", + "UpdateComputeHost", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/UpdateComputeHost"); + java.util.function.Function + transformer = + UpdateComputeHostConverter.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.getUpdateComputeHostDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateComputeImageCapabilitySchemaResponse updateComputeImageCapabilitySchema( UpdateComputeImageCapabilitySchemaRequest request) { diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputePaginators.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputePaginators.java index 4b2c5c8d3f..70ffc31aa2 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputePaginators.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputePaginators.java @@ -1802,6 +1802,487 @@ public ListComputeGlobalImageCapabilitySchemasResponse apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listComputeGpuMemoryClusterInstances 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 + listComputeGpuMemoryClusterInstancesResponseIterator( + final ListComputeGpuMemoryClusterInstancesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListComputeGpuMemoryClusterInstancesRequest.Builder, + ListComputeGpuMemoryClusterInstancesRequest, + ListComputeGpuMemoryClusterInstancesResponse>( + new java.util.function.Supplier< + ListComputeGpuMemoryClusterInstancesRequest.Builder>() { + @Override + public ListComputeGpuMemoryClusterInstancesRequest.Builder get() { + return ListComputeGpuMemoryClusterInstancesRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListComputeGpuMemoryClusterInstancesResponse, String>() { + @Override + public String apply(ListComputeGpuMemoryClusterInstancesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeGpuMemoryClusterInstancesRequest.Builder>, + ListComputeGpuMemoryClusterInstancesRequest>() { + @Override + public ListComputeGpuMemoryClusterInstancesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeGpuMemoryClusterInstancesRequest.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< + ListComputeGpuMemoryClusterInstancesRequest, + ListComputeGpuMemoryClusterInstancesResponse>() { + @Override + public ListComputeGpuMemoryClusterInstancesResponse apply( + ListComputeGpuMemoryClusterInstancesRequest request) { + return client.listComputeGpuMemoryClusterInstances(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.core.model.ComputeGpuMemoryClusterInstanceSummary} objects + * contained in responses from the listComputeGpuMemoryClusterInstances 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.core.model.ComputeGpuMemoryClusterInstanceSummary} objects + * contained in responses received from the service. + */ + public Iterable + listComputeGpuMemoryClusterInstancesRecordIterator( + final ListComputeGpuMemoryClusterInstancesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListComputeGpuMemoryClusterInstancesRequest.Builder, + ListComputeGpuMemoryClusterInstancesRequest, + ListComputeGpuMemoryClusterInstancesResponse, + com.oracle.bmc.core.model.ComputeGpuMemoryClusterInstanceSummary>( + new java.util.function.Supplier< + ListComputeGpuMemoryClusterInstancesRequest.Builder>() { + @Override + public ListComputeGpuMemoryClusterInstancesRequest.Builder get() { + return ListComputeGpuMemoryClusterInstancesRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListComputeGpuMemoryClusterInstancesResponse, String>() { + @Override + public String apply(ListComputeGpuMemoryClusterInstancesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeGpuMemoryClusterInstancesRequest.Builder>, + ListComputeGpuMemoryClusterInstancesRequest>() { + @Override + public ListComputeGpuMemoryClusterInstancesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeGpuMemoryClusterInstancesRequest.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< + ListComputeGpuMemoryClusterInstancesRequest, + ListComputeGpuMemoryClusterInstancesResponse>() { + @Override + public ListComputeGpuMemoryClusterInstancesResponse apply( + ListComputeGpuMemoryClusterInstancesRequest request) { + return client.listComputeGpuMemoryClusterInstances(request); + } + }, + new java.util.function.Function< + ListComputeGpuMemoryClusterInstancesResponse, + java.util.List< + com.oracle.bmc.core.model + .ComputeGpuMemoryClusterInstanceSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.core.model + .ComputeGpuMemoryClusterInstanceSummary> + apply(ListComputeGpuMemoryClusterInstancesResponse response) { + return response.getComputeGpuMemoryClusterInstanceCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listComputeGpuMemoryClusters 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 + listComputeGpuMemoryClustersResponseIterator( + final ListComputeGpuMemoryClustersRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListComputeGpuMemoryClustersRequest.Builder, ListComputeGpuMemoryClustersRequest, + ListComputeGpuMemoryClustersResponse>( + new java.util.function.Supplier() { + @Override + public ListComputeGpuMemoryClustersRequest.Builder get() { + return ListComputeGpuMemoryClustersRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListComputeGpuMemoryClustersResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeGpuMemoryClustersRequest.Builder>, + ListComputeGpuMemoryClustersRequest>() { + @Override + public ListComputeGpuMemoryClustersRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeGpuMemoryClustersRequest.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< + ListComputeGpuMemoryClustersRequest, + ListComputeGpuMemoryClustersResponse>() { + @Override + public ListComputeGpuMemoryClustersResponse apply( + ListComputeGpuMemoryClustersRequest request) { + return client.listComputeGpuMemoryClusters(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.core.model.ComputeGpuMemoryClusterSummary} objects + * contained in responses from the listComputeGpuMemoryClusters 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.core.model.ComputeGpuMemoryClusterSummary} objects + * contained in responses received from the service. + */ + public Iterable + listComputeGpuMemoryClustersRecordIterator( + final ListComputeGpuMemoryClustersRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListComputeGpuMemoryClustersRequest.Builder, ListComputeGpuMemoryClustersRequest, + ListComputeGpuMemoryClustersResponse, + com.oracle.bmc.core.model.ComputeGpuMemoryClusterSummary>( + new java.util.function.Supplier() { + @Override + public ListComputeGpuMemoryClustersRequest.Builder get() { + return ListComputeGpuMemoryClustersRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListComputeGpuMemoryClustersResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeGpuMemoryClustersRequest.Builder>, + ListComputeGpuMemoryClustersRequest>() { + @Override + public ListComputeGpuMemoryClustersRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeGpuMemoryClustersRequest.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< + ListComputeGpuMemoryClustersRequest, + ListComputeGpuMemoryClustersResponse>() { + @Override + public ListComputeGpuMemoryClustersResponse apply( + ListComputeGpuMemoryClustersRequest request) { + return client.listComputeGpuMemoryClusters(request); + } + }, + new java.util.function.Function< + ListComputeGpuMemoryClustersResponse, + java.util.List< + com.oracle.bmc.core.model.ComputeGpuMemoryClusterSummary>>() { + @Override + public java.util.List + apply(ListComputeGpuMemoryClustersResponse response) { + return response.getComputeGpuMemoryClusterCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listComputeGpuMemoryFabrics 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 + listComputeGpuMemoryFabricsResponseIterator( + final ListComputeGpuMemoryFabricsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListComputeGpuMemoryFabricsRequest.Builder, ListComputeGpuMemoryFabricsRequest, + ListComputeGpuMemoryFabricsResponse>( + new java.util.function.Supplier() { + @Override + public ListComputeGpuMemoryFabricsRequest.Builder get() { + return ListComputeGpuMemoryFabricsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListComputeGpuMemoryFabricsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeGpuMemoryFabricsRequest.Builder>, + ListComputeGpuMemoryFabricsRequest>() { + @Override + public ListComputeGpuMemoryFabricsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeGpuMemoryFabricsRequest.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< + ListComputeGpuMemoryFabricsRequest, ListComputeGpuMemoryFabricsResponse>() { + @Override + public ListComputeGpuMemoryFabricsResponse apply( + ListComputeGpuMemoryFabricsRequest request) { + return client.listComputeGpuMemoryFabrics(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.core.model.ComputeGpuMemoryFabricSummary} objects + * contained in responses from the listComputeGpuMemoryFabrics 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.core.model.ComputeGpuMemoryFabricSummary} objects + * contained in responses received from the service. + */ + public Iterable + listComputeGpuMemoryFabricsRecordIterator( + final ListComputeGpuMemoryFabricsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListComputeGpuMemoryFabricsRequest.Builder, ListComputeGpuMemoryFabricsRequest, + ListComputeGpuMemoryFabricsResponse, + com.oracle.bmc.core.model.ComputeGpuMemoryFabricSummary>( + new java.util.function.Supplier() { + @Override + public ListComputeGpuMemoryFabricsRequest.Builder get() { + return ListComputeGpuMemoryFabricsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListComputeGpuMemoryFabricsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeGpuMemoryFabricsRequest.Builder>, + ListComputeGpuMemoryFabricsRequest>() { + @Override + public ListComputeGpuMemoryFabricsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeGpuMemoryFabricsRequest.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< + ListComputeGpuMemoryFabricsRequest, ListComputeGpuMemoryFabricsResponse>() { + @Override + public ListComputeGpuMemoryFabricsResponse apply( + ListComputeGpuMemoryFabricsRequest request) { + return client.listComputeGpuMemoryFabrics(request); + } + }, + new java.util.function.Function< + ListComputeGpuMemoryFabricsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListComputeGpuMemoryFabricsResponse response) { + return response.getComputeGpuMemoryFabricCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listComputeHosts 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 listComputeHostsResponseIterator( + final ListComputeHostsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListComputeHostsRequest.Builder, ListComputeHostsRequest, ListComputeHostsResponse>( + new java.util.function.Supplier() { + @Override + public ListComputeHostsRequest.Builder get() { + return ListComputeHostsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListComputeHostsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeHostsRequest.Builder>, + ListComputeHostsRequest>() { + @Override + public ListComputeHostsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeHostsRequest.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< + ListComputeHostsRequest, ListComputeHostsResponse>() { + @Override + public ListComputeHostsResponse apply(ListComputeHostsRequest request) { + return client.listComputeHosts(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.core.model.ComputeHostSummary} objects + * contained in responses from the listComputeHosts 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.core.model.ComputeHostSummary} objects + * contained in responses received from the service. + */ + public Iterable listComputeHostsRecordIterator( + final ListComputeHostsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListComputeHostsRequest.Builder, ListComputeHostsRequest, ListComputeHostsResponse, + com.oracle.bmc.core.model.ComputeHostSummary>( + new java.util.function.Supplier() { + @Override + public ListComputeHostsRequest.Builder get() { + return ListComputeHostsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListComputeHostsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeHostsRequest.Builder>, + ListComputeHostsRequest>() { + @Override + public ListComputeHostsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComputeHostsRequest.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< + ListComputeHostsRequest, ListComputeHostsResponse>() { + @Override + public ListComputeHostsResponse apply(ListComputeHostsRequest request) { + return client.listComputeHosts(request); + } + }, + new java.util.function.Function< + ListComputeHostsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListComputeHostsResponse response) { + return response.getComputeHostCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listComputeImageCapabilitySchemas operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java index a3898673c2..90792265f5 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java @@ -177,6 +177,69 @@ public ChangeComputeCapacityTopologyCompartmentResponse call() request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ChangeComputeHostCompartmentRequest, ChangeComputeHostCompartmentResponse> + forChangeComputeHostCompartment(ChangeComputeHostCompartmentRequest request) { + return forChangeComputeHostCompartment( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ChangeComputeHostCompartmentRequest, ChangeComputeHostCompartmentResponse> + forChangeComputeHostCompartment( + ChangeComputeHostCompartmentRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public ChangeComputeHostCompartmentResponse call() throws Exception { + final ChangeComputeHostCompartmentResponse response = + client.changeComputeHostCompartment(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -433,6 +496,69 @@ public CreateComputeCapacityTopologyResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + CreateComputeGpuMemoryClusterRequest, CreateComputeGpuMemoryClusterResponse> + forCreateComputeGpuMemoryCluster(CreateComputeGpuMemoryClusterRequest request) { + return forCreateComputeGpuMemoryCluster( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + CreateComputeGpuMemoryClusterRequest, CreateComputeGpuMemoryClusterResponse> + forCreateComputeGpuMemoryCluster( + CreateComputeGpuMemoryClusterRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public CreateComputeGpuMemoryClusterResponse call() throws Exception { + final CreateComputeGpuMemoryClusterResponse response = + client.createComputeGpuMemoryCluster(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -681,6 +807,69 @@ public DeleteComputeCapacityTopologyResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + DeleteComputeGpuMemoryClusterRequest, DeleteComputeGpuMemoryClusterResponse> + forDeleteComputeGpuMemoryCluster(DeleteComputeGpuMemoryClusterRequest request) { + return forDeleteComputeGpuMemoryCluster( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + DeleteComputeGpuMemoryClusterRequest, DeleteComputeGpuMemoryClusterResponse> + forDeleteComputeGpuMemoryCluster( + DeleteComputeGpuMemoryClusterRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public DeleteComputeGpuMemoryClusterResponse call() throws Exception { + final DeleteComputeGpuMemoryClusterResponse response = + client.deleteComputeGpuMemoryCluster(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -1236,6 +1425,329 @@ public boolean test(GetComputeClusterResponse 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< + GetComputeGpuMemoryClusterRequest, GetComputeGpuMemoryClusterResponse> + forComputeGpuMemoryCluster( + GetComputeGpuMemoryClusterRequest request, + com.oracle.bmc.core.model.ComputeGpuMemoryCluster.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 forComputeGpuMemoryCluster( + 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< + GetComputeGpuMemoryClusterRequest, GetComputeGpuMemoryClusterResponse> + forComputeGpuMemoryCluster( + GetComputeGpuMemoryClusterRequest request, + com.oracle.bmc.core.model.ComputeGpuMemoryCluster.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 forComputeGpuMemoryCluster( + 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< + GetComputeGpuMemoryClusterRequest, GetComputeGpuMemoryClusterResponse> + forComputeGpuMemoryCluster( + GetComputeGpuMemoryClusterRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.core.model.ComputeGpuMemoryCluster.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 forComputeGpuMemoryCluster( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for ComputeGpuMemoryCluster. + private com.oracle.bmc.waiter.Waiter< + GetComputeGpuMemoryClusterRequest, GetComputeGpuMemoryClusterResponse> + forComputeGpuMemoryCluster( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetComputeGpuMemoryClusterRequest request, + final com.oracle.bmc.core.model.ComputeGpuMemoryCluster.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< + GetComputeGpuMemoryClusterRequest, + GetComputeGpuMemoryClusterResponse>() { + @Override + public GetComputeGpuMemoryClusterResponse apply( + GetComputeGpuMemoryClusterRequest request) { + return client.getComputeGpuMemoryCluster(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetComputeGpuMemoryClusterResponse response) { + return targetStatesSet.contains( + response.getComputeGpuMemoryCluster().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.core.model.ComputeGpuMemoryCluster.LifecycleState + .Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetComputeGpuMemoryFabricRequest, GetComputeGpuMemoryFabricResponse> + forComputeGpuMemoryFabric( + GetComputeGpuMemoryFabricRequest request, + com.oracle.bmc.core.model.ComputeGpuMemoryFabric.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 forComputeGpuMemoryFabric( + 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< + GetComputeGpuMemoryFabricRequest, GetComputeGpuMemoryFabricResponse> + forComputeGpuMemoryFabric( + GetComputeGpuMemoryFabricRequest request, + com.oracle.bmc.core.model.ComputeGpuMemoryFabric.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 forComputeGpuMemoryFabric( + 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< + GetComputeGpuMemoryFabricRequest, GetComputeGpuMemoryFabricResponse> + forComputeGpuMemoryFabric( + GetComputeGpuMemoryFabricRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.core.model.ComputeGpuMemoryFabric.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 forComputeGpuMemoryFabric( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for ComputeGpuMemoryFabric. + private com.oracle.bmc.waiter.Waiter< + GetComputeGpuMemoryFabricRequest, GetComputeGpuMemoryFabricResponse> + forComputeGpuMemoryFabric( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetComputeGpuMemoryFabricRequest request, + final com.oracle.bmc.core.model.ComputeGpuMemoryFabric.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< + GetComputeGpuMemoryFabricRequest, + GetComputeGpuMemoryFabricResponse>() { + @Override + public GetComputeGpuMemoryFabricResponse apply( + GetComputeGpuMemoryFabricRequest request) { + return client.getComputeGpuMemoryFabric(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetComputeGpuMemoryFabricResponse response) { + return targetStatesSet.contains( + response.getComputeGpuMemoryFabric().getLifecycleState()); + } + }, + false), + 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 + forComputeHost( + GetComputeHostRequest request, + com.oracle.bmc.core.model.ComputeHost.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 forComputeHost( + 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 + forComputeHost( + GetComputeHostRequest request, + com.oracle.bmc.core.model.ComputeHost.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 forComputeHost( + 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 + forComputeHost( + GetComputeHostRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.core.model.ComputeHost.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 forComputeHost( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for ComputeHost. + private com.oracle.bmc.waiter.Waiter + forComputeHost( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetComputeHostRequest request, + final com.oracle.bmc.core.model.ComputeHost.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< + GetComputeHostRequest, GetComputeHostResponse>() { + @Override + public GetComputeHostResponse apply(GetComputeHostRequest request) { + return client.getComputeHost(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetComputeHostResponse response) { + return targetStatesSet.contains( + response.getComputeHost().getLifecycleState()); + } + }, + false), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -2252,6 +2764,130 @@ public UpdateComputeCapacityTopologyResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + UpdateComputeGpuMemoryClusterRequest, UpdateComputeGpuMemoryClusterResponse> + forUpdateComputeGpuMemoryCluster(UpdateComputeGpuMemoryClusterRequest request) { + return forUpdateComputeGpuMemoryCluster( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + UpdateComputeGpuMemoryClusterRequest, UpdateComputeGpuMemoryClusterResponse> + forUpdateComputeGpuMemoryCluster( + UpdateComputeGpuMemoryClusterRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public UpdateComputeGpuMemoryClusterResponse call() throws Exception { + final UpdateComputeGpuMemoryClusterResponse response = + client.updateComputeGpuMemoryCluster(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forUpdateComputeHost(UpdateComputeHostRequest request) { + return forUpdateComputeHost( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forUpdateComputeHost( + UpdateComputeHostRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public UpdateComputeHostResponse call() throws Exception { + final UpdateComputeHostResponse response = + client.updateComputeHost(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeComputeGpuMemoryClusterCompartmentConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeComputeGpuMemoryClusterCompartmentConverter.java new file mode 100644 index 0000000000..af214afb20 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeComputeGpuMemoryClusterCompartmentConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeComputeGpuMemoryClusterCompartmentConverter { + 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( + ChangeComputeGpuMemoryClusterCompartmentConverter.class); + + public static com.oracle.bmc.core.requests.ChangeComputeGpuMemoryClusterCompartmentRequest + interceptRequest( + com.oracle.bmc.core.requests.ChangeComputeGpuMemoryClusterCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.ChangeComputeGpuMemoryClusterCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getComputeGpuMemoryClusterId(), + "computeGpuMemoryClusterId must not be blank"); + Validate.notNull( + request.getChangeComputeGpuMemoryClusterCompartmentDetails(), + "changeComputeGpuMemoryClusterCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("computeGpuMemoryClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getComputeGpuMemoryClusterId())) + .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 (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.core.responses.ChangeComputeGpuMemoryClusterCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ChangeComputeGpuMemoryClusterCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .ChangeComputeGpuMemoryClusterCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .ChangeComputeGpuMemoryClusterCompartmentResponse>() { + @Override + public com.oracle.bmc.core.responses + .ChangeComputeGpuMemoryClusterCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.ChangeComputeGpuMemoryClusterCompartmentResponse"); + 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.core.responses + .ChangeComputeGpuMemoryClusterCompartmentResponse + .Builder + builder = + com.oracle.bmc.core.responses + .ChangeComputeGpuMemoryClusterCompartmentResponse + .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.core.responses + .ChangeComputeGpuMemoryClusterCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeComputeGpuMemoryFabricCompartmentConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeComputeGpuMemoryFabricCompartmentConverter.java new file mode 100644 index 0000000000..aebca80c79 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeComputeGpuMemoryFabricCompartmentConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeComputeGpuMemoryFabricCompartmentConverter { + 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( + ChangeComputeGpuMemoryFabricCompartmentConverter.class); + + public static com.oracle.bmc.core.requests.ChangeComputeGpuMemoryFabricCompartmentRequest + interceptRequest( + com.oracle.bmc.core.requests.ChangeComputeGpuMemoryFabricCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.ChangeComputeGpuMemoryFabricCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getComputeGpuMemoryFabricId(), + "computeGpuMemoryFabricId must not be blank"); + Validate.notNull( + request.getChangeComputeGpuMemoryFabricCompartmentDetails(), + "changeComputeGpuMemoryFabricCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("computeGpuMemoryFabrics") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getComputeGpuMemoryFabricId())) + .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 (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.core.responses.ChangeComputeGpuMemoryFabricCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ChangeComputeGpuMemoryFabricCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .ChangeComputeGpuMemoryFabricCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .ChangeComputeGpuMemoryFabricCompartmentResponse>() { + @Override + public com.oracle.bmc.core.responses + .ChangeComputeGpuMemoryFabricCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.ChangeComputeGpuMemoryFabricCompartmentResponse"); + 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.core.responses + .ChangeComputeGpuMemoryFabricCompartmentResponse + .Builder + builder = + com.oracle.bmc.core.responses + .ChangeComputeGpuMemoryFabricCompartmentResponse + .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.core.responses + .ChangeComputeGpuMemoryFabricCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeComputeHostCompartmentConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeComputeHostCompartmentConverter.java new file mode 100644 index 0000000000..6230146c52 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeComputeHostCompartmentConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeComputeHostCompartmentConverter { + 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(ChangeComputeHostCompartmentConverter.class); + + public static com.oracle.bmc.core.requests.ChangeComputeHostCompartmentRequest interceptRequest( + com.oracle.bmc.core.requests.ChangeComputeHostCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.ChangeComputeHostCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getComputeHostId(), "computeHostId must not be blank"); + Validate.notNull( + request.getChangeComputeHostCompartmentDetails(), + "changeComputeHostCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("computeHosts") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getComputeHostId())) + .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 (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.core.responses.ChangeComputeHostCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ChangeComputeHostCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ChangeComputeHostCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .ChangeComputeHostCompartmentResponse>() { + @Override + public com.oracle.bmc.core.responses + .ChangeComputeHostCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.ChangeComputeHostCompartmentResponse"); + 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.core.responses.ChangeComputeHostCompartmentResponse + .Builder + builder = + com.oracle.bmc.core.responses + .ChangeComputeHostCompartmentResponse + .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.core.responses.ChangeComputeHostCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateComputeGpuMemoryClusterConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateComputeGpuMemoryClusterConverter.java new file mode 100644 index 0000000000..f383657474 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateComputeGpuMemoryClusterConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateComputeGpuMemoryClusterConverter { + 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(CreateComputeGpuMemoryClusterConverter.class); + + public static com.oracle.bmc.core.requests.CreateComputeGpuMemoryClusterRequest + interceptRequest( + com.oracle.bmc.core.requests.CreateComputeGpuMemoryClusterRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.CreateComputeGpuMemoryClusterRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateComputeGpuMemoryClusterDetails(), + "createComputeGpuMemoryClusterDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("computeGpuMemoryClusters"); + + 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.core.responses.CreateComputeGpuMemoryClusterResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.CreateComputeGpuMemoryClusterResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.CreateComputeGpuMemoryClusterResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .CreateComputeGpuMemoryClusterResponse>() { + @Override + public com.oracle.bmc.core.responses + .CreateComputeGpuMemoryClusterResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.CreateComputeGpuMemoryClusterResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .ComputeGpuMemoryCluster>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .ComputeGpuMemoryCluster + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .ComputeGpuMemoryCluster + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model.ComputeGpuMemoryCluster> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses.CreateComputeGpuMemoryClusterResponse + .Builder + builder = + com.oracle.bmc.core.responses + .CreateComputeGpuMemoryClusterResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.computeGpuMemoryCluster(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.core.responses.CreateComputeGpuMemoryClusterResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteComputeGpuMemoryClusterConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteComputeGpuMemoryClusterConverter.java new file mode 100644 index 0000000000..2ffb1df59d --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteComputeGpuMemoryClusterConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteComputeGpuMemoryClusterConverter { + 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(DeleteComputeGpuMemoryClusterConverter.class); + + public static com.oracle.bmc.core.requests.DeleteComputeGpuMemoryClusterRequest + interceptRequest( + com.oracle.bmc.core.requests.DeleteComputeGpuMemoryClusterRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.DeleteComputeGpuMemoryClusterRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getComputeGpuMemoryClusterId(), + "computeGpuMemoryClusterId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("computeGpuMemoryClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getComputeGpuMemoryClusterId())); + + 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.core.responses.DeleteComputeGpuMemoryClusterResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.DeleteComputeGpuMemoryClusterResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.DeleteComputeGpuMemoryClusterResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .DeleteComputeGpuMemoryClusterResponse>() { + @Override + public com.oracle.bmc.core.responses + .DeleteComputeGpuMemoryClusterResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.DeleteComputeGpuMemoryClusterResponse"); + 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.core.responses.DeleteComputeGpuMemoryClusterResponse + .Builder + builder = + com.oracle.bmc.core.responses + .DeleteComputeGpuMemoryClusterResponse + .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.core.responses.DeleteComputeGpuMemoryClusterResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetComputeGpuMemoryClusterConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetComputeGpuMemoryClusterConverter.java new file mode 100644 index 0000000000..a5d62dc259 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetComputeGpuMemoryClusterConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetComputeGpuMemoryClusterConverter { + 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(GetComputeGpuMemoryClusterConverter.class); + + public static com.oracle.bmc.core.requests.GetComputeGpuMemoryClusterRequest interceptRequest( + com.oracle.bmc.core.requests.GetComputeGpuMemoryClusterRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.GetComputeGpuMemoryClusterRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getComputeGpuMemoryClusterId(), + "computeGpuMemoryClusterId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("computeGpuMemoryClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getComputeGpuMemoryClusterId())); + + 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.core.responses.GetComputeGpuMemoryClusterResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.GetComputeGpuMemoryClusterResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.GetComputeGpuMemoryClusterResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .GetComputeGpuMemoryClusterResponse>() { + @Override + public com.oracle.bmc.core.responses.GetComputeGpuMemoryClusterResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.GetComputeGpuMemoryClusterResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .ComputeGpuMemoryCluster>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .ComputeGpuMemoryCluster + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .ComputeGpuMemoryCluster + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model.ComputeGpuMemoryCluster> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses.GetComputeGpuMemoryClusterResponse + .Builder + builder = + com.oracle.bmc.core.responses + .GetComputeGpuMemoryClusterResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.computeGpuMemoryCluster(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.core.responses.GetComputeGpuMemoryClusterResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetComputeGpuMemoryFabricConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetComputeGpuMemoryFabricConverter.java new file mode 100644 index 0000000000..421e5cfb88 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetComputeGpuMemoryFabricConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetComputeGpuMemoryFabricConverter { + 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(GetComputeGpuMemoryFabricConverter.class); + + public static com.oracle.bmc.core.requests.GetComputeGpuMemoryFabricRequest interceptRequest( + com.oracle.bmc.core.requests.GetComputeGpuMemoryFabricRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.GetComputeGpuMemoryFabricRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getComputeGpuMemoryFabricId(), + "computeGpuMemoryFabricId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("computeGpuMemoryFabrics") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getComputeGpuMemoryFabricId())); + + 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.core.responses.GetComputeGpuMemoryFabricResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.GetComputeGpuMemoryFabricResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.GetComputeGpuMemoryFabricResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.GetComputeGpuMemoryFabricResponse>() { + @Override + public com.oracle.bmc.core.responses.GetComputeGpuMemoryFabricResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.GetComputeGpuMemoryFabricResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .ComputeGpuMemoryFabric>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model.ComputeGpuMemoryFabric + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model.ComputeGpuMemoryFabric + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model.ComputeGpuMemoryFabric> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses.GetComputeGpuMemoryFabricResponse + .Builder + builder = + com.oracle.bmc.core.responses + .GetComputeGpuMemoryFabricResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.computeGpuMemoryFabric(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.core.responses.GetComputeGpuMemoryFabricResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetComputeHostConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetComputeHostConverter.java new file mode 100644 index 0000000000..8c5e32138f --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetComputeHostConverter.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetComputeHostConverter { + 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(GetComputeHostConverter.class); + + public static com.oracle.bmc.core.requests.GetComputeHostRequest interceptRequest( + com.oracle.bmc.core.requests.GetComputeHostRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.GetComputeHostRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getComputeHostId(), "computeHostId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("computeHosts") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getComputeHostId())); + + 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.core.responses.GetComputeHostResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.core.responses.GetComputeHostResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.GetComputeHostResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.GetComputeHostResponse>() { + @Override + public com.oracle.bmc.core.responses.GetComputeHostResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.GetComputeHostResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model.ComputeHost>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model.ComputeHost.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model.ComputeHost.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model.ComputeHost> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses.GetComputeHostResponse.Builder + builder = + com.oracle.bmc.core.responses.GetComputeHostResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.computeHost(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.core.responses.GetComputeHostResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListComputeGpuMemoryClusterInstancesConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListComputeGpuMemoryClusterInstancesConverter.java new file mode 100644 index 0000000000..393cb1ca04 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListComputeGpuMemoryClusterInstancesConverter.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListComputeGpuMemoryClusterInstancesConverter { + 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(ListComputeGpuMemoryClusterInstancesConverter.class); + + public static com.oracle.bmc.core.requests.ListComputeGpuMemoryClusterInstancesRequest + interceptRequest( + com.oracle.bmc.core.requests.ListComputeGpuMemoryClusterInstancesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.ListComputeGpuMemoryClusterInstancesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getComputeGpuMemoryClusterId(), + "computeGpuMemoryClusterId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("computeGpuMemoryClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getComputeGpuMemoryClusterId())) + .path("instances"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + 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())); + } + + 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.core.responses.ListComputeGpuMemoryClusterInstancesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ListComputeGpuMemoryClusterInstancesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ListComputeGpuMemoryClusterInstancesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .ListComputeGpuMemoryClusterInstancesResponse>() { + @Override + public com.oracle.bmc.core.responses + .ListComputeGpuMemoryClusterInstancesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.ListComputeGpuMemoryClusterInstancesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .ComputeGpuMemoryClusterInstanceCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .ComputeGpuMemoryClusterInstanceCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .ComputeGpuMemoryClusterInstanceCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .ComputeGpuMemoryClusterInstanceCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses + .ListComputeGpuMemoryClusterInstancesResponse + .Builder + builder = + com.oracle.bmc.core.responses + .ListComputeGpuMemoryClusterInstancesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.computeGpuMemoryClusterInstanceCollection( + 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> 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.core.responses + .ListComputeGpuMemoryClusterInstancesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListComputeGpuMemoryClustersConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListComputeGpuMemoryClustersConverter.java new file mode 100644 index 0000000000..bdb4589ad0 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListComputeGpuMemoryClustersConverter.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListComputeGpuMemoryClustersConverter { + 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(ListComputeGpuMemoryClustersConverter.class); + + public static com.oracle.bmc.core.requests.ListComputeGpuMemoryClustersRequest interceptRequest( + com.oracle.bmc.core.requests.ListComputeGpuMemoryClustersRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.ListComputeGpuMemoryClustersRequest 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("/20160918").path("computeGpuMemoryClusters"); + + if (request.getComputeGpuMemoryClusterId() != null) { + target = + target.queryParam( + "computeGpuMemoryClusterId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getComputeGpuMemoryClusterId())); + } + + if (request.getAvailabilityDomain() != null) { + target = + target.queryParam( + "availabilityDomain", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAvailabilityDomain())); + } + + 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.getComputeClusterId() != null) { + target = + target.queryParam( + "computeClusterId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getComputeClusterId())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + 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())); + } + + 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.core.responses.ListComputeGpuMemoryClustersResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ListComputeGpuMemoryClustersResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ListComputeGpuMemoryClustersResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .ListComputeGpuMemoryClustersResponse>() { + @Override + public com.oracle.bmc.core.responses + .ListComputeGpuMemoryClustersResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.ListComputeGpuMemoryClustersResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .ComputeGpuMemoryClusterCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .ComputeGpuMemoryClusterCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .ComputeGpuMemoryClusterCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .ComputeGpuMemoryClusterCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses.ListComputeGpuMemoryClustersResponse + .Builder + builder = + com.oracle.bmc.core.responses + .ListComputeGpuMemoryClustersResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.computeGpuMemoryClusterCollection(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> 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.core.responses.ListComputeGpuMemoryClustersResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListComputeGpuMemoryFabricsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListComputeGpuMemoryFabricsConverter.java new file mode 100644 index 0000000000..6b1ef01547 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListComputeGpuMemoryFabricsConverter.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListComputeGpuMemoryFabricsConverter { + 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(ListComputeGpuMemoryFabricsConverter.class); + + public static com.oracle.bmc.core.requests.ListComputeGpuMemoryFabricsRequest interceptRequest( + com.oracle.bmc.core.requests.ListComputeGpuMemoryFabricsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.ListComputeGpuMemoryFabricsRequest 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("/20160918").path("computeGpuMemoryFabrics"); + + if (request.getComputeGpuMemoryFabricId() != null) { + target = + target.queryParam( + "computeGpuMemoryFabricId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getComputeGpuMemoryFabricId())); + } + + if (request.getAvailabilityDomain() != null) { + target = + target.queryParam( + "availabilityDomain", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAvailabilityDomain())); + } + + 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.getComputeHpcIslandId() != null) { + target = + target.queryParam( + "computeHpcIslandId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getComputeHpcIslandId())); + } + + if (request.getComputeNetworkBlockId() != null) { + target = + target.queryParam( + "computeNetworkBlockId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getComputeNetworkBlockId())); + } + + if (request.getComputeGpuMemoryFabricLifecycleState() != null) { + target = + target.queryParam( + "computeGpuMemoryFabricLifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getComputeGpuMemoryFabricLifecycleState().getValue())); + } + + if (request.getComputeGpuMemoryFabricHealth() != null) { + target = + target.queryParam( + "computeGpuMemoryFabricHealth", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getComputeGpuMemoryFabricHealth().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.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.core.responses.ListComputeGpuMemoryFabricsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ListComputeGpuMemoryFabricsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ListComputeGpuMemoryFabricsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .ListComputeGpuMemoryFabricsResponse>() { + @Override + public com.oracle.bmc.core.responses.ListComputeGpuMemoryFabricsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.ListComputeGpuMemoryFabricsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .ComputeGpuMemoryFabricCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .ComputeGpuMemoryFabricCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .ComputeGpuMemoryFabricCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .ComputeGpuMemoryFabricCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses.ListComputeGpuMemoryFabricsResponse + .Builder + builder = + com.oracle.bmc.core.responses + .ListComputeGpuMemoryFabricsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.computeGpuMemoryFabricCollection(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.core.responses.ListComputeGpuMemoryFabricsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListComputeHostsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListComputeHostsConverter.java new file mode 100644 index 0000000000..5272d20229 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListComputeHostsConverter.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListComputeHostsConverter { + 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(ListComputeHostsConverter.class); + + public static com.oracle.bmc.core.requests.ListComputeHostsRequest interceptRequest( + com.oracle.bmc.core.requests.ListComputeHostsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.ListComputeHostsRequest 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("/20160918").path("computeHosts"); + + if (request.getAvailabilityDomain() != null) { + target = + target.queryParam( + "availabilityDomain", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAvailabilityDomain())); + } + + 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.getNetworkResourceId() != null) { + target = + target.queryParam( + "networkResourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getNetworkResourceId())); + } + + 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.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.getComputeHostLifecycleState() != null) { + target = + target.queryParam( + "computeHostLifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getComputeHostLifecycleState())); + } + + if (request.getComputeHostHealth() != null) { + target = + target.queryParam( + "computeHostHealth", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getComputeHostHealth())); + } + + 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.core.responses.ListComputeHostsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ListComputeHostsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ListComputeHostsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ListComputeHostsResponse>() { + @Override + public com.oracle.bmc.core.responses.ListComputeHostsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.ListComputeHostsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .ComputeHostCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model.ComputeHostCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model.ComputeHostCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model.ComputeHostCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses.ListComputeHostsResponse.Builder + builder = + com.oracle.bmc.core.responses + .ListComputeHostsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.computeHostCollection(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.core.responses.ListComputeHostsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateComputeGpuMemoryClusterConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateComputeGpuMemoryClusterConverter.java new file mode 100644 index 0000000000..107824dcb6 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateComputeGpuMemoryClusterConverter.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateComputeGpuMemoryClusterConverter { + 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(UpdateComputeGpuMemoryClusterConverter.class); + + public static com.oracle.bmc.core.requests.UpdateComputeGpuMemoryClusterRequest + interceptRequest( + com.oracle.bmc.core.requests.UpdateComputeGpuMemoryClusterRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.UpdateComputeGpuMemoryClusterRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getComputeGpuMemoryClusterId(), + "computeGpuMemoryClusterId must not be blank"); + Validate.notNull( + request.getUpdateComputeGpuMemoryClusterDetails(), + "updateComputeGpuMemoryClusterDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("computeGpuMemoryClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getComputeGpuMemoryClusterId())); + + 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.core.responses.UpdateComputeGpuMemoryClusterResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.UpdateComputeGpuMemoryClusterResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.UpdateComputeGpuMemoryClusterResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .UpdateComputeGpuMemoryClusterResponse>() { + @Override + public com.oracle.bmc.core.responses + .UpdateComputeGpuMemoryClusterResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.UpdateComputeGpuMemoryClusterResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .ComputeGpuMemoryCluster>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .ComputeGpuMemoryCluster + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .ComputeGpuMemoryCluster + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model.ComputeGpuMemoryCluster> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses.UpdateComputeGpuMemoryClusterResponse + .Builder + builder = + com.oracle.bmc.core.responses + .UpdateComputeGpuMemoryClusterResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.computeGpuMemoryCluster(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.core.responses.UpdateComputeGpuMemoryClusterResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateComputeGpuMemoryFabricConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateComputeGpuMemoryFabricConverter.java new file mode 100644 index 0000000000..d68c54a8fb --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateComputeGpuMemoryFabricConverter.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateComputeGpuMemoryFabricConverter { + 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(UpdateComputeGpuMemoryFabricConverter.class); + + public static com.oracle.bmc.core.requests.UpdateComputeGpuMemoryFabricRequest interceptRequest( + com.oracle.bmc.core.requests.UpdateComputeGpuMemoryFabricRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.UpdateComputeGpuMemoryFabricRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getComputeGpuMemoryFabricId(), + "computeGpuMemoryFabricId must not be blank"); + Validate.notNull( + request.getUpdateComputeGpuMemoryFabricDetails(), + "updateComputeGpuMemoryFabricDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("computeGpuMemoryFabrics") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getComputeGpuMemoryFabricId())); + + 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.core.responses.UpdateComputeGpuMemoryFabricResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.UpdateComputeGpuMemoryFabricResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.UpdateComputeGpuMemoryFabricResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .UpdateComputeGpuMemoryFabricResponse>() { + @Override + public com.oracle.bmc.core.responses + .UpdateComputeGpuMemoryFabricResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.UpdateComputeGpuMemoryFabricResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .ComputeGpuMemoryFabric>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model.ComputeGpuMemoryFabric + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model.ComputeGpuMemoryFabric + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model.ComputeGpuMemoryFabric> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses.UpdateComputeGpuMemoryFabricResponse + .Builder + builder = + com.oracle.bmc.core.responses + .UpdateComputeGpuMemoryFabricResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.computeGpuMemoryFabric(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.core.responses.UpdateComputeGpuMemoryFabricResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateComputeHostConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateComputeHostConverter.java new file mode 100644 index 0000000000..6a501ab63e --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateComputeHostConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateComputeHostConverter { + 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(UpdateComputeHostConverter.class); + + public static com.oracle.bmc.core.requests.UpdateComputeHostRequest interceptRequest( + com.oracle.bmc.core.requests.UpdateComputeHostRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.UpdateComputeHostRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getComputeHostId(), "computeHostId must not be blank"); + Validate.notNull( + request.getUpdateComputeHostDetails(), "updateComputeHostDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("computeHosts") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getComputeHostId())); + + 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.core.responses.UpdateComputeHostResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.UpdateComputeHostResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.UpdateComputeHostResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.UpdateComputeHostResponse>() { + @Override + public com.oracle.bmc.core.responses.UpdateComputeHostResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.UpdateComputeHostResponse"); + 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.core.responses.UpdateComputeHostResponse.Builder + builder = + com.oracle.bmc.core.responses + .UpdateComputeHostResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + 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.core.responses.UpdateComputeHostResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeComputeGpuMemoryClusterCompartmentDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeComputeGpuMemoryClusterCompartmentDetails.java new file mode 100644 index 0000000000..25824057b3 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeComputeGpuMemoryClusterCompartmentDetails.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * Specifies the compartment to move the compute GPU memory cluster to. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__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 = ChangeComputeGpuMemoryClusterCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeComputeGpuMemoryClusterCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeComputeGpuMemoryClusterCompartmentDetails(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 compute GPU + * memory cluster 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 compute GPU + * memory cluster 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 ChangeComputeGpuMemoryClusterCompartmentDetails build() { + ChangeComputeGpuMemoryClusterCompartmentDetails model = + new ChangeComputeGpuMemoryClusterCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeComputeGpuMemoryClusterCompartmentDetails 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 compute GPU + * memory cluster 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 compute GPU + * memory cluster 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("ChangeComputeGpuMemoryClusterCompartmentDetails("); + 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 ChangeComputeGpuMemoryClusterCompartmentDetails)) { + return false; + } + + ChangeComputeGpuMemoryClusterCompartmentDetails other = + (ChangeComputeGpuMemoryClusterCompartmentDetails) 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-core/src/main/java/com/oracle/bmc/core/model/ChangeComputeGpuMemoryFabricCompartmentDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeComputeGpuMemoryFabricCompartmentDetails.java new file mode 100644 index 0000000000..7282feebb8 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeComputeGpuMemoryFabricCompartmentDetails.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * Specifies the compartment to move the compute GPU memory fabric to. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__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 = ChangeComputeGpuMemoryFabricCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeComputeGpuMemoryFabricCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeComputeGpuMemoryFabricCompartmentDetails(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 compute GPU + * memory fabric 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 compute GPU + * memory fabric 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 ChangeComputeGpuMemoryFabricCompartmentDetails build() { + ChangeComputeGpuMemoryFabricCompartmentDetails model = + new ChangeComputeGpuMemoryFabricCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeComputeGpuMemoryFabricCompartmentDetails 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 compute GPU + * memory fabric 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 compute GPU + * memory fabric 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("ChangeComputeGpuMemoryFabricCompartmentDetails("); + 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 ChangeComputeGpuMemoryFabricCompartmentDetails)) { + return false; + } + + ChangeComputeGpuMemoryFabricCompartmentDetails other = + (ChangeComputeGpuMemoryFabricCompartmentDetails) 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-core/src/main/java/com/oracle/bmc/core/model/ChangeComputeHostCompartmentDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeComputeHostCompartmentDetails.java new file mode 100644 index 0000000000..407a6e85d5 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeComputeHostCompartmentDetails.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * Specifies the compartment to move the compute host to. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__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 = ChangeComputeHostCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeComputeHostCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeComputeHostCompartmentDetails(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 compute host 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 compute host 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 ChangeComputeHostCompartmentDetails build() { + ChangeComputeHostCompartmentDetails model = + new ChangeComputeHostCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeComputeHostCompartmentDetails 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 compute host 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 compute host 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("ChangeComputeHostCompartmentDetails("); + 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 ChangeComputeHostCompartmentDetails)) { + return false; + } + + ChangeComputeHostCompartmentDetails other = (ChangeComputeHostCompartmentDetails) 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-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryCluster.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryCluster.java new file mode 100644 index 0000000000..34bed8d219 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryCluster.java @@ -0,0 +1,785 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * The customer facing object includes GPU memory cluster 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: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComputeGpuMemoryCluster.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComputeGpuMemoryCluster + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "availabilityDomain", + "id", + "instanceConfigurationId", + "compartmentId", + "lifecycleState", + "gpuMemoryFabricId", + "computeClusterId", + "size", + "definedTags", + "freeformTags", + "systemTags", + "displayName", + "timeCreated" + }) + public ComputeGpuMemoryCluster( + String availabilityDomain, + String id, + String instanceConfigurationId, + String compartmentId, + LifecycleState lifecycleState, + String gpuMemoryFabricId, + String computeClusterId, + Long size, + java.util.Map> definedTags, + java.util.Map freeformTags, + java.util.Map> systemTags, + String displayName, + java.util.Date timeCreated) { + super(); + this.availabilityDomain = availabilityDomain; + this.id = id; + this.instanceConfigurationId = instanceConfigurationId; + this.compartmentId = compartmentId; + this.lifecycleState = lifecycleState; + this.gpuMemoryFabricId = gpuMemoryFabricId; + this.computeClusterId = computeClusterId; + this.size = size; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + this.systemTags = systemTags; + this.displayName = displayName; + this.timeCreated = timeCreated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The availability domain of the GPU memory cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The availability domain of the GPU memory cluster. + * + * @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) for the Customer-unique GPU memory cluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory cluster + * + * @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 Instance Configuration used to source launch details for this instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceConfigurationId") + private String instanceConfigurationId; + + /** + * The OCID of the Instance Configuration used to source launch details for this instance. + * @param instanceConfigurationId the value to set + * @return this builder + **/ + public Builder instanceConfigurationId(String instanceConfigurationId) { + this.instanceConfigurationId = instanceConfigurationId; + this.__explicitlySet__.add("instanceConfigurationId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute GPU + * memory 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 that contains the compute GPU + * memory 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 lifecycle state of the GPU memory cluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The lifecycle state of the GPU memory cluster + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the GPU memory fabric. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuMemoryFabricId") + private String gpuMemoryFabricId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the GPU memory fabric. + * + * @param gpuMemoryFabricId the value to set + * @return this builder + **/ + public Builder gpuMemoryFabricId(String gpuMemoryFabricId) { + this.gpuMemoryFabricId = gpuMemoryFabricId; + this.__explicitlySet__.add("gpuMemoryFabricId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeClusterId") + private String computeClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + * + * @param computeClusterId the value to set + * @return this builder + **/ + public Builder computeClusterId(String computeClusterId) { + this.computeClusterId = computeClusterId; + this.__explicitlySet__.add("computeClusterId"); + return this; + } + /** + * The number of instances currently running in the GpuMemoryCluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("size") + private Long size; + + /** + * The number of instances currently running in the GpuMemoryCluster + * + * @param size the value to set + * @return this builder + **/ + public Builder size(Long size) { + this.size = size; + this.__explicitlySet__.add("size"); + 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; + } + /** + * 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; + } + /** + * 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; + } + /** + * 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 date and time the GPU memory cluster was created. + *

+ * Example: {@code 2016-09-15T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the GPU memory cluster was created. + *

+ * Example: {@code 2016-09-15T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComputeGpuMemoryCluster build() { + ComputeGpuMemoryCluster model = + new ComputeGpuMemoryCluster( + this.availabilityDomain, + this.id, + this.instanceConfigurationId, + this.compartmentId, + this.lifecycleState, + this.gpuMemoryFabricId, + this.computeClusterId, + this.size, + this.definedTags, + this.freeformTags, + this.systemTags, + this.displayName, + this.timeCreated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComputeGpuMemoryCluster model) { + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("instanceConfigurationId")) { + this.instanceConfigurationId(model.getInstanceConfigurationId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("gpuMemoryFabricId")) { + this.gpuMemoryFabricId(model.getGpuMemoryFabricId()); + } + if (model.wasPropertyExplicitlySet("computeClusterId")) { + this.computeClusterId(model.getComputeClusterId()); + } + if (model.wasPropertyExplicitlySet("size")) { + this.size(model.getSize()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The availability domain of the GPU memory cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The availability domain of the GPU memory cluster. + * + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory cluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory cluster + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the Instance Configuration used to source launch details for this instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceConfigurationId") + private final String instanceConfigurationId; + + /** + * The OCID of the Instance Configuration used to source launch details for this instance. + * @return the value + **/ + public String getInstanceConfigurationId() { + return instanceConfigurationId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute GPU + * memory 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 that contains the compute GPU + * memory cluster. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The lifecycle state of the GPU memory cluster + * + **/ + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Updating("UPDATING"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The lifecycle state of the GPU memory cluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The lifecycle state of the GPU memory cluster + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the GPU memory fabric. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuMemoryFabricId") + private final String gpuMemoryFabricId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the GPU memory fabric. + * + * @return the value + **/ + public String getGpuMemoryFabricId() { + return gpuMemoryFabricId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeClusterId") + private final String computeClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + * + * @return the value + **/ + public String getComputeClusterId() { + return computeClusterId; + } + + /** + * The number of instances currently running in the GpuMemoryCluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("size") + private final Long size; + + /** + * The number of instances currently running in the GpuMemoryCluster + * + * @return the value + **/ + public Long getSize() { + return size; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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 date and time the GPU memory cluster was created. + *

+ * Example: {@code 2016-09-15T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the GPU memory cluster was created. + *

+ * Example: {@code 2016-09-15T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComputeGpuMemoryCluster("); + sb.append("super=").append(super.toString()); + sb.append("availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", instanceConfigurationId=") + .append(String.valueOf(this.instanceConfigurationId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", gpuMemoryFabricId=").append(String.valueOf(this.gpuMemoryFabricId)); + sb.append(", computeClusterId=").append(String.valueOf(this.computeClusterId)); + sb.append(", size=").append(String.valueOf(this.size)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComputeGpuMemoryCluster)) { + return false; + } + + ComputeGpuMemoryCluster other = (ComputeGpuMemoryCluster) o; + return java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals( + this.instanceConfigurationId, other.instanceConfigurationId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.gpuMemoryFabricId, other.gpuMemoryFabricId) + && java.util.Objects.equals(this.computeClusterId, other.computeClusterId) + && java.util.Objects.equals(this.size, other.size) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.instanceConfigurationId == null + ? 43 + : this.instanceConfigurationId.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.gpuMemoryFabricId == null ? 43 : this.gpuMemoryFabricId.hashCode()); + result = + (result * PRIME) + + (this.computeClusterId == null ? 43 : this.computeClusterId.hashCode()); + result = (result * PRIME) + (this.size == null ? 43 : this.size.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryClusterCollection.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryClusterCollection.java new file mode 100644 index 0000000000..709da6074a --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryClusterCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * A list of compute GPU memory clusters. + * + *
+ * 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 = ComputeGpuMemoryClusterCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComputeGpuMemoryClusterCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ComputeGpuMemoryClusterCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The list of compute GPU memory clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * The list of compute GPU memory clusters. + * @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 ComputeGpuMemoryClusterCollection build() { + ComputeGpuMemoryClusterCollection model = + new ComputeGpuMemoryClusterCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComputeGpuMemoryClusterCollection 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 compute GPU memory clusters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * The list of compute GPU memory clusters. + * @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("ComputeGpuMemoryClusterCollection("); + 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 ComputeGpuMemoryClusterCollection)) { + return false; + } + + ComputeGpuMemoryClusterCollection other = (ComputeGpuMemoryClusterCollection) 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-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryClusterInstanceCollection.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryClusterInstanceCollection.java new file mode 100644 index 0000000000..aa3869214f --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryClusterInstanceCollection.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * A list of compute GPU memory cluster instances. + * + *
+ * 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 = ComputeGpuMemoryClusterInstanceCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComputeGpuMemoryClusterInstanceCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ComputeGpuMemoryClusterInstanceCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The list of compute GPU memory cluster instances. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * The list of compute GPU memory cluster 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 ComputeGpuMemoryClusterInstanceCollection build() { + ComputeGpuMemoryClusterInstanceCollection model = + new ComputeGpuMemoryClusterInstanceCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComputeGpuMemoryClusterInstanceCollection 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 compute GPU memory cluster instances. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * The list of compute GPU memory cluster 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("ComputeGpuMemoryClusterInstanceCollection("); + 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 ComputeGpuMemoryClusterInstanceCollection)) { + return false; + } + + ComputeGpuMemoryClusterInstanceCollection other = + (ComputeGpuMemoryClusterInstanceCollection) 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-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryClusterInstanceSummary.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryClusterInstanceSummary.java new file mode 100644 index 0000000000..89da6d6255 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryClusterInstanceSummary.java @@ -0,0 +1,636 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * The customer facing GPU memory cluster instance object 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: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComputeGpuMemoryClusterInstanceSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComputeGpuMemoryClusterInstanceSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "availabilityDomain", + "id", + "compartmentId", + "faultDomain", + "instanceConfigurationId", + "region", + "instanceShape", + "lifecycleState", + "displayName", + "timeCreated" + }) + public ComputeGpuMemoryClusterInstanceSummary( + String availabilityDomain, + String id, + String compartmentId, + String faultDomain, + String instanceConfigurationId, + String region, + String instanceShape, + LifecycleState lifecycleState, + String displayName, + java.util.Date timeCreated) { + super(); + this.availabilityDomain = availabilityDomain; + this.id = id; + this.compartmentId = compartmentId; + this.faultDomain = faultDomain; + this.instanceConfigurationId = instanceConfigurationId; + this.region = region; + this.instanceShape = instanceShape; + this.lifecycleState = lifecycleState; + this.displayName = displayName; + this.timeCreated = timeCreated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The availability domain of the GPU memory cluster instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The availability domain of the GPU memory cluster instance. + * + * @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) for the Customer-unique GPU memory cluster instance + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory cluster instance + * + * @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) for the compartment + * compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment + * 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 fault domain the GPU memory cluster instance is running in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("faultDomain") + private String faultDomain; + + /** + * The fault domain the GPU memory cluster instance is running in. + * @param faultDomain the value to set + * @return this builder + **/ + public Builder faultDomain(String faultDomain) { + this.faultDomain = faultDomain; + this.__explicitlySet__.add("faultDomain"); + return this; + } + /** + * Configuration to be used for this GPU Memory Cluster instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceConfigurationId") + private String instanceConfigurationId; + + /** + * Configuration to be used for this GPU Memory Cluster instance. + * + * @param instanceConfigurationId the value to set + * @return this builder + **/ + public Builder instanceConfigurationId(String instanceConfigurationId) { + this.instanceConfigurationId = instanceConfigurationId; + this.__explicitlySet__.add("instanceConfigurationId"); + return this; + } + /** + * The region that contains the availability domain the instance is running in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("region") + private String region; + + /** + * The region that contains the availability domain the instance is running in. + * @param region the value to set + * @return this builder + **/ + public Builder region(String region) { + this.region = region; + this.__explicitlySet__.add("region"); + return this; + } + /** + * The shape of an instance. The shape determines the number of CPUs, amount of memory, + * and other resources allocated to the instance. The shape determines the number of CPUs, + * the amount of memory, and other resources allocated to the instance. + * You can list all available shapes by calling {@link #listShapes(ListShapesRequest) listShapes}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceShape") + private String instanceShape; + + /** + * The shape of an instance. The shape determines the number of CPUs, amount of memory, + * and other resources allocated to the instance. The shape determines the number of CPUs, + * the amount of memory, and other resources allocated to the instance. + * You can list all available shapes by calling {@link #listShapes(ListShapesRequest) listShapes}. + * + * @param instanceShape the value to set + * @return this builder + **/ + public Builder instanceShape(String instanceShape) { + this.instanceShape = instanceShape; + this.__explicitlySet__.add("instanceShape"); + return this; + } + /** + * The lifecycle state of the GPU memory cluster instance + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The lifecycle state of the GPU memory cluster 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 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 date and time the GPU memory cluster instance was created. + *

+ * Example: {@code 2016-09-15T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the GPU memory cluster instance was created. + *

+ * Example: {@code 2016-09-15T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComputeGpuMemoryClusterInstanceSummary build() { + ComputeGpuMemoryClusterInstanceSummary model = + new ComputeGpuMemoryClusterInstanceSummary( + this.availabilityDomain, + this.id, + this.compartmentId, + this.faultDomain, + this.instanceConfigurationId, + this.region, + this.instanceShape, + this.lifecycleState, + this.displayName, + this.timeCreated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComputeGpuMemoryClusterInstanceSummary model) { + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("faultDomain")) { + this.faultDomain(model.getFaultDomain()); + } + if (model.wasPropertyExplicitlySet("instanceConfigurationId")) { + this.instanceConfigurationId(model.getInstanceConfigurationId()); + } + if (model.wasPropertyExplicitlySet("region")) { + this.region(model.getRegion()); + } + if (model.wasPropertyExplicitlySet("instanceShape")) { + this.instanceShape(model.getInstanceShape()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The availability domain of the GPU memory cluster instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The availability domain of the GPU memory cluster instance. + * + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory cluster instance + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory cluster instance + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment + * compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment + * compartment. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The fault domain the GPU memory cluster instance is running in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("faultDomain") + private final String faultDomain; + + /** + * The fault domain the GPU memory cluster instance is running in. + * @return the value + **/ + public String getFaultDomain() { + return faultDomain; + } + + /** + * Configuration to be used for this GPU Memory Cluster instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceConfigurationId") + private final String instanceConfigurationId; + + /** + * Configuration to be used for this GPU Memory Cluster instance. + * + * @return the value + **/ + public String getInstanceConfigurationId() { + return instanceConfigurationId; + } + + /** + * The region that contains the availability domain the instance is running in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("region") + private final String region; + + /** + * The region that contains the availability domain the instance is running in. + * @return the value + **/ + public String getRegion() { + return region; + } + + /** + * The shape of an instance. The shape determines the number of CPUs, amount of memory, + * and other resources allocated to the instance. The shape determines the number of CPUs, + * the amount of memory, and other resources allocated to the instance. + * You can list all available shapes by calling {@link #listShapes(ListShapesRequest) listShapes}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceShape") + private final String instanceShape; + + /** + * The shape of an instance. The shape determines the number of CPUs, amount of memory, + * and other resources allocated to the instance. The shape determines the number of CPUs, + * the amount of memory, and other resources allocated to the instance. + * You can list all available shapes by calling {@link #listShapes(ListShapesRequest) listShapes}. + * + * @return the value + **/ + public String getInstanceShape() { + return instanceShape; + } + + /** + * The lifecycle state of the GPU memory cluster instance + * + **/ + public enum LifecycleState { + Moving("MOVING"), + Provisioning("PROVISIONING"), + Running("RUNNING"), + Starting("STARTING"), + Stopping("STOPPING"), + Stopped("STOPPED"), + Suspending("SUSPENDING"), + Suspended("SUSPENDED"), + CreatingImage("CREATING_IMAGE"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + + /** + * 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 lifecycle state of the GPU memory cluster instance + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The lifecycle state of the GPU memory cluster instance + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * 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 date and time the GPU memory cluster instance was created. + *

+ * Example: {@code 2016-09-15T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the GPU memory cluster instance was created. + *

+ * Example: {@code 2016-09-15T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComputeGpuMemoryClusterInstanceSummary("); + sb.append("super=").append(super.toString()); + sb.append("availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", faultDomain=").append(String.valueOf(this.faultDomain)); + sb.append(", instanceConfigurationId=") + .append(String.valueOf(this.instanceConfigurationId)); + sb.append(", region=").append(String.valueOf(this.region)); + sb.append(", instanceShape=").append(String.valueOf(this.instanceShape)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComputeGpuMemoryClusterInstanceSummary)) { + return false; + } + + ComputeGpuMemoryClusterInstanceSummary other = (ComputeGpuMemoryClusterInstanceSummary) o; + return java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.faultDomain, other.faultDomain) + && java.util.Objects.equals( + this.instanceConfigurationId, other.instanceConfigurationId) + && java.util.Objects.equals(this.region, other.region) + && java.util.Objects.equals(this.instanceShape, other.instanceShape) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.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.faultDomain == null ? 43 : this.faultDomain.hashCode()); + result = + (result * PRIME) + + (this.instanceConfigurationId == null + ? 43 + : this.instanceConfigurationId.hashCode()); + result = (result * PRIME) + (this.region == null ? 43 : this.region.hashCode()); + result = + (result * PRIME) + + (this.instanceShape == null ? 43 : this.instanceShape.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.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryClusterSummary.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryClusterSummary.java new file mode 100644 index 0000000000..c9f6859631 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryClusterSummary.java @@ -0,0 +1,554 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * Summary model for listing Compute GPU Memory Clusters. + *
+ * 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 = ComputeGpuMemoryClusterSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComputeGpuMemoryClusterSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "availabilityDomain", + "lifecycleState", + "timeCreated", + "definedTags", + "freeformTags", + "systemTags", + "displayName" + }) + public ComputeGpuMemoryClusterSummary( + String id, + String compartmentId, + String availabilityDomain, + ComputeGpuMemoryCluster.LifecycleState lifecycleState, + java.util.Date timeCreated, + java.util.Map> definedTags, + java.util.Map freeformTags, + java.util.Map> systemTags, + String displayName) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.availabilityDomain = availabilityDomain; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + this.systemTags = systemTags; + this.displayName = displayName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory cluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory cluster + * + * @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 compute GPU memory cluster. + * 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 that contains the compute GPU memory cluster. + * 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 availability domain of GPU memory cluster. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The availability domain of GPU memory cluster. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The current state of the compute GPU memory cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ComputeGpuMemoryCluster.LifecycleState lifecycleState; + + /** + * The current state of the compute GPU memory cluster. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(ComputeGpuMemoryCluster.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The date and time the boot volume was created, in the format defined by [RFC3339](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 boot volume was created, in the format defined by [RFC3339](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; + } + /** + * 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; + } + /** + * 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; + } + /** + * 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; + } + /** + * 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; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComputeGpuMemoryClusterSummary build() { + ComputeGpuMemoryClusterSummary model = + new ComputeGpuMemoryClusterSummary( + this.id, + this.compartmentId, + this.availabilityDomain, + this.lifecycleState, + this.timeCreated, + this.definedTags, + this.freeformTags, + this.systemTags, + this.displayName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComputeGpuMemoryClusterSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + 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) for the Customer-unique GPU memory cluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory cluster + * + * @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 compute GPU memory cluster. + * 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 that contains the compute GPU memory cluster. + * compartment. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The availability domain of GPU memory cluster. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The availability domain of GPU memory cluster. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The current state of the compute GPU memory cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final ComputeGpuMemoryCluster.LifecycleState lifecycleState; + + /** + * The current state of the compute GPU memory cluster. + * @return the value + **/ + public ComputeGpuMemoryCluster.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The date and time the boot volume was created, in the format defined by [RFC3339](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 boot volume was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + @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("ComputeGpuMemoryClusterSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + 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 ComputeGpuMemoryClusterSummary)) { + return false; + } + + ComputeGpuMemoryClusterSummary other = (ComputeGpuMemoryClusterSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.displayName, other.displayName) + && 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.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryFabric.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryFabric.java new file mode 100644 index 0000000000..67f662c1aa --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryFabric.java @@ -0,0 +1,926 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * The customer facing object includes GPU memory fabric 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: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComputeGpuMemoryFabric.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComputeGpuMemoryFabric + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "computeHpcIslandId", + "computeNetworkBlockId", + "computeLocalBlockId", + "lifecycleState", + "fabricHealth", + "additionalData", + "healthyHostCount", + "totalHostCount", + "timeCreated", + "definedTags", + "freeformTags", + "systemTags", + "displayName" + }) + public ComputeGpuMemoryFabric( + String id, + String compartmentId, + String computeHpcIslandId, + String computeNetworkBlockId, + String computeLocalBlockId, + LifecycleState lifecycleState, + FabricHealth fabricHealth, + java.util.Map additionalData, + Long healthyHostCount, + Long totalHostCount, + java.util.Date timeCreated, + java.util.Map> definedTags, + java.util.Map freeformTags, + java.util.Map> systemTags, + String displayName) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.computeHpcIslandId = computeHpcIslandId; + this.computeNetworkBlockId = computeNetworkBlockId; + this.computeLocalBlockId = computeLocalBlockId; + this.lifecycleState = lifecycleState; + this.fabricHealth = fabricHealth; + this.additionalData = additionalData; + this.healthyHostCount = healthyHostCount; + this.totalHostCount = totalHostCount; + this.timeCreated = timeCreated; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + this.systemTags = systemTags; + this.displayName = displayName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory fabric + * + * @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) for the compartment. This should always be the root + * compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + * 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeHpcIslandId") + private String computeHpcIslandId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + * @param computeHpcIslandId the value to set + * @return this builder + **/ + public Builder computeHpcIslandId(String computeHpcIslandId) { + this.computeHpcIslandId = computeHpcIslandId; + this.__explicitlySet__.add("computeHpcIslandId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeNetworkBlockId") + private String computeNetworkBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + * @param computeNetworkBlockId the value to set + * @return this builder + **/ + public Builder computeNetworkBlockId(String computeNetworkBlockId) { + this.computeNetworkBlockId = computeNetworkBlockId; + this.__explicitlySet__.add("computeNetworkBlockId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeLocalBlockId") + private String computeLocalBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + * @param computeLocalBlockId the value to set + * @return this builder + **/ + public Builder computeLocalBlockId(String computeLocalBlockId) { + this.computeLocalBlockId = computeLocalBlockId; + this.__explicitlySet__.add("computeLocalBlockId"); + return this; + } + /** + * The lifecycle state of the GPU memory fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The lifecycle state of the GPU memory fabric + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The health state of the GPU memory fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fabricHealth") + private FabricHealth fabricHealth; + + /** + * The health state of the GPU memory fabric + * + * @param fabricHealth the value to set + * @return this builder + **/ + public Builder fabricHealth(FabricHealth fabricHealth) { + this.fabricHealth = fabricHealth; + this.__explicitlySet__.add("fabricHealth"); + return this; + } + /** + * Additional data that can be exposed to the customer. Right now it will include the switch tray ids. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalData") + private java.util.Map additionalData; + + /** + * Additional data that can be exposed to the customer. Right now it will include the switch tray ids. + * + * @param additionalData the value to set + * @return this builder + **/ + public Builder additionalData(java.util.Map additionalData) { + this.additionalData = additionalData; + this.__explicitlySet__.add("additionalData"); + return this; + } + /** + * The total number of healthy bare metal hosts located in this compute GPU memory fabric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("healthyHostCount") + private Long healthyHostCount; + + /** + * The total number of healthy bare metal hosts located in this compute GPU memory fabric. + * @param healthyHostCount the value to set + * @return this builder + **/ + public Builder healthyHostCount(Long healthyHostCount) { + this.healthyHostCount = healthyHostCount; + this.__explicitlySet__.add("healthyHostCount"); + return this; + } + /** + * The total number of bare metal hosts located in this compute GPU memory fabric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalHostCount") + private Long totalHostCount; + + /** + * The total number of bare metal hosts located in this compute GPU memory fabric. + * @param totalHostCount the value to set + * @return this builder + **/ + public Builder totalHostCount(Long totalHostCount) { + this.totalHostCount = totalHostCount; + this.__explicitlySet__.add("totalHostCount"); + return this; + } + /** + * The date and time that the compute GPU memory fabric record was created, in the format defined by [RFC3339] + * (https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time that the compute GPU memory fabric record was created, in the format defined by [RFC3339] + * (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; + } + /** + * 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; + } + /** + * 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; + } + /** + * 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; + } + /** + * 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; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComputeGpuMemoryFabric build() { + ComputeGpuMemoryFabric model = + new ComputeGpuMemoryFabric( + this.id, + this.compartmentId, + this.computeHpcIslandId, + this.computeNetworkBlockId, + this.computeLocalBlockId, + this.lifecycleState, + this.fabricHealth, + this.additionalData, + this.healthyHostCount, + this.totalHostCount, + this.timeCreated, + this.definedTags, + this.freeformTags, + this.systemTags, + this.displayName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComputeGpuMemoryFabric model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("computeHpcIslandId")) { + this.computeHpcIslandId(model.getComputeHpcIslandId()); + } + if (model.wasPropertyExplicitlySet("computeNetworkBlockId")) { + this.computeNetworkBlockId(model.getComputeNetworkBlockId()); + } + if (model.wasPropertyExplicitlySet("computeLocalBlockId")) { + this.computeLocalBlockId(model.getComputeLocalBlockId()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("fabricHealth")) { + this.fabricHealth(model.getFabricHealth()); + } + if (model.wasPropertyExplicitlySet("additionalData")) { + this.additionalData(model.getAdditionalData()); + } + if (model.wasPropertyExplicitlySet("healthyHostCount")) { + this.healthyHostCount(model.getHealthyHostCount()); + } + if (model.wasPropertyExplicitlySet("totalHostCount")) { + this.totalHostCount(model.getTotalHostCount()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + 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) for the Customer-unique GPU memory fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory fabric + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + * compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + * compartment. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeHpcIslandId") + private final String computeHpcIslandId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + * @return the value + **/ + public String getComputeHpcIslandId() { + return computeHpcIslandId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeNetworkBlockId") + private final String computeNetworkBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + * @return the value + **/ + public String getComputeNetworkBlockId() { + return computeNetworkBlockId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeLocalBlockId") + private final String computeLocalBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + * @return the value + **/ + public String getComputeLocalBlockId() { + return computeLocalBlockId; + } + + /** + * The lifecycle state of the GPU memory fabric + * + **/ + public enum LifecycleState { + Available("AVAILABLE"), + Occupied("OCCUPIED"), + Provisioning("PROVISIONING"), + Degraded("DEGRADED"), + Unavailable("UNAVAILABLE"), + + /** + * 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 lifecycle state of the GPU memory fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The lifecycle state of the GPU memory fabric + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The health state of the GPU memory fabric + * + **/ + public enum FabricHealth { + Healthy("HEALTHY"), + Unhealthy("UNHEALTHY"), + + /** + * 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(FabricHealth.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (FabricHealth v : FabricHealth.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + FabricHealth(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static FabricHealth create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'FabricHealth', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The health state of the GPU memory fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fabricHealth") + private final FabricHealth fabricHealth; + + /** + * The health state of the GPU memory fabric + * + * @return the value + **/ + public FabricHealth getFabricHealth() { + return fabricHealth; + } + + /** + * Additional data that can be exposed to the customer. Right now it will include the switch tray ids. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalData") + private final java.util.Map additionalData; + + /** + * Additional data that can be exposed to the customer. Right now it will include the switch tray ids. + * + * @return the value + **/ + public java.util.Map getAdditionalData() { + return additionalData; + } + + /** + * The total number of healthy bare metal hosts located in this compute GPU memory fabric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("healthyHostCount") + private final Long healthyHostCount; + + /** + * The total number of healthy bare metal hosts located in this compute GPU memory fabric. + * @return the value + **/ + public Long getHealthyHostCount() { + return healthyHostCount; + } + + /** + * The total number of bare metal hosts located in this compute GPU memory fabric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalHostCount") + private final Long totalHostCount; + + /** + * The total number of bare metal hosts located in this compute GPU memory fabric. + * @return the value + **/ + public Long getTotalHostCount() { + return totalHostCount; + } + + /** + * The date and time that the compute GPU memory fabric record was created, in the format defined by [RFC3339] + * (https://tools.ietf.org/html/rfc3339). + *

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

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + @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("ComputeGpuMemoryFabric("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", computeHpcIslandId=").append(String.valueOf(this.computeHpcIslandId)); + sb.append(", computeNetworkBlockId=").append(String.valueOf(this.computeNetworkBlockId)); + sb.append(", computeLocalBlockId=").append(String.valueOf(this.computeLocalBlockId)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", fabricHealth=").append(String.valueOf(this.fabricHealth)); + sb.append(", additionalData=").append(String.valueOf(this.additionalData)); + sb.append(", healthyHostCount=").append(String.valueOf(this.healthyHostCount)); + sb.append(", totalHostCount=").append(String.valueOf(this.totalHostCount)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + 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 ComputeGpuMemoryFabric)) { + return false; + } + + ComputeGpuMemoryFabric other = (ComputeGpuMemoryFabric) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.computeHpcIslandId, other.computeHpcIslandId) + && java.util.Objects.equals(this.computeNetworkBlockId, other.computeNetworkBlockId) + && java.util.Objects.equals(this.computeLocalBlockId, other.computeLocalBlockId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.fabricHealth, other.fabricHealth) + && java.util.Objects.equals(this.additionalData, other.additionalData) + && java.util.Objects.equals(this.healthyHostCount, other.healthyHostCount) + && java.util.Objects.equals(this.totalHostCount, other.totalHostCount) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.displayName, other.displayName) + && 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.computeHpcIslandId == null + ? 43 + : this.computeHpcIslandId.hashCode()); + result = + (result * PRIME) + + (this.computeNetworkBlockId == null + ? 43 + : this.computeNetworkBlockId.hashCode()); + result = + (result * PRIME) + + (this.computeLocalBlockId == null + ? 43 + : this.computeLocalBlockId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.fabricHealth == null ? 43 : this.fabricHealth.hashCode()); + result = + (result * PRIME) + + (this.additionalData == null ? 43 : this.additionalData.hashCode()); + result = + (result * PRIME) + + (this.healthyHostCount == null ? 43 : this.healthyHostCount.hashCode()); + result = + (result * PRIME) + + (this.totalHostCount == null ? 43 : this.totalHostCount.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryFabricCollection.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryFabricCollection.java new file mode 100644 index 0000000000..b39ed93594 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryFabricCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * A list of compute GPU memory fabrics. + * + *
+ * 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 = ComputeGpuMemoryFabricCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComputeGpuMemoryFabricCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ComputeGpuMemoryFabricCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The list of compute GPU memory fabrics. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * The list of compute GPU memory fabrics. + * @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 ComputeGpuMemoryFabricCollection build() { + ComputeGpuMemoryFabricCollection model = + new ComputeGpuMemoryFabricCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComputeGpuMemoryFabricCollection 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 compute GPU memory fabrics. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * The list of compute GPU memory fabrics. + * @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("ComputeGpuMemoryFabricCollection("); + 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 ComputeGpuMemoryFabricCollection)) { + return false; + } + + ComputeGpuMemoryFabricCollection other = (ComputeGpuMemoryFabricCollection) 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-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryFabricSummary.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryFabricSummary.java new file mode 100644 index 0000000000..34f4a58796 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeGpuMemoryFabricSummary.java @@ -0,0 +1,737 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * Summary information for a compute GPU memory fabric. + * + *
+ * 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 = ComputeGpuMemoryFabricSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComputeGpuMemoryFabricSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "computeHpcIslandId", + "computeNetworkBlockId", + "computeLocalBlockId", + "lifecycleState", + "fabricHealth", + "totalHostCount", + "timeCreated", + "definedTags", + "freeformTags", + "systemTags", + "displayName" + }) + public ComputeGpuMemoryFabricSummary( + String id, + String compartmentId, + String computeHpcIslandId, + String computeNetworkBlockId, + String computeLocalBlockId, + ComputeGpuMemoryFabric.LifecycleState lifecycleState, + ComputeGpuMemoryFabric.FabricHealth fabricHealth, + Long totalHostCount, + java.util.Date timeCreated, + java.util.Map> definedTags, + java.util.Map freeformTags, + java.util.Map> systemTags, + String displayName) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.computeHpcIslandId = computeHpcIslandId; + this.computeNetworkBlockId = computeNetworkBlockId; + this.computeLocalBlockId = computeLocalBlockId; + this.lifecycleState = lifecycleState; + this.fabricHealth = fabricHealth; + this.totalHostCount = totalHostCount; + this.timeCreated = timeCreated; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + this.systemTags = systemTags; + this.displayName = displayName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory fabric + * + * @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) for the compartment. This should always be the + * root compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the + * root 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeHpcIslandId") + private String computeHpcIslandId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + * @param computeHpcIslandId the value to set + * @return this builder + **/ + public Builder computeHpcIslandId(String computeHpcIslandId) { + this.computeHpcIslandId = computeHpcIslandId; + this.__explicitlySet__.add("computeHpcIslandId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeNetworkBlockId") + private String computeNetworkBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + * @param computeNetworkBlockId the value to set + * @return this builder + **/ + public Builder computeNetworkBlockId(String computeNetworkBlockId) { + this.computeNetworkBlockId = computeNetworkBlockId; + this.__explicitlySet__.add("computeNetworkBlockId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeLocalBlockId") + private String computeLocalBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + * @param computeLocalBlockId the value to set + * @return this builder + **/ + public Builder computeLocalBlockId(String computeLocalBlockId) { + this.computeLocalBlockId = computeLocalBlockId; + this.__explicitlySet__.add("computeLocalBlockId"); + return this; + } + /** + * The lifecycle state of the GPU memory fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ComputeGpuMemoryFabric.LifecycleState lifecycleState; + + /** + * The lifecycle state of the GPU memory fabric + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(ComputeGpuMemoryFabric.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The health state of the GPU memory fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fabricHealth") + private ComputeGpuMemoryFabric.FabricHealth fabricHealth; + + /** + * The health state of the GPU memory fabric + * + * @param fabricHealth the value to set + * @return this builder + **/ + public Builder fabricHealth(ComputeGpuMemoryFabric.FabricHealth fabricHealth) { + this.fabricHealth = fabricHealth; + this.__explicitlySet__.add("fabricHealth"); + return this; + } + /** + * The total number of bare metal hosts located in this compute GPU memory fabric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalHostCount") + private Long totalHostCount; + + /** + * The total number of bare metal hosts located in this compute GPU memory fabric. + * @param totalHostCount the value to set + * @return this builder + **/ + public Builder totalHostCount(Long totalHostCount) { + this.totalHostCount = totalHostCount; + this.__explicitlySet__.add("totalHostCount"); + return this; + } + /** + * The date and time that the compute GPU memory fabric record was created, in the format defined by [RFC3339] + * (https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time that the compute GPU memory fabric record was created, in the format defined by [RFC3339] + * (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; + } + /** + * 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; + } + /** + * 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; + } + /** + * 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; + } + /** + * 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; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComputeGpuMemoryFabricSummary build() { + ComputeGpuMemoryFabricSummary model = + new ComputeGpuMemoryFabricSummary( + this.id, + this.compartmentId, + this.computeHpcIslandId, + this.computeNetworkBlockId, + this.computeLocalBlockId, + this.lifecycleState, + this.fabricHealth, + this.totalHostCount, + this.timeCreated, + this.definedTags, + this.freeformTags, + this.systemTags, + this.displayName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComputeGpuMemoryFabricSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("computeHpcIslandId")) { + this.computeHpcIslandId(model.getComputeHpcIslandId()); + } + if (model.wasPropertyExplicitlySet("computeNetworkBlockId")) { + this.computeNetworkBlockId(model.getComputeNetworkBlockId()); + } + if (model.wasPropertyExplicitlySet("computeLocalBlockId")) { + this.computeLocalBlockId(model.getComputeLocalBlockId()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("fabricHealth")) { + this.fabricHealth(model.getFabricHealth()); + } + if (model.wasPropertyExplicitlySet("totalHostCount")) { + this.totalHostCount(model.getTotalHostCount()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + 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) for the Customer-unique GPU memory fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory fabric + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the + * root compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the + * root compartment. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeHpcIslandId") + private final String computeHpcIslandId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + * @return the value + **/ + public String getComputeHpcIslandId() { + return computeHpcIslandId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeNetworkBlockId") + private final String computeNetworkBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + * @return the value + **/ + public String getComputeNetworkBlockId() { + return computeNetworkBlockId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeLocalBlockId") + private final String computeLocalBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + * @return the value + **/ + public String getComputeLocalBlockId() { + return computeLocalBlockId; + } + + /** + * The lifecycle state of the GPU memory fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final ComputeGpuMemoryFabric.LifecycleState lifecycleState; + + /** + * The lifecycle state of the GPU memory fabric + * + * @return the value + **/ + public ComputeGpuMemoryFabric.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The health state of the GPU memory fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fabricHealth") + private final ComputeGpuMemoryFabric.FabricHealth fabricHealth; + + /** + * The health state of the GPU memory fabric + * + * @return the value + **/ + public ComputeGpuMemoryFabric.FabricHealth getFabricHealth() { + return fabricHealth; + } + + /** + * The total number of bare metal hosts located in this compute GPU memory fabric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalHostCount") + private final Long totalHostCount; + + /** + * The total number of bare metal hosts located in this compute GPU memory fabric. + * @return the value + **/ + public Long getTotalHostCount() { + return totalHostCount; + } + + /** + * The date and time that the compute GPU memory fabric record was created, in the format defined by [RFC3339] + * (https://tools.ietf.org/html/rfc3339). + *

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

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + @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("ComputeGpuMemoryFabricSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", computeHpcIslandId=").append(String.valueOf(this.computeHpcIslandId)); + sb.append(", computeNetworkBlockId=").append(String.valueOf(this.computeNetworkBlockId)); + sb.append(", computeLocalBlockId=").append(String.valueOf(this.computeLocalBlockId)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", fabricHealth=").append(String.valueOf(this.fabricHealth)); + sb.append(", totalHostCount=").append(String.valueOf(this.totalHostCount)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + 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 ComputeGpuMemoryFabricSummary)) { + return false; + } + + ComputeGpuMemoryFabricSummary other = (ComputeGpuMemoryFabricSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.computeHpcIslandId, other.computeHpcIslandId) + && java.util.Objects.equals(this.computeNetworkBlockId, other.computeNetworkBlockId) + && java.util.Objects.equals(this.computeLocalBlockId, other.computeLocalBlockId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.fabricHealth, other.fabricHealth) + && java.util.Objects.equals(this.totalHostCount, other.totalHostCount) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.displayName, other.displayName) + && 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.computeHpcIslandId == null + ? 43 + : this.computeHpcIslandId.hashCode()); + result = + (result * PRIME) + + (this.computeNetworkBlockId == null + ? 43 + : this.computeNetworkBlockId.hashCode()); + result = + (result * PRIME) + + (this.computeLocalBlockId == null + ? 43 + : this.computeLocalBlockId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.fabricHealth == null ? 43 : this.fabricHealth.hashCode()); + result = + (result * PRIME) + + (this.totalHostCount == null ? 43 : this.totalHostCount.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeHost.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeHost.java new file mode 100644 index 0000000000..533e3a7835 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeHost.java @@ -0,0 +1,1239 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * The customer facing object includes host 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: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ComputeHost.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComputeHost extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "availabilityDomain", + "compartmentId", + "id", + "faultDomain", + "hpcIslandId", + "networkBlockId", + "localBlockId", + "gpuMemoryFabricId", + "instanceId", + "shape", + "health", + "additionalData", + "lifecycleState", + "lifecycleDetails", + "capacityReservationId", + "impactedComponentDetails", + "timeCreated", + "timeUpdated", + "definedTags", + "displayName", + "freeformTags" + }) + public ComputeHost( + String availabilityDomain, + String compartmentId, + String id, + String faultDomain, + String hpcIslandId, + String networkBlockId, + String localBlockId, + String gpuMemoryFabricId, + String instanceId, + String shape, + Health health, + java.util.Map additionalData, + LifecycleState lifecycleState, + java.util.Map lifecycleDetails, + String capacityReservationId, + java.util.Map impactedComponentDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Map> definedTags, + String displayName, + java.util.Map freeformTags) { + super(); + this.availabilityDomain = availabilityDomain; + this.compartmentId = compartmentId; + this.id = id; + this.faultDomain = faultDomain; + this.hpcIslandId = hpcIslandId; + this.networkBlockId = networkBlockId; + this.localBlockId = localBlockId; + this.gpuMemoryFabricId = gpuMemoryFabricId; + this.instanceId = instanceId; + this.shape = shape; + this.health = health; + this.additionalData = additionalData; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.capacityReservationId = capacityReservationId; + this.impactedComponentDetails = impactedComponentDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.definedTags = definedTags; + this.displayName = displayName; + this.freeformTags = freeformTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The availability domain of the compute host. + *

+ * Example: {@code Uocm:US-CHICAGO-1-AD-2} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The availability domain of the compute host. + *

+ * Example: {@code Uocm:US-CHICAGO-1-AD-2} + * + * @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) for the compartment. This should always be the root + * compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + * 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host + * + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A fault domain is a grouping of hardware and infrastructure within an availability domain. + * Each availability domain contains three fault domains. Fault domains let you distribute your + * instances so that they are not on the same physical hardware within a single availability domain. + * A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + * instances in other fault domains. + *

+ * This field is the Fault domain of the host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("faultDomain") + private String faultDomain; + + /** + * A fault domain is a grouping of hardware and infrastructure within an availability domain. + * Each availability domain contains three fault domains. Fault domains let you distribute your + * instances so that they are not on the same physical hardware within a single availability domain. + * A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + * instances in other fault domains. + *

+ * This field is the Fault domain of the host + * + * @param faultDomain the value to set + * @return this builder + **/ + public Builder faultDomain(String faultDomain) { + this.faultDomain = faultDomain; + this.__explicitlySet__.add("faultDomain"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hpcIslandId") + private String hpcIslandId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + * @param hpcIslandId the value to set + * @return this builder + **/ + public Builder hpcIslandId(String hpcIslandId) { + this.hpcIslandId = hpcIslandId; + this.__explicitlySet__.add("hpcIslandId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkBlockId") + private String networkBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + * @param networkBlockId the value to set + * @return this builder + **/ + public Builder networkBlockId(String networkBlockId) { + this.networkBlockId = networkBlockId; + this.__explicitlySet__.add("networkBlockId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("localBlockId") + private String localBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + * @param localBlockId the value to set + * @return this builder + **/ + public Builder localBlockId(String localBlockId) { + this.localBlockId = localBlockId; + this.__explicitlySet__.add("localBlockId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique GPU Memory Fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuMemoryFabricId") + private String gpuMemoryFabricId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique GPU Memory Fabric + * + * @param gpuMemoryFabricId the value to set + * @return this builder + **/ + public Builder gpuMemoryFabricId(String gpuMemoryFabricId) { + this.gpuMemoryFabricId = gpuMemoryFabricId; + this.__explicitlySet__.add("gpuMemoryFabricId"); + return this; + } + /** + * The public [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Virtual Machine or Bare Metal instance + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceId") + private String instanceId; + + /** + * The public [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Virtual Machine or Bare Metal instance + * + * @param instanceId the value to set + * @return this builder + **/ + public Builder instanceId(String instanceId) { + this.instanceId = instanceId; + this.__explicitlySet__.add("instanceId"); + return this; + } + /** + * The shape of host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private String shape; + + /** + * The shape of host + * + * @param shape the value to set + * @return this builder + **/ + public Builder shape(String shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * The heathy state of the host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("health") + private Health health; + + /** + * The heathy state of the host + * + * @param health the value to set + * @return this builder + **/ + public Builder health(Health health) { + this.health = health; + this.__explicitlySet__.add("health"); + return this; + } + /** + * Additional data that can be exposed to the customer. Will include raw fault codes for strategic customers + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalData") + private java.util.Map additionalData; + + /** + * Additional data that can be exposed to the customer. Will include raw fault codes for strategic customers + * + * @param additionalData the value to set + * @return this builder + **/ + public Builder additionalData(java.util.Map additionalData) { + this.additionalData = additionalData; + this.__explicitlySet__.add("additionalData"); + return this; + } + /** + * The lifecycle state of the host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The lifecycle state of the host + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A free-form description detailing why the host is in its current state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private java.util.Map lifecycleDetails; + + /** + * A free-form description detailing why the host is in its current state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(java.util.Map lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Capacity Reserver that is currently on host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("capacityReservationId") + private String capacityReservationId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Capacity Reserver that is currently on host + * + * @param capacityReservationId the value to set + * @return this builder + **/ + public Builder capacityReservationId(String capacityReservationId) { + this.capacityReservationId = capacityReservationId; + this.__explicitlySet__.add("capacityReservationId"); + return this; + } + /** + * A list that contains impacted components related to an unhealthy host. An impacted component will be a + * free-form structure of key values pairs that will provide more or less details based on data tiering + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("impactedComponentDetails") + private java.util.Map impactedComponentDetails; + + /** + * A list that contains impacted components related to an unhealthy host. An impacted component will be a + * free-form structure of key values pairs that will provide more or less details based on data tiering + * + * @param impactedComponentDetails the value to set + * @return this builder + **/ + public Builder impactedComponentDetails( + java.util.Map impactedComponentDetails) { + this.impactedComponentDetails = impactedComponentDetails; + this.__explicitlySet__.add("impactedComponentDetails"); + return this; + } + /** + * The date and time that the compute host record was created, in the format defined by [RFC3339](https://tools + * .ietf.org/html/rfc3339). + *

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

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

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time that the compute host record was updated, in the format defined by [RFC3339](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; + } + /** + * 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; + } + /** + * 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; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComputeHost build() { + ComputeHost model = + new ComputeHost( + this.availabilityDomain, + this.compartmentId, + this.id, + this.faultDomain, + this.hpcIslandId, + this.networkBlockId, + this.localBlockId, + this.gpuMemoryFabricId, + this.instanceId, + this.shape, + this.health, + this.additionalData, + this.lifecycleState, + this.lifecycleDetails, + this.capacityReservationId, + this.impactedComponentDetails, + this.timeCreated, + this.timeUpdated, + this.definedTags, + this.displayName, + this.freeformTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComputeHost model) { + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("faultDomain")) { + this.faultDomain(model.getFaultDomain()); + } + if (model.wasPropertyExplicitlySet("hpcIslandId")) { + this.hpcIslandId(model.getHpcIslandId()); + } + if (model.wasPropertyExplicitlySet("networkBlockId")) { + this.networkBlockId(model.getNetworkBlockId()); + } + if (model.wasPropertyExplicitlySet("localBlockId")) { + this.localBlockId(model.getLocalBlockId()); + } + if (model.wasPropertyExplicitlySet("gpuMemoryFabricId")) { + this.gpuMemoryFabricId(model.getGpuMemoryFabricId()); + } + if (model.wasPropertyExplicitlySet("instanceId")) { + this.instanceId(model.getInstanceId()); + } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("health")) { + this.health(model.getHealth()); + } + if (model.wasPropertyExplicitlySet("additionalData")) { + this.additionalData(model.getAdditionalData()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("capacityReservationId")) { + this.capacityReservationId(model.getCapacityReservationId()); + } + if (model.wasPropertyExplicitlySet("impactedComponentDetails")) { + this.impactedComponentDetails(model.getImpactedComponentDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The availability domain of the compute host. + *

+ * Example: {@code Uocm:US-CHICAGO-1-AD-2} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The availability domain of the compute host. + *

+ * Example: {@code Uocm:US-CHICAGO-1-AD-2} + * + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + * compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + * compartment. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A fault domain is a grouping of hardware and infrastructure within an availability domain. + * Each availability domain contains three fault domains. Fault domains let you distribute your + * instances so that they are not on the same physical hardware within a single availability domain. + * A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + * instances in other fault domains. + *

+ * This field is the Fault domain of the host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("faultDomain") + private final String faultDomain; + + /** + * A fault domain is a grouping of hardware and infrastructure within an availability domain. + * Each availability domain contains three fault domains. Fault domains let you distribute your + * instances so that they are not on the same physical hardware within a single availability domain. + * A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + * instances in other fault domains. + *

+ * This field is the Fault domain of the host + * + * @return the value + **/ + public String getFaultDomain() { + return faultDomain; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hpcIslandId") + private final String hpcIslandId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + * @return the value + **/ + public String getHpcIslandId() { + return hpcIslandId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkBlockId") + private final String networkBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + * @return the value + **/ + public String getNetworkBlockId() { + return networkBlockId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("localBlockId") + private final String localBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + * @return the value + **/ + public String getLocalBlockId() { + return localBlockId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique GPU Memory Fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuMemoryFabricId") + private final String gpuMemoryFabricId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique GPU Memory Fabric + * + * @return the value + **/ + public String getGpuMemoryFabricId() { + return gpuMemoryFabricId; + } + + /** + * The public [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Virtual Machine or Bare Metal instance + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceId") + private final String instanceId; + + /** + * The public [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Virtual Machine or Bare Metal instance + * + * @return the value + **/ + public String getInstanceId() { + return instanceId; + } + + /** + * The shape of host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final String shape; + + /** + * The shape of host + * + * @return the value + **/ + public String getShape() { + return shape; + } + + /** + * The heathy state of the host + * + **/ + public enum Health { + Healthy("HEALTHY"), + Unhealthy("UNHEALTHY"), + + /** + * 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(Health.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Health v : Health.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Health(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Health create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Health', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The heathy state of the host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("health") + private final Health health; + + /** + * The heathy state of the host + * + * @return the value + **/ + public Health getHealth() { + return health; + } + + /** + * Additional data that can be exposed to the customer. Will include raw fault codes for strategic customers + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalData") + private final java.util.Map additionalData; + + /** + * Additional data that can be exposed to the customer. Will include raw fault codes for strategic customers + * + * @return the value + **/ + public java.util.Map getAdditionalData() { + return additionalData; + } + + /** + * The lifecycle state of the host + * + **/ + public enum LifecycleState { + Available("AVAILABLE"), + Occupied("OCCUPIED"), + Provisioning("PROVISIONING"), + Repair("REPAIR"), + Unavailable("UNAVAILABLE"), + + /** + * 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 lifecycle state of the host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The lifecycle state of the host + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A free-form description detailing why the host is in its current state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final java.util.Map lifecycleDetails; + + /** + * A free-form description detailing why the host is in its current state. + * + * @return the value + **/ + public java.util.Map getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Capacity Reserver that is currently on host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("capacityReservationId") + private final String capacityReservationId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Capacity Reserver that is currently on host + * + * @return the value + **/ + public String getCapacityReservationId() { + return capacityReservationId; + } + + /** + * A list that contains impacted components related to an unhealthy host. An impacted component will be a + * free-form structure of key values pairs that will provide more or less details based on data tiering + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("impactedComponentDetails") + private final java.util.Map impactedComponentDetails; + + /** + * A list that contains impacted components related to an unhealthy host. An impacted component will be a + * free-form structure of key values pairs that will provide more or less details based on data tiering + * + * @return the value + **/ + public java.util.Map getImpactedComponentDetails() { + return impactedComponentDetails; + } + + /** + * The date and time that the compute host record was created, in the format defined by [RFC3339](https://tools + * .ietf.org/html/rfc3339). + *

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

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

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

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * 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; + } + + /** + * 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; + } + + @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("ComputeHost("); + sb.append("super=").append(super.toString()); + sb.append("availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", faultDomain=").append(String.valueOf(this.faultDomain)); + sb.append(", hpcIslandId=").append(String.valueOf(this.hpcIslandId)); + sb.append(", networkBlockId=").append(String.valueOf(this.networkBlockId)); + sb.append(", localBlockId=").append(String.valueOf(this.localBlockId)); + sb.append(", gpuMemoryFabricId=").append(String.valueOf(this.gpuMemoryFabricId)); + sb.append(", instanceId=").append(String.valueOf(this.instanceId)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", health=").append(String.valueOf(this.health)); + sb.append(", additionalData=").append(String.valueOf(this.additionalData)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", capacityReservationId=").append(String.valueOf(this.capacityReservationId)); + sb.append(", impactedComponentDetails=") + .append(String.valueOf(this.impactedComponentDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComputeHost)) { + return false; + } + + ComputeHost other = (ComputeHost) o; + return java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.faultDomain, other.faultDomain) + && java.util.Objects.equals(this.hpcIslandId, other.hpcIslandId) + && java.util.Objects.equals(this.networkBlockId, other.networkBlockId) + && java.util.Objects.equals(this.localBlockId, other.localBlockId) + && java.util.Objects.equals(this.gpuMemoryFabricId, other.gpuMemoryFabricId) + && java.util.Objects.equals(this.instanceId, other.instanceId) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.health, other.health) + && java.util.Objects.equals(this.additionalData, other.additionalData) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.capacityReservationId, other.capacityReservationId) + && java.util.Objects.equals( + this.impactedComponentDetails, other.impactedComponentDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.faultDomain == null ? 43 : this.faultDomain.hashCode()); + result = (result * PRIME) + (this.hpcIslandId == null ? 43 : this.hpcIslandId.hashCode()); + result = + (result * PRIME) + + (this.networkBlockId == null ? 43 : this.networkBlockId.hashCode()); + result = (result * PRIME) + (this.localBlockId == null ? 43 : this.localBlockId.hashCode()); + result = + (result * PRIME) + + (this.gpuMemoryFabricId == null ? 43 : this.gpuMemoryFabricId.hashCode()); + result = (result * PRIME) + (this.instanceId == null ? 43 : this.instanceId.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.health == null ? 43 : this.health.hashCode()); + result = + (result * PRIME) + + (this.additionalData == null ? 43 : this.additionalData.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.capacityReservationId == null + ? 43 + : this.capacityReservationId.hashCode()); + result = + (result * PRIME) + + (this.impactedComponentDetails == null + ? 43 + : this.impactedComponentDetails.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.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/PipelineValidationErrorDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeHostCollection.java similarity index 62% rename from bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/PipelineValidationErrorDetails.java rename to bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeHostCollection.java index cb857eb73f..eb675e4f2a 100644 --- a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/PipelineValidationErrorDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeHostCollection.java @@ -2,10 +2,11 @@ * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ -package com.oracle.bmc.opensearch.model; +package com.oracle.bmc.core.model; /** - * The configuration details for validating pipeline configuration provided as input. + * A list of compute hosts. + * *
* 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 @@ -14,37 +15,44 @@ * {@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: 20180828") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") @com.fasterxml.jackson.databind.annotation.JsonDeserialize( - builder = PipelineValidationErrorDetails.Builder.class + builder = ComputeHostCollection.Builder.class ) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) -public final class PipelineValidationErrorDetails +public final class ComputeHostCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"message"}) - public PipelineValidationErrorDetails(String message) { + @java.beans.ConstructorProperties({"items"}) + public ComputeHostCollection(java.util.List items) { super(); - this.message = message; + this.items = items; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { - - @com.fasterxml.jackson.annotation.JsonProperty("message") - private String message; - - public Builder message(String message) { - this.message = message; - this.__explicitlySet__.add("message"); + /** + * The list of compute hosts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * The list of compute hosts. + * @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 PipelineValidationErrorDetails build() { - PipelineValidationErrorDetails model = new PipelineValidationErrorDetails(this.message); + public ComputeHostCollection build() { + ComputeHostCollection model = new ComputeHostCollection(this.items); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -52,9 +60,9 @@ public PipelineValidationErrorDetails build() { } @com.fasterxml.jackson.annotation.JsonIgnore - public Builder copy(PipelineValidationErrorDetails model) { - if (model.wasPropertyExplicitlySet("message")) { - this.message(model.getMessage()); + public Builder copy(ComputeHostCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); } return this; } @@ -71,11 +79,18 @@ public Builder toBuilder() { return new Builder().copy(this); } - @com.fasterxml.jackson.annotation.JsonProperty("message") - private final String message; + /** + * The list of compute hosts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; - public String getMessage() { - return message; + /** + * The list of compute hosts. + * @return the value + **/ + public java.util.List getItems() { + return items; } @Override @@ -90,9 +105,9 @@ public String toString() { */ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); - sb.append("PipelineValidationErrorDetails("); + sb.append("ComputeHostCollection("); sb.append("super=").append(super.toString()); - sb.append("message=").append(String.valueOf(this.message)); + sb.append("items=").append(String.valueOf(this.items)); sb.append(")"); return sb.toString(); } @@ -102,19 +117,19 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof PipelineValidationErrorDetails)) { + if (!(o instanceof ComputeHostCollection)) { return false; } - PipelineValidationErrorDetails other = (PipelineValidationErrorDetails) o; - return java.util.Objects.equals(this.message, other.message) && super.equals(other); + ComputeHostCollection other = (ComputeHostCollection) 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.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeHostSummary.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeHostSummary.java new file mode 100644 index 0000000000..2fcae56b32 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ComputeHostSummary.java @@ -0,0 +1,1046 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * Summary information for a compute host. + * + *
+ * 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 = ComputeHostSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComputeHostSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "availabilityDomain", + "compartmentId", + "id", + "faultDomain", + "hpcIslandId", + "networkBlockId", + "localBlockId", + "gpuMemoryFabricId", + "instanceId", + "shape", + "health", + "lifecycleState", + "capacityReservationId", + "hasImpactedComponents", + "timeCreated", + "timeUpdated", + "definedTags", + "displayName", + "freeformTags" + }) + public ComputeHostSummary( + String availabilityDomain, + String compartmentId, + String id, + String faultDomain, + String hpcIslandId, + String networkBlockId, + String localBlockId, + String gpuMemoryFabricId, + String instanceId, + String shape, + ComputeHost.Health health, + ComputeHost.LifecycleState lifecycleState, + String capacityReservationId, + Boolean hasImpactedComponents, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Map> definedTags, + String displayName, + java.util.Map freeformTags) { + super(); + this.availabilityDomain = availabilityDomain; + this.compartmentId = compartmentId; + this.id = id; + this.faultDomain = faultDomain; + this.hpcIslandId = hpcIslandId; + this.networkBlockId = networkBlockId; + this.localBlockId = localBlockId; + this.gpuMemoryFabricId = gpuMemoryFabricId; + this.instanceId = instanceId; + this.shape = shape; + this.health = health; + this.lifecycleState = lifecycleState; + this.capacityReservationId = capacityReservationId; + this.hasImpactedComponents = hasImpactedComponents; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.definedTags = definedTags; + this.displayName = displayName; + this.freeformTags = freeformTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The availability domain of the compute host. + *

+ * Example: {@code Uocm:US-CHICAGO-1-AD-2} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The availability domain of the compute host. + *

+ * Example: {@code Uocm:US-CHICAGO-1-AD-2} + * + * @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) for the compartment. This should always be the root + * compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + * 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host + * + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A fault domain is a grouping of hardware and infrastructure within an availability domain. + * Each availability domain contains three fault domains. Fault domains let you distribute your + * instances so that they are not on the same physical hardware within a single availability domain. + * A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + * instances in other fault domains. + *

+ * This field is the Fault domain of the host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("faultDomain") + private String faultDomain; + + /** + * A fault domain is a grouping of hardware and infrastructure within an availability domain. + * Each availability domain contains three fault domains. Fault domains let you distribute your + * instances so that they are not on the same physical hardware within a single availability domain. + * A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + * instances in other fault domains. + *

+ * This field is the Fault domain of the host + * + * @param faultDomain the value to set + * @return this builder + **/ + public Builder faultDomain(String faultDomain) { + this.faultDomain = faultDomain; + this.__explicitlySet__.add("faultDomain"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hpcIslandId") + private String hpcIslandId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + * @param hpcIslandId the value to set + * @return this builder + **/ + public Builder hpcIslandId(String hpcIslandId) { + this.hpcIslandId = hpcIslandId; + this.__explicitlySet__.add("hpcIslandId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkBlockId") + private String networkBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + * @param networkBlockId the value to set + * @return this builder + **/ + public Builder networkBlockId(String networkBlockId) { + this.networkBlockId = networkBlockId; + this.__explicitlySet__.add("networkBlockId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("localBlockId") + private String localBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + * @param localBlockId the value to set + * @return this builder + **/ + public Builder localBlockId(String localBlockId) { + this.localBlockId = localBlockId; + this.__explicitlySet__.add("localBlockId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique GPU Memory Fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuMemoryFabricId") + private String gpuMemoryFabricId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique GPU Memory Fabric + * + * @param gpuMemoryFabricId the value to set + * @return this builder + **/ + public Builder gpuMemoryFabricId(String gpuMemoryFabricId) { + this.gpuMemoryFabricId = gpuMemoryFabricId; + this.__explicitlySet__.add("gpuMemoryFabricId"); + return this; + } + /** + * The public [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Virtual Machine or Bare Metal instance + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceId") + private String instanceId; + + /** + * The public [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Virtual Machine or Bare Metal instance + * + * @param instanceId the value to set + * @return this builder + **/ + public Builder instanceId(String instanceId) { + this.instanceId = instanceId; + this.__explicitlySet__.add("instanceId"); + return this; + } + /** + * The shape of host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private String shape; + + /** + * The shape of host + * + * @param shape the value to set + * @return this builder + **/ + public Builder shape(String shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * The heathy state of the host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("health") + private ComputeHost.Health health; + + /** + * The heathy state of the host + * + * @param health the value to set + * @return this builder + **/ + public Builder health(ComputeHost.Health health) { + this.health = health; + this.__explicitlySet__.add("health"); + return this; + } + /** + * The lifecycle state of the host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ComputeHost.LifecycleState lifecycleState; + + /** + * The lifecycle state of the host + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(ComputeHost.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Capacity Reserver that is currently on host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("capacityReservationId") + private String capacityReservationId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Capacity Reserver that is currently on host + * + * @param capacityReservationId the value to set + * @return this builder + **/ + public Builder capacityReservationId(String capacityReservationId) { + this.capacityReservationId = capacityReservationId; + this.__explicitlySet__.add("capacityReservationId"); + return this; + } + /** + * While listing a host the user will know if they have an impacted component or not. + * The user will have to issue a get host to see details. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hasImpactedComponents") + private Boolean hasImpactedComponents; + + /** + * While listing a host the user will know if they have an impacted component or not. + * The user will have to issue a get host to see details. + * + * @param hasImpactedComponents the value to set + * @return this builder + **/ + public Builder hasImpactedComponents(Boolean hasImpactedComponents) { + this.hasImpactedComponents = hasImpactedComponents; + this.__explicitlySet__.add("hasImpactedComponents"); + return this; + } + /** + * The date and time that the compute host record was created, in the format defined by [RFC3339](https://tools + * .ietf.org/html/rfc3339). + *

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

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time that the compute host record was updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time that the compute host record was updated, in the format defined by [RFC3339](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; + } + /** + * 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; + } + /** + * 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; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComputeHostSummary build() { + ComputeHostSummary model = + new ComputeHostSummary( + this.availabilityDomain, + this.compartmentId, + this.id, + this.faultDomain, + this.hpcIslandId, + this.networkBlockId, + this.localBlockId, + this.gpuMemoryFabricId, + this.instanceId, + this.shape, + this.health, + this.lifecycleState, + this.capacityReservationId, + this.hasImpactedComponents, + this.timeCreated, + this.timeUpdated, + this.definedTags, + this.displayName, + this.freeformTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComputeHostSummary model) { + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("faultDomain")) { + this.faultDomain(model.getFaultDomain()); + } + if (model.wasPropertyExplicitlySet("hpcIslandId")) { + this.hpcIslandId(model.getHpcIslandId()); + } + if (model.wasPropertyExplicitlySet("networkBlockId")) { + this.networkBlockId(model.getNetworkBlockId()); + } + if (model.wasPropertyExplicitlySet("localBlockId")) { + this.localBlockId(model.getLocalBlockId()); + } + if (model.wasPropertyExplicitlySet("gpuMemoryFabricId")) { + this.gpuMemoryFabricId(model.getGpuMemoryFabricId()); + } + if (model.wasPropertyExplicitlySet("instanceId")) { + this.instanceId(model.getInstanceId()); + } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("health")) { + this.health(model.getHealth()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("capacityReservationId")) { + this.capacityReservationId(model.getCapacityReservationId()); + } + if (model.wasPropertyExplicitlySet("hasImpactedComponents")) { + this.hasImpactedComponents(model.getHasImpactedComponents()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The availability domain of the compute host. + *

+ * Example: {@code Uocm:US-CHICAGO-1-AD-2} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The availability domain of the compute host. + *

+ * Example: {@code Uocm:US-CHICAGO-1-AD-2} + * + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + * compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + * compartment. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A fault domain is a grouping of hardware and infrastructure within an availability domain. + * Each availability domain contains three fault domains. Fault domains let you distribute your + * instances so that they are not on the same physical hardware within a single availability domain. + * A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + * instances in other fault domains. + *

+ * This field is the Fault domain of the host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("faultDomain") + private final String faultDomain; + + /** + * A fault domain is a grouping of hardware and infrastructure within an availability domain. + * Each availability domain contains three fault domains. Fault domains let you distribute your + * instances so that they are not on the same physical hardware within a single availability domain. + * A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + * instances in other fault domains. + *

+ * This field is the Fault domain of the host + * + * @return the value + **/ + public String getFaultDomain() { + return faultDomain; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hpcIslandId") + private final String hpcIslandId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + * + * @return the value + **/ + public String getHpcIslandId() { + return hpcIslandId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkBlockId") + private final String networkBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + * + * @return the value + **/ + public String getNetworkBlockId() { + return networkBlockId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("localBlockId") + private final String localBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + * + * @return the value + **/ + public String getLocalBlockId() { + return localBlockId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique GPU Memory Fabric + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuMemoryFabricId") + private final String gpuMemoryFabricId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique GPU Memory Fabric + * + * @return the value + **/ + public String getGpuMemoryFabricId() { + return gpuMemoryFabricId; + } + + /** + * The public [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Virtual Machine or Bare Metal instance + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceId") + private final String instanceId; + + /** + * The public [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Virtual Machine or Bare Metal instance + * + * @return the value + **/ + public String getInstanceId() { + return instanceId; + } + + /** + * The shape of host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final String shape; + + /** + * The shape of host + * + * @return the value + **/ + public String getShape() { + return shape; + } + + /** + * The heathy state of the host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("health") + private final ComputeHost.Health health; + + /** + * The heathy state of the host + * + * @return the value + **/ + public ComputeHost.Health getHealth() { + return health; + } + + /** + * The lifecycle state of the host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final ComputeHost.LifecycleState lifecycleState; + + /** + * The lifecycle state of the host + * + * @return the value + **/ + public ComputeHost.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Capacity Reserver that is currently on host + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("capacityReservationId") + private final String capacityReservationId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Capacity Reserver that is currently on host + * + * @return the value + **/ + public String getCapacityReservationId() { + return capacityReservationId; + } + + /** + * While listing a host the user will know if they have an impacted component or not. + * The user will have to issue a get host to see details. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hasImpactedComponents") + private final Boolean hasImpactedComponents; + + /** + * While listing a host the user will know if they have an impacted component or not. + * The user will have to issue a get host to see details. + * + * @return the value + **/ + public Boolean getHasImpactedComponents() { + return hasImpactedComponents; + } + + /** + * The date and time that the compute host record was created, in the format defined by [RFC3339](https://tools + * .ietf.org/html/rfc3339). + *

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

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time that the compute host record was updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time that the compute host record was updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * 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; + } + + /** + * 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; + } + + @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("ComputeHostSummary("); + sb.append("super=").append(super.toString()); + sb.append("availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", faultDomain=").append(String.valueOf(this.faultDomain)); + sb.append(", hpcIslandId=").append(String.valueOf(this.hpcIslandId)); + sb.append(", networkBlockId=").append(String.valueOf(this.networkBlockId)); + sb.append(", localBlockId=").append(String.valueOf(this.localBlockId)); + sb.append(", gpuMemoryFabricId=").append(String.valueOf(this.gpuMemoryFabricId)); + sb.append(", instanceId=").append(String.valueOf(this.instanceId)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", health=").append(String.valueOf(this.health)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", capacityReservationId=").append(String.valueOf(this.capacityReservationId)); + sb.append(", hasImpactedComponents=").append(String.valueOf(this.hasImpactedComponents)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComputeHostSummary)) { + return false; + } + + ComputeHostSummary other = (ComputeHostSummary) o; + return java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.faultDomain, other.faultDomain) + && java.util.Objects.equals(this.hpcIslandId, other.hpcIslandId) + && java.util.Objects.equals(this.networkBlockId, other.networkBlockId) + && java.util.Objects.equals(this.localBlockId, other.localBlockId) + && java.util.Objects.equals(this.gpuMemoryFabricId, other.gpuMemoryFabricId) + && java.util.Objects.equals(this.instanceId, other.instanceId) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.health, other.health) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.capacityReservationId, other.capacityReservationId) + && java.util.Objects.equals(this.hasImpactedComponents, other.hasImpactedComponents) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.faultDomain == null ? 43 : this.faultDomain.hashCode()); + result = (result * PRIME) + (this.hpcIslandId == null ? 43 : this.hpcIslandId.hashCode()); + result = + (result * PRIME) + + (this.networkBlockId == null ? 43 : this.networkBlockId.hashCode()); + result = (result * PRIME) + (this.localBlockId == null ? 43 : this.localBlockId.hashCode()); + result = + (result * PRIME) + + (this.gpuMemoryFabricId == null ? 43 : this.gpuMemoryFabricId.hashCode()); + result = (result * PRIME) + (this.instanceId == null ? 43 : this.instanceId.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.health == null ? 43 : this.health.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.capacityReservationId == null + ? 43 + : this.capacityReservationId.hashCode()); + result = + (result * PRIME) + + (this.hasImpactedComponents == null + ? 43 + : this.hasImpactedComponents.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.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateByoipRangeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateByoipRangeDetails.java index 590cef39ec..57d232f84e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateByoipRangeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateByoipRangeDetails.java @@ -25,8 +25,6 @@ public final class CreateByoipRangeDetails @java.beans.ConstructorProperties({ "cidrBlock", "compartmentId", - "ipAnycastId", - "monitorIp", "ipv6CidrBlock", "definedTags", "displayName", @@ -35,8 +33,6 @@ public final class CreateByoipRangeDetails public CreateByoipRangeDetails( String cidrBlock, String compartmentId, - String ipAnycastId, - String monitorIp, String ipv6CidrBlock, java.util.Map> definedTags, String displayName, @@ -44,8 +40,6 @@ public CreateByoipRangeDetails( super(); this.cidrBlock = cidrBlock; this.compartmentId = compartmentId; - this.ipAnycastId = ipAnycastId; - this.monitorIp = monitorIp; this.ipv6CidrBlock = ipv6CidrBlock; this.definedTags = definedTags; this.displayName = displayName; @@ -92,38 +86,6 @@ public Builder compartmentId(String compartmentId) { this.__explicitlySet__.add("compartmentId"); return this; } - /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the {@code IpAnycast} resource. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("ipAnycastId") - private String ipAnycastId; - - /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the {@code IpAnycast} resource. - * @param ipAnycastId the value to set - * @return this builder - **/ - public Builder ipAnycastId(String ipAnycastId) { - this.ipAnycastId = ipAnycastId; - this.__explicitlySet__.add("ipAnycastId"); - return this; - } - /** - * The IP address of the CIDR for Prefix Monitoring. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("monitorIp") - private String monitorIp; - - /** - * The IP address of the CIDR for Prefix Monitoring. - * @param monitorIp the value to set - * @return this builder - **/ - public Builder monitorIp(String monitorIp) { - this.monitorIp = monitorIp; - this.__explicitlySet__.add("monitorIp"); - return this; - } /** * The BYOIPv6 prefix. You can assign some or all of it to a VCN after it is validated. * @@ -220,8 +182,6 @@ public CreateByoipRangeDetails build() { new CreateByoipRangeDetails( this.cidrBlock, this.compartmentId, - this.ipAnycastId, - this.monitorIp, this.ipv6CidrBlock, this.definedTags, this.displayName, @@ -240,12 +200,6 @@ public Builder copy(CreateByoipRangeDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } - if (model.wasPropertyExplicitlySet("ipAnycastId")) { - this.ipAnycastId(model.getIpAnycastId()); - } - if (model.wasPropertyExplicitlySet("monitorIp")) { - this.monitorIp(model.getMonitorIp()); - } if (model.wasPropertyExplicitlySet("ipv6CidrBlock")) { this.ipv6CidrBlock(model.getIpv6CidrBlock()); } @@ -307,34 +261,6 @@ public String getCompartmentId() { return compartmentId; } - /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the {@code IpAnycast} resource. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("ipAnycastId") - private final String ipAnycastId; - - /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the {@code IpAnycast} resource. - * @return the value - **/ - public String getIpAnycastId() { - return ipAnycastId; - } - - /** - * The IP address of the CIDR for Prefix Monitoring. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("monitorIp") - private final String monitorIp; - - /** - * The IP address of the CIDR for Prefix Monitoring. - * @return the value - **/ - public String getMonitorIp() { - return monitorIp; - } - /** * The BYOIPv6 prefix. You can assign some or all of it to a VCN after it is validated. * @@ -429,8 +355,6 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("cidrBlock=").append(String.valueOf(this.cidrBlock)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); - sb.append(", ipAnycastId=").append(String.valueOf(this.ipAnycastId)); - sb.append(", monitorIp=").append(String.valueOf(this.monitorIp)); sb.append(", ipv6CidrBlock=").append(String.valueOf(this.ipv6CidrBlock)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", displayName=").append(String.valueOf(this.displayName)); @@ -451,8 +375,6 @@ public boolean equals(Object o) { CreateByoipRangeDetails other = (CreateByoipRangeDetails) o; return java.util.Objects.equals(this.cidrBlock, other.cidrBlock) && java.util.Objects.equals(this.compartmentId, other.compartmentId) - && java.util.Objects.equals(this.ipAnycastId, other.ipAnycastId) - && java.util.Objects.equals(this.monitorIp, other.monitorIp) && java.util.Objects.equals(this.ipv6CidrBlock, other.ipv6CidrBlock) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.displayName, other.displayName) @@ -468,8 +390,6 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); - result = (result * PRIME) + (this.ipAnycastId == null ? 43 : this.ipAnycastId.hashCode()); - result = (result * PRIME) + (this.monitorIp == null ? 43 : this.monitorIp.hashCode()); result = (result * PRIME) + (this.ipv6CidrBlock == null ? 43 : this.ipv6CidrBlock.hashCode()); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateComputeGpuMemoryClusterDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateComputeGpuMemoryClusterDetails.java new file mode 100644 index 0000000000..69c7580c32 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateComputeGpuMemoryClusterDetails.java @@ -0,0 +1,547 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * The customer facing object includes GPU memory cluster 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: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateComputeGpuMemoryClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateComputeGpuMemoryClusterDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "availabilityDomain", + "compartmentId", + "gpuMemoryFabricId", + "computeClusterId", + "instanceConfigurationId", + "size", + "definedTags", + "freeformTags", + "displayName" + }) + public CreateComputeGpuMemoryClusterDetails( + String availabilityDomain, + String compartmentId, + String gpuMemoryFabricId, + String computeClusterId, + String instanceConfigurationId, + Long size, + java.util.Map> definedTags, + java.util.Map freeformTags, + String displayName) { + super(); + this.availabilityDomain = availabilityDomain; + this.compartmentId = compartmentId; + this.gpuMemoryFabricId = gpuMemoryFabricId; + this.computeClusterId = computeClusterId; + this.instanceConfigurationId = instanceConfigurationId; + this.size = size; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + this.displayName = displayName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The availability domain of the GPU memory cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The availability domain of the GPU memory cluster. + * + * @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 compartment that contains the compute GPU memory cluster. + * 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 that contains the compute GPU memory cluster. + * 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the GPU memory fabric. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuMemoryFabricId") + private String gpuMemoryFabricId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the GPU memory fabric. + * + * @param gpuMemoryFabricId the value to set + * @return this builder + **/ + public Builder gpuMemoryFabricId(String gpuMemoryFabricId) { + this.gpuMemoryFabricId = gpuMemoryFabricId; + this.__explicitlySet__.add("gpuMemoryFabricId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeClusterId") + private String computeClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + * + * @param computeClusterId the value to set + * @return this builder + **/ + public Builder computeClusterId(String computeClusterId) { + this.computeClusterId = computeClusterId; + this.__explicitlySet__.add("computeClusterId"); + return this; + } + /** + * Instance Configuration to be used for this GPU Memory Cluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceConfigurationId") + private String instanceConfigurationId; + + /** + * Instance Configuration to be used for this GPU Memory Cluster + * + * @param instanceConfigurationId the value to set + * @return this builder + **/ + public Builder instanceConfigurationId(String instanceConfigurationId) { + this.instanceConfigurationId = instanceConfigurationId; + this.__explicitlySet__.add("instanceConfigurationId"); + return this; + } + /** + * The number of instances currently running in the GpuMemoryCluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("size") + private Long size; + + /** + * The number of instances currently running in the GpuMemoryCluster + * + * @param size the value to set + * @return this builder + **/ + public Builder size(Long size) { + this.size = size; + this.__explicitlySet__.add("size"); + 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; + } + /** + * 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; + } + /** + * 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; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateComputeGpuMemoryClusterDetails build() { + CreateComputeGpuMemoryClusterDetails model = + new CreateComputeGpuMemoryClusterDetails( + this.availabilityDomain, + this.compartmentId, + this.gpuMemoryFabricId, + this.computeClusterId, + this.instanceConfigurationId, + this.size, + this.definedTags, + this.freeformTags, + this.displayName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateComputeGpuMemoryClusterDetails model) { + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("gpuMemoryFabricId")) { + this.gpuMemoryFabricId(model.getGpuMemoryFabricId()); + } + if (model.wasPropertyExplicitlySet("computeClusterId")) { + this.computeClusterId(model.getComputeClusterId()); + } + if (model.wasPropertyExplicitlySet("instanceConfigurationId")) { + this.instanceConfigurationId(model.getInstanceConfigurationId()); + } + if (model.wasPropertyExplicitlySet("size")) { + this.size(model.getSize()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The availability domain of the GPU memory cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The availability domain of the GPU memory cluster. + * + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute GPU memory cluster. + * 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 that contains the compute GPU memory cluster. + * compartment. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the GPU memory fabric. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuMemoryFabricId") + private final String gpuMemoryFabricId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the GPU memory fabric. + * + * @return the value + **/ + public String getGpuMemoryFabricId() { + return gpuMemoryFabricId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeClusterId") + private final String computeClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + * + * @return the value + **/ + public String getComputeClusterId() { + return computeClusterId; + } + + /** + * Instance Configuration to be used for this GPU Memory Cluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceConfigurationId") + private final String instanceConfigurationId; + + /** + * Instance Configuration to be used for this GPU Memory Cluster + * + * @return the value + **/ + public String getInstanceConfigurationId() { + return instanceConfigurationId; + } + + /** + * The number of instances currently running in the GpuMemoryCluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("size") + private final Long size; + + /** + * The number of instances currently running in the GpuMemoryCluster + * + * @return the value + **/ + public Long getSize() { + return size; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + @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("CreateComputeGpuMemoryClusterDetails("); + sb.append("super=").append(super.toString()); + sb.append("availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", gpuMemoryFabricId=").append(String.valueOf(this.gpuMemoryFabricId)); + sb.append(", computeClusterId=").append(String.valueOf(this.computeClusterId)); + sb.append(", instanceConfigurationId=") + .append(String.valueOf(this.instanceConfigurationId)); + sb.append(", size=").append(String.valueOf(this.size)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + 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 CreateComputeGpuMemoryClusterDetails)) { + return false; + } + + CreateComputeGpuMemoryClusterDetails other = (CreateComputeGpuMemoryClusterDetails) o; + return java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.gpuMemoryFabricId, other.gpuMemoryFabricId) + && java.util.Objects.equals(this.computeClusterId, other.computeClusterId) + && java.util.Objects.equals( + this.instanceConfigurationId, other.instanceConfigurationId) + && java.util.Objects.equals(this.size, other.size) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.displayName, other.displayName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.gpuMemoryFabricId == null ? 43 : this.gpuMemoryFabricId.hashCode()); + result = + (result * PRIME) + + (this.computeClusterId == null ? 43 : this.computeClusterId.hashCode()); + result = + (result * PRIME) + + (this.instanceConfigurationId == null + ? 43 + : this.instanceConfigurationId.hashCode()); + result = (result * PRIME) + (this.size == null ? 43 : this.size.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateByoipRangeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateByoipRangeDetails.java index fa11e75c1d..cb5e822c20 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateByoipRangeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateByoipRangeDetails.java @@ -22,25 +22,15 @@ public final class UpdateByoipRangeDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({ - "definedTags", - "displayName", - "freeformTags", - "ipAnycastId", - "monitorIp" - }) + @java.beans.ConstructorProperties({"definedTags", "displayName", "freeformTags"}) public UpdateByoipRangeDetails( java.util.Map> definedTags, String displayName, - java.util.Map freeformTags, - String ipAnycastId, - String monitorIp) { + java.util.Map freeformTags) { super(); this.definedTags = definedTags; this.displayName = displayName; this.freeformTags = freeformTags; - this.ipAnycastId = ipAnycastId; - this.monitorIp = monitorIp; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -114,38 +104,6 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } - /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the {@code IpAnycast} resource. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("ipAnycastId") - private String ipAnycastId; - - /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the {@code IpAnycast} resource. - * @param ipAnycastId the value to set - * @return this builder - **/ - public Builder ipAnycastId(String ipAnycastId) { - this.ipAnycastId = ipAnycastId; - this.__explicitlySet__.add("ipAnycastId"); - return this; - } - /** - * The IP address of the CIDR for Prefix Monitoring. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("monitorIp") - private String monitorIp; - - /** - * The IP address of the CIDR for Prefix Monitoring. - * @param monitorIp the value to set - * @return this builder - **/ - public Builder monitorIp(String monitorIp) { - this.monitorIp = monitorIp; - this.__explicitlySet__.add("monitorIp"); - return this; - } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -153,11 +111,7 @@ public Builder monitorIp(String monitorIp) { public UpdateByoipRangeDetails build() { UpdateByoipRangeDetails model = new UpdateByoipRangeDetails( - this.definedTags, - this.displayName, - this.freeformTags, - this.ipAnycastId, - this.monitorIp); + this.definedTags, this.displayName, this.freeformTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -175,12 +129,6 @@ public Builder copy(UpdateByoipRangeDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } - if (model.wasPropertyExplicitlySet("ipAnycastId")) { - this.ipAnycastId(model.getIpAnycastId()); - } - if (model.wasPropertyExplicitlySet("monitorIp")) { - this.monitorIp(model.getMonitorIp()); - } return this; } } @@ -258,34 +206,6 @@ public java.util.Map getFreeformTags() { return freeformTags; } - /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the {@code IpAnycast} resource. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("ipAnycastId") - private final String ipAnycastId; - - /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the {@code IpAnycast} resource. - * @return the value - **/ - public String getIpAnycastId() { - return ipAnycastId; - } - - /** - * The IP address of the CIDR for Prefix Monitoring. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("monitorIp") - private final String monitorIp; - - /** - * The IP address of the CIDR for Prefix Monitoring. - * @return the value - **/ - public String getMonitorIp() { - return monitorIp; - } - @Override public String toString() { return this.toString(true); @@ -303,8 +223,6 @@ public String toString(boolean includeByteArrayContents) { sb.append("definedTags=").append(String.valueOf(this.definedTags)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); - sb.append(", ipAnycastId=").append(String.valueOf(this.ipAnycastId)); - sb.append(", monitorIp=").append(String.valueOf(this.monitorIp)); sb.append(")"); return sb.toString(); } @@ -322,8 +240,6 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) - && java.util.Objects.equals(this.ipAnycastId, other.ipAnycastId) - && java.util.Objects.equals(this.monitorIp, other.monitorIp) && super.equals(other); } @@ -334,8 +250,6 @@ public int hashCode() { result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); - result = (result * PRIME) + (this.ipAnycastId == null ? 43 : this.ipAnycastId.hashCode()); - result = (result * PRIME) + (this.monitorIp == null ? 43 : this.monitorIp.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateComputeGpuMemoryClusterDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateComputeGpuMemoryClusterDetails.java new file mode 100644 index 0000000000..2047c419d1 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateComputeGpuMemoryClusterDetails.java @@ -0,0 +1,355 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * Updates compute GPU memory cluster 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: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateComputeGpuMemoryClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateComputeGpuMemoryClusterDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "instanceConfigurationId", + "size", + "definedTags", + "freeformTags", + "displayName" + }) + public UpdateComputeGpuMemoryClusterDetails( + String instanceConfigurationId, + Long size, + java.util.Map> definedTags, + java.util.Map freeformTags, + String displayName) { + super(); + this.instanceConfigurationId = instanceConfigurationId; + this.size = size; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + this.displayName = displayName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Instance Configuration to be used for this GPU Memory Cluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceConfigurationId") + private String instanceConfigurationId; + + /** + * Instance Configuration to be used for this GPU Memory Cluster + * + * @param instanceConfigurationId the value to set + * @return this builder + **/ + public Builder instanceConfigurationId(String instanceConfigurationId) { + this.instanceConfigurationId = instanceConfigurationId; + this.__explicitlySet__.add("instanceConfigurationId"); + return this; + } + /** + * The number of instances currently running in the GpuMemoryCluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("size") + private Long size; + + /** + * The number of instances currently running in the GpuMemoryCluster + * + * @param size the value to set + * @return this builder + **/ + public Builder size(Long size) { + this.size = size; + this.__explicitlySet__.add("size"); + 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; + } + /** + * 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; + } + /** + * 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; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateComputeGpuMemoryClusterDetails build() { + UpdateComputeGpuMemoryClusterDetails model = + new UpdateComputeGpuMemoryClusterDetails( + this.instanceConfigurationId, + this.size, + this.definedTags, + this.freeformTags, + this.displayName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateComputeGpuMemoryClusterDetails model) { + if (model.wasPropertyExplicitlySet("instanceConfigurationId")) { + this.instanceConfigurationId(model.getInstanceConfigurationId()); + } + if (model.wasPropertyExplicitlySet("size")) { + this.size(model.getSize()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Instance Configuration to be used for this GPU Memory Cluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceConfigurationId") + private final String instanceConfigurationId; + + /** + * Instance Configuration to be used for this GPU Memory Cluster + * + * @return the value + **/ + public String getInstanceConfigurationId() { + return instanceConfigurationId; + } + + /** + * The number of instances currently running in the GpuMemoryCluster + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("size") + private final Long size; + + /** + * The number of instances currently running in the GpuMemoryCluster + * + * @return the value + **/ + public Long getSize() { + return size; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + @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("UpdateComputeGpuMemoryClusterDetails("); + sb.append("super=").append(super.toString()); + sb.append("instanceConfigurationId=").append(String.valueOf(this.instanceConfigurationId)); + sb.append(", size=").append(String.valueOf(this.size)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + 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 UpdateComputeGpuMemoryClusterDetails)) { + return false; + } + + UpdateComputeGpuMemoryClusterDetails other = (UpdateComputeGpuMemoryClusterDetails) o; + return java.util.Objects.equals(this.instanceConfigurationId, other.instanceConfigurationId) + && java.util.Objects.equals(this.size, other.size) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.displayName, other.displayName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.instanceConfigurationId == null + ? 43 + : this.instanceConfigurationId.hashCode()); + result = (result * PRIME) + (this.size == null ? 43 : this.size.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateComputeGpuMemoryFabricDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateComputeGpuMemoryFabricDetails.java new file mode 100644 index 0000000000..c758f1af33 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateComputeGpuMemoryFabricDetails.java @@ -0,0 +1,257 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * Updates compute GPU memory fabric 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: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateComputeGpuMemoryFabricDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateComputeGpuMemoryFabricDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"definedTags", "freeformTags", "displayName"}) + public UpdateComputeGpuMemoryFabricDetails( + java.util.Map> definedTags, + java.util.Map freeformTags, + String displayName) { + super(); + this.definedTags = definedTags; + this.freeformTags = freeformTags; + this.displayName = displayName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * 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; + } + /** + * 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; + } + /** + * 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; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateComputeGpuMemoryFabricDetails build() { + UpdateComputeGpuMemoryFabricDetails model = + new UpdateComputeGpuMemoryFabricDetails( + this.definedTags, this.freeformTags, this.displayName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateComputeGpuMemoryFabricDetails model) { + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(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 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; + } + + /** + * 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; + } + + /** + * 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; + } + + @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("UpdateComputeGpuMemoryFabricDetails("); + sb.append("super=").append(super.toString()); + sb.append("definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + 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 UpdateComputeGpuMemoryFabricDetails)) { + return false; + } + + UpdateComputeGpuMemoryFabricDetails other = (UpdateComputeGpuMemoryFabricDetails) o; + return java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.displayName, other.displayName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateComputeHostDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateComputeHostDetails.java new file mode 100644 index 0000000000..3a610b59e6 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateComputeHostDetails.java @@ -0,0 +1,257 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * The details for updating the compute host. + * + *
+ * 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 = UpdateComputeHostDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateComputeHostDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"definedTags", "displayName", "freeformTags"}) + public UpdateComputeHostDetails( + java.util.Map> definedTags, + String displayName, + java.util.Map freeformTags) { + super(); + this.definedTags = definedTags; + this.displayName = displayName; + this.freeformTags = freeformTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * 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; + } + /** + * 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; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateComputeHostDetails build() { + UpdateComputeHostDetails model = + new UpdateComputeHostDetails( + this.definedTags, this.displayName, this.freeformTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateComputeHostDetails model) { + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(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 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; + } + + /** + * 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; + } + + @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("UpdateComputeHostDetails("); + sb.append("super=").append(super.toString()); + sb.append("definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateComputeHostDetails)) { + return false; + } + + UpdateComputeHostDetails other = (UpdateComputeHostDetails) o; + return java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeComputeGpuMemoryClusterCompartmentRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeComputeGpuMemoryClusterCompartmentRequest.java new file mode 100644 index 0000000000..1cc7b7e105 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeComputeGpuMemoryClusterCompartmentRequest.java @@ -0,0 +1,383 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use ChangeComputeGpuMemoryClusterCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeComputeGpuMemoryClusterCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.core.model.ChangeComputeGpuMemoryClusterCompartmentDetails> { + + /** + * The OCID of the compute GPU memory cluster. + */ + private String computeGpuMemoryClusterId; + + /** + * The OCID of the compute GPU memory cluster. + */ + public String getComputeGpuMemoryClusterId() { + return computeGpuMemoryClusterId; + } + /** + * The configuration details for the move operation. + */ + private com.oracle.bmc.core.model.ChangeComputeGpuMemoryClusterCompartmentDetails + changeComputeGpuMemoryClusterCompartmentDetails; + + /** + * The configuration details for the move operation. + */ + public com.oracle.bmc.core.model.ChangeComputeGpuMemoryClusterCompartmentDetails + getChangeComputeGpuMemoryClusterCompartmentDetails() { + return changeComputeGpuMemoryClusterCompartmentDetails; + } + /** + * 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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 token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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.core.model.ChangeComputeGpuMemoryClusterCompartmentDetails getBody$() { + return changeComputeGpuMemoryClusterCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeComputeGpuMemoryClusterCompartmentRequest, + com.oracle.bmc.core.model.ChangeComputeGpuMemoryClusterCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the compute GPU memory cluster. + */ + private String computeGpuMemoryClusterId = null; + + /** + * The OCID of the compute GPU memory cluster. + * @param computeGpuMemoryClusterId the value to set + * @return this builder instance + */ + public Builder computeGpuMemoryClusterId(String computeGpuMemoryClusterId) { + this.computeGpuMemoryClusterId = computeGpuMemoryClusterId; + return this; + } + + /** + * The configuration details for the move operation. + */ + private com.oracle.bmc.core.model.ChangeComputeGpuMemoryClusterCompartmentDetails + changeComputeGpuMemoryClusterCompartmentDetails = null; + + /** + * The configuration details for the move operation. + * @param changeComputeGpuMemoryClusterCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeComputeGpuMemoryClusterCompartmentDetails( + com.oracle.bmc.core.model.ChangeComputeGpuMemoryClusterCompartmentDetails + changeComputeGpuMemoryClusterCompartmentDetails) { + this.changeComputeGpuMemoryClusterCompartmentDetails = + changeComputeGpuMemoryClusterCompartmentDetails; + 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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 token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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(ChangeComputeGpuMemoryClusterCompartmentRequest o) { + computeGpuMemoryClusterId(o.getComputeGpuMemoryClusterId()); + changeComputeGpuMemoryClusterCompartmentDetails( + o.getChangeComputeGpuMemoryClusterCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeComputeGpuMemoryClusterCompartmentRequest 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 ChangeComputeGpuMemoryClusterCompartmentRequest + */ + public ChangeComputeGpuMemoryClusterCompartmentRequest build() { + ChangeComputeGpuMemoryClusterCompartmentRequest 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.core.model.ChangeComputeGpuMemoryClusterCompartmentDetails body) { + changeComputeGpuMemoryClusterCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeComputeGpuMemoryClusterCompartmentRequest 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 ChangeComputeGpuMemoryClusterCompartmentRequest + */ + public ChangeComputeGpuMemoryClusterCompartmentRequest buildWithoutInvocationCallback() { + ChangeComputeGpuMemoryClusterCompartmentRequest request = + new ChangeComputeGpuMemoryClusterCompartmentRequest(); + request.computeGpuMemoryClusterId = computeGpuMemoryClusterId; + request.changeComputeGpuMemoryClusterCompartmentDetails = + changeComputeGpuMemoryClusterCompartmentDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeComputeGpuMemoryClusterCompartmentRequest(computeGpuMemoryClusterId, changeComputeGpuMemoryClusterCompartmentDetails, 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() + .computeGpuMemoryClusterId(computeGpuMemoryClusterId) + .changeComputeGpuMemoryClusterCompartmentDetails( + changeComputeGpuMemoryClusterCompartmentDetails) + .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(",computeGpuMemoryClusterId=") + .append(String.valueOf(this.computeGpuMemoryClusterId)); + sb.append(",changeComputeGpuMemoryClusterCompartmentDetails=") + .append(String.valueOf(this.changeComputeGpuMemoryClusterCompartmentDetails)); + 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 ChangeComputeGpuMemoryClusterCompartmentRequest)) { + return false; + } + + ChangeComputeGpuMemoryClusterCompartmentRequest other = + (ChangeComputeGpuMemoryClusterCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.computeGpuMemoryClusterId, other.computeGpuMemoryClusterId) + && java.util.Objects.equals( + this.changeComputeGpuMemoryClusterCompartmentDetails, + other.changeComputeGpuMemoryClusterCompartmentDetails) + && 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.computeGpuMemoryClusterId == null + ? 43 + : this.computeGpuMemoryClusterId.hashCode()); + result = + (result * PRIME) + + (this.changeComputeGpuMemoryClusterCompartmentDetails == null + ? 43 + : this.changeComputeGpuMemoryClusterCompartmentDetails.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-core/src/main/java/com/oracle/bmc/core/requests/ChangeComputeGpuMemoryFabricCompartmentRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeComputeGpuMemoryFabricCompartmentRequest.java new file mode 100644 index 0000000000..4c72524a9b --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeComputeGpuMemoryFabricCompartmentRequest.java @@ -0,0 +1,383 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use ChangeComputeGpuMemoryFabricCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeComputeGpuMemoryFabricCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.core.model.ChangeComputeGpuMemoryFabricCompartmentDetails> { + + /** + * The OCID of the compute GPU memory fabric. + */ + private String computeGpuMemoryFabricId; + + /** + * The OCID of the compute GPU memory fabric. + */ + public String getComputeGpuMemoryFabricId() { + return computeGpuMemoryFabricId; + } + /** + * The configuration details for the move operation. + */ + private com.oracle.bmc.core.model.ChangeComputeGpuMemoryFabricCompartmentDetails + changeComputeGpuMemoryFabricCompartmentDetails; + + /** + * The configuration details for the move operation. + */ + public com.oracle.bmc.core.model.ChangeComputeGpuMemoryFabricCompartmentDetails + getChangeComputeGpuMemoryFabricCompartmentDetails() { + return changeComputeGpuMemoryFabricCompartmentDetails; + } + /** + * 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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 token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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.core.model.ChangeComputeGpuMemoryFabricCompartmentDetails getBody$() { + return changeComputeGpuMemoryFabricCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeComputeGpuMemoryFabricCompartmentRequest, + com.oracle.bmc.core.model.ChangeComputeGpuMemoryFabricCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the compute GPU memory fabric. + */ + private String computeGpuMemoryFabricId = null; + + /** + * The OCID of the compute GPU memory fabric. + * @param computeGpuMemoryFabricId the value to set + * @return this builder instance + */ + public Builder computeGpuMemoryFabricId(String computeGpuMemoryFabricId) { + this.computeGpuMemoryFabricId = computeGpuMemoryFabricId; + return this; + } + + /** + * The configuration details for the move operation. + */ + private com.oracle.bmc.core.model.ChangeComputeGpuMemoryFabricCompartmentDetails + changeComputeGpuMemoryFabricCompartmentDetails = null; + + /** + * The configuration details for the move operation. + * @param changeComputeGpuMemoryFabricCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeComputeGpuMemoryFabricCompartmentDetails( + com.oracle.bmc.core.model.ChangeComputeGpuMemoryFabricCompartmentDetails + changeComputeGpuMemoryFabricCompartmentDetails) { + this.changeComputeGpuMemoryFabricCompartmentDetails = + changeComputeGpuMemoryFabricCompartmentDetails; + 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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 token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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(ChangeComputeGpuMemoryFabricCompartmentRequest o) { + computeGpuMemoryFabricId(o.getComputeGpuMemoryFabricId()); + changeComputeGpuMemoryFabricCompartmentDetails( + o.getChangeComputeGpuMemoryFabricCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeComputeGpuMemoryFabricCompartmentRequest 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 ChangeComputeGpuMemoryFabricCompartmentRequest + */ + public ChangeComputeGpuMemoryFabricCompartmentRequest build() { + ChangeComputeGpuMemoryFabricCompartmentRequest 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.core.model.ChangeComputeGpuMemoryFabricCompartmentDetails body) { + changeComputeGpuMemoryFabricCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeComputeGpuMemoryFabricCompartmentRequest 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 ChangeComputeGpuMemoryFabricCompartmentRequest + */ + public ChangeComputeGpuMemoryFabricCompartmentRequest buildWithoutInvocationCallback() { + ChangeComputeGpuMemoryFabricCompartmentRequest request = + new ChangeComputeGpuMemoryFabricCompartmentRequest(); + request.computeGpuMemoryFabricId = computeGpuMemoryFabricId; + request.changeComputeGpuMemoryFabricCompartmentDetails = + changeComputeGpuMemoryFabricCompartmentDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeComputeGpuMemoryFabricCompartmentRequest(computeGpuMemoryFabricId, changeComputeGpuMemoryFabricCompartmentDetails, 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() + .computeGpuMemoryFabricId(computeGpuMemoryFabricId) + .changeComputeGpuMemoryFabricCompartmentDetails( + changeComputeGpuMemoryFabricCompartmentDetails) + .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(",computeGpuMemoryFabricId=") + .append(String.valueOf(this.computeGpuMemoryFabricId)); + sb.append(",changeComputeGpuMemoryFabricCompartmentDetails=") + .append(String.valueOf(this.changeComputeGpuMemoryFabricCompartmentDetails)); + 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 ChangeComputeGpuMemoryFabricCompartmentRequest)) { + return false; + } + + ChangeComputeGpuMemoryFabricCompartmentRequest other = + (ChangeComputeGpuMemoryFabricCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.computeGpuMemoryFabricId, other.computeGpuMemoryFabricId) + && java.util.Objects.equals( + this.changeComputeGpuMemoryFabricCompartmentDetails, + other.changeComputeGpuMemoryFabricCompartmentDetails) + && 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.computeGpuMemoryFabricId == null + ? 43 + : this.computeGpuMemoryFabricId.hashCode()); + result = + (result * PRIME) + + (this.changeComputeGpuMemoryFabricCompartmentDetails == null + ? 43 + : this.changeComputeGpuMemoryFabricCompartmentDetails.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-core/src/main/java/com/oracle/bmc/core/requests/ChangeComputeHostCompartmentRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeComputeHostCompartmentRequest.java new file mode 100644 index 0000000000..55a889d157 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeComputeHostCompartmentRequest.java @@ -0,0 +1,375 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use ChangeComputeHostCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeComputeHostCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.core.model.ChangeComputeHostCompartmentDetails> { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + * + */ + private String computeHostId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + * + */ + public String getComputeHostId() { + return computeHostId; + } + /** + * The configuration details for the move operation. + */ + private com.oracle.bmc.core.model.ChangeComputeHostCompartmentDetails + changeComputeHostCompartmentDetails; + + /** + * The configuration details for the move operation. + */ + public com.oracle.bmc.core.model.ChangeComputeHostCompartmentDetails + getChangeComputeHostCompartmentDetails() { + return changeComputeHostCompartmentDetails; + } + /** + * 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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 token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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.core.model.ChangeComputeHostCompartmentDetails getBody$() { + return changeComputeHostCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeComputeHostCompartmentRequest, + com.oracle.bmc.core.model.ChangeComputeHostCompartmentDetails> { + 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 compute host. + * + */ + private String computeHostId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + * + * @param computeHostId the value to set + * @return this builder instance + */ + public Builder computeHostId(String computeHostId) { + this.computeHostId = computeHostId; + return this; + } + + /** + * The configuration details for the move operation. + */ + private com.oracle.bmc.core.model.ChangeComputeHostCompartmentDetails + changeComputeHostCompartmentDetails = null; + + /** + * The configuration details for the move operation. + * @param changeComputeHostCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeComputeHostCompartmentDetails( + com.oracle.bmc.core.model.ChangeComputeHostCompartmentDetails + changeComputeHostCompartmentDetails) { + this.changeComputeHostCompartmentDetails = changeComputeHostCompartmentDetails; + 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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 token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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(ChangeComputeHostCompartmentRequest o) { + computeHostId(o.getComputeHostId()); + changeComputeHostCompartmentDetails(o.getChangeComputeHostCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeComputeHostCompartmentRequest 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 ChangeComputeHostCompartmentRequest + */ + public ChangeComputeHostCompartmentRequest build() { + ChangeComputeHostCompartmentRequest 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.core.model.ChangeComputeHostCompartmentDetails body) { + changeComputeHostCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeComputeHostCompartmentRequest 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 ChangeComputeHostCompartmentRequest + */ + public ChangeComputeHostCompartmentRequest buildWithoutInvocationCallback() { + ChangeComputeHostCompartmentRequest request = new ChangeComputeHostCompartmentRequest(); + request.computeHostId = computeHostId; + request.changeComputeHostCompartmentDetails = changeComputeHostCompartmentDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeComputeHostCompartmentRequest(computeHostId, changeComputeHostCompartmentDetails, 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() + .computeHostId(computeHostId) + .changeComputeHostCompartmentDetails(changeComputeHostCompartmentDetails) + .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(",computeHostId=").append(String.valueOf(this.computeHostId)); + sb.append(",changeComputeHostCompartmentDetails=") + .append(String.valueOf(this.changeComputeHostCompartmentDetails)); + 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 ChangeComputeHostCompartmentRequest)) { + return false; + } + + ChangeComputeHostCompartmentRequest other = (ChangeComputeHostCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.computeHostId, other.computeHostId) + && java.util.Objects.equals( + this.changeComputeHostCompartmentDetails, + other.changeComputeHostCompartmentDetails) + && 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.computeHostId == null ? 43 : this.computeHostId.hashCode()); + result = + (result * PRIME) + + (this.changeComputeHostCompartmentDetails == null + ? 43 + : this.changeComputeHostCompartmentDetails.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-core/src/main/java/com/oracle/bmc/core/requests/CreateComputeGpuMemoryClusterRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateComputeGpuMemoryClusterRequest.java new file mode 100644 index 0000000000..32f3da37a8 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateComputeGpuMemoryClusterRequest.java @@ -0,0 +1,294 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use CreateComputeGpuMemoryClusterRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateComputeGpuMemoryClusterRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.core.model.CreateComputeGpuMemoryClusterDetails> { + + /** + * The configuration details of a GPU memory cluster + */ + private com.oracle.bmc.core.model.CreateComputeGpuMemoryClusterDetails + createComputeGpuMemoryClusterDetails; + + /** + * The configuration details of a GPU memory cluster + */ + public com.oracle.bmc.core.model.CreateComputeGpuMemoryClusterDetails + getCreateComputeGpuMemoryClusterDetails() { + return createComputeGpuMemoryClusterDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.core.model.CreateComputeGpuMemoryClusterDetails getBody$() { + return createComputeGpuMemoryClusterDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateComputeGpuMemoryClusterRequest, + com.oracle.bmc.core.model.CreateComputeGpuMemoryClusterDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The configuration details of a GPU memory cluster + */ + private com.oracle.bmc.core.model.CreateComputeGpuMemoryClusterDetails + createComputeGpuMemoryClusterDetails = null; + + /** + * The configuration details of a GPU memory cluster + * @param createComputeGpuMemoryClusterDetails the value to set + * @return this builder instance + */ + public Builder createComputeGpuMemoryClusterDetails( + com.oracle.bmc.core.model.CreateComputeGpuMemoryClusterDetails + createComputeGpuMemoryClusterDetails) { + this.createComputeGpuMemoryClusterDetails = createComputeGpuMemoryClusterDetails; + 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 + * may 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 + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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(CreateComputeGpuMemoryClusterRequest o) { + createComputeGpuMemoryClusterDetails(o.getCreateComputeGpuMemoryClusterDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateComputeGpuMemoryClusterRequest 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 CreateComputeGpuMemoryClusterRequest + */ + public CreateComputeGpuMemoryClusterRequest build() { + CreateComputeGpuMemoryClusterRequest 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.core.model.CreateComputeGpuMemoryClusterDetails body) { + createComputeGpuMemoryClusterDetails(body); + return this; + } + + /** + * Build the instance of CreateComputeGpuMemoryClusterRequest 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 CreateComputeGpuMemoryClusterRequest + */ + public CreateComputeGpuMemoryClusterRequest buildWithoutInvocationCallback() { + CreateComputeGpuMemoryClusterRequest request = + new CreateComputeGpuMemoryClusterRequest(); + request.createComputeGpuMemoryClusterDetails = createComputeGpuMemoryClusterDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateComputeGpuMemoryClusterRequest(createComputeGpuMemoryClusterDetails, 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() + .createComputeGpuMemoryClusterDetails(createComputeGpuMemoryClusterDetails) + .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(",createComputeGpuMemoryClusterDetails=") + .append(String.valueOf(this.createComputeGpuMemoryClusterDetails)); + 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 CreateComputeGpuMemoryClusterRequest)) { + return false; + } + + CreateComputeGpuMemoryClusterRequest other = (CreateComputeGpuMemoryClusterRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createComputeGpuMemoryClusterDetails, + other.createComputeGpuMemoryClusterDetails) + && 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.createComputeGpuMemoryClusterDetails == null + ? 43 + : this.createComputeGpuMemoryClusterDetails.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-core/src/main/java/com/oracle/bmc/core/requests/DeleteComputeGpuMemoryClusterRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteComputeGpuMemoryClusterRequest.java new file mode 100644 index 0000000000..2359eb857e --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteComputeGpuMemoryClusterRequest.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use DeleteComputeGpuMemoryClusterRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteComputeGpuMemoryClusterRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compute GPU memory cluster. + */ + private String computeGpuMemoryClusterId; + + /** + * The OCID of the compute GPU memory cluster. + */ + public String getComputeGpuMemoryClusterId() { + return computeGpuMemoryClusterId; + } + /** + * 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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< + DeleteComputeGpuMemoryClusterRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the compute GPU memory cluster. + */ + private String computeGpuMemoryClusterId = null; + + /** + * The OCID of the compute GPU memory cluster. + * @param computeGpuMemoryClusterId the value to set + * @return this builder instance + */ + public Builder computeGpuMemoryClusterId(String computeGpuMemoryClusterId) { + this.computeGpuMemoryClusterId = computeGpuMemoryClusterId; + 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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(DeleteComputeGpuMemoryClusterRequest o) { + computeGpuMemoryClusterId(o.getComputeGpuMemoryClusterId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteComputeGpuMemoryClusterRequest 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 DeleteComputeGpuMemoryClusterRequest + */ + public DeleteComputeGpuMemoryClusterRequest build() { + DeleteComputeGpuMemoryClusterRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteComputeGpuMemoryClusterRequest 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 DeleteComputeGpuMemoryClusterRequest + */ + public DeleteComputeGpuMemoryClusterRequest buildWithoutInvocationCallback() { + DeleteComputeGpuMemoryClusterRequest request = + new DeleteComputeGpuMemoryClusterRequest(); + request.computeGpuMemoryClusterId = computeGpuMemoryClusterId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteComputeGpuMemoryClusterRequest(computeGpuMemoryClusterId, 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() + .computeGpuMemoryClusterId(computeGpuMemoryClusterId) + .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(",computeGpuMemoryClusterId=") + .append(String.valueOf(this.computeGpuMemoryClusterId)); + 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 DeleteComputeGpuMemoryClusterRequest)) { + return false; + } + + DeleteComputeGpuMemoryClusterRequest other = (DeleteComputeGpuMemoryClusterRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.computeGpuMemoryClusterId, other.computeGpuMemoryClusterId) + && 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.computeGpuMemoryClusterId == null + ? 43 + : this.computeGpuMemoryClusterId.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-core/src/main/java/com/oracle/bmc/core/requests/GetComputeGpuMemoryClusterRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetComputeGpuMemoryClusterRequest.java new file mode 100644 index 0000000000..296e29eb8c --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetComputeGpuMemoryClusterRequest.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use GetComputeGpuMemoryClusterRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetComputeGpuMemoryClusterRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compute GPU memory cluster. + */ + private String computeGpuMemoryClusterId; + + /** + * The OCID of the compute GPU memory cluster. + */ + public String getComputeGpuMemoryClusterId() { + return computeGpuMemoryClusterId; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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< + GetComputeGpuMemoryClusterRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the compute GPU memory cluster. + */ + private String computeGpuMemoryClusterId = null; + + /** + * The OCID of the compute GPU memory cluster. + * @param computeGpuMemoryClusterId the value to set + * @return this builder instance + */ + public Builder computeGpuMemoryClusterId(String computeGpuMemoryClusterId) { + this.computeGpuMemoryClusterId = computeGpuMemoryClusterId; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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(GetComputeGpuMemoryClusterRequest o) { + computeGpuMemoryClusterId(o.getComputeGpuMemoryClusterId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetComputeGpuMemoryClusterRequest 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 GetComputeGpuMemoryClusterRequest + */ + public GetComputeGpuMemoryClusterRequest build() { + GetComputeGpuMemoryClusterRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetComputeGpuMemoryClusterRequest 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 GetComputeGpuMemoryClusterRequest + */ + public GetComputeGpuMemoryClusterRequest buildWithoutInvocationCallback() { + GetComputeGpuMemoryClusterRequest request = new GetComputeGpuMemoryClusterRequest(); + request.computeGpuMemoryClusterId = computeGpuMemoryClusterId; + request.opcRequestId = opcRequestId; + return request; + // new GetComputeGpuMemoryClusterRequest(computeGpuMemoryClusterId, 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() + .computeGpuMemoryClusterId(computeGpuMemoryClusterId) + .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(",computeGpuMemoryClusterId=") + .append(String.valueOf(this.computeGpuMemoryClusterId)); + 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 GetComputeGpuMemoryClusterRequest)) { + return false; + } + + GetComputeGpuMemoryClusterRequest other = (GetComputeGpuMemoryClusterRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.computeGpuMemoryClusterId, other.computeGpuMemoryClusterId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.computeGpuMemoryClusterId == null + ? 43 + : this.computeGpuMemoryClusterId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetComputeGpuMemoryFabricRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetComputeGpuMemoryFabricRequest.java new file mode 100644 index 0000000000..d174dbe187 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetComputeGpuMemoryFabricRequest.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use GetComputeGpuMemoryFabricRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetComputeGpuMemoryFabricRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compute GPU memory fabric. + */ + private String computeGpuMemoryFabricId; + + /** + * The OCID of the compute GPU memory fabric. + */ + public String getComputeGpuMemoryFabricId() { + return computeGpuMemoryFabricId; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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< + GetComputeGpuMemoryFabricRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the compute GPU memory fabric. + */ + private String computeGpuMemoryFabricId = null; + + /** + * The OCID of the compute GPU memory fabric. + * @param computeGpuMemoryFabricId the value to set + * @return this builder instance + */ + public Builder computeGpuMemoryFabricId(String computeGpuMemoryFabricId) { + this.computeGpuMemoryFabricId = computeGpuMemoryFabricId; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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(GetComputeGpuMemoryFabricRequest o) { + computeGpuMemoryFabricId(o.getComputeGpuMemoryFabricId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetComputeGpuMemoryFabricRequest 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 GetComputeGpuMemoryFabricRequest + */ + public GetComputeGpuMemoryFabricRequest build() { + GetComputeGpuMemoryFabricRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetComputeGpuMemoryFabricRequest 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 GetComputeGpuMemoryFabricRequest + */ + public GetComputeGpuMemoryFabricRequest buildWithoutInvocationCallback() { + GetComputeGpuMemoryFabricRequest request = new GetComputeGpuMemoryFabricRequest(); + request.computeGpuMemoryFabricId = computeGpuMemoryFabricId; + request.opcRequestId = opcRequestId; + return request; + // new GetComputeGpuMemoryFabricRequest(computeGpuMemoryFabricId, 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() + .computeGpuMemoryFabricId(computeGpuMemoryFabricId) + .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(",computeGpuMemoryFabricId=") + .append(String.valueOf(this.computeGpuMemoryFabricId)); + 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 GetComputeGpuMemoryFabricRequest)) { + return false; + } + + GetComputeGpuMemoryFabricRequest other = (GetComputeGpuMemoryFabricRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.computeGpuMemoryFabricId, other.computeGpuMemoryFabricId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.computeGpuMemoryFabricId == null + ? 43 + : this.computeGpuMemoryFabricId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetComputeHostRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetComputeHostRequest.java new file mode 100644 index 0000000000..7671de9d1a --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetComputeHostRequest.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use GetComputeHostRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetComputeHostRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + * + */ + private String computeHostId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + * + */ + public String getComputeHostId() { + return computeHostId; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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< + GetComputeHostRequest, 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 compute host. + * + */ + private String computeHostId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + * + * @param computeHostId the value to set + * @return this builder instance + */ + public Builder computeHostId(String computeHostId) { + this.computeHostId = computeHostId; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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(GetComputeHostRequest o) { + computeHostId(o.getComputeHostId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetComputeHostRequest 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 GetComputeHostRequest + */ + public GetComputeHostRequest build() { + GetComputeHostRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetComputeHostRequest 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 GetComputeHostRequest + */ + public GetComputeHostRequest buildWithoutInvocationCallback() { + GetComputeHostRequest request = new GetComputeHostRequest(); + request.computeHostId = computeHostId; + request.opcRequestId = opcRequestId; + return request; + // new GetComputeHostRequest(computeHostId, 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().computeHostId(computeHostId).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(",computeHostId=").append(String.valueOf(this.computeHostId)); + 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 GetComputeHostRequest)) { + return false; + } + + GetComputeHostRequest other = (GetComputeHostRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.computeHostId, other.computeHostId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.computeHostId == null ? 43 : this.computeHostId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListComputeGpuMemoryClusterInstancesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListComputeGpuMemoryClusterInstancesRequest.java new file mode 100644 index 0000000000..52b0aa6518 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListComputeGpuMemoryClusterInstancesRequest.java @@ -0,0 +1,494 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use ListComputeGpuMemoryClusterInstancesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListComputeGpuMemoryClusterInstancesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compute GPU memory cluster. + */ + private String computeGpuMemoryClusterId; + + /** + * The OCID of the compute GPU memory cluster. + */ + public String getComputeGpuMemoryClusterId() { + return computeGpuMemoryClusterId; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the {@code 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 {@code 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 field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

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

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + **/ + public enum SortBy { + 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 one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + 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, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + public 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). + *

+ * Example: {@code 50} + * + */ + 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). + *

+ * Example: {@code 50} + * + */ + public Integer getLimit() { + return limit; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListComputeGpuMemoryClusterInstancesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the compute GPU memory cluster. + */ + private String computeGpuMemoryClusterId = null; + + /** + * The OCID of the compute GPU memory cluster. + * @param computeGpuMemoryClusterId the value to set + * @return this builder instance + */ + public Builder computeGpuMemoryClusterId(String computeGpuMemoryClusterId) { + this.computeGpuMemoryClusterId = computeGpuMemoryClusterId; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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; + } + + /** + * For list pagination. The value of the {@code 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 {@code 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 field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

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

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(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). + *

+ * Example: {@code 50} + * + */ + 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). + *

+ * Example: {@code 50} + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + 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(ListComputeGpuMemoryClusterInstancesRequest o) { + computeGpuMemoryClusterId(o.getComputeGpuMemoryClusterId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + limit(o.getLimit()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListComputeGpuMemoryClusterInstancesRequest 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 ListComputeGpuMemoryClusterInstancesRequest + */ + public ListComputeGpuMemoryClusterInstancesRequest build() { + ListComputeGpuMemoryClusterInstancesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListComputeGpuMemoryClusterInstancesRequest 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 ListComputeGpuMemoryClusterInstancesRequest + */ + public ListComputeGpuMemoryClusterInstancesRequest buildWithoutInvocationCallback() { + ListComputeGpuMemoryClusterInstancesRequest request = + new ListComputeGpuMemoryClusterInstancesRequest(); + request.computeGpuMemoryClusterId = computeGpuMemoryClusterId; + request.opcRequestId = opcRequestId; + request.page = page; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.limit = limit; + return request; + // new ListComputeGpuMemoryClusterInstancesRequest(computeGpuMemoryClusterId, opcRequestId, page, sortBy, sortOrder, limit); + } + } + + /** + * 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() + .computeGpuMemoryClusterId(computeGpuMemoryClusterId) + .opcRequestId(opcRequestId) + .page(page) + .sortBy(sortBy) + .sortOrder(sortOrder) + .limit(limit); + } + + /** + * 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(",computeGpuMemoryClusterId=") + .append(String.valueOf(this.computeGpuMemoryClusterId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + 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(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListComputeGpuMemoryClusterInstancesRequest)) { + return false; + } + + ListComputeGpuMemoryClusterInstancesRequest other = + (ListComputeGpuMemoryClusterInstancesRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.computeGpuMemoryClusterId, other.computeGpuMemoryClusterId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.limit, other.limit); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.computeGpuMemoryClusterId == null + ? 43 + : this.computeGpuMemoryClusterId.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.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()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListComputeGpuMemoryClustersRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListComputeGpuMemoryClustersRequest.java new file mode 100644 index 0000000000..ff2f20e964 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListComputeGpuMemoryClustersRequest.java @@ -0,0 +1,660 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use ListComputeGpuMemoryClustersRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListComputeGpuMemoryClustersRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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 to return only the listings that matches the given GPU memory cluster id. + * + */ + private String computeGpuMemoryClusterId; + + /** + * A filter to return only the listings that matches the given GPU memory cluster id. + * + */ + public String getComputeGpuMemoryClusterId() { + return computeGpuMemoryClusterId; + } + /** + * The name of the availability domain. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + */ + private String availabilityDomain; + + /** + * The name of the availability domain. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + */ + public String getAvailabilityDomain() { + return availabilityDomain; + } + /** + * 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 compute cluster. + * A [compute cluster](https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + * access (RDMA) network group. + * + */ + private String computeClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + * A [compute cluster](https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + * access (RDMA) network group. + * + */ + public String getComputeClusterId() { + return computeClusterId; + } + /** + * For list pagination. The value of the {@code 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 {@code 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 field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

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

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + **/ + public enum SortBy { + 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 one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + 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, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + public 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). + *

+ * Example: {@code 50} + * + */ + 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). + *

+ * Example: {@code 50} + * + */ + public Integer getLimit() { + return limit; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListComputeGpuMemoryClustersRequest, 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. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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 to return only the listings that matches the given GPU memory cluster id. + * + */ + private String computeGpuMemoryClusterId = null; + + /** + * A filter to return only the listings that matches the given GPU memory cluster id. + * + * @param computeGpuMemoryClusterId the value to set + * @return this builder instance + */ + public Builder computeGpuMemoryClusterId(String computeGpuMemoryClusterId) { + this.computeGpuMemoryClusterId = computeGpuMemoryClusterId; + return this; + } + + /** + * The name of the availability domain. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + */ + private String availabilityDomain = null; + + /** + * The name of the availability domain. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + * @param availabilityDomain the value to set + * @return this builder instance + */ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + 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 compute cluster. + * A [compute cluster](https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + * access (RDMA) network group. + * + */ + private String computeClusterId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + * A [compute cluster](https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + * access (RDMA) network group. + * + * @param computeClusterId the value to set + * @return this builder instance + */ + public Builder computeClusterId(String computeClusterId) { + this.computeClusterId = computeClusterId; + return this; + } + + /** + * For list pagination. The value of the {@code 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 {@code 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 field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

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

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(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). + *

+ * Example: {@code 50} + * + */ + 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). + *

+ * Example: {@code 50} + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + 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(ListComputeGpuMemoryClustersRequest o) { + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + computeGpuMemoryClusterId(o.getComputeGpuMemoryClusterId()); + availabilityDomain(o.getAvailabilityDomain()); + displayName(o.getDisplayName()); + computeClusterId(o.getComputeClusterId()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + limit(o.getLimit()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListComputeGpuMemoryClustersRequest 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 ListComputeGpuMemoryClustersRequest + */ + public ListComputeGpuMemoryClustersRequest build() { + ListComputeGpuMemoryClustersRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListComputeGpuMemoryClustersRequest 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 ListComputeGpuMemoryClustersRequest + */ + public ListComputeGpuMemoryClustersRequest buildWithoutInvocationCallback() { + ListComputeGpuMemoryClustersRequest request = new ListComputeGpuMemoryClustersRequest(); + request.compartmentId = compartmentId; + request.opcRequestId = opcRequestId; + request.computeGpuMemoryClusterId = computeGpuMemoryClusterId; + request.availabilityDomain = availabilityDomain; + request.displayName = displayName; + request.computeClusterId = computeClusterId; + request.page = page; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.limit = limit; + return request; + // new ListComputeGpuMemoryClustersRequest(compartmentId, opcRequestId, computeGpuMemoryClusterId, availabilityDomain, displayName, computeClusterId, page, sortBy, sortOrder, limit); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .opcRequestId(opcRequestId) + .computeGpuMemoryClusterId(computeGpuMemoryClusterId) + .availabilityDomain(availabilityDomain) + .displayName(displayName) + .computeClusterId(computeClusterId) + .page(page) + .sortBy(sortBy) + .sortOrder(sortOrder) + .limit(limit); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",computeGpuMemoryClusterId=") + .append(String.valueOf(this.computeGpuMemoryClusterId)); + sb.append(",availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",computeClusterId=").append(String.valueOf(this.computeClusterId)); + sb.append(",page=").append(String.valueOf(this.page)); + 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(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListComputeGpuMemoryClustersRequest)) { + return false; + } + + ListComputeGpuMemoryClustersRequest other = (ListComputeGpuMemoryClustersRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.computeGpuMemoryClusterId, other.computeGpuMemoryClusterId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.computeClusterId, other.computeClusterId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.limit, other.limit); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.computeGpuMemoryClusterId == null + ? 43 + : this.computeGpuMemoryClusterId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.computeClusterId == null ? 43 : this.computeClusterId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.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()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListComputeGpuMemoryFabricsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListComputeGpuMemoryFabricsRequest.java new file mode 100644 index 0000000000..7bb603e275 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListComputeGpuMemoryFabricsRequest.java @@ -0,0 +1,781 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use ListComputeGpuMemoryFabricsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListComputeGpuMemoryFabricsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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 to return only the listings that matches the given GPU memory fabric id. + * + */ + private String computeGpuMemoryFabricId; + + /** + * A filter to return only the listings that matches the given GPU memory fabric id. + * + */ + public String getComputeGpuMemoryFabricId() { + return computeGpuMemoryFabricId; + } + /** + * The name of the availability domain. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + */ + private String availabilityDomain; + + /** + * The name of the availability domain. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + */ + public String getAvailabilityDomain() { + return availabilityDomain; + } + /** + * 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 compute HPC island. + */ + private String computeHpcIslandId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + */ + public String getComputeHpcIslandId() { + return computeHpcIslandId; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + */ + private String computeNetworkBlockId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + */ + public String getComputeNetworkBlockId() { + return computeNetworkBlockId; + } + /** + * A filter to return ComputeGpuMemoryFabricSummary resources that match the given lifecycle state. + * + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryFabric.LifecycleState + computeGpuMemoryFabricLifecycleState; + + /** + * A filter to return ComputeGpuMemoryFabricSummary resources that match the given lifecycle state. + * + */ + public com.oracle.bmc.core.model.ComputeGpuMemoryFabric.LifecycleState + getComputeGpuMemoryFabricLifecycleState() { + return computeGpuMemoryFabricLifecycleState; + } + /** + * A filter to return ComputeGpuMemoryFabricSummary resources that match the given fabric health. + * + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryFabric.FabricHealth + computeGpuMemoryFabricHealth; + + /** + * A filter to return ComputeGpuMemoryFabricSummary resources that match the given fabric health. + * + */ + public com.oracle.bmc.core.model.ComputeGpuMemoryFabric.FabricHealth + getComputeGpuMemoryFabricHealth() { + return computeGpuMemoryFabricHealth; + } + /** + * 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). + *

+ * Example: {@code 50} + * + */ + 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). + *

+ * Example: {@code 50} + * + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the {@code 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 {@code 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 field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

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

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + **/ + public enum SortBy { + 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 one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + 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, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + public SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListComputeGpuMemoryFabricsRequest, 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. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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 to return only the listings that matches the given GPU memory fabric id. + * + */ + private String computeGpuMemoryFabricId = null; + + /** + * A filter to return only the listings that matches the given GPU memory fabric id. + * + * @param computeGpuMemoryFabricId the value to set + * @return this builder instance + */ + public Builder computeGpuMemoryFabricId(String computeGpuMemoryFabricId) { + this.computeGpuMemoryFabricId = computeGpuMemoryFabricId; + return this; + } + + /** + * The name of the availability domain. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + */ + private String availabilityDomain = null; + + /** + * The name of the availability domain. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + * @param availabilityDomain the value to set + * @return this builder instance + */ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + 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 compute HPC island. + */ + private String computeHpcIslandId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + * @param computeHpcIslandId the value to set + * @return this builder instance + */ + public Builder computeHpcIslandId(String computeHpcIslandId) { + this.computeHpcIslandId = computeHpcIslandId; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + */ + private String computeNetworkBlockId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + * @param computeNetworkBlockId the value to set + * @return this builder instance + */ + public Builder computeNetworkBlockId(String computeNetworkBlockId) { + this.computeNetworkBlockId = computeNetworkBlockId; + return this; + } + + /** + * A filter to return ComputeGpuMemoryFabricSummary resources that match the given lifecycle state. + * + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryFabric.LifecycleState + computeGpuMemoryFabricLifecycleState = null; + + /** + * A filter to return ComputeGpuMemoryFabricSummary resources that match the given lifecycle state. + * + * @param computeGpuMemoryFabricLifecycleState the value to set + * @return this builder instance + */ + public Builder computeGpuMemoryFabricLifecycleState( + com.oracle.bmc.core.model.ComputeGpuMemoryFabric.LifecycleState + computeGpuMemoryFabricLifecycleState) { + this.computeGpuMemoryFabricLifecycleState = computeGpuMemoryFabricLifecycleState; + return this; + } + + /** + * A filter to return ComputeGpuMemoryFabricSummary resources that match the given fabric health. + * + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryFabric.FabricHealth + computeGpuMemoryFabricHealth = null; + + /** + * A filter to return ComputeGpuMemoryFabricSummary resources that match the given fabric health. + * + * @param computeGpuMemoryFabricHealth the value to set + * @return this builder instance + */ + public Builder computeGpuMemoryFabricHealth( + com.oracle.bmc.core.model.ComputeGpuMemoryFabric.FabricHealth + computeGpuMemoryFabricHealth) { + this.computeGpuMemoryFabricHealth = computeGpuMemoryFabricHealth; + 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). + *

+ * Example: {@code 50} + * + */ + 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). + *

+ * Example: {@code 50} + * + * @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 {@code 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 {@code 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 field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

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

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(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(ListComputeGpuMemoryFabricsRequest o) { + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + computeGpuMemoryFabricId(o.getComputeGpuMemoryFabricId()); + availabilityDomain(o.getAvailabilityDomain()); + displayName(o.getDisplayName()); + computeHpcIslandId(o.getComputeHpcIslandId()); + computeNetworkBlockId(o.getComputeNetworkBlockId()); + computeGpuMemoryFabricLifecycleState(o.getComputeGpuMemoryFabricLifecycleState()); + computeGpuMemoryFabricHealth(o.getComputeGpuMemoryFabricHealth()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListComputeGpuMemoryFabricsRequest 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 ListComputeGpuMemoryFabricsRequest + */ + public ListComputeGpuMemoryFabricsRequest build() { + ListComputeGpuMemoryFabricsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListComputeGpuMemoryFabricsRequest 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 ListComputeGpuMemoryFabricsRequest + */ + public ListComputeGpuMemoryFabricsRequest buildWithoutInvocationCallback() { + ListComputeGpuMemoryFabricsRequest request = new ListComputeGpuMemoryFabricsRequest(); + request.compartmentId = compartmentId; + request.opcRequestId = opcRequestId; + request.computeGpuMemoryFabricId = computeGpuMemoryFabricId; + request.availabilityDomain = availabilityDomain; + request.displayName = displayName; + request.computeHpcIslandId = computeHpcIslandId; + request.computeNetworkBlockId = computeNetworkBlockId; + request.computeGpuMemoryFabricLifecycleState = computeGpuMemoryFabricLifecycleState; + request.computeGpuMemoryFabricHealth = computeGpuMemoryFabricHealth; + request.limit = limit; + request.page = page; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListComputeGpuMemoryFabricsRequest(compartmentId, opcRequestId, computeGpuMemoryFabricId, availabilityDomain, displayName, computeHpcIslandId, computeNetworkBlockId, computeGpuMemoryFabricLifecycleState, computeGpuMemoryFabricHealth, limit, page, 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() + .compartmentId(compartmentId) + .opcRequestId(opcRequestId) + .computeGpuMemoryFabricId(computeGpuMemoryFabricId) + .availabilityDomain(availabilityDomain) + .displayName(displayName) + .computeHpcIslandId(computeHpcIslandId) + .computeNetworkBlockId(computeNetworkBlockId) + .computeGpuMemoryFabricLifecycleState(computeGpuMemoryFabricLifecycleState) + .computeGpuMemoryFabricHealth(computeGpuMemoryFabricHealth) + .limit(limit) + .page(page) + .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(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",computeGpuMemoryFabricId=") + .append(String.valueOf(this.computeGpuMemoryFabricId)); + sb.append(",availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",computeHpcIslandId=").append(String.valueOf(this.computeHpcIslandId)); + sb.append(",computeNetworkBlockId=").append(String.valueOf(this.computeNetworkBlockId)); + sb.append(",computeGpuMemoryFabricLifecycleState=") + .append(String.valueOf(this.computeGpuMemoryFabricLifecycleState)); + sb.append(",computeGpuMemoryFabricHealth=") + .append(String.valueOf(this.computeGpuMemoryFabricHealth)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + 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 ListComputeGpuMemoryFabricsRequest)) { + return false; + } + + ListComputeGpuMemoryFabricsRequest other = (ListComputeGpuMemoryFabricsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.computeGpuMemoryFabricId, other.computeGpuMemoryFabricId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.computeHpcIslandId, other.computeHpcIslandId) + && java.util.Objects.equals(this.computeNetworkBlockId, other.computeNetworkBlockId) + && java.util.Objects.equals( + this.computeGpuMemoryFabricLifecycleState, + other.computeGpuMemoryFabricLifecycleState) + && java.util.Objects.equals( + this.computeGpuMemoryFabricHealth, other.computeGpuMemoryFabricHealth) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && 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.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.computeGpuMemoryFabricId == null + ? 43 + : this.computeGpuMemoryFabricId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.computeHpcIslandId == null + ? 43 + : this.computeHpcIslandId.hashCode()); + result = + (result * PRIME) + + (this.computeNetworkBlockId == null + ? 43 + : this.computeNetworkBlockId.hashCode()); + result = + (result * PRIME) + + (this.computeGpuMemoryFabricLifecycleState == null + ? 43 + : this.computeGpuMemoryFabricLifecycleState.hashCode()); + result = + (result * PRIME) + + (this.computeGpuMemoryFabricHealth == null + ? 43 + : this.computeGpuMemoryFabricHealth.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.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListComputeHostsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListComputeHostsRequest.java new file mode 100644 index 0000000000..20976f22ab --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListComputeHostsRequest.java @@ -0,0 +1,701 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use ListComputeHostsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListComputeHostsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The name of the availability domain. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + */ + private String availabilityDomain; + + /** + * The name of the availability domain. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + */ + public String getAvailabilityDomain() { + return availabilityDomain; + } + /** + * 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 compute host network resoruce. + * - Customer-unique HPC island ID + * - Customer-unique network block ID + * - Customer-unique local block ID + * + */ + private String networkResourceId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host network resoruce. + * - Customer-unique HPC island ID + * - Customer-unique network block ID + * - Customer-unique local block ID + * + */ + public String getNetworkResourceId() { + return networkResourceId; + } + /** + * 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). + *

+ * Example: {@code 50} + * + */ + 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). + *

+ * Example: {@code 50} + * + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the {@code 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 {@code 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 field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

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

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + **/ + public enum SortBy { + 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 one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + 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, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * A filter to return only ComputeHostSummary resources that match the given Compute Host lifecycle State OCID exactly. + * + */ + private String computeHostLifecycleState; + + /** + * A filter to return only ComputeHostSummary resources that match the given Compute Host lifecycle State OCID exactly. + * + */ + public String getComputeHostLifecycleState() { + return computeHostLifecycleState; + } + /** + * A filter to return only ComputeHostSummary resources that match the given Compute Host health State OCID exactly. + * + */ + private String computeHostHealth; + + /** + * A filter to return only ComputeHostSummary resources that match the given Compute Host health State OCID exactly. + * + */ + public String getComputeHostHealth() { + return computeHostHealth; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListComputeHostsRequest, 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. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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; + } + + /** + * The name of the availability domain. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + */ + private String availabilityDomain = null; + + /** + * The name of the availability domain. + *

+ * Example: {@code Uocm:PHX-AD-1} + * + * @param availabilityDomain the value to set + * @return this builder instance + */ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + 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 compute host network resoruce. + * - Customer-unique HPC island ID + * - Customer-unique network block ID + * - Customer-unique local block ID + * + */ + private String networkResourceId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host network resoruce. + * - Customer-unique HPC island ID + * - Customer-unique network block ID + * - Customer-unique local block ID + * + * @param networkResourceId the value to set + * @return this builder instance + */ + public Builder networkResourceId(String networkResourceId) { + this.networkResourceId = networkResourceId; + 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). + *

+ * Example: {@code 50} + * + */ + 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). + *

+ * Example: {@code 50} + * + * @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 {@code 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 {@code 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 field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

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

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * A filter to return only ComputeHostSummary resources that match the given Compute Host lifecycle State OCID exactly. + * + */ + private String computeHostLifecycleState = null; + + /** + * A filter to return only ComputeHostSummary resources that match the given Compute Host lifecycle State OCID exactly. + * + * @param computeHostLifecycleState the value to set + * @return this builder instance + */ + public Builder computeHostLifecycleState(String computeHostLifecycleState) { + this.computeHostLifecycleState = computeHostLifecycleState; + return this; + } + + /** + * A filter to return only ComputeHostSummary resources that match the given Compute Host health State OCID exactly. + * + */ + private String computeHostHealth = null; + + /** + * A filter to return only ComputeHostSummary resources that match the given Compute Host health State OCID exactly. + * + * @param computeHostHealth the value to set + * @return this builder instance + */ + public Builder computeHostHealth(String computeHostHealth) { + this.computeHostHealth = computeHostHealth; + 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(ListComputeHostsRequest o) { + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + availabilityDomain(o.getAvailabilityDomain()); + displayName(o.getDisplayName()); + networkResourceId(o.getNetworkResourceId()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + computeHostLifecycleState(o.getComputeHostLifecycleState()); + computeHostHealth(o.getComputeHostHealth()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListComputeHostsRequest 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 ListComputeHostsRequest + */ + public ListComputeHostsRequest build() { + ListComputeHostsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListComputeHostsRequest 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 ListComputeHostsRequest + */ + public ListComputeHostsRequest buildWithoutInvocationCallback() { + ListComputeHostsRequest request = new ListComputeHostsRequest(); + request.compartmentId = compartmentId; + request.opcRequestId = opcRequestId; + request.availabilityDomain = availabilityDomain; + request.displayName = displayName; + request.networkResourceId = networkResourceId; + request.limit = limit; + request.page = page; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.computeHostLifecycleState = computeHostLifecycleState; + request.computeHostHealth = computeHostHealth; + return request; + // new ListComputeHostsRequest(compartmentId, opcRequestId, availabilityDomain, displayName, networkResourceId, limit, page, sortBy, sortOrder, computeHostLifecycleState, computeHostHealth); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .opcRequestId(opcRequestId) + .availabilityDomain(availabilityDomain) + .displayName(displayName) + .networkResourceId(networkResourceId) + .limit(limit) + .page(page) + .sortBy(sortBy) + .sortOrder(sortOrder) + .computeHostLifecycleState(computeHostLifecycleState) + .computeHostHealth(computeHostHealth); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",networkResourceId=").append(String.valueOf(this.networkResourceId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",computeHostLifecycleState=") + .append(String.valueOf(this.computeHostLifecycleState)); + sb.append(",computeHostHealth=").append(String.valueOf(this.computeHostHealth)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListComputeHostsRequest)) { + return false; + } + + ListComputeHostsRequest other = (ListComputeHostsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.networkResourceId, other.networkResourceId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals( + this.computeHostLifecycleState, other.computeHostLifecycleState) + && java.util.Objects.equals(this.computeHostHealth, other.computeHostHealth); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.networkResourceId == null ? 43 : this.networkResourceId.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.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = + (result * PRIME) + + (this.computeHostLifecycleState == null + ? 43 + : this.computeHostLifecycleState.hashCode()); + result = + (result * PRIME) + + (this.computeHostHealth == null ? 43 : this.computeHostHealth.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateComputeGpuMemoryClusterRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateComputeGpuMemoryClusterRequest.java new file mode 100644 index 0000000000..a95dee9717 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateComputeGpuMemoryClusterRequest.java @@ -0,0 +1,376 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use UpdateComputeGpuMemoryClusterRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateComputeGpuMemoryClusterRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.core.model.UpdateComputeGpuMemoryClusterDetails> { + + /** + * The OCID of the compute GPU memory cluster. + */ + private String computeGpuMemoryClusterId; + + /** + * The OCID of the compute GPU memory cluster. + */ + public String getComputeGpuMemoryClusterId() { + return computeGpuMemoryClusterId; + } + /** + * Update compute GPU memory cluster details. + */ + private com.oracle.bmc.core.model.UpdateComputeGpuMemoryClusterDetails + updateComputeGpuMemoryClusterDetails; + + /** + * Update compute GPU memory cluster details. + */ + public com.oracle.bmc.core.model.UpdateComputeGpuMemoryClusterDetails + getUpdateComputeGpuMemoryClusterDetails() { + return updateComputeGpuMemoryClusterDetails; + } + /** + * 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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 token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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.core.model.UpdateComputeGpuMemoryClusterDetails getBody$() { + return updateComputeGpuMemoryClusterDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateComputeGpuMemoryClusterRequest, + com.oracle.bmc.core.model.UpdateComputeGpuMemoryClusterDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the compute GPU memory cluster. + */ + private String computeGpuMemoryClusterId = null; + + /** + * The OCID of the compute GPU memory cluster. + * @param computeGpuMemoryClusterId the value to set + * @return this builder instance + */ + public Builder computeGpuMemoryClusterId(String computeGpuMemoryClusterId) { + this.computeGpuMemoryClusterId = computeGpuMemoryClusterId; + return this; + } + + /** + * Update compute GPU memory cluster details. + */ + private com.oracle.bmc.core.model.UpdateComputeGpuMemoryClusterDetails + updateComputeGpuMemoryClusterDetails = null; + + /** + * Update compute GPU memory cluster details. + * @param updateComputeGpuMemoryClusterDetails the value to set + * @return this builder instance + */ + public Builder updateComputeGpuMemoryClusterDetails( + com.oracle.bmc.core.model.UpdateComputeGpuMemoryClusterDetails + updateComputeGpuMemoryClusterDetails) { + this.updateComputeGpuMemoryClusterDetails = updateComputeGpuMemoryClusterDetails; + 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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 token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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(UpdateComputeGpuMemoryClusterRequest o) { + computeGpuMemoryClusterId(o.getComputeGpuMemoryClusterId()); + updateComputeGpuMemoryClusterDetails(o.getUpdateComputeGpuMemoryClusterDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateComputeGpuMemoryClusterRequest 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 UpdateComputeGpuMemoryClusterRequest + */ + public UpdateComputeGpuMemoryClusterRequest build() { + UpdateComputeGpuMemoryClusterRequest 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.core.model.UpdateComputeGpuMemoryClusterDetails body) { + updateComputeGpuMemoryClusterDetails(body); + return this; + } + + /** + * Build the instance of UpdateComputeGpuMemoryClusterRequest 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 UpdateComputeGpuMemoryClusterRequest + */ + public UpdateComputeGpuMemoryClusterRequest buildWithoutInvocationCallback() { + UpdateComputeGpuMemoryClusterRequest request = + new UpdateComputeGpuMemoryClusterRequest(); + request.computeGpuMemoryClusterId = computeGpuMemoryClusterId; + request.updateComputeGpuMemoryClusterDetails = updateComputeGpuMemoryClusterDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new UpdateComputeGpuMemoryClusterRequest(computeGpuMemoryClusterId, updateComputeGpuMemoryClusterDetails, 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() + .computeGpuMemoryClusterId(computeGpuMemoryClusterId) + .updateComputeGpuMemoryClusterDetails(updateComputeGpuMemoryClusterDetails) + .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(",computeGpuMemoryClusterId=") + .append(String.valueOf(this.computeGpuMemoryClusterId)); + sb.append(",updateComputeGpuMemoryClusterDetails=") + .append(String.valueOf(this.updateComputeGpuMemoryClusterDetails)); + 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 UpdateComputeGpuMemoryClusterRequest)) { + return false; + } + + UpdateComputeGpuMemoryClusterRequest other = (UpdateComputeGpuMemoryClusterRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.computeGpuMemoryClusterId, other.computeGpuMemoryClusterId) + && java.util.Objects.equals( + this.updateComputeGpuMemoryClusterDetails, + other.updateComputeGpuMemoryClusterDetails) + && 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.computeGpuMemoryClusterId == null + ? 43 + : this.computeGpuMemoryClusterId.hashCode()); + result = + (result * PRIME) + + (this.updateComputeGpuMemoryClusterDetails == null + ? 43 + : this.updateComputeGpuMemoryClusterDetails.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-core/src/main/java/com/oracle/bmc/core/requests/UpdateComputeGpuMemoryFabricRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateComputeGpuMemoryFabricRequest.java new file mode 100644 index 0000000000..131d00e0bd --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateComputeGpuMemoryFabricRequest.java @@ -0,0 +1,375 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use UpdateComputeGpuMemoryFabricRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateComputeGpuMemoryFabricRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.core.model.UpdateComputeGpuMemoryFabricDetails> { + + /** + * The OCID of the compute GPU memory fabric. + */ + private String computeGpuMemoryFabricId; + + /** + * The OCID of the compute GPU memory fabric. + */ + public String getComputeGpuMemoryFabricId() { + return computeGpuMemoryFabricId; + } + /** + * Update compute GPU memory fabric details. + */ + private com.oracle.bmc.core.model.UpdateComputeGpuMemoryFabricDetails + updateComputeGpuMemoryFabricDetails; + + /** + * Update compute GPU memory fabric details. + */ + public com.oracle.bmc.core.model.UpdateComputeGpuMemoryFabricDetails + getUpdateComputeGpuMemoryFabricDetails() { + return updateComputeGpuMemoryFabricDetails; + } + /** + * 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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 token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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.core.model.UpdateComputeGpuMemoryFabricDetails getBody$() { + return updateComputeGpuMemoryFabricDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateComputeGpuMemoryFabricRequest, + com.oracle.bmc.core.model.UpdateComputeGpuMemoryFabricDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the compute GPU memory fabric. + */ + private String computeGpuMemoryFabricId = null; + + /** + * The OCID of the compute GPU memory fabric. + * @param computeGpuMemoryFabricId the value to set + * @return this builder instance + */ + public Builder computeGpuMemoryFabricId(String computeGpuMemoryFabricId) { + this.computeGpuMemoryFabricId = computeGpuMemoryFabricId; + return this; + } + + /** + * Update compute GPU memory fabric details. + */ + private com.oracle.bmc.core.model.UpdateComputeGpuMemoryFabricDetails + updateComputeGpuMemoryFabricDetails = null; + + /** + * Update compute GPU memory fabric details. + * @param updateComputeGpuMemoryFabricDetails the value to set + * @return this builder instance + */ + public Builder updateComputeGpuMemoryFabricDetails( + com.oracle.bmc.core.model.UpdateComputeGpuMemoryFabricDetails + updateComputeGpuMemoryFabricDetails) { + this.updateComputeGpuMemoryFabricDetails = updateComputeGpuMemoryFabricDetails; + 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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 token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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(UpdateComputeGpuMemoryFabricRequest o) { + computeGpuMemoryFabricId(o.getComputeGpuMemoryFabricId()); + updateComputeGpuMemoryFabricDetails(o.getUpdateComputeGpuMemoryFabricDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateComputeGpuMemoryFabricRequest 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 UpdateComputeGpuMemoryFabricRequest + */ + public UpdateComputeGpuMemoryFabricRequest build() { + UpdateComputeGpuMemoryFabricRequest 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.core.model.UpdateComputeGpuMemoryFabricDetails body) { + updateComputeGpuMemoryFabricDetails(body); + return this; + } + + /** + * Build the instance of UpdateComputeGpuMemoryFabricRequest 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 UpdateComputeGpuMemoryFabricRequest + */ + public UpdateComputeGpuMemoryFabricRequest buildWithoutInvocationCallback() { + UpdateComputeGpuMemoryFabricRequest request = new UpdateComputeGpuMemoryFabricRequest(); + request.computeGpuMemoryFabricId = computeGpuMemoryFabricId; + request.updateComputeGpuMemoryFabricDetails = updateComputeGpuMemoryFabricDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new UpdateComputeGpuMemoryFabricRequest(computeGpuMemoryFabricId, updateComputeGpuMemoryFabricDetails, 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() + .computeGpuMemoryFabricId(computeGpuMemoryFabricId) + .updateComputeGpuMemoryFabricDetails(updateComputeGpuMemoryFabricDetails) + .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(",computeGpuMemoryFabricId=") + .append(String.valueOf(this.computeGpuMemoryFabricId)); + sb.append(",updateComputeGpuMemoryFabricDetails=") + .append(String.valueOf(this.updateComputeGpuMemoryFabricDetails)); + 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 UpdateComputeGpuMemoryFabricRequest)) { + return false; + } + + UpdateComputeGpuMemoryFabricRequest other = (UpdateComputeGpuMemoryFabricRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.computeGpuMemoryFabricId, other.computeGpuMemoryFabricId) + && java.util.Objects.equals( + this.updateComputeGpuMemoryFabricDetails, + other.updateComputeGpuMemoryFabricDetails) + && 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.computeGpuMemoryFabricId == null + ? 43 + : this.computeGpuMemoryFabricId.hashCode()); + result = + (result * PRIME) + + (this.updateComputeGpuMemoryFabricDetails == null + ? 43 + : this.updateComputeGpuMemoryFabricDetails.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-core/src/main/java/com/oracle/bmc/core/requests/UpdateComputeHostRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateComputeHostRequest.java new file mode 100644 index 0000000000..1ebed01e9d --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateComputeHostRequest.java @@ -0,0 +1,315 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use UpdateComputeHostRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateComputeHostRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.core.model.UpdateComputeHostDetails> { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + * + */ + private String computeHostId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + * + */ + public String getComputeHostId() { + return computeHostId; + } + /** + * Update compute capacity topology details. + */ + private com.oracle.bmc.core.model.UpdateComputeHostDetails updateComputeHostDetails; + + /** + * Update compute capacity topology details. + */ + public com.oracle.bmc.core.model.UpdateComputeHostDetails getUpdateComputeHostDetails() { + return updateComputeHostDetails; + } + /** + * 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.core.model.UpdateComputeHostDetails getBody$() { + return updateComputeHostDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateComputeHostRequest, com.oracle.bmc.core.model.UpdateComputeHostDetails> { + 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 compute host. + * + */ + private String computeHostId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + * + * @param computeHostId the value to set + * @return this builder instance + */ + public Builder computeHostId(String computeHostId) { + this.computeHostId = computeHostId; + return this; + } + + /** + * Update compute capacity topology details. + */ + private com.oracle.bmc.core.model.UpdateComputeHostDetails updateComputeHostDetails = null; + + /** + * Update compute capacity topology details. + * @param updateComputeHostDetails the value to set + * @return this builder instance + */ + public Builder updateComputeHostDetails( + com.oracle.bmc.core.model.UpdateComputeHostDetails updateComputeHostDetails) { + this.updateComputeHostDetails = updateComputeHostDetails; + 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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(UpdateComputeHostRequest o) { + computeHostId(o.getComputeHostId()); + updateComputeHostDetails(o.getUpdateComputeHostDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateComputeHostRequest 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 UpdateComputeHostRequest + */ + public UpdateComputeHostRequest build() { + UpdateComputeHostRequest 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.core.model.UpdateComputeHostDetails body) { + updateComputeHostDetails(body); + return this; + } + + /** + * Build the instance of UpdateComputeHostRequest 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 UpdateComputeHostRequest + */ + public UpdateComputeHostRequest buildWithoutInvocationCallback() { + UpdateComputeHostRequest request = new UpdateComputeHostRequest(); + request.computeHostId = computeHostId; + request.updateComputeHostDetails = updateComputeHostDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateComputeHostRequest(computeHostId, updateComputeHostDetails, 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() + .computeHostId(computeHostId) + .updateComputeHostDetails(updateComputeHostDetails) + .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(",computeHostId=").append(String.valueOf(this.computeHostId)); + sb.append(",updateComputeHostDetails=") + .append(String.valueOf(this.updateComputeHostDetails)); + 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 UpdateComputeHostRequest)) { + return false; + } + + UpdateComputeHostRequest other = (UpdateComputeHostRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.computeHostId, other.computeHostId) + && java.util.Objects.equals( + this.updateComputeHostDetails, other.updateComputeHostDetails) + && 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.computeHostId == null ? 43 : this.computeHostId.hashCode()); + result = + (result * PRIME) + + (this.updateComputeHostDetails == null + ? 43 + : this.updateComputeHostDetails.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-core/src/main/java/com/oracle/bmc/core/responses/ChangeComputeGpuMemoryClusterCompartmentResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeComputeGpuMemoryClusterCompartmentResponse.java new file mode 100644 index 0000000000..95fc03d584 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeComputeGpuMemoryClusterCompartmentResponse.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeComputeGpuMemoryClusterCompartmentResponse + 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 ChangeComputeGpuMemoryClusterCompartmentResponse( + 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(ChangeComputeGpuMemoryClusterCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeComputeGpuMemoryClusterCompartmentResponse build() { + return new ChangeComputeGpuMemoryClusterCompartmentResponse( + __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 ChangeComputeGpuMemoryClusterCompartmentResponse)) { + return false; + } + + ChangeComputeGpuMemoryClusterCompartmentResponse other = + (ChangeComputeGpuMemoryClusterCompartmentResponse) 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-core/src/main/java/com/oracle/bmc/core/responses/ChangeComputeGpuMemoryFabricCompartmentResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeComputeGpuMemoryFabricCompartmentResponse.java new file mode 100644 index 0000000000..7b1830bbc4 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeComputeGpuMemoryFabricCompartmentResponse.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeComputeGpuMemoryFabricCompartmentResponse + 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 ChangeComputeGpuMemoryFabricCompartmentResponse( + 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(ChangeComputeGpuMemoryFabricCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeComputeGpuMemoryFabricCompartmentResponse build() { + return new ChangeComputeGpuMemoryFabricCompartmentResponse( + __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 ChangeComputeGpuMemoryFabricCompartmentResponse)) { + return false; + } + + ChangeComputeGpuMemoryFabricCompartmentResponse other = + (ChangeComputeGpuMemoryFabricCompartmentResponse) 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-core/src/main/java/com/oracle/bmc/core/responses/ChangeComputeHostCompartmentResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeComputeHostCompartmentResponse.java new file mode 100644 index 0000000000..a89cbf22b6 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeComputeHostCompartmentResponse.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeComputeHostCompartmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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 work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + * with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private ChangeComputeHostCompartmentResponse( + 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; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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 work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeComputeHostCompartmentResponse 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 ChangeComputeHostCompartmentResponse build() { + return new ChangeComputeHostCompartmentResponse( + __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 ChangeComputeHostCompartmentResponse)) { + return false; + } + + ChangeComputeHostCompartmentResponse other = (ChangeComputeHostCompartmentResponse) 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-core/src/main/java/com/oracle/bmc/core/responses/CreateComputeGpuMemoryClusterResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateComputeGpuMemoryClusterResponse.java new file mode 100644 index 0000000000..13f085a61b --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateComputeGpuMemoryClusterResponse.java @@ -0,0 +1,270 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateComputeGpuMemoryClusterResponse 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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 work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + * with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * The returned ComputeGpuMemoryCluster instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryCluster computeGpuMemoryCluster; + + /** + * The returned ComputeGpuMemoryCluster instance. + * @return the value + */ + public com.oracle.bmc.core.model.ComputeGpuMemoryCluster getComputeGpuMemoryCluster() { + return computeGpuMemoryCluster; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "opcWorkRequestId", + "computeGpuMemoryCluster" + }) + private CreateComputeGpuMemoryClusterResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + String opcWorkRequestId, + com.oracle.bmc.core.model.ComputeGpuMemoryCluster computeGpuMemoryCluster) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + this.computeGpuMemoryCluster = computeGpuMemoryCluster; + } + + 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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 work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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; + } + + /** + * The returned ComputeGpuMemoryCluster instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryCluster computeGpuMemoryCluster; + + /** + * The returned ComputeGpuMemoryCluster instance. + * @param computeGpuMemoryCluster the value to set + * @return this builder + */ + public Builder computeGpuMemoryCluster( + com.oracle.bmc.core.model.ComputeGpuMemoryCluster computeGpuMemoryCluster) { + this.computeGpuMemoryCluster = computeGpuMemoryCluster; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateComputeGpuMemoryClusterResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + computeGpuMemoryCluster(o.getComputeGpuMemoryCluster()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateComputeGpuMemoryClusterResponse build() { + return new CreateComputeGpuMemoryClusterResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + opcWorkRequestId, + computeGpuMemoryCluster); + } + } + + /** + * 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(",computeGpuMemoryCluster=").append(String.valueOf(computeGpuMemoryCluster)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateComputeGpuMemoryClusterResponse)) { + return false; + } + + CreateComputeGpuMemoryClusterResponse other = (CreateComputeGpuMemoryClusterResponse) 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.computeGpuMemoryCluster, other.computeGpuMemoryCluster); + } + + @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.computeGpuMemoryCluster == null + ? 43 + : this.computeGpuMemoryCluster.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteComputeGpuMemoryClusterResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteComputeGpuMemoryClusterResponse.java new file mode 100644 index 0000000000..090d27d138 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteComputeGpuMemoryClusterResponse.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteComputeGpuMemoryClusterResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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 work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + * with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private DeleteComputeGpuMemoryClusterResponse( + 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; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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 work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteComputeGpuMemoryClusterResponse 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 DeleteComputeGpuMemoryClusterResponse build() { + return new DeleteComputeGpuMemoryClusterResponse( + __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 DeleteComputeGpuMemoryClusterResponse)) { + return false; + } + + DeleteComputeGpuMemoryClusterResponse other = (DeleteComputeGpuMemoryClusterResponse) 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-core/src/main/java/com/oracle/bmc/core/responses/GetComputeGpuMemoryClusterResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetComputeGpuMemoryClusterResponse.java new file mode 100644 index 0000000000..b8c8f8d4ab --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetComputeGpuMemoryClusterResponse.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetComputeGpuMemoryClusterResponse 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 ComputeGpuMemoryCluster instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryCluster computeGpuMemoryCluster; + + /** + * The returned ComputeGpuMemoryCluster instance. + * @return the value + */ + public com.oracle.bmc.core.model.ComputeGpuMemoryCluster getComputeGpuMemoryCluster() { + return computeGpuMemoryCluster; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "computeGpuMemoryCluster" + }) + private GetComputeGpuMemoryClusterResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.core.model.ComputeGpuMemoryCluster computeGpuMemoryCluster) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.computeGpuMemoryCluster = computeGpuMemoryCluster; + } + + 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 ComputeGpuMemoryCluster instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryCluster computeGpuMemoryCluster; + + /** + * The returned ComputeGpuMemoryCluster instance. + * @param computeGpuMemoryCluster the value to set + * @return this builder + */ + public Builder computeGpuMemoryCluster( + com.oracle.bmc.core.model.ComputeGpuMemoryCluster computeGpuMemoryCluster) { + this.computeGpuMemoryCluster = computeGpuMemoryCluster; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetComputeGpuMemoryClusterResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + computeGpuMemoryCluster(o.getComputeGpuMemoryCluster()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetComputeGpuMemoryClusterResponse build() { + return new GetComputeGpuMemoryClusterResponse( + __httpStatusCode__, headers, etag, opcRequestId, computeGpuMemoryCluster); + } + } + + /** + * 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(",computeGpuMemoryCluster=").append(String.valueOf(computeGpuMemoryCluster)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetComputeGpuMemoryClusterResponse)) { + return false; + } + + GetComputeGpuMemoryClusterResponse other = (GetComputeGpuMemoryClusterResponse) 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.computeGpuMemoryCluster, other.computeGpuMemoryCluster); + } + + @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.computeGpuMemoryCluster == null + ? 43 + : this.computeGpuMemoryCluster.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetComputeGpuMemoryFabricResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetComputeGpuMemoryFabricResponse.java new file mode 100644 index 0000000000..37e6688a12 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetComputeGpuMemoryFabricResponse.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetComputeGpuMemoryFabricResponse 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 ComputeGpuMemoryFabric instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryFabric computeGpuMemoryFabric; + + /** + * The returned ComputeGpuMemoryFabric instance. + * @return the value + */ + public com.oracle.bmc.core.model.ComputeGpuMemoryFabric getComputeGpuMemoryFabric() { + return computeGpuMemoryFabric; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "computeGpuMemoryFabric" + }) + private GetComputeGpuMemoryFabricResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.core.model.ComputeGpuMemoryFabric computeGpuMemoryFabric) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.computeGpuMemoryFabric = computeGpuMemoryFabric; + } + + 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 ComputeGpuMemoryFabric instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryFabric computeGpuMemoryFabric; + + /** + * The returned ComputeGpuMemoryFabric instance. + * @param computeGpuMemoryFabric the value to set + * @return this builder + */ + public Builder computeGpuMemoryFabric( + com.oracle.bmc.core.model.ComputeGpuMemoryFabric computeGpuMemoryFabric) { + this.computeGpuMemoryFabric = computeGpuMemoryFabric; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetComputeGpuMemoryFabricResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + computeGpuMemoryFabric(o.getComputeGpuMemoryFabric()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetComputeGpuMemoryFabricResponse build() { + return new GetComputeGpuMemoryFabricResponse( + __httpStatusCode__, headers, etag, opcRequestId, computeGpuMemoryFabric); + } + } + + /** + * 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(",computeGpuMemoryFabric=").append(String.valueOf(computeGpuMemoryFabric)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetComputeGpuMemoryFabricResponse)) { + return false; + } + + GetComputeGpuMemoryFabricResponse other = (GetComputeGpuMemoryFabricResponse) 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.computeGpuMemoryFabric, other.computeGpuMemoryFabric); + } + + @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.computeGpuMemoryFabric == null + ? 43 + : this.computeGpuMemoryFabric.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetComputeHostResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetComputeHostResponse.java new file mode 100644 index 0000000000..95b255b8c9 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetComputeHostResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetComputeHostResponse 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 ComputeHost instance. + */ + private com.oracle.bmc.core.model.ComputeHost computeHost; + + /** + * The returned ComputeHost instance. + * @return the value + */ + public com.oracle.bmc.core.model.ComputeHost getComputeHost() { + return computeHost; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "computeHost" + }) + private GetComputeHostResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.core.model.ComputeHost computeHost) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.computeHost = computeHost; + } + + 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 ComputeHost instance. + */ + private com.oracle.bmc.core.model.ComputeHost computeHost; + + /** + * The returned ComputeHost instance. + * @param computeHost the value to set + * @return this builder + */ + public Builder computeHost(com.oracle.bmc.core.model.ComputeHost computeHost) { + this.computeHost = computeHost; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetComputeHostResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + computeHost(o.getComputeHost()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetComputeHostResponse build() { + return new GetComputeHostResponse( + __httpStatusCode__, headers, etag, opcRequestId, computeHost); + } + } + + /** + * 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(",computeHost=").append(String.valueOf(computeHost)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetComputeHostResponse)) { + return false; + } + + GetComputeHostResponse other = (GetComputeHostResponse) 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.computeHost, other.computeHost); + } + + @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.computeHost == null ? 43 : this.computeHost.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListComputeGpuMemoryClusterInstancesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListComputeGpuMemoryClusterInstancesResponse.java new file mode 100644 index 0000000000..0ef75310c3 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListComputeGpuMemoryClusterInstancesResponse.java @@ -0,0 +1,279 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListComputeGpuMemoryClusterInstancesResponse + 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; + } + + /** + * 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 ComputeGpuMemoryClusterInstanceCollection instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryClusterInstanceCollection + computeGpuMemoryClusterInstanceCollection; + + /** + * The returned ComputeGpuMemoryClusterInstanceCollection instance. + * @return the value + */ + public com.oracle.bmc.core.model.ComputeGpuMemoryClusterInstanceCollection + getComputeGpuMemoryClusterInstanceCollection() { + return computeGpuMemoryClusterInstanceCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcNextPage", + "opcRequestId", + "computeGpuMemoryClusterInstanceCollection" + }) + private ListComputeGpuMemoryClusterInstancesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.core.model.ComputeGpuMemoryClusterInstanceCollection + computeGpuMemoryClusterInstanceCollection) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.computeGpuMemoryClusterInstanceCollection = computeGpuMemoryClusterInstanceCollection; + } + + 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; + } + + /** + * 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 ComputeGpuMemoryClusterInstanceCollection instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryClusterInstanceCollection + computeGpuMemoryClusterInstanceCollection; + + /** + * The returned ComputeGpuMemoryClusterInstanceCollection instance. + * @param computeGpuMemoryClusterInstanceCollection the value to set + * @return this builder + */ + public Builder computeGpuMemoryClusterInstanceCollection( + com.oracle.bmc.core.model.ComputeGpuMemoryClusterInstanceCollection + computeGpuMemoryClusterInstanceCollection) { + this.computeGpuMemoryClusterInstanceCollection = + computeGpuMemoryClusterInstanceCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListComputeGpuMemoryClusterInstancesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + computeGpuMemoryClusterInstanceCollection( + o.getComputeGpuMemoryClusterInstanceCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListComputeGpuMemoryClusterInstancesResponse build() { + return new ListComputeGpuMemoryClusterInstancesResponse( + __httpStatusCode__, + headers, + etag, + opcNextPage, + opcRequestId, + computeGpuMemoryClusterInstanceCollection); + } + } + + /** + * 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(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",computeGpuMemoryClusterInstanceCollection=") + .append(String.valueOf(computeGpuMemoryClusterInstanceCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListComputeGpuMemoryClusterInstancesResponse)) { + return false; + } + + ListComputeGpuMemoryClusterInstancesResponse other = + (ListComputeGpuMemoryClusterInstancesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.computeGpuMemoryClusterInstanceCollection, + other.computeGpuMemoryClusterInstanceCollection); + } + + @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.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.computeGpuMemoryClusterInstanceCollection == null + ? 43 + : this.computeGpuMemoryClusterInstanceCollection.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListComputeGpuMemoryClustersResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListComputeGpuMemoryClustersResponse.java new file mode 100644 index 0000000000..4f5ed01059 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListComputeGpuMemoryClustersResponse.java @@ -0,0 +1,275 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListComputeGpuMemoryClustersResponse 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; + } + + /** + * 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 ComputeGpuMemoryClusterCollection instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryClusterCollection + computeGpuMemoryClusterCollection; + + /** + * The returned ComputeGpuMemoryClusterCollection instance. + * @return the value + */ + public com.oracle.bmc.core.model.ComputeGpuMemoryClusterCollection + getComputeGpuMemoryClusterCollection() { + return computeGpuMemoryClusterCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcNextPage", + "opcRequestId", + "computeGpuMemoryClusterCollection" + }) + private ListComputeGpuMemoryClustersResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.core.model.ComputeGpuMemoryClusterCollection + computeGpuMemoryClusterCollection) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.computeGpuMemoryClusterCollection = computeGpuMemoryClusterCollection; + } + + 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; + } + + /** + * 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 ComputeGpuMemoryClusterCollection instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryClusterCollection + computeGpuMemoryClusterCollection; + + /** + * The returned ComputeGpuMemoryClusterCollection instance. + * @param computeGpuMemoryClusterCollection the value to set + * @return this builder + */ + public Builder computeGpuMemoryClusterCollection( + com.oracle.bmc.core.model.ComputeGpuMemoryClusterCollection + computeGpuMemoryClusterCollection) { + this.computeGpuMemoryClusterCollection = computeGpuMemoryClusterCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListComputeGpuMemoryClustersResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + computeGpuMemoryClusterCollection(o.getComputeGpuMemoryClusterCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListComputeGpuMemoryClustersResponse build() { + return new ListComputeGpuMemoryClustersResponse( + __httpStatusCode__, + headers, + etag, + opcNextPage, + opcRequestId, + computeGpuMemoryClusterCollection); + } + } + + /** + * 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(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",computeGpuMemoryClusterCollection=") + .append(String.valueOf(computeGpuMemoryClusterCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListComputeGpuMemoryClustersResponse)) { + return false; + } + + ListComputeGpuMemoryClustersResponse other = (ListComputeGpuMemoryClustersResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.computeGpuMemoryClusterCollection, + other.computeGpuMemoryClusterCollection); + } + + @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.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.computeGpuMemoryClusterCollection == null + ? 43 + : this.computeGpuMemoryClusterCollection.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListComputeGpuMemoryFabricsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListComputeGpuMemoryFabricsResponse.java new file mode 100644 index 0000000000..434b57d96e --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListComputeGpuMemoryFabricsResponse.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListComputeGpuMemoryFabricsResponse 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 ComputeGpuMemoryFabricCollection instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryFabricCollection + computeGpuMemoryFabricCollection; + + /** + * The returned ComputeGpuMemoryFabricCollection instance. + * @return the value + */ + public com.oracle.bmc.core.model.ComputeGpuMemoryFabricCollection + getComputeGpuMemoryFabricCollection() { + return computeGpuMemoryFabricCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "computeGpuMemoryFabricCollection" + }) + private ListComputeGpuMemoryFabricsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.core.model.ComputeGpuMemoryFabricCollection + computeGpuMemoryFabricCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.computeGpuMemoryFabricCollection = computeGpuMemoryFabricCollection; + } + + 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 ComputeGpuMemoryFabricCollection instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryFabricCollection + computeGpuMemoryFabricCollection; + + /** + * The returned ComputeGpuMemoryFabricCollection instance. + * @param computeGpuMemoryFabricCollection the value to set + * @return this builder + */ + public Builder computeGpuMemoryFabricCollection( + com.oracle.bmc.core.model.ComputeGpuMemoryFabricCollection + computeGpuMemoryFabricCollection) { + this.computeGpuMemoryFabricCollection = computeGpuMemoryFabricCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListComputeGpuMemoryFabricsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + computeGpuMemoryFabricCollection(o.getComputeGpuMemoryFabricCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListComputeGpuMemoryFabricsResponse build() { + return new ListComputeGpuMemoryFabricsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + computeGpuMemoryFabricCollection); + } + } + + /** + * 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(",computeGpuMemoryFabricCollection=") + .append(String.valueOf(computeGpuMemoryFabricCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListComputeGpuMemoryFabricsResponse)) { + return false; + } + + ListComputeGpuMemoryFabricsResponse other = (ListComputeGpuMemoryFabricsResponse) 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.computeGpuMemoryFabricCollection, + other.computeGpuMemoryFabricCollection); + } + + @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.computeGpuMemoryFabricCollection == null + ? 43 + : this.computeGpuMemoryFabricCollection.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListComputeHostsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListComputeHostsResponse.java new file mode 100644 index 0000000000..5f8f816bd6 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListComputeHostsResponse.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListComputeHostsResponse 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 ComputeHostCollection instance. + */ + private com.oracle.bmc.core.model.ComputeHostCollection computeHostCollection; + + /** + * The returned ComputeHostCollection instance. + * @return the value + */ + public com.oracle.bmc.core.model.ComputeHostCollection getComputeHostCollection() { + return computeHostCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "computeHostCollection" + }) + private ListComputeHostsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.core.model.ComputeHostCollection computeHostCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.computeHostCollection = computeHostCollection; + } + + 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 ComputeHostCollection instance. + */ + private com.oracle.bmc.core.model.ComputeHostCollection computeHostCollection; + + /** + * The returned ComputeHostCollection instance. + * @param computeHostCollection the value to set + * @return this builder + */ + public Builder computeHostCollection( + com.oracle.bmc.core.model.ComputeHostCollection computeHostCollection) { + this.computeHostCollection = computeHostCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListComputeHostsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + computeHostCollection(o.getComputeHostCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListComputeHostsResponse build() { + return new ListComputeHostsResponse( + __httpStatusCode__, headers, opcNextPage, opcRequestId, computeHostCollection); + } + } + + /** + * 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(",computeHostCollection=").append(String.valueOf(computeHostCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListComputeHostsResponse)) { + return false; + } + + ListComputeHostsResponse other = (ListComputeHostsResponse) 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.computeHostCollection, other.computeHostCollection); + } + + @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.computeHostCollection == null + ? 43 + : this.computeHostCollection.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateComputeGpuMemoryClusterResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateComputeGpuMemoryClusterResponse.java new file mode 100644 index 0000000000..d948c76bbe --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateComputeGpuMemoryClusterResponse.java @@ -0,0 +1,270 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateComputeGpuMemoryClusterResponse 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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 work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + * with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * The returned ComputeGpuMemoryCluster instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryCluster computeGpuMemoryCluster; + + /** + * The returned ComputeGpuMemoryCluster instance. + * @return the value + */ + public com.oracle.bmc.core.model.ComputeGpuMemoryCluster getComputeGpuMemoryCluster() { + return computeGpuMemoryCluster; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "opcWorkRequestId", + "computeGpuMemoryCluster" + }) + private UpdateComputeGpuMemoryClusterResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + String opcWorkRequestId, + com.oracle.bmc.core.model.ComputeGpuMemoryCluster computeGpuMemoryCluster) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + this.computeGpuMemoryCluster = computeGpuMemoryCluster; + } + + 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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 work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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; + } + + /** + * The returned ComputeGpuMemoryCluster instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryCluster computeGpuMemoryCluster; + + /** + * The returned ComputeGpuMemoryCluster instance. + * @param computeGpuMemoryCluster the value to set + * @return this builder + */ + public Builder computeGpuMemoryCluster( + com.oracle.bmc.core.model.ComputeGpuMemoryCluster computeGpuMemoryCluster) { + this.computeGpuMemoryCluster = computeGpuMemoryCluster; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateComputeGpuMemoryClusterResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + computeGpuMemoryCluster(o.getComputeGpuMemoryCluster()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateComputeGpuMemoryClusterResponse build() { + return new UpdateComputeGpuMemoryClusterResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + opcWorkRequestId, + computeGpuMemoryCluster); + } + } + + /** + * 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(",computeGpuMemoryCluster=").append(String.valueOf(computeGpuMemoryCluster)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateComputeGpuMemoryClusterResponse)) { + return false; + } + + UpdateComputeGpuMemoryClusterResponse other = (UpdateComputeGpuMemoryClusterResponse) 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.computeGpuMemoryCluster, other.computeGpuMemoryCluster); + } + + @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.computeGpuMemoryCluster == null + ? 43 + : this.computeGpuMemoryCluster.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateComputeGpuMemoryFabricResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateComputeGpuMemoryFabricResponse.java new file mode 100644 index 0000000000..a67306e7c7 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateComputeGpuMemoryFabricResponse.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateComputeGpuMemoryFabricResponse 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 ComputeGpuMemoryFabric instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryFabric computeGpuMemoryFabric; + + /** + * The returned ComputeGpuMemoryFabric instance. + * @return the value + */ + public com.oracle.bmc.core.model.ComputeGpuMemoryFabric getComputeGpuMemoryFabric() { + return computeGpuMemoryFabric; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "computeGpuMemoryFabric" + }) + private UpdateComputeGpuMemoryFabricResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.core.model.ComputeGpuMemoryFabric computeGpuMemoryFabric) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.computeGpuMemoryFabric = computeGpuMemoryFabric; + } + + 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 ComputeGpuMemoryFabric instance. + */ + private com.oracle.bmc.core.model.ComputeGpuMemoryFabric computeGpuMemoryFabric; + + /** + * The returned ComputeGpuMemoryFabric instance. + * @param computeGpuMemoryFabric the value to set + * @return this builder + */ + public Builder computeGpuMemoryFabric( + com.oracle.bmc.core.model.ComputeGpuMemoryFabric computeGpuMemoryFabric) { + this.computeGpuMemoryFabric = computeGpuMemoryFabric; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateComputeGpuMemoryFabricResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + computeGpuMemoryFabric(o.getComputeGpuMemoryFabric()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateComputeGpuMemoryFabricResponse build() { + return new UpdateComputeGpuMemoryFabricResponse( + __httpStatusCode__, headers, etag, opcRequestId, computeGpuMemoryFabric); + } + } + + /** + * 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(",computeGpuMemoryFabric=").append(String.valueOf(computeGpuMemoryFabric)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateComputeGpuMemoryFabricResponse)) { + return false; + } + + UpdateComputeGpuMemoryFabricResponse other = (UpdateComputeGpuMemoryFabricResponse) 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.computeGpuMemoryFabric, other.computeGpuMemoryFabric); + } + + @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.computeGpuMemoryFabric == null + ? 43 + : this.computeGpuMemoryFabric.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateComputeHostResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateComputeHostResponse.java new file mode 100644 index 0000000000..5be9a5de56 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateComputeHostResponse.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateComputeHostResponse 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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 work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + * with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "opcWorkRequestId" + }) + private UpdateComputeHostResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.etag = etag; + 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; + } + + /** + * 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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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 work request. + * Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateComputeHostResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateComputeHostResponse build() { + return new UpdateComputeHostResponse( + __httpStatusCode__, headers, etag, 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(",etag=").append(String.valueOf(etag)); + 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 UpdateComputeHostResponse)) { + return false; + } + + UpdateComputeHostResponse other = (UpdateComputeHostResponse) 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); + } + + @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()); + return result; + } +} diff --git a/bmc-dashboardservice/pom.xml b/bmc-dashboardservice/pom.xml index e8f38c531c..86ddd7fb27 100644 --- a/bmc-dashboardservice/pom.xml +++ b/bmc-dashboardservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-dashboardservice @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-database/pom.xml b/bmc-database/pom.xml index f0974919f8..8cdfae5b3f 100644 --- a/bmc-database/pom.xml +++ b/bmc-database/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 2.81.0 + 2.82.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 c23db87094..49b9874188 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 @@ -74,6 +74,22 @@ public interface Database extends AutoCloseable { ActivateExadataInfrastructureResponse activateExadataInfrastructure( ActivateExadataInfrastructureRequest request); + /** + * Create Standby Autonomous Container Database. + * For more information about changing Autonomous Container Databases Add Standby, see + * [Create Standby Autonomous Container Database](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-D3B503F1-0032-4B0D-9F00-ACAE8151AB80) and [Convert Snapshot Standby to Physical Standby](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-E8D7E0EE-8244-467D-B33A-1BC6F969A0A4). + * + * @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 AddStandbyAutonomousContainerDatabase API. + */ + AddStandbyAutonomousContainerDatabaseResponse addStandbyAutonomousContainerDatabase( + AddStandbyAutonomousContainerDatabaseRequest request); + /** * Makes the storage capacity from additional storage servers available for Cloud VM Cluster consumption. Applies to Exadata Cloud Service instances and Autonomous Database on dedicated Exadata infrastructure only. * @@ -466,6 +482,20 @@ ChangeExadataInfrastructureCompartmentResponse changeExadataInfrastructureCompar ChangeExadbVmClusterCompartmentResponse changeExadbVmClusterCompartment( ChangeExadbVmClusterCompartmentRequest request); + /** + * Associate a Exadata VM cluster on Exascale Infrastructure with a different subscription. + * + * @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 ChangeExadbVmClusterSubscription API. + */ + ChangeExadbVmClusterSubscriptionResponse changeExadbVmClusterSubscription( + ChangeExadbVmClusterSubscriptionRequest request); + /** * Moves a Exadata Database Storage Vault to another compartment. * @@ -480,6 +510,20 @@ ChangeExadbVmClusterCompartmentResponse changeExadbVmClusterCompartment( ChangeExascaleDbStorageVaultCompartmentResponse changeExascaleDbStorageVaultCompartment( ChangeExascaleDbStorageVaultCompartmentRequest request); + /** + * Associate a Exadata Database Storage Vault with a different subscription. + * + * @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 ChangeExascaleDbStorageVaultSubscription API. + */ + ChangeExascaleDbStorageVaultSubscriptionResponse changeExascaleDbStorageVaultSubscription( + ChangeExascaleDbStorageVaultSubscriptionRequest request); + /** * Move the {@link #createExternalContainerDatabaseDetails(CreateExternalContainerDatabaseDetailsRequest) createExternalContainerDatabaseDetails} * and its dependent resources to the specified compartment. @@ -703,6 +747,22 @@ ConfigureExascaleExadataInfrastructureResponse configureExascaleExadataInfrastru ConfirmKeyStoreDetailsAreCorrectResponse confirmKeyStoreDetailsAreCorrect( ConfirmKeyStoreDetailsAreCorrectRequest request); + /** + * Convert between and SnapshotStandby Standby Autonomous Container Database . + * For more information about changing Autonomous Container Databases Add Standby, see + * [Convert Standby Autonomous Container Database](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-D3B503F1-0032-4B0D-9F00-ACAE8151AB80) and [Convert Snapshot Standby to Physical Standby](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-E8D7E0EE-8244-467D-B33A-1BC6F969A0A4). + * + * @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 ConvertStandbyAutonomousContainerDatabase API. + */ + ConvertStandbyAutonomousContainerDatabaseResponse convertStandbyAutonomousContainerDatabase( + ConvertStandbyAutonomousContainerDatabaseRequest request); + /** * Converts a non-container database to a pluggable database. * @@ -2003,6 +2063,22 @@ DownloadValidationReportResponse downloadValidationReport( DownloadVmClusterNetworkConfigFileResponse downloadVmClusterNetworkConfigFile( DownloadVmClusterNetworkConfigFileRequest request); + /** + * Edit Autonomous Container Database Dataguard. + * For more information about changing Autonomous Container Databases Add Standby, see + * [Update Autonomous Container Database Dataguard](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-D3B503F1-0032-4B0D-9F00-ACAE8151AB80) and [Convert Snapshot Standby to Physical Standby](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-E8D7E0EE-8244-467D-B33A-1BC6F969A0A4). + * + * @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 EditAutonomousContainerDatabaseDataguard API. + */ + EditAutonomousContainerDatabaseDataguardResponse editAutonomousContainerDatabaseDataguard( + EditAutonomousContainerDatabaseDataguardRequest request); + /** * Enables Database Management for Autonomous Database. * @@ -2202,6 +2278,21 @@ EnablePluggableDatabaseManagementResponse enablePluggableDatabaseManagement( FailOverAutonomousDatabaseResponse failOverAutonomousDatabase( FailOverAutonomousDatabaseRequest request); + /** + * Failover Autonomous Container Database, identified by the autonomousContainerDatabaseId parameter, to an active standby Autonomous Container 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 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 FailoverAutonomousContainerDatabaseDataguard API. + */ + FailoverAutonomousContainerDatabaseDataguardResponse + failoverAutonomousContainerDatabaseDataguard( + FailoverAutonomousContainerDatabaseDataguardRequest request); + /** * Fails over the standby Autonomous Container Database identified by the autonomousContainerDatabaseId parameter to the primary Autonomous Container Database after the existing primary Autonomous Container Database fails or becomes unreachable. *

@@ -4414,6 +4505,21 @@ ListVmClusterUpdateHistoryEntriesResponse listVmClusterUpdateHistoryEntries( LocalClonePluggableDatabaseResponse localClonePluggableDatabase( LocalClonePluggableDatabaseRequest request); + /** + * Migrate Autonomous Container Database, identified by the autonomousContainerDatabaseId parameter. + * + * @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 MigrateAutonomousContainerDatabaseDataguardAssociation API. + */ + MigrateAutonomousContainerDatabaseDataguardAssociationResponse + migrateAutonomousContainerDatabaseDataguardAssociation( + MigrateAutonomousContainerDatabaseDataguardAssociationRequest request); + /** * Migrates the existing Data Guard association to new Data Guard model to support multiple standby databases functionality. *

@@ -4526,6 +4632,21 @@ RefreshPluggableDatabaseResponse refreshPluggableDatabase( RegisterAutonomousDatabaseDataSafeResponse registerAutonomousDatabaseDataSafe( RegisterAutonomousDatabaseDataSafeRequest request); + /** + * Reinstates a disabled standby Autonomous Container Database, identified by the autonomousContainerDatabaseId parameter, to an active standby Autonomous Container 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 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 ReinstateAutonomousContainerDatabaseDataguard API. + */ + ReinstateAutonomousContainerDatabaseDataguardResponse + reinstateAutonomousContainerDatabaseDataguard( + ReinstateAutonomousContainerDatabaseDataguardRequest request); + /** * Reinstates a disabled standby Autonomous Container Database, identified by the autonomousContainerDatabaseId parameter, to an active standby Autonomous Container Database. * @@ -5003,6 +5124,21 @@ ShrinkAutonomousDatabaseResponse shrinkAutonomousDatabase( */ SwitchOverDataGuardResponse switchOverDataGuard(SwitchOverDataGuardRequest request); + /** + * Switchover Autonomous Container Database, identified by the autonomousContainerDatabaseId parameter, to an active standby Autonomous Container 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 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 SwitchoverAutonomousContainerDatabaseDataguard API. + */ + SwitchoverAutonomousContainerDatabaseDataguardResponse + switchoverAutonomousContainerDatabaseDataguard( + SwitchoverAutonomousContainerDatabaseDataguardRequest request); + /** * Switches over the primary Autonomous Container Database of an Autonomous Data Guard peer association to standby role. The standby Autonomous Container Database associated with autonomousContainerDatabaseDataguardAssociationId assumes the primary Autonomous Container Database role. *

@@ -5225,6 +5361,18 @@ UpdateAutonomousExadataInfrastructureResponse updateAutonomousExadataInfrastruct UpdateAutonomousVmClusterResponse updateAutonomousVmCluster( UpdateAutonomousVmClusterRequest request); + /** + * Updates database backup details. + * @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 UpdateBackup API. + */ + UpdateBackupResponse updateBackup(UpdateBackupRequest request); + /** * If no database is associated with the backup destination: * - For a RECOVERY_APPLIANCE backup destination, updates the connection string and/or the list of VPC users. 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 cab5cec01f..7d79a889f3 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 @@ -78,6 +78,27 @@ public interface DatabaseAsync extends AutoCloseable { ActivateExadataInfrastructureResponse> handler); + /** + * Create Standby Autonomous Container Database. + * For more information about changing Autonomous Container Databases Add Standby, see + * [Create Standby Autonomous Container Database](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-D3B503F1-0032-4B0D-9F00-ACAE8151AB80) and [Convert Snapshot Standby to Physical Standby](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-E8D7E0EE-8244-467D-B33A-1BC6F969A0A4). + * + * + * @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 + addStandbyAutonomousContainerDatabase( + AddStandbyAutonomousContainerDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + AddStandbyAutonomousContainerDatabaseRequest, + AddStandbyAutonomousContainerDatabaseResponse> + handler); + /** * Makes the storage capacity from additional storage servers available for Cloud VM Cluster consumption. Applies to Exadata Cloud Service instances and Autonomous Database on dedicated Exadata infrastructure only. * @@ -591,6 +612,25 @@ java.util.concurrent.Future changeEncryptio ChangeExadbVmClusterCompartmentResponse> handler); + /** + * Associate a Exadata VM cluster on Exascale Infrastructure with a different subscription. + * + * + * @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 + changeExadbVmClusterSubscription( + ChangeExadbVmClusterSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeExadbVmClusterSubscriptionRequest, + ChangeExadbVmClusterSubscriptionResponse> + handler); + /** * Moves a Exadata Database Storage Vault to another compartment. * @@ -610,6 +650,25 @@ java.util.concurrent.Future changeEncryptio ChangeExascaleDbStorageVaultCompartmentResponse> handler); + /** + * Associate a Exadata Database Storage Vault with a different subscription. + * + * + * @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 + changeExascaleDbStorageVaultSubscription( + ChangeExascaleDbStorageVaultSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeExascaleDbStorageVaultSubscriptionRequest, + ChangeExascaleDbStorageVaultSubscriptionResponse> + handler); + /** * Move the {@link #createExternalContainerDatabaseDetails(CreateExternalContainerDatabaseDetailsRequest, Consumer, Consumer) createExternalContainerDatabaseDetails} * and its dependent resources to the specified compartment. @@ -897,6 +956,27 @@ java.util.concurrent.Future configureSaasAdminUs ConfirmKeyStoreDetailsAreCorrectResponse> handler); + /** + * Convert between and SnapshotStandby Standby Autonomous Container Database . + * For more information about changing Autonomous Container Databases Add Standby, see + * [Convert Standby Autonomous Container Database](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-D3B503F1-0032-4B0D-9F00-ACAE8151AB80) and [Convert Snapshot Standby to Physical Standby](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-E8D7E0EE-8244-467D-B33A-1BC6F969A0A4). + * + * + * @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 + convertStandbyAutonomousContainerDatabase( + ConvertStandbyAutonomousContainerDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + ConvertStandbyAutonomousContainerDatabaseRequest, + ConvertStandbyAutonomousContainerDatabaseResponse> + handler); + /** * Converts a non-container database to a pluggable database. * @@ -2566,6 +2646,27 @@ java.util.concurrent.Future downloadValidation DownloadVmClusterNetworkConfigFileResponse> handler); + /** + * Edit Autonomous Container Database Dataguard. + * For more information about changing Autonomous Container Databases Add Standby, see + * [Update Autonomous Container Database Dataguard](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-D3B503F1-0032-4B0D-9F00-ACAE8151AB80) and [Convert Snapshot Standby to Physical Standby](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-E8D7E0EE-8244-467D-B33A-1BC6F969A0A4). + * + * + * @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 + editAutonomousContainerDatabaseDataguard( + EditAutonomousContainerDatabaseDataguardRequest request, + com.oracle.bmc.responses.AsyncHandler< + EditAutonomousContainerDatabaseDataguardRequest, + EditAutonomousContainerDatabaseDataguardResponse> + handler); + /** * Enables Database Management for Autonomous Database. * @@ -2818,6 +2919,25 @@ java.util.concurrent.Future failOverAutonomo FailOverAutonomousDatabaseRequest, FailOverAutonomousDatabaseResponse> handler); + /** + * Failover Autonomous Container Database, identified by the autonomousContainerDatabaseId parameter, to an active standby Autonomous Container 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 + failoverAutonomousContainerDatabaseDataguard( + FailoverAutonomousContainerDatabaseDataguardRequest request, + com.oracle.bmc.responses.AsyncHandler< + FailoverAutonomousContainerDatabaseDataguardRequest, + FailoverAutonomousContainerDatabaseDataguardResponse> + handler); + /** * Fails over the standby Autonomous Container Database identified by the autonomousContainerDatabaseId parameter to the primary Autonomous Container Database after the existing primary Autonomous Container Database fails or becomes unreachable. *

@@ -5670,6 +5790,25 @@ java.util.concurrent.Future localClonePlugg LocalClonePluggableDatabaseRequest, LocalClonePluggableDatabaseResponse> handler); + /** + * Migrate Autonomous Container Database, identified by the autonomousContainerDatabaseId parameter. + * + * + * @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 + migrateAutonomousContainerDatabaseDataguardAssociation( + MigrateAutonomousContainerDatabaseDataguardAssociationRequest request, + com.oracle.bmc.responses.AsyncHandler< + MigrateAutonomousContainerDatabaseDataguardAssociationRequest, + MigrateAutonomousContainerDatabaseDataguardAssociationResponse> + handler); + /** * Migrates the existing Data Guard association to new Data Guard model to support multiple standby databases functionality. *

@@ -5813,6 +5952,25 @@ java.util.concurrent.Future refreshPluggableDa RegisterAutonomousDatabaseDataSafeResponse> handler); + /** + * Reinstates a disabled standby Autonomous Container Database, identified by the autonomousContainerDatabaseId parameter, to an active standby Autonomous Container 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 + reinstateAutonomousContainerDatabaseDataguard( + ReinstateAutonomousContainerDatabaseDataguardRequest request, + com.oracle.bmc.responses.AsyncHandler< + ReinstateAutonomousContainerDatabaseDataguardRequest, + ReinstateAutonomousContainerDatabaseDataguardResponse> + handler); + /** * Reinstates a disabled standby Autonomous Container Database, identified by the autonomousContainerDatabaseId parameter, to an active standby Autonomous Container Database. * @@ -6432,6 +6590,25 @@ java.util.concurrent.Future switchOverDataGuard( SwitchOverDataGuardRequest, SwitchOverDataGuardResponse> handler); + /** + * Switchover Autonomous Container Database, identified by the autonomousContainerDatabaseId parameter, to an active standby Autonomous Container 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 + switchoverAutonomousContainerDatabaseDataguard( + SwitchoverAutonomousContainerDatabaseDataguardRequest request, + com.oracle.bmc.responses.AsyncHandler< + SwitchoverAutonomousContainerDatabaseDataguardRequest, + SwitchoverAutonomousContainerDatabaseDataguardResponse> + handler); + /** * Switches over the primary Autonomous Container Database of an Autonomous Data Guard peer association to standby role. The standby Autonomous Container Database associated with autonomousContainerDatabaseDataguardAssociationId assumes the primary Autonomous Container Database role. *

@@ -6721,6 +6898,21 @@ java.util.concurrent.Future updateAutonomousV UpdateAutonomousVmClusterRequest, UpdateAutonomousVmClusterResponse> handler); + /** + * Updates database backup details. + * + * @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 updateBackup( + UpdateBackupRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * If no database is associated with the backup destination: * - For a RECOVERY_APPLIANCE backup destination, updates the connection string and/or the list of VPC users. 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 7294231003..3df64dd0b9 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 @@ -520,6 +520,67 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + addStandbyAutonomousContainerDatabase( + AddStandbyAutonomousContainerDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + AddStandbyAutonomousContainerDatabaseRequest, + AddStandbyAutonomousContainerDatabaseResponse> + handler) { + LOG.trace("Called async addStandbyAutonomousContainerDatabase"); + final AddStandbyAutonomousContainerDatabaseRequest interceptedRequest = + AddStandbyAutonomousContainerDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddStandbyAutonomousContainerDatabaseConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "AddStandbyAutonomousContainerDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/AddStandbyAutonomousContainerDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, AddStandbyAutonomousContainerDatabaseResponse> + transformer = + AddStandbyAutonomousContainerDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + AddStandbyAutonomousContainerDatabaseRequest, + AddStandbyAutonomousContainerDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + AddStandbyAutonomousContainerDatabaseRequest, + AddStandbyAutonomousContainerDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getAddStandbyAutonomousContainerDatabaseDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + AddStandbyAutonomousContainerDatabaseRequest, + AddStandbyAutonomousContainerDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future addStorageCapacityCloudExadataInfrastructure( @@ -2095,6 +2156,65 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + changeExadbVmClusterSubscription( + ChangeExadbVmClusterSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeExadbVmClusterSubscriptionRequest, + ChangeExadbVmClusterSubscriptionResponse> + handler) { + LOG.trace("Called async changeExadbVmClusterSubscription"); + final ChangeExadbVmClusterSubscriptionRequest interceptedRequest = + ChangeExadbVmClusterSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeExadbVmClusterSubscriptionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeExadbVmClusterSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/ChangeExadbVmClusterSubscription"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeExadbVmClusterSubscriptionResponse> + transformer = + ChangeExadbVmClusterSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeExadbVmClusterSubscriptionRequest, + ChangeExadbVmClusterSubscriptionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeExadbVmClusterSubscriptionRequest, + ChangeExadbVmClusterSubscriptionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeExadbVmClusterSubscriptionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeExadbVmClusterSubscriptionRequest, + ChangeExadbVmClusterSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeExascaleDbStorageVaultCompartment( @@ -2157,6 +2277,68 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + changeExascaleDbStorageVaultSubscription( + ChangeExascaleDbStorageVaultSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeExascaleDbStorageVaultSubscriptionRequest, + ChangeExascaleDbStorageVaultSubscriptionResponse> + handler) { + LOG.trace("Called async changeExascaleDbStorageVaultSubscription"); + final ChangeExascaleDbStorageVaultSubscriptionRequest interceptedRequest = + ChangeExascaleDbStorageVaultSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeExascaleDbStorageVaultSubscriptionConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeExascaleDbStorageVaultSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/ChangeExascaleDbStorageVaultSubscription"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeExascaleDbStorageVaultSubscriptionResponse> + transformer = + ChangeExascaleDbStorageVaultSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeExascaleDbStorageVaultSubscriptionRequest, + ChangeExascaleDbStorageVaultSubscriptionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeExascaleDbStorageVaultSubscriptionRequest, + ChangeExascaleDbStorageVaultSubscriptionResponse>, + java.util.concurrent.Future< + ChangeExascaleDbStorageVaultSubscriptionResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getChangeExascaleDbStorageVaultSubscriptionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeExascaleDbStorageVaultSubscriptionRequest, + ChangeExascaleDbStorageVaultSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeExternalContainerDatabaseCompartment( @@ -3021,6 +3203,69 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + convertStandbyAutonomousContainerDatabase( + ConvertStandbyAutonomousContainerDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ConvertStandbyAutonomousContainerDatabaseRequest, + ConvertStandbyAutonomousContainerDatabaseResponse> + handler) { + LOG.trace("Called async convertStandbyAutonomousContainerDatabase"); + final ConvertStandbyAutonomousContainerDatabaseRequest interceptedRequest = + ConvertStandbyAutonomousContainerDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConvertStandbyAutonomousContainerDatabaseConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ConvertStandbyAutonomousContainerDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/ConvertStandbyAutonomousContainerDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ConvertStandbyAutonomousContainerDatabaseResponse> + transformer = + ConvertStandbyAutonomousContainerDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ConvertStandbyAutonomousContainerDatabaseRequest, + ConvertStandbyAutonomousContainerDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ConvertStandbyAutonomousContainerDatabaseRequest, + ConvertStandbyAutonomousContainerDatabaseResponse>, + java.util.concurrent.Future< + ConvertStandbyAutonomousContainerDatabaseResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getConvertStandbyAutonomousContainerDatabaseDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ConvertStandbyAutonomousContainerDatabaseRequest, + ConvertStandbyAutonomousContainerDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future convertToPdb( ConvertToPdbRequest request, @@ -7860,6 +8105,68 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + editAutonomousContainerDatabaseDataguard( + EditAutonomousContainerDatabaseDataguardRequest request, + final com.oracle.bmc.responses.AsyncHandler< + EditAutonomousContainerDatabaseDataguardRequest, + EditAutonomousContainerDatabaseDataguardResponse> + handler) { + LOG.trace("Called async editAutonomousContainerDatabaseDataguard"); + final EditAutonomousContainerDatabaseDataguardRequest interceptedRequest = + EditAutonomousContainerDatabaseDataguardConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EditAutonomousContainerDatabaseDataguardConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "EditAutonomousContainerDatabaseDataguard", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/EditAutonomousContainerDatabaseDataguard"); + final java.util.function.Function< + javax.ws.rs.core.Response, EditAutonomousContainerDatabaseDataguardResponse> + transformer = + EditAutonomousContainerDatabaseDataguardConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + EditAutonomousContainerDatabaseDataguardRequest, + EditAutonomousContainerDatabaseDataguardResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + EditAutonomousContainerDatabaseDataguardRequest, + EditAutonomousContainerDatabaseDataguardResponse>, + java.util.concurrent.Future< + EditAutonomousContainerDatabaseDataguardResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getEditAutonomousContainerDatabaseDataguardDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + EditAutonomousContainerDatabaseDataguardRequest, + EditAutonomousContainerDatabaseDataguardResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future enableAutonomousDatabaseManagement( @@ -8644,6 +8951,62 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + failoverAutonomousContainerDatabaseDataguard( + FailoverAutonomousContainerDatabaseDataguardRequest request, + final com.oracle.bmc.responses.AsyncHandler< + FailoverAutonomousContainerDatabaseDataguardRequest, + FailoverAutonomousContainerDatabaseDataguardResponse> + handler) { + LOG.trace("Called async failoverAutonomousContainerDatabaseDataguard"); + final FailoverAutonomousContainerDatabaseDataguardRequest interceptedRequest = + FailoverAutonomousContainerDatabaseDataguardConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + FailoverAutonomousContainerDatabaseDataguardConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "FailoverAutonomousContainerDatabaseDataguard", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/FailoverAutonomousContainerDatabaseDataguard"); + final java.util.function.Function< + javax.ws.rs.core.Response, + FailoverAutonomousContainerDatabaseDataguardResponse> + transformer = + FailoverAutonomousContainerDatabaseDataguardConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + FailoverAutonomousContainerDatabaseDataguardRequest, + FailoverAutonomousContainerDatabaseDataguardResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + FailoverAutonomousContainerDatabaseDataguardRequest, + FailoverAutonomousContainerDatabaseDataguardResponse>, + java.util.concurrent.Future< + FailoverAutonomousContainerDatabaseDataguardResponse>> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + FailoverAutonomousContainerDatabaseDataguardRequest, + FailoverAutonomousContainerDatabaseDataguardResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future< FailoverAutonomousContainerDatabaseDataguardAssociationResponse> @@ -16647,6 +17010,64 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future< + MigrateAutonomousContainerDatabaseDataguardAssociationResponse> + migrateAutonomousContainerDatabaseDataguardAssociation( + MigrateAutonomousContainerDatabaseDataguardAssociationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + MigrateAutonomousContainerDatabaseDataguardAssociationRequest, + MigrateAutonomousContainerDatabaseDataguardAssociationResponse> + handler) { + LOG.trace("Called async migrateAutonomousContainerDatabaseDataguardAssociation"); + final MigrateAutonomousContainerDatabaseDataguardAssociationRequest interceptedRequest = + MigrateAutonomousContainerDatabaseDataguardAssociationConverter.interceptRequest( + request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MigrateAutonomousContainerDatabaseDataguardAssociationConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "MigrateAutonomousContainerDatabaseDataguardAssociation", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabaseDataguardAssociation/MigrateAutonomousContainerDatabaseDataguardAssociation"); + final java.util.function.Function< + javax.ws.rs.core.Response, + MigrateAutonomousContainerDatabaseDataguardAssociationResponse> + transformer = + MigrateAutonomousContainerDatabaseDataguardAssociationConverter + .fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + MigrateAutonomousContainerDatabaseDataguardAssociationRequest, + MigrateAutonomousContainerDatabaseDataguardAssociationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + MigrateAutonomousContainerDatabaseDataguardAssociationRequest, + MigrateAutonomousContainerDatabaseDataguardAssociationResponse>, + java.util.concurrent.Future< + MigrateAutonomousContainerDatabaseDataguardAssociationResponse>> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + MigrateAutonomousContainerDatabaseDataguardAssociationRequest, + MigrateAutonomousContainerDatabaseDataguardAssociationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future migrateDataGuardAssociationToMultiDataGuards( @@ -17086,6 +17507,62 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + reinstateAutonomousContainerDatabaseDataguard( + ReinstateAutonomousContainerDatabaseDataguardRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ReinstateAutonomousContainerDatabaseDataguardRequest, + ReinstateAutonomousContainerDatabaseDataguardResponse> + handler) { + LOG.trace("Called async reinstateAutonomousContainerDatabaseDataguard"); + final ReinstateAutonomousContainerDatabaseDataguardRequest interceptedRequest = + ReinstateAutonomousContainerDatabaseDataguardConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReinstateAutonomousContainerDatabaseDataguardConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ReinstateAutonomousContainerDatabaseDataguard", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/ReinstateAutonomousContainerDatabaseDataguard"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ReinstateAutonomousContainerDatabaseDataguardResponse> + transformer = + ReinstateAutonomousContainerDatabaseDataguardConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ReinstateAutonomousContainerDatabaseDataguardRequest, + ReinstateAutonomousContainerDatabaseDataguardResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ReinstateAutonomousContainerDatabaseDataguardRequest, + ReinstateAutonomousContainerDatabaseDataguardResponse>, + java.util.concurrent.Future< + ReinstateAutonomousContainerDatabaseDataguardResponse>> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ReinstateAutonomousContainerDatabaseDataguardRequest, + ReinstateAutonomousContainerDatabaseDataguardResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future< ReinstateAutonomousContainerDatabaseDataguardAssociationResponse> @@ -18964,6 +19441,62 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + switchoverAutonomousContainerDatabaseDataguard( + SwitchoverAutonomousContainerDatabaseDataguardRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SwitchoverAutonomousContainerDatabaseDataguardRequest, + SwitchoverAutonomousContainerDatabaseDataguardResponse> + handler) { + LOG.trace("Called async switchoverAutonomousContainerDatabaseDataguard"); + final SwitchoverAutonomousContainerDatabaseDataguardRequest interceptedRequest = + SwitchoverAutonomousContainerDatabaseDataguardConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SwitchoverAutonomousContainerDatabaseDataguardConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "SwitchoverAutonomousContainerDatabaseDataguard", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/SwitchoverAutonomousContainerDatabaseDataguard"); + final java.util.function.Function< + javax.ws.rs.core.Response, + SwitchoverAutonomousContainerDatabaseDataguardResponse> + transformer = + SwitchoverAutonomousContainerDatabaseDataguardConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + SwitchoverAutonomousContainerDatabaseDataguardRequest, + SwitchoverAutonomousContainerDatabaseDataguardResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SwitchoverAutonomousContainerDatabaseDataguardRequest, + SwitchoverAutonomousContainerDatabaseDataguardResponse>, + java.util.concurrent.Future< + SwitchoverAutonomousContainerDatabaseDataguardResponse>> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SwitchoverAutonomousContainerDatabaseDataguardRequest, + SwitchoverAutonomousContainerDatabaseDataguardResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future< SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse> @@ -19808,6 +20341,55 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future updateBackup( + UpdateBackupRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async updateBackup"); + final UpdateBackupRequest interceptedRequest = + UpdateBackupConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateBackupConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateBackup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Backup/UpdateBackup"); + final java.util.function.Function + transformer = + UpdateBackupConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateBackupRequest, UpdateBackupResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateBackupDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateBackupRequest, UpdateBackupResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateBackupDestination( UpdateBackupDestinationRequest request, 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 532b788fde..227fbaad4f 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 @@ -600,6 +600,52 @@ public ActivateExadataInfrastructureResponse activateExadataInfrastructure( }); } + @Override + public AddStandbyAutonomousContainerDatabaseResponse addStandbyAutonomousContainerDatabase( + AddStandbyAutonomousContainerDatabaseRequest request) { + LOG.trace("Called addStandbyAutonomousContainerDatabase"); + final AddStandbyAutonomousContainerDatabaseRequest interceptedRequest = + AddStandbyAutonomousContainerDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddStandbyAutonomousContainerDatabaseConverter.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.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "AddStandbyAutonomousContainerDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/AddStandbyAutonomousContainerDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, AddStandbyAutonomousContainerDatabaseResponse> + transformer = + AddStandbyAutonomousContainerDatabaseConverter.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 + .getAddStandbyAutonomousContainerDatabaseDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public AddStorageCapacityCloudExadataInfrastructureResponse addStorageCapacityCloudExadataInfrastructure( @@ -1807,6 +1853,51 @@ public ChangeExadbVmClusterCompartmentResponse changeExadbVmClusterCompartment( }); } + @Override + public ChangeExadbVmClusterSubscriptionResponse changeExadbVmClusterSubscription( + ChangeExadbVmClusterSubscriptionRequest request) { + LOG.trace("Called changeExadbVmClusterSubscription"); + final ChangeExadbVmClusterSubscriptionRequest interceptedRequest = + ChangeExadbVmClusterSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeExadbVmClusterSubscriptionConverter.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.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeExadbVmClusterSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/ChangeExadbVmClusterSubscription"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeExadbVmClusterSubscriptionResponse> + transformer = + ChangeExadbVmClusterSubscriptionConverter.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 + .getChangeExadbVmClusterSubscriptionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeExascaleDbStorageVaultCompartmentResponse changeExascaleDbStorageVaultCompartment( ChangeExascaleDbStorageVaultCompartmentRequest request) { @@ -1853,6 +1944,53 @@ public ChangeExascaleDbStorageVaultCompartmentResponse changeExascaleDbStorageVa }); } + @Override + public ChangeExascaleDbStorageVaultSubscriptionResponse + changeExascaleDbStorageVaultSubscription( + ChangeExascaleDbStorageVaultSubscriptionRequest request) { + LOG.trace("Called changeExascaleDbStorageVaultSubscription"); + final ChangeExascaleDbStorageVaultSubscriptionRequest interceptedRequest = + ChangeExascaleDbStorageVaultSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeExascaleDbStorageVaultSubscriptionConverter.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.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeExascaleDbStorageVaultSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/ChangeExascaleDbStorageVaultSubscription"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeExascaleDbStorageVaultSubscriptionResponse> + transformer = + ChangeExascaleDbStorageVaultSubscriptionConverter.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 + .getChangeExascaleDbStorageVaultSubscriptionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeExternalContainerDatabaseCompartmentResponse changeExternalContainerDatabaseCompartment( @@ -2520,6 +2658,54 @@ public ConfirmKeyStoreDetailsAreCorrectResponse confirmKeyStoreDetailsAreCorrect }); } + @Override + public ConvertStandbyAutonomousContainerDatabaseResponse + convertStandbyAutonomousContainerDatabase( + ConvertStandbyAutonomousContainerDatabaseRequest request) { + LOG.trace("Called convertStandbyAutonomousContainerDatabase"); + final ConvertStandbyAutonomousContainerDatabaseRequest interceptedRequest = + ConvertStandbyAutonomousContainerDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConvertStandbyAutonomousContainerDatabaseConverter.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.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ConvertStandbyAutonomousContainerDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/ConvertStandbyAutonomousContainerDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, + ConvertStandbyAutonomousContainerDatabaseResponse> + transformer = + ConvertStandbyAutonomousContainerDatabaseConverter.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 + .getConvertStandbyAutonomousContainerDatabaseDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ConvertToPdbResponse convertToPdb(ConvertToPdbRequest request) { LOG.trace("Called convertToPdb"); @@ -6329,6 +6515,53 @@ public DownloadVmClusterNetworkConfigFileResponse downloadVmClusterNetworkConfig }); } + @Override + public EditAutonomousContainerDatabaseDataguardResponse + editAutonomousContainerDatabaseDataguard( + EditAutonomousContainerDatabaseDataguardRequest request) { + LOG.trace("Called editAutonomousContainerDatabaseDataguard"); + final EditAutonomousContainerDatabaseDataguardRequest interceptedRequest = + EditAutonomousContainerDatabaseDataguardConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EditAutonomousContainerDatabaseDataguardConverter.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.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "EditAutonomousContainerDatabaseDataguard", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/EditAutonomousContainerDatabaseDataguard"); + java.util.function.Function< + javax.ws.rs.core.Response, EditAutonomousContainerDatabaseDataguardResponse> + transformer = + EditAutonomousContainerDatabaseDataguardConverter.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 + .getEditAutonomousContainerDatabaseDataguardDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public EnableAutonomousDatabaseManagementResponse enableAutonomousDatabaseManagement( EnableAutonomousDatabaseManagementRequest request) { @@ -6930,6 +7163,49 @@ public FailOverAutonomousDatabaseResponse failOverAutonomousDatabase( }); } + @Override + public FailoverAutonomousContainerDatabaseDataguardResponse + failoverAutonomousContainerDatabaseDataguard( + FailoverAutonomousContainerDatabaseDataguardRequest request) { + LOG.trace("Called failoverAutonomousContainerDatabaseDataguard"); + final FailoverAutonomousContainerDatabaseDataguardRequest interceptedRequest = + FailoverAutonomousContainerDatabaseDataguardConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + FailoverAutonomousContainerDatabaseDataguardConverter.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", + "FailoverAutonomousContainerDatabaseDataguard", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/FailoverAutonomousContainerDatabaseDataguard"); + java.util.function.Function< + javax.ws.rs.core.Response, + FailoverAutonomousContainerDatabaseDataguardResponse> + transformer = + FailoverAutonomousContainerDatabaseDataguardConverter.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 FailoverAutonomousContainerDatabaseDataguardAssociationResponse failoverAutonomousContainerDatabaseDataguardAssociation( @@ -13090,6 +13366,50 @@ public LocalClonePluggableDatabaseResponse localClonePluggableDatabase( }); } + @Override + public MigrateAutonomousContainerDatabaseDataguardAssociationResponse + migrateAutonomousContainerDatabaseDataguardAssociation( + MigrateAutonomousContainerDatabaseDataguardAssociationRequest request) { + LOG.trace("Called migrateAutonomousContainerDatabaseDataguardAssociation"); + final MigrateAutonomousContainerDatabaseDataguardAssociationRequest interceptedRequest = + MigrateAutonomousContainerDatabaseDataguardAssociationConverter.interceptRequest( + request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MigrateAutonomousContainerDatabaseDataguardAssociationConverter.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", + "MigrateAutonomousContainerDatabaseDataguardAssociation", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabaseDataguardAssociation/MigrateAutonomousContainerDatabaseDataguardAssociation"); + java.util.function.Function< + javax.ws.rs.core.Response, + MigrateAutonomousContainerDatabaseDataguardAssociationResponse> + transformer = + MigrateAutonomousContainerDatabaseDataguardAssociationConverter + .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 MigrateDataGuardAssociationToMultiDataGuardsResponse migrateDataGuardAssociationToMultiDataGuards( @@ -13434,6 +13754,49 @@ public RegisterAutonomousDatabaseDataSafeResponse registerAutonomousDatabaseData }); } + @Override + public ReinstateAutonomousContainerDatabaseDataguardResponse + reinstateAutonomousContainerDatabaseDataguard( + ReinstateAutonomousContainerDatabaseDataguardRequest request) { + LOG.trace("Called reinstateAutonomousContainerDatabaseDataguard"); + final ReinstateAutonomousContainerDatabaseDataguardRequest interceptedRequest = + ReinstateAutonomousContainerDatabaseDataguardConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReinstateAutonomousContainerDatabaseDataguardConverter.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", + "ReinstateAutonomousContainerDatabaseDataguard", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/ReinstateAutonomousContainerDatabaseDataguard"); + java.util.function.Function< + javax.ws.rs.core.Response, + ReinstateAutonomousContainerDatabaseDataguardResponse> + transformer = + ReinstateAutonomousContainerDatabaseDataguardConverter.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 ReinstateAutonomousContainerDatabaseDataguardAssociationResponse reinstateAutonomousContainerDatabaseDataguardAssociation( @@ -14912,6 +15275,49 @@ public SwitchOverDataGuardResponse switchOverDataGuard(SwitchOverDataGuardReques }); } + @Override + public SwitchoverAutonomousContainerDatabaseDataguardResponse + switchoverAutonomousContainerDatabaseDataguard( + SwitchoverAutonomousContainerDatabaseDataguardRequest request) { + LOG.trace("Called switchoverAutonomousContainerDatabaseDataguard"); + final SwitchoverAutonomousContainerDatabaseDataguardRequest interceptedRequest = + SwitchoverAutonomousContainerDatabaseDataguardConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SwitchoverAutonomousContainerDatabaseDataguardConverter.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", + "SwitchoverAutonomousContainerDatabaseDataguard", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/SwitchoverAutonomousContainerDatabaseDataguard"); + java.util.function.Function< + javax.ws.rs.core.Response, + SwitchoverAutonomousContainerDatabaseDataguardResponse> + transformer = + SwitchoverAutonomousContainerDatabaseDataguardConverter.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 SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse switchoverAutonomousContainerDatabaseDataguardAssociation( @@ -15561,6 +15967,45 @@ public UpdateAutonomousVmClusterResponse updateAutonomousVmCluster( }); } + @Override + public UpdateBackupResponse updateBackup(UpdateBackupRequest request) { + LOG.trace("Called updateBackup"); + final UpdateBackupRequest interceptedRequest = + UpdateBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateBackupConverter.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", + "UpdateBackup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Backup/UpdateBackup"); + java.util.function.Function transformer = + UpdateBackupConverter.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.getUpdateBackupDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateBackupDestinationResponse updateBackupDestination( UpdateBackupDestinationRequest request) { 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 4c179770a2..9bb5a385b3 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 @@ -104,6 +104,72 @@ public ActivateExadataInfrastructureResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + AddStandbyAutonomousContainerDatabaseRequest, + AddStandbyAutonomousContainerDatabaseResponse> + forAddStandbyAutonomousContainerDatabase( + AddStandbyAutonomousContainerDatabaseRequest request) { + return forAddStandbyAutonomousContainerDatabase( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + AddStandbyAutonomousContainerDatabaseRequest, + AddStandbyAutonomousContainerDatabaseResponse> + forAddStandbyAutonomousContainerDatabase( + AddStandbyAutonomousContainerDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public AddStandbyAutonomousContainerDatabaseResponse call() throws Exception { + final AddStandbyAutonomousContainerDatabaseResponse response = + client.addStandbyAutonomousContainerDatabase(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -1863,6 +1929,71 @@ public ChangeExadbVmClusterCompartmentResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ChangeExadbVmClusterSubscriptionRequest, + ChangeExadbVmClusterSubscriptionResponse> + forChangeExadbVmClusterSubscription(ChangeExadbVmClusterSubscriptionRequest request) { + return forChangeExadbVmClusterSubscription( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ChangeExadbVmClusterSubscriptionRequest, + ChangeExadbVmClusterSubscriptionResponse> + forChangeExadbVmClusterSubscription( + ChangeExadbVmClusterSubscriptionRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public ChangeExadbVmClusterSubscriptionResponse call() throws Exception { + final ChangeExadbVmClusterSubscriptionResponse response = + client.changeExadbVmClusterSubscription(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -1930,6 +2061,74 @@ public ChangeExascaleDbStorageVaultCompartmentResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ChangeExascaleDbStorageVaultSubscriptionRequest, + ChangeExascaleDbStorageVaultSubscriptionResponse> + forChangeExascaleDbStorageVaultSubscription( + ChangeExascaleDbStorageVaultSubscriptionRequest request) { + return forChangeExascaleDbStorageVaultSubscription( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ChangeExascaleDbStorageVaultSubscriptionRequest, + ChangeExascaleDbStorageVaultSubscriptionResponse> + forChangeExascaleDbStorageVaultSubscription( + ChangeExascaleDbStorageVaultSubscriptionRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + ChangeExascaleDbStorageVaultSubscriptionResponse>() { + @Override + public ChangeExascaleDbStorageVaultSubscriptionResponse call() + throws Exception { + final ChangeExascaleDbStorageVaultSubscriptionResponse response = + client.changeExascaleDbStorageVaultSubscription(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -2904,6 +3103,74 @@ public ConfirmKeyStoreDetailsAreCorrectResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ConvertStandbyAutonomousContainerDatabaseRequest, + ConvertStandbyAutonomousContainerDatabaseResponse> + forConvertStandbyAutonomousContainerDatabase( + ConvertStandbyAutonomousContainerDatabaseRequest request) { + return forConvertStandbyAutonomousContainerDatabase( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ConvertStandbyAutonomousContainerDatabaseRequest, + ConvertStandbyAutonomousContainerDatabaseResponse> + forConvertStandbyAutonomousContainerDatabase( + ConvertStandbyAutonomousContainerDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + ConvertStandbyAutonomousContainerDatabaseResponse>() { + @Override + public ConvertStandbyAutonomousContainerDatabaseResponse call() + throws Exception { + final ConvertStandbyAutonomousContainerDatabaseResponse response = + client.convertStandbyAutonomousContainerDatabase(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -7960,6 +8227,74 @@ public DisablePluggableDatabaseManagementResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + EditAutonomousContainerDatabaseDataguardRequest, + EditAutonomousContainerDatabaseDataguardResponse> + forEditAutonomousContainerDatabaseDataguard( + EditAutonomousContainerDatabaseDataguardRequest request) { + return forEditAutonomousContainerDatabaseDataguard( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + EditAutonomousContainerDatabaseDataguardRequest, + EditAutonomousContainerDatabaseDataguardResponse> + forEditAutonomousContainerDatabaseDataguard( + EditAutonomousContainerDatabaseDataguardRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + EditAutonomousContainerDatabaseDataguardResponse>() { + @Override + public EditAutonomousContainerDatabaseDataguardResponse call() + throws Exception { + final EditAutonomousContainerDatabaseDataguardResponse response = + client.editAutonomousContainerDatabaseDataguard(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -8712,10 +9047,74 @@ public EnableExternalPluggableDatabaseStackMonitoringResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnablePluggableDatabaseManagementRequest, - EnablePluggableDatabaseManagementResponse> - forEnablePluggableDatabaseManagement(EnablePluggableDatabaseManagementRequest request) { - return forEnablePluggableDatabaseManagement( + EnablePluggableDatabaseManagementRequest, + EnablePluggableDatabaseManagementResponse> + forEnablePluggableDatabaseManagement(EnablePluggableDatabaseManagementRequest request) { + return forEnablePluggableDatabaseManagement( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + EnablePluggableDatabaseManagementRequest, + EnablePluggableDatabaseManagementResponse> + forEnablePluggableDatabaseManagement( + EnablePluggableDatabaseManagementRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public EnablePluggableDatabaseManagementResponse call() throws Exception { + final EnablePluggableDatabaseManagementResponse response = + client.enablePluggableDatabaseManagement(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + FailOverAutonomousDatabaseRequest, FailOverAutonomousDatabaseResponse> + forFailOverAutonomousDatabase(FailOverAutonomousDatabaseRequest request) { + return forFailOverAutonomousDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -8730,10 +9129,9 @@ public EnableExternalPluggableDatabaseStackMonitoringResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnablePluggableDatabaseManagementRequest, - EnablePluggableDatabaseManagementResponse> - forEnablePluggableDatabaseManagement( - EnablePluggableDatabaseManagementRequest request, + FailOverAutonomousDatabaseRequest, FailOverAutonomousDatabaseResponse> + forFailOverAutonomousDatabase( + FailOverAutonomousDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -8743,11 +9141,11 @@ public EnableExternalPluggableDatabaseStackMonitoringResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public EnablePluggableDatabaseManagementResponse call() throws Exception { - final EnablePluggableDatabaseManagementResponse response = - client.enablePluggableDatabaseManagement(request); + public FailOverAutonomousDatabaseResponse call() throws Exception { + final FailOverAutonomousDatabaseResponse response = + client.failOverAutonomousDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -8777,9 +9175,11 @@ public EnablePluggableDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - FailOverAutonomousDatabaseRequest, FailOverAutonomousDatabaseResponse> - forFailOverAutonomousDatabase(FailOverAutonomousDatabaseRequest request) { - return forFailOverAutonomousDatabase( + FailoverAutonomousContainerDatabaseDataguardRequest, + FailoverAutonomousContainerDatabaseDataguardResponse> + forFailoverAutonomousContainerDatabaseDataguard( + FailoverAutonomousContainerDatabaseDataguardRequest request) { + return forFailoverAutonomousContainerDatabaseDataguard( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -8794,9 +9194,10 @@ public EnablePluggableDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - FailOverAutonomousDatabaseRequest, FailOverAutonomousDatabaseResponse> - forFailOverAutonomousDatabase( - FailOverAutonomousDatabaseRequest request, + FailoverAutonomousContainerDatabaseDataguardRequest, + FailoverAutonomousContainerDatabaseDataguardResponse> + forFailoverAutonomousContainerDatabaseDataguard( + FailoverAutonomousContainerDatabaseDataguardRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -8806,11 +9207,13 @@ public EnablePluggableDatabaseManagementResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + FailoverAutonomousContainerDatabaseDataguardResponse>() { @Override - public FailOverAutonomousDatabaseResponse call() throws Exception { - final FailOverAutonomousDatabaseResponse response = - client.failOverAutonomousDatabase(request); + public FailoverAutonomousContainerDatabaseDataguardResponse call() + throws Exception { + final FailoverAutonomousContainerDatabaseDataguardResponse response = + client.failoverAutonomousContainerDatabaseDataguard(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14982,6 +15385,77 @@ public LocalClonePluggableDatabaseResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + MigrateAutonomousContainerDatabaseDataguardAssociationRequest, + MigrateAutonomousContainerDatabaseDataguardAssociationResponse> + forMigrateAutonomousContainerDatabaseDataguardAssociation( + MigrateAutonomousContainerDatabaseDataguardAssociationRequest request) { + return forMigrateAutonomousContainerDatabaseDataguardAssociation( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + MigrateAutonomousContainerDatabaseDataguardAssociationRequest, + MigrateAutonomousContainerDatabaseDataguardAssociationResponse> + forMigrateAutonomousContainerDatabaseDataguardAssociation( + MigrateAutonomousContainerDatabaseDataguardAssociationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + MigrateAutonomousContainerDatabaseDataguardAssociationResponse>() { + @Override + public MigrateAutonomousContainerDatabaseDataguardAssociationResponse call() + throws Exception { + final MigrateAutonomousContainerDatabaseDataguardAssociationResponse + response = + client + .migrateAutonomousContainerDatabaseDataguardAssociation( + request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -15496,6 +15970,74 @@ public RegisterAutonomousDatabaseDataSafeResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ReinstateAutonomousContainerDatabaseDataguardRequest, + ReinstateAutonomousContainerDatabaseDataguardResponse> + forReinstateAutonomousContainerDatabaseDataguard( + ReinstateAutonomousContainerDatabaseDataguardRequest request) { + return forReinstateAutonomousContainerDatabaseDataguard( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ReinstateAutonomousContainerDatabaseDataguardRequest, + ReinstateAutonomousContainerDatabaseDataguardResponse> + forReinstateAutonomousContainerDatabaseDataguard( + ReinstateAutonomousContainerDatabaseDataguardRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + ReinstateAutonomousContainerDatabaseDataguardResponse>() { + @Override + public ReinstateAutonomousContainerDatabaseDataguardResponse call() + throws Exception { + final ReinstateAutonomousContainerDatabaseDataguardResponse response = + client.reinstateAutonomousContainerDatabaseDataguard(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -17601,6 +18143,74 @@ public SwitchOverDataGuardResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + SwitchoverAutonomousContainerDatabaseDataguardRequest, + SwitchoverAutonomousContainerDatabaseDataguardResponse> + forSwitchoverAutonomousContainerDatabaseDataguard( + SwitchoverAutonomousContainerDatabaseDataguardRequest request) { + return forSwitchoverAutonomousContainerDatabaseDataguard( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + SwitchoverAutonomousContainerDatabaseDataguardRequest, + SwitchoverAutonomousContainerDatabaseDataguardResponse> + forSwitchoverAutonomousContainerDatabaseDataguard( + SwitchoverAutonomousContainerDatabaseDataguardRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + SwitchoverAutonomousContainerDatabaseDataguardResponse>() { + @Override + public SwitchoverAutonomousContainerDatabaseDataguardResponse call() + throws Exception { + final SwitchoverAutonomousContainerDatabaseDataguardResponse response = + client.switchoverAutonomousContainerDatabaseDataguard(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -18514,6 +19124,65 @@ public UpdateAutonomousVmClusterResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forUpdateBackup( + UpdateBackupRequest request) { + return forUpdateBackup( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * 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 + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forUpdateBackup( + UpdateBackupRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public UpdateBackupResponse call() throws Exception { + final UpdateBackupResponse response = client.updateBackup(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + 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/AddStandbyAutonomousContainerDatabaseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/AddStandbyAutonomousContainerDatabaseConverter.java new file mode 100644 index 0000000000..5110640c85 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/AddStandbyAutonomousContainerDatabaseConverter.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 AddStandbyAutonomousContainerDatabaseConverter { + 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(AddStandbyAutonomousContainerDatabaseConverter.class); + + public static com.oracle.bmc.database.requests.AddStandbyAutonomousContainerDatabaseRequest + interceptRequest( + com.oracle.bmc.database.requests.AddStandbyAutonomousContainerDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.AddStandbyAutonomousContainerDatabaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getAddStandbyAutonomousContainerDatabaseDetails(), + "addStandbyAutonomousContainerDatabaseDetails is required"); + Validate.notBlank( + request.getAutonomousContainerDatabaseId(), + "autonomousContainerDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousContainerDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousContainerDatabaseId())) + .path("actions") + .path("addStandby"); + + 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.database.responses.AddStandbyAutonomousContainerDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.AddStandbyAutonomousContainerDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .AddStandbyAutonomousContainerDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .AddStandbyAutonomousContainerDatabaseResponse>() { + @Override + public com.oracle.bmc.database.responses + .AddStandbyAutonomousContainerDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.AddStandbyAutonomousContainerDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .AddStandbyAutonomousContainerDatabaseResponse + .Builder + builder = + com.oracle.bmc.database.responses + .AddStandbyAutonomousContainerDatabaseResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.autonomousContainerDatabase(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> 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.database.responses + .AddStandbyAutonomousContainerDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeExadbVmClusterSubscriptionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeExadbVmClusterSubscriptionConverter.java new file mode 100644 index 0000000000..525ae63f28 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeExadbVmClusterSubscriptionConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 ChangeExadbVmClusterSubscriptionConverter { + 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(ChangeExadbVmClusterSubscriptionConverter.class); + + public static com.oracle.bmc.database.requests.ChangeExadbVmClusterSubscriptionRequest + interceptRequest( + com.oracle.bmc.database.requests.ChangeExadbVmClusterSubscriptionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ChangeExadbVmClusterSubscriptionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getChangeExadbVmClusterSubscriptionDetails(), + "changeExadbVmClusterSubscriptionDetails is required"); + Validate.notBlank(request.getExadbVmClusterId(), "exadbVmClusterId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exadbVmClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExadbVmClusterId())) + .path("actions") + .path("changeSubscription"); + + 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.database.responses.ChangeExadbVmClusterSubscriptionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeExadbVmClusterSubscriptionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeExadbVmClusterSubscriptionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeExadbVmClusterSubscriptionResponse>() { + @Override + public com.oracle.bmc.database.responses + .ChangeExadbVmClusterSubscriptionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ChangeExadbVmClusterSubscriptionResponse"); + 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.database.responses + .ChangeExadbVmClusterSubscriptionResponse.Builder + builder = + com.oracle.bmc.database.responses + .ChangeExadbVmClusterSubscriptionResponse + .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.database.responses + .ChangeExadbVmClusterSubscriptionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeExascaleDbStorageVaultSubscriptionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeExascaleDbStorageVaultSubscriptionConverter.java new file mode 100644 index 0000000000..6e1a83c24f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeExascaleDbStorageVaultSubscriptionConverter.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 ChangeExascaleDbStorageVaultSubscriptionConverter { + 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( + ChangeExascaleDbStorageVaultSubscriptionConverter.class); + + public static com.oracle.bmc.database.requests.ChangeExascaleDbStorageVaultSubscriptionRequest + interceptRequest( + com.oracle.bmc.database.requests.ChangeExascaleDbStorageVaultSubscriptionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ChangeExascaleDbStorageVaultSubscriptionRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getChangeExascaleDbStorageVaultSubscriptionDetails(), + "changeExascaleDbStorageVaultSubscriptionDetails is required"); + Validate.notBlank( + request.getExascaleDbStorageVaultId(), + "exascaleDbStorageVaultId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exascaleDbStorageVaults") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExascaleDbStorageVaultId())) + .path("actions") + .path("changeSubscription"); + + 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.database.responses + .ChangeExascaleDbStorageVaultSubscriptionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultSubscriptionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultSubscriptionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultSubscriptionResponse>() { + @Override + public com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultSubscriptionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ChangeExascaleDbStorageVaultSubscriptionResponse"); + 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.database.responses + .ChangeExascaleDbStorageVaultSubscriptionResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultSubscriptionResponse + .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.database.responses + .ChangeExascaleDbStorageVaultSubscriptionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ConvertStandbyAutonomousContainerDatabaseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ConvertStandbyAutonomousContainerDatabaseConverter.java new file mode 100644 index 0000000000..b04f569c87 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ConvertStandbyAutonomousContainerDatabaseConverter.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 ConvertStandbyAutonomousContainerDatabaseConverter { + 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( + ConvertStandbyAutonomousContainerDatabaseConverter.class); + + public static com.oracle.bmc.database.requests.ConvertStandbyAutonomousContainerDatabaseRequest + interceptRequest( + com.oracle.bmc.database.requests + .ConvertStandbyAutonomousContainerDatabaseRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ConvertStandbyAutonomousContainerDatabaseRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getConvertStandbyAutonomousContainerDatabaseDetails(), + "convertStandbyAutonomousContainerDatabaseDetails is required"); + Validate.notBlank( + request.getAutonomousContainerDatabaseId(), + "autonomousContainerDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousContainerDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousContainerDatabaseId())) + .path("actions") + .path("snapshotStandby"); + + 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.database.responses + .ConvertStandbyAutonomousContainerDatabaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ConvertStandbyAutonomousContainerDatabaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ConvertStandbyAutonomousContainerDatabaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ConvertStandbyAutonomousContainerDatabaseResponse>() { + @Override + public com.oracle.bmc.database.responses + .ConvertStandbyAutonomousContainerDatabaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ConvertStandbyAutonomousContainerDatabaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ConvertStandbyAutonomousContainerDatabaseResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ConvertStandbyAutonomousContainerDatabaseResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.autonomousContainerDatabase(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> 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.database.responses + .ConvertStandbyAutonomousContainerDatabaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/EditAutonomousContainerDatabaseDataguardConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/EditAutonomousContainerDatabaseDataguardConverter.java new file mode 100644 index 0000000000..6accb42d93 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/EditAutonomousContainerDatabaseDataguardConverter.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 EditAutonomousContainerDatabaseDataguardConverter { + 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( + EditAutonomousContainerDatabaseDataguardConverter.class); + + public static com.oracle.bmc.database.requests.EditAutonomousContainerDatabaseDataguardRequest + interceptRequest( + com.oracle.bmc.database.requests.EditAutonomousContainerDatabaseDataguardRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.EditAutonomousContainerDatabaseDataguardRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getEditAutonomousContainerDatabaseDataguardDetails(), + "editAutonomousContainerDatabaseDataguardDetails is required"); + Validate.notBlank( + request.getAutonomousContainerDatabaseId(), + "autonomousContainerDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousContainerDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousContainerDatabaseId())) + .path("actions") + .path("editDataguard"); + + 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.database.responses + .EditAutonomousContainerDatabaseDataguardResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .EditAutonomousContainerDatabaseDataguardResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .EditAutonomousContainerDatabaseDataguardResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .EditAutonomousContainerDatabaseDataguardResponse>() { + @Override + public com.oracle.bmc.database.responses + .EditAutonomousContainerDatabaseDataguardResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.EditAutonomousContainerDatabaseDataguardResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .EditAutonomousContainerDatabaseDataguardResponse + .Builder + builder = + com.oracle.bmc.database.responses + .EditAutonomousContainerDatabaseDataguardResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.autonomousContainerDatabase(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> 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.database.responses + .EditAutonomousContainerDatabaseDataguardResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/FailoverAutonomousContainerDatabaseDataguardConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/FailoverAutonomousContainerDatabaseDataguardConverter.java new file mode 100644 index 0000000000..0762f34868 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/FailoverAutonomousContainerDatabaseDataguardConverter.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 FailoverAutonomousContainerDatabaseDataguardConverter { + 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( + FailoverAutonomousContainerDatabaseDataguardConverter.class); + + public static com.oracle.bmc.database.requests + .FailoverAutonomousContainerDatabaseDataguardRequest + interceptRequest( + com.oracle.bmc.database.requests + .FailoverAutonomousContainerDatabaseDataguardRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.FailoverAutonomousContainerDatabaseDataguardRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousContainerDatabaseId(), + "autonomousContainerDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousContainerDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousContainerDatabaseId())) + .path("actions") + .path("failover"); + + 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.database.responses + .FailoverAutonomousContainerDatabaseDataguardResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .FailoverAutonomousContainerDatabaseDataguardResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .FailoverAutonomousContainerDatabaseDataguardResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .FailoverAutonomousContainerDatabaseDataguardResponse>() { + @Override + public com.oracle.bmc.database.responses + .FailoverAutonomousContainerDatabaseDataguardResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.FailoverAutonomousContainerDatabaseDataguardResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .FailoverAutonomousContainerDatabaseDataguardResponse + .Builder + builder = + com.oracle.bmc.database.responses + .FailoverAutonomousContainerDatabaseDataguardResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.autonomousContainerDatabase(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.database.responses + .FailoverAutonomousContainerDatabaseDataguardResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListBackupsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListBackupsConverter.java index 434f59cc9f..67821c85d2 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListBackupsConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListBackupsConverter.java @@ -73,6 +73,54 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getShapeFamily().getValue())); } + if (request.getVersion() != null) { + target = + target.queryParam( + "version", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getVersion())); + } + + if (request.getType() != null) { + target = + target.queryParam( + "type", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getType())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getTimeExpiryScheduledGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "timeExpiryScheduledGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeExpiryScheduledGreaterThanOrEqualTo())); + } + + if (request.getTimeExpiryScheduledLessThan() != null) { + target = + target.queryParam( + "timeExpiryScheduledLessThan", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeExpiryScheduledLessThan())); + } + + if (request.getBackupDestinationType() != null) { + target = + target.queryParam( + "backupDestinationType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getBackupDestinationType())); + } + 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/ListCloudVmClustersConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListCloudVmClustersConverter.java index 0e144b7b41..025f70fe81 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListCloudVmClustersConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListCloudVmClustersConverter.java @@ -96,6 +96,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getDisplayName())); } + if (request.getVmClusterType() != null) { + target = + target.queryParam( + "vmClusterType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getVmClusterType().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/internal/http/ListDatabaseSoftwareImagesConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListDatabaseSoftwareImagesConverter.java index a96d86670d..4cbc00432a 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListDatabaseSoftwareImagesConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListDatabaseSoftwareImagesConverter.java @@ -113,6 +113,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getPatchSetGreaterThanOrEqualTo())); } + if (request.getDbSystemId() != null) { + target = + target.queryParam( + "dbSystemId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDbSystemId())); + } + if (request.getIsUpgradeSupported() != null) { target = target.queryParam( diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClustersConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClustersConverter.java index 635839619d..fa95268c8f 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClustersConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClustersConverter.java @@ -88,6 +88,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getExascaleDbStorageVaultId())); } + if (request.getClusterPlacementGroupId() != null) { + target = + target.queryParam( + "clusterPlacementGroupId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getClusterPlacementGroupId())); + } + if (request.getDisplayName() != null) { target = target.queryParam( diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExascaleDbStorageVaultsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExascaleDbStorageVaultsConverter.java index 6ce5322527..5d1ca863d3 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExascaleDbStorageVaultsConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExascaleDbStorageVaultsConverter.java @@ -81,6 +81,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getLifecycleState().getValue())); } + if (request.getClusterPlacementGroupId() != null) { + target = + target.queryParam( + "clusterPlacementGroupId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getClusterPlacementGroupId())); + } + if (request.getDisplayName() != null) { target = target.queryParam( diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListVmClustersConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListVmClustersConverter.java index a32d279581..12dba1ff75 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListVmClustersConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListVmClustersConverter.java @@ -96,6 +96,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getDisplayName())); } + if (request.getVmClusterType() != null) { + target = + target.queryParam( + "vmClusterType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getVmClusterType().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/internal/http/MigrateAutonomousContainerDatabaseDataguardAssociationConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/MigrateAutonomousContainerDatabaseDataguardAssociationConverter.java new file mode 100644 index 0000000000..72ed95befb --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/MigrateAutonomousContainerDatabaseDataguardAssociationConverter.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 MigrateAutonomousContainerDatabaseDataguardAssociationConverter { + 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( + MigrateAutonomousContainerDatabaseDataguardAssociationConverter.class); + + public static com.oracle.bmc.database.requests + .MigrateAutonomousContainerDatabaseDataguardAssociationRequest + interceptRequest( + com.oracle.bmc.database.requests + .MigrateAutonomousContainerDatabaseDataguardAssociationRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests + .MigrateAutonomousContainerDatabaseDataguardAssociationRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousContainerDatabaseId(), + "autonomousContainerDatabaseId must not be blank"); + Validate.notBlank( + request.getAutonomousContainerDatabaseDataguardAssociationId(), + "autonomousContainerDatabaseDataguardAssociationId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousContainerDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousContainerDatabaseId())) + .path("autonomousContainerDatabaseDataguardAssociations") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request + .getAutonomousContainerDatabaseDataguardAssociationId())) + .path("actions") + .path("migrate"); + + 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.database.responses + .MigrateAutonomousContainerDatabaseDataguardAssociationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .MigrateAutonomousContainerDatabaseDataguardAssociationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .MigrateAutonomousContainerDatabaseDataguardAssociationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .MigrateAutonomousContainerDatabaseDataguardAssociationResponse>() { + @Override + public com.oracle.bmc.database.responses + .MigrateAutonomousContainerDatabaseDataguardAssociationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.MigrateAutonomousContainerDatabaseDataguardAssociationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabaseDataguardAssociation>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabaseDataguardAssociation + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabaseDataguardAssociation + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabaseDataguardAssociation> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .MigrateAutonomousContainerDatabaseDataguardAssociationResponse + .Builder + builder = + com.oracle.bmc.database.responses + .MigrateAutonomousContainerDatabaseDataguardAssociationResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.autonomousContainerDatabaseDataguardAssociation( + 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.database.responses + .MigrateAutonomousContainerDatabaseDataguardAssociationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ReinstateAutonomousContainerDatabaseDataguardConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ReinstateAutonomousContainerDatabaseDataguardConverter.java new file mode 100644 index 0000000000..56df1785eb --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ReinstateAutonomousContainerDatabaseDataguardConverter.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 ReinstateAutonomousContainerDatabaseDataguardConverter { + 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( + ReinstateAutonomousContainerDatabaseDataguardConverter.class); + + public static com.oracle.bmc.database.requests + .ReinstateAutonomousContainerDatabaseDataguardRequest + interceptRequest( + com.oracle.bmc.database.requests + .ReinstateAutonomousContainerDatabaseDataguardRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ReinstateAutonomousContainerDatabaseDataguardRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousContainerDatabaseId(), + "autonomousContainerDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousContainerDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousContainerDatabaseId())) + .path("actions") + .path("reinstate"); + + 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.database.responses + .ReinstateAutonomousContainerDatabaseDataguardResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ReinstateAutonomousContainerDatabaseDataguardResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ReinstateAutonomousContainerDatabaseDataguardResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ReinstateAutonomousContainerDatabaseDataguardResponse>() { + @Override + public com.oracle.bmc.database.responses + .ReinstateAutonomousContainerDatabaseDataguardResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ReinstateAutonomousContainerDatabaseDataguardResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ReinstateAutonomousContainerDatabaseDataguardResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ReinstateAutonomousContainerDatabaseDataguardResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.autonomousContainerDatabase(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.database.responses + .ReinstateAutonomousContainerDatabaseDataguardResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/SwitchoverAutonomousContainerDatabaseDataguardConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/SwitchoverAutonomousContainerDatabaseDataguardConverter.java new file mode 100644 index 0000000000..0ae92ac6c1 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/SwitchoverAutonomousContainerDatabaseDataguardConverter.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 SwitchoverAutonomousContainerDatabaseDataguardConverter { + 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( + SwitchoverAutonomousContainerDatabaseDataguardConverter.class); + + public static com.oracle.bmc.database.requests + .SwitchoverAutonomousContainerDatabaseDataguardRequest + interceptRequest( + com.oracle.bmc.database.requests + .SwitchoverAutonomousContainerDatabaseDataguardRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.SwitchoverAutonomousContainerDatabaseDataguardRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousContainerDatabaseId(), + "autonomousContainerDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousContainerDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousContainerDatabaseId())) + .path("actions") + .path("switchover"); + + 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.database.responses + .SwitchoverAutonomousContainerDatabaseDataguardResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .SwitchoverAutonomousContainerDatabaseDataguardResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .SwitchoverAutonomousContainerDatabaseDataguardResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .SwitchoverAutonomousContainerDatabaseDataguardResponse>() { + @Override + public com.oracle.bmc.database.responses + .SwitchoverAutonomousContainerDatabaseDataguardResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.SwitchoverAutonomousContainerDatabaseDataguardResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .AutonomousContainerDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .AutonomousContainerDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .SwitchoverAutonomousContainerDatabaseDataguardResponse + .Builder + builder = + com.oracle.bmc.database.responses + .SwitchoverAutonomousContainerDatabaseDataguardResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.autonomousContainerDatabase(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.database.responses + .SwitchoverAutonomousContainerDatabaseDataguardResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateBackupConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateBackupConverter.java new file mode 100644 index 0000000000..49a28ccde8 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateBackupConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 UpdateBackupConverter { + 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(UpdateBackupConverter.class); + + public static com.oracle.bmc.database.requests.UpdateBackupRequest interceptRequest( + com.oracle.bmc.database.requests.UpdateBackupRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.UpdateBackupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getBackupId(), "backupId must not be blank"); + Validate.notNull(request.getUpdateBackupDetails(), "updateBackupDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("backups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBackupId())); + + 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.database.responses.UpdateBackupResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateBackupResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateBackupResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateBackupResponse>() { + @Override + public com.oracle.bmc.database.responses.UpdateBackupResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.UpdateBackupResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.Backup>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.Backup.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.Backup.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.Backup> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.UpdateBackupResponse.Builder + builder = + com.oracle.bmc.database.responses + .UpdateBackupResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.backup(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> 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.database.responses.UpdateBackupResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AddStandbyAutonomousContainerDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AddStandbyAutonomousContainerDatabaseDetails.java new file mode 100644 index 0000000000..b630525465 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AddStandbyAutonomousContainerDatabaseDetails.java @@ -0,0 +1,639 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * Create Standby Autonomous Container Database to an existing Autonomous Container 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: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AddStandbyAutonomousContainerDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AddStandbyAutonomousContainerDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "fastStartFailOverLagLimitInSeconds", + "isAutomaticFailoverEnabled", + "peerAutonomousContainerDatabaseBackupConfig", + "peerAutonomousContainerDatabaseCompartmentId", + "peerAutonomousContainerDatabaseDisplayName", + "peerCloudAutonomousVmClusterId", + "peerAutonomousVmClusterId", + "peerDbUniqueName", + "protectionMode", + "standbyMaintenanceBufferInDays" + }) + public AddStandbyAutonomousContainerDatabaseDetails( + Integer fastStartFailOverLagLimitInSeconds, + Boolean isAutomaticFailoverEnabled, + PeerAutonomousContainerDatabaseBackupConfig peerAutonomousContainerDatabaseBackupConfig, + String peerAutonomousContainerDatabaseCompartmentId, + String peerAutonomousContainerDatabaseDisplayName, + String peerCloudAutonomousVmClusterId, + String peerAutonomousVmClusterId, + String peerDbUniqueName, + ProtectionMode protectionMode, + Integer standbyMaintenanceBufferInDays) { + super(); + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.isAutomaticFailoverEnabled = isAutomaticFailoverEnabled; + this.peerAutonomousContainerDatabaseBackupConfig = + peerAutonomousContainerDatabaseBackupConfig; + this.peerAutonomousContainerDatabaseCompartmentId = + peerAutonomousContainerDatabaseCompartmentId; + this.peerAutonomousContainerDatabaseDisplayName = + peerAutonomousContainerDatabaseDisplayName; + this.peerCloudAutonomousVmClusterId = peerCloudAutonomousVmClusterId; + this.peerAutonomousVmClusterId = peerAutonomousVmClusterId; + this.peerDbUniqueName = peerDbUniqueName; + this.protectionMode = protectionMode; + this.standbyMaintenanceBufferInDays = standbyMaintenanceBufferInDays; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The lag time for my preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time for my 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; + } + /** + * Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutomaticFailoverEnabled") + private Boolean isAutomaticFailoverEnabled; + + /** + * Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + * + * @param isAutomaticFailoverEnabled the value to set + * @return this builder + **/ + public Builder isAutomaticFailoverEnabled(Boolean isAutomaticFailoverEnabled) { + this.isAutomaticFailoverEnabled = isAutomaticFailoverEnabled; + this.__explicitlySet__.add("isAutomaticFailoverEnabled"); + 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; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the standby Autonomous Container Database + * will be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty( + "peerAutonomousContainerDatabaseCompartmentId") + private String peerAutonomousContainerDatabaseCompartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the standby Autonomous Container Database + * will be created. + * + * @param peerAutonomousContainerDatabaseCompartmentId the value to set + * @return this builder + **/ + public Builder peerAutonomousContainerDatabaseCompartmentId( + String peerAutonomousContainerDatabaseCompartmentId) { + this.peerAutonomousContainerDatabaseCompartmentId = + peerAutonomousContainerDatabaseCompartmentId; + this.__explicitlySet__.add("peerAutonomousContainerDatabaseCompartmentId"); + return this; + } + /** + * The display name for the peer Autonomous Container Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerAutonomousContainerDatabaseDisplayName") + private String peerAutonomousContainerDatabaseDisplayName; + + /** + * The display name for the peer Autonomous Container Database. + * @param peerAutonomousContainerDatabaseDisplayName the value to set + * @return this builder + **/ + public Builder peerAutonomousContainerDatabaseDisplayName( + String peerAutonomousContainerDatabaseDisplayName) { + this.peerAutonomousContainerDatabaseDisplayName = + peerAutonomousContainerDatabaseDisplayName; + this.__explicitlySet__.add("peerAutonomousContainerDatabaseDisplayName"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the peer cloud Autonomous Exadata VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerCloudAutonomousVmClusterId") + private String peerCloudAutonomousVmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the peer cloud Autonomous Exadata VM Cluster. + * @param peerCloudAutonomousVmClusterId the value to set + * @return this builder + **/ + public Builder peerCloudAutonomousVmClusterId(String peerCloudAutonomousVmClusterId) { + this.peerCloudAutonomousVmClusterId = peerCloudAutonomousVmClusterId; + this.__explicitlySet__.add("peerCloudAutonomousVmClusterId"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the peer Autonomous Exadata VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerAutonomousVmClusterId") + private String peerAutonomousVmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the peer Autonomous Exadata VM Cluster. + * @param peerAutonomousVmClusterId the value to set + * @return this builder + **/ + public Builder peerAutonomousVmClusterId(String peerAutonomousVmClusterId) { + this.peerAutonomousVmClusterId = peerAutonomousVmClusterId; + this.__explicitlySet__.add("peerAutonomousVmClusterId"); + return this; + } + /** + * Specifies the {@code DB_UNIQUE_NAME} of the peer database to be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerDbUniqueName") + private String peerDbUniqueName; + + /** + * Specifies the {@code DB_UNIQUE_NAME} of the peer database to be created. + * + * @param peerDbUniqueName the value to set + * @return this builder + **/ + public Builder peerDbUniqueName(String peerDbUniqueName) { + this.peerDbUniqueName = peerDbUniqueName; + this.__explicitlySet__.add("peerDbUniqueName"); + return this; + } + /** + * 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. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private ProtectionMode protectionMode; + + /** + * 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. + * + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(ProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + 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 AddStandbyAutonomousContainerDatabaseDetails build() { + AddStandbyAutonomousContainerDatabaseDetails model = + new AddStandbyAutonomousContainerDatabaseDetails( + this.fastStartFailOverLagLimitInSeconds, + this.isAutomaticFailoverEnabled, + this.peerAutonomousContainerDatabaseBackupConfig, + this.peerAutonomousContainerDatabaseCompartmentId, + this.peerAutonomousContainerDatabaseDisplayName, + this.peerCloudAutonomousVmClusterId, + this.peerAutonomousVmClusterId, + this.peerDbUniqueName, + this.protectionMode, + this.standbyMaintenanceBufferInDays); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AddStandbyAutonomousContainerDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("fastStartFailOverLagLimitInSeconds")) { + this.fastStartFailOverLagLimitInSeconds( + model.getFastStartFailOverLagLimitInSeconds()); + } + if (model.wasPropertyExplicitlySet("isAutomaticFailoverEnabled")) { + this.isAutomaticFailoverEnabled(model.getIsAutomaticFailoverEnabled()); + } + if (model.wasPropertyExplicitlySet("peerAutonomousContainerDatabaseBackupConfig")) { + this.peerAutonomousContainerDatabaseBackupConfig( + model.getPeerAutonomousContainerDatabaseBackupConfig()); + } + if (model.wasPropertyExplicitlySet("peerAutonomousContainerDatabaseCompartmentId")) { + this.peerAutonomousContainerDatabaseCompartmentId( + model.getPeerAutonomousContainerDatabaseCompartmentId()); + } + if (model.wasPropertyExplicitlySet("peerAutonomousContainerDatabaseDisplayName")) { + this.peerAutonomousContainerDatabaseDisplayName( + model.getPeerAutonomousContainerDatabaseDisplayName()); + } + if (model.wasPropertyExplicitlySet("peerCloudAutonomousVmClusterId")) { + this.peerCloudAutonomousVmClusterId(model.getPeerCloudAutonomousVmClusterId()); + } + if (model.wasPropertyExplicitlySet("peerAutonomousVmClusterId")) { + this.peerAutonomousVmClusterId(model.getPeerAutonomousVmClusterId()); + } + if (model.wasPropertyExplicitlySet("peerDbUniqueName")) { + this.peerDbUniqueName(model.getPeerDbUniqueName()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + 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); + } + + /** + * The lag time for my preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private final Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time for my preference based on data loss tolerance in seconds. + * @return the value + **/ + public Integer getFastStartFailOverLagLimitInSeconds() { + return fastStartFailOverLagLimitInSeconds; + } + + /** + * Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutomaticFailoverEnabled") + private final Boolean isAutomaticFailoverEnabled; + + /** + * Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + * + * @return the value + **/ + public Boolean getIsAutomaticFailoverEnabled() { + return isAutomaticFailoverEnabled; + } + + @com.fasterxml.jackson.annotation.JsonProperty("peerAutonomousContainerDatabaseBackupConfig") + private final PeerAutonomousContainerDatabaseBackupConfig + peerAutonomousContainerDatabaseBackupConfig; + + public PeerAutonomousContainerDatabaseBackupConfig + getPeerAutonomousContainerDatabaseBackupConfig() { + return peerAutonomousContainerDatabaseBackupConfig; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the standby Autonomous Container Database + * will be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerAutonomousContainerDatabaseCompartmentId") + private final String peerAutonomousContainerDatabaseCompartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the standby Autonomous Container Database + * will be created. + * + * @return the value + **/ + public String getPeerAutonomousContainerDatabaseCompartmentId() { + return peerAutonomousContainerDatabaseCompartmentId; + } + + /** + * The display name for the peer Autonomous Container Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerAutonomousContainerDatabaseDisplayName") + private final String peerAutonomousContainerDatabaseDisplayName; + + /** + * The display name for the peer Autonomous Container Database. + * @return the value + **/ + public String getPeerAutonomousContainerDatabaseDisplayName() { + return peerAutonomousContainerDatabaseDisplayName; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the peer cloud Autonomous Exadata VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerCloudAutonomousVmClusterId") + private final String peerCloudAutonomousVmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the peer cloud Autonomous Exadata VM Cluster. + * @return the value + **/ + public String getPeerCloudAutonomousVmClusterId() { + return peerCloudAutonomousVmClusterId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the peer Autonomous Exadata VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerAutonomousVmClusterId") + private final String peerAutonomousVmClusterId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the peer Autonomous Exadata VM Cluster. + * @return the value + **/ + public String getPeerAutonomousVmClusterId() { + return peerAutonomousVmClusterId; + } + + /** + * Specifies the {@code DB_UNIQUE_NAME} of the peer database to be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerDbUniqueName") + private final String peerDbUniqueName; + + /** + * Specifies the {@code DB_UNIQUE_NAME} of the peer database to be created. + * + * @return the value + **/ + public String getPeerDbUniqueName() { + return peerDbUniqueName; + } + + /** + * 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. + * + **/ + public enum ProtectionMode { + MaximumAvailability("MAXIMUM_AVAILABILITY"), + MaximumPerformance("MAXIMUM_PERFORMANCE"), + ; + + 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 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. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final ProtectionMode protectionMode; + + /** + * 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. + * + * @return the value + **/ + public ProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * 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("AddStandbyAutonomousContainerDatabaseDetails("); + sb.append("super=").append(super.toString()); + sb.append("fastStartFailOverLagLimitInSeconds=") + .append(String.valueOf(this.fastStartFailOverLagLimitInSeconds)); + sb.append(", isAutomaticFailoverEnabled=") + .append(String.valueOf(this.isAutomaticFailoverEnabled)); + sb.append(", peerAutonomousContainerDatabaseBackupConfig=") + .append(String.valueOf(this.peerAutonomousContainerDatabaseBackupConfig)); + sb.append(", peerAutonomousContainerDatabaseCompartmentId=") + .append(String.valueOf(this.peerAutonomousContainerDatabaseCompartmentId)); + sb.append(", peerAutonomousContainerDatabaseDisplayName=") + .append(String.valueOf(this.peerAutonomousContainerDatabaseDisplayName)); + sb.append(", peerCloudAutonomousVmClusterId=") + .append(String.valueOf(this.peerCloudAutonomousVmClusterId)); + sb.append(", peerAutonomousVmClusterId=") + .append(String.valueOf(this.peerAutonomousVmClusterId)); + sb.append(", peerDbUniqueName=").append(String.valueOf(this.peerDbUniqueName)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + 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 AddStandbyAutonomousContainerDatabaseDetails)) { + return false; + } + + AddStandbyAutonomousContainerDatabaseDetails other = + (AddStandbyAutonomousContainerDatabaseDetails) o; + return java.util.Objects.equals( + this.fastStartFailOverLagLimitInSeconds, + other.fastStartFailOverLagLimitInSeconds) + && java.util.Objects.equals( + this.isAutomaticFailoverEnabled, other.isAutomaticFailoverEnabled) + && java.util.Objects.equals( + this.peerAutonomousContainerDatabaseBackupConfig, + other.peerAutonomousContainerDatabaseBackupConfig) + && java.util.Objects.equals( + this.peerAutonomousContainerDatabaseCompartmentId, + other.peerAutonomousContainerDatabaseCompartmentId) + && java.util.Objects.equals( + this.peerAutonomousContainerDatabaseDisplayName, + other.peerAutonomousContainerDatabaseDisplayName) + && java.util.Objects.equals( + this.peerCloudAutonomousVmClusterId, other.peerCloudAutonomousVmClusterId) + && java.util.Objects.equals( + this.peerAutonomousVmClusterId, other.peerAutonomousVmClusterId) + && java.util.Objects.equals(this.peerDbUniqueName, other.peerDbUniqueName) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals( + this.standbyMaintenanceBufferInDays, other.standbyMaintenanceBufferInDays) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.fastStartFailOverLagLimitInSeconds == null + ? 43 + : this.fastStartFailOverLagLimitInSeconds.hashCode()); + result = + (result * PRIME) + + (this.isAutomaticFailoverEnabled == null + ? 43 + : this.isAutomaticFailoverEnabled.hashCode()); + result = + (result * PRIME) + + (this.peerAutonomousContainerDatabaseBackupConfig == null + ? 43 + : this.peerAutonomousContainerDatabaseBackupConfig.hashCode()); + result = + (result * PRIME) + + (this.peerAutonomousContainerDatabaseCompartmentId == null + ? 43 + : this.peerAutonomousContainerDatabaseCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.peerAutonomousContainerDatabaseDisplayName == null + ? 43 + : this.peerAutonomousContainerDatabaseDisplayName.hashCode()); + result = + (result * PRIME) + + (this.peerCloudAutonomousVmClusterId == null + ? 43 + : this.peerCloudAutonomousVmClusterId.hashCode()); + result = + (result * PRIME) + + (this.peerAutonomousVmClusterId == null + ? 43 + : this.peerAutonomousVmClusterId.hashCode()); + result = + (result * PRIME) + + (this.peerDbUniqueName == null ? 43 : this.peerDbUniqueName.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.standbyMaintenanceBufferInDays == null + ? 43 + : this.standbyMaintenanceBufferInDays.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ApplicationVip.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ApplicationVip.java index c480be2cda..16419bee74 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/ApplicationVip.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ApplicationVip.java @@ -25,6 +25,7 @@ public final class ApplicationVip extends com.oracle.bmc.http.internal.Explicitl "compartmentId", "subnetId", "ipAddress", + "ipv6Address", "hostnameLabel", "lifecycleState", "lifecycleDetails", @@ -38,6 +39,7 @@ public ApplicationVip( String compartmentId, String subnetId, String ipAddress, + String ipv6Address, String hostnameLabel, LifecycleState lifecycleState, String lifecycleDetails, @@ -50,6 +52,7 @@ public ApplicationVip( this.compartmentId = compartmentId; this.subnetId = subnetId; this.ipAddress = ipAddress; + this.ipv6Address = ipv6Address; this.hostnameLabel = hostnameLabel; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; @@ -125,13 +128,13 @@ public Builder subnetId(String subnetId) { return this; } /** - * The application virtual IP (VIP) address. + * The application virtual IP (VIP) IPv4 address. **/ @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") private String ipAddress; /** - * The application virtual IP (VIP) address. + * The application virtual IP (VIP) IPv4 address. * @param ipAddress the value to set * @return this builder **/ @@ -140,6 +143,22 @@ public Builder ipAddress(String ipAddress) { this.__explicitlySet__.add("ipAddress"); return this; } + /** + * The application virtual IP (VIP) IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6Address") + private String ipv6Address; + + /** + * The application virtual IP (VIP) IPv6 address. + * @param ipv6Address the value to set + * @return this builder + **/ + public Builder ipv6Address(String ipv6Address) { + this.ipv6Address = ipv6Address; + this.__explicitlySet__.add("ipv6Address"); + return this; + } /** * The hostname of the application virtual IP (VIP) address. **/ @@ -261,6 +280,7 @@ public ApplicationVip build() { this.compartmentId, this.subnetId, this.ipAddress, + this.ipv6Address, this.hostnameLabel, this.lifecycleState, this.lifecycleDetails, @@ -290,6 +310,9 @@ public Builder copy(ApplicationVip model) { if (model.wasPropertyExplicitlySet("ipAddress")) { this.ipAddress(model.getIpAddress()); } + if (model.wasPropertyExplicitlySet("ipv6Address")) { + this.ipv6Address(model.getIpv6Address()); + } if (model.wasPropertyExplicitlySet("hostnameLabel")) { this.hostnameLabel(model.getHostnameLabel()); } @@ -380,19 +403,33 @@ public String getSubnetId() { } /** - * The application virtual IP (VIP) address. + * The application virtual IP (VIP) IPv4 address. **/ @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") private final String ipAddress; /** - * The application virtual IP (VIP) address. + * The application virtual IP (VIP) IPv4 address. * @return the value **/ public String getIpAddress() { return ipAddress; } + /** + * The application virtual IP (VIP) IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6Address") + private final String ipv6Address; + + /** + * The application virtual IP (VIP) IPv6 address. + * @return the value + **/ + public String getIpv6Address() { + return ipv6Address; + } + /** * The hostname of the application virtual IP (VIP) address. **/ @@ -559,6 +596,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", ipAddress=").append(String.valueOf(this.ipAddress)); + sb.append(", ipv6Address=").append(String.valueOf(this.ipv6Address)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); @@ -584,6 +622,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.ipAddress, other.ipAddress) + && java.util.Objects.equals(this.ipv6Address, other.ipv6Address) && java.util.Objects.equals(this.hostnameLabel, other.hostnameLabel) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) @@ -606,6 +645,7 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); result = (result * PRIME) + (this.ipAddress == null ? 43 : this.ipAddress.hashCode()); + result = (result * PRIME) + (this.ipv6Address == null ? 43 : this.ipv6Address.hashCode()); result = (result * PRIME) + (this.hostnameLabel == null ? 43 : this.hostnameLabel.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ApplicationVipSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ApplicationVipSummary.java index 389ce23baf..8da200aa96 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/ApplicationVipSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ApplicationVipSummary.java @@ -29,6 +29,7 @@ public final class ApplicationVipSummary "compartmentId", "subnetId", "ipAddress", + "ipv6Address", "hostnameLabel", "lifecycleState", "lifecycleDetails", @@ -42,6 +43,7 @@ public ApplicationVipSummary( String compartmentId, String subnetId, String ipAddress, + String ipv6Address, String hostnameLabel, LifecycleState lifecycleState, String lifecycleDetails, @@ -54,6 +56,7 @@ public ApplicationVipSummary( this.compartmentId = compartmentId; this.subnetId = subnetId; this.ipAddress = ipAddress; + this.ipv6Address = ipv6Address; this.hostnameLabel = hostnameLabel; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; @@ -129,13 +132,13 @@ public Builder subnetId(String subnetId) { return this; } /** - * The application virtual IP (VIP) address. + * The application virtual IP (VIP) IPv4 address. **/ @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") private String ipAddress; /** - * The application virtual IP (VIP) address. + * The application virtual IP (VIP) IPv4 address. * @param ipAddress the value to set * @return this builder **/ @@ -144,6 +147,22 @@ public Builder ipAddress(String ipAddress) { this.__explicitlySet__.add("ipAddress"); return this; } + /** + * The application virtual IP (VIP) IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6Address") + private String ipv6Address; + + /** + * The application virtual IP (VIP) IPv6 address. + * @param ipv6Address the value to set + * @return this builder + **/ + public Builder ipv6Address(String ipv6Address) { + this.ipv6Address = ipv6Address; + this.__explicitlySet__.add("ipv6Address"); + return this; + } /** * The hostname of the application virtual IP (VIP) address. **/ @@ -265,6 +284,7 @@ public ApplicationVipSummary build() { this.compartmentId, this.subnetId, this.ipAddress, + this.ipv6Address, this.hostnameLabel, this.lifecycleState, this.lifecycleDetails, @@ -294,6 +314,9 @@ public Builder copy(ApplicationVipSummary model) { if (model.wasPropertyExplicitlySet("ipAddress")) { this.ipAddress(model.getIpAddress()); } + if (model.wasPropertyExplicitlySet("ipv6Address")) { + this.ipv6Address(model.getIpv6Address()); + } if (model.wasPropertyExplicitlySet("hostnameLabel")) { this.hostnameLabel(model.getHostnameLabel()); } @@ -384,19 +407,33 @@ public String getSubnetId() { } /** - * The application virtual IP (VIP) address. + * The application virtual IP (VIP) IPv4 address. **/ @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") private final String ipAddress; /** - * The application virtual IP (VIP) address. + * The application virtual IP (VIP) IPv4 address. * @return the value **/ public String getIpAddress() { return ipAddress; } + /** + * The application virtual IP (VIP) IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6Address") + private final String ipv6Address; + + /** + * The application virtual IP (VIP) IPv6 address. + * @return the value + **/ + public String getIpv6Address() { + return ipv6Address; + } + /** * The hostname of the application virtual IP (VIP) address. **/ @@ -563,6 +600,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", ipAddress=").append(String.valueOf(this.ipAddress)); + sb.append(", ipv6Address=").append(String.valueOf(this.ipv6Address)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); @@ -588,6 +626,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.ipAddress, other.ipAddress) + && java.util.Objects.equals(this.ipv6Address, other.ipv6Address) && java.util.Objects.equals(this.hostnameLabel, other.hostnameLabel) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) @@ -610,6 +649,7 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); result = (result * PRIME) + (this.ipAddress == null ? 43 : this.ipAddress.hashCode()); + result = (result * PRIME) + (this.ipv6Address == null ? 43 : this.ipv6Address.hashCode()); result = (result * PRIME) + (this.hostnameLabel == null ? 43 : this.hostnameLabel.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabase.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabase.java index 914b9d5f77..a769ff3850 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabase.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabase.java @@ -75,7 +75,11 @@ public final class AutonomousContainerDatabase "dbSplitThreshold", "vmFailoverReservation", "distributionAffinity", - "netServicesArchitecture" + "netServicesArchitecture", + "isMultipleStandby", + "isDataGuardEnabled", + "dataguard", + "dataguardGroupMembers" }) public AutonomousContainerDatabase( String id, @@ -131,7 +135,11 @@ public AutonomousContainerDatabase( Integer dbSplitThreshold, Integer vmFailoverReservation, DistributionAffinity distributionAffinity, - NetServicesArchitecture netServicesArchitecture) { + NetServicesArchitecture netServicesArchitecture, + Boolean isMultipleStandby, + Boolean isDataGuardEnabled, + AutonomousContainerDatabaseDataguard dataguard, + java.util.List dataguardGroupMembers) { super(); this.id = id; this.compartmentId = compartmentId; @@ -187,6 +195,10 @@ public AutonomousContainerDatabase( this.vmFailoverReservation = vmFailoverReservation; this.distributionAffinity = distributionAffinity; this.netServicesArchitecture = netServicesArchitecture; + this.isMultipleStandby = isMultipleStandby; + this.isDataGuardEnabled = isDataGuardEnabled; + this.dataguard = dataguard; + this.dataguardGroupMembers = dataguardGroupMembers; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -1064,6 +1076,68 @@ public Builder netServicesArchitecture(NetServicesArchitecture netServicesArchit this.__explicitlySet__.add("netServicesArchitecture"); return this; } + /** + * Whether it is multiple standby Autonomous Dataguard + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMultipleStandby") + private Boolean isMultipleStandby; + + /** + * Whether it is multiple standby Autonomous Dataguard + * + * @param isMultipleStandby the value to set + * @return this builder + **/ + public Builder isMultipleStandby(Boolean isMultipleStandby) { + this.isMultipleStandby = isMultipleStandby; + this.__explicitlySet__.add("isMultipleStandby"); + return this; + } + /** + * **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDataGuardEnabled") + private Boolean isDataGuardEnabled; + + /** + * **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. + * + * @param isDataGuardEnabled the value to set + * @return this builder + **/ + public Builder isDataGuardEnabled(Boolean isDataGuardEnabled) { + this.isDataGuardEnabled = isDataGuardEnabled; + this.__explicitlySet__.add("isDataGuardEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataguard") + private AutonomousContainerDatabaseDataguard dataguard; + + public Builder dataguard(AutonomousContainerDatabaseDataguard dataguard) { + this.dataguard = dataguard; + this.__explicitlySet__.add("dataguard"); + return this; + } + /** + * Array of Dg associations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataguardGroupMembers") + private java.util.List dataguardGroupMembers; + + /** + * Array of Dg associations. + * @param dataguardGroupMembers the value to set + * @return this builder + **/ + public Builder dataguardGroupMembers( + java.util.List dataguardGroupMembers) { + this.dataguardGroupMembers = dataguardGroupMembers; + this.__explicitlySet__.add("dataguardGroupMembers"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -1123,7 +1197,11 @@ public AutonomousContainerDatabase build() { this.dbSplitThreshold, this.vmFailoverReservation, this.distributionAffinity, - this.netServicesArchitecture); + this.netServicesArchitecture, + this.isMultipleStandby, + this.isDataGuardEnabled, + this.dataguard, + this.dataguardGroupMembers); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -1294,6 +1372,18 @@ public Builder copy(AutonomousContainerDatabase model) { if (model.wasPropertyExplicitlySet("netServicesArchitecture")) { this.netServicesArchitecture(model.getNetServicesArchitecture()); } + if (model.wasPropertyExplicitlySet("isMultipleStandby")) { + this.isMultipleStandby(model.getIsMultipleStandby()); + } + if (model.wasPropertyExplicitlySet("isDataGuardEnabled")) { + this.isDataGuardEnabled(model.getIsDataGuardEnabled()); + } + if (model.wasPropertyExplicitlySet("dataguard")) { + this.dataguard(model.getDataguard()); + } + if (model.wasPropertyExplicitlySet("dataguardGroupMembers")) { + this.dataguardGroupMembers(model.getDataguardGroupMembers()); + } return this; } } @@ -2517,6 +2607,59 @@ public NetServicesArchitecture getNetServicesArchitecture() { return netServicesArchitecture; } + /** + * Whether it is multiple standby Autonomous Dataguard + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMultipleStandby") + private final Boolean isMultipleStandby; + + /** + * Whether it is multiple standby Autonomous Dataguard + * + * @return the value + **/ + public Boolean getIsMultipleStandby() { + return isMultipleStandby; + } + + /** + * **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDataGuardEnabled") + private final Boolean isDataGuardEnabled; + + /** + * **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. + * + * @return the value + **/ + public Boolean getIsDataGuardEnabled() { + return isDataGuardEnabled; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataguard") + private final AutonomousContainerDatabaseDataguard dataguard; + + public AutonomousContainerDatabaseDataguard getDataguard() { + return dataguard; + } + + /** + * Array of Dg associations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataguardGroupMembers") + private final java.util.List dataguardGroupMembers; + + /** + * Array of Dg associations. + * @return the value + **/ + public java.util.List getDataguardGroupMembers() { + return dataguardGroupMembers; + } + @Override public String toString() { return this.toString(true); @@ -2595,6 +2738,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", distributionAffinity=").append(String.valueOf(this.distributionAffinity)); sb.append(", netServicesArchitecture=") .append(String.valueOf(this.netServicesArchitecture)); + sb.append(", isMultipleStandby=").append(String.valueOf(this.isMultipleStandby)); + sb.append(", isDataGuardEnabled=").append(String.valueOf(this.isDataGuardEnabled)); + sb.append(", dataguard=").append(String.valueOf(this.dataguard)); + sb.append(", dataguardGroupMembers=").append(String.valueOf(this.dataguardGroupMembers)); sb.append(")"); return sb.toString(); } @@ -2677,6 +2824,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.distributionAffinity, other.distributionAffinity) && java.util.Objects.equals( this.netServicesArchitecture, other.netServicesArchitecture) + && java.util.Objects.equals(this.isMultipleStandby, other.isMultipleStandby) + && java.util.Objects.equals(this.isDataGuardEnabled, other.isDataGuardEnabled) + && java.util.Objects.equals(this.dataguard, other.dataguard) + && java.util.Objects.equals(this.dataguardGroupMembers, other.dataguardGroupMembers) && super.equals(other); } @@ -2847,6 +2998,20 @@ public int hashCode() { + (this.netServicesArchitecture == null ? 43 : this.netServicesArchitecture.hashCode()); + result = + (result * PRIME) + + (this.isMultipleStandby == null ? 43 : this.isMultipleStandby.hashCode()); + result = + (result * PRIME) + + (this.isDataGuardEnabled == null + ? 43 + : this.isDataGuardEnabled.hashCode()); + result = (result * PRIME) + (this.dataguard == null ? 43 : this.dataguard.hashCode()); + result = + (result * PRIME) + + (this.dataguardGroupMembers == null + ? 43 + : this.dataguardGroupMembers.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseDataguard.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseDataguard.java new file mode 100644 index 0000000000..8fcae6b16e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseDataguard.java @@ -0,0 +1,1058 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 that define Autonomous Container Databases Dataguard. + * + *
+ * 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 = AutonomousContainerDatabaseDataguard.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousContainerDatabaseDataguard + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "autonomousContainerDatabaseId", + "role", + "lifecycleState", + "lifecycleDetails", + "protectionMode", + "fastStartFailOverLagLimitInSeconds", + "applyLag", + "applyRate", + "isAutomaticFailoverEnabled", + "transportLag", + "timeLastSynced", + "timeCreated", + "timeLastRoleChanged", + "availabilityDomain", + "timeLagRefreshedOn", + "redoTransportMode", + "automaticFailoverTarget" + }) + public AutonomousContainerDatabaseDataguard( + String autonomousContainerDatabaseId, + Role role, + LifecycleState lifecycleState, + String lifecycleDetails, + ProtectionMode protectionMode, + Integer fastStartFailOverLagLimitInSeconds, + String applyLag, + String applyRate, + Boolean isAutomaticFailoverEnabled, + String transportLag, + java.util.Date timeLastSynced, + java.util.Date timeCreated, + java.util.Date timeLastRoleChanged, + String availabilityDomain, + java.util.Date timeLagRefreshedOn, + String redoTransportMode, + String automaticFailoverTarget) { + super(); + this.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + this.role = role; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.protectionMode = protectionMode; + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + this.applyLag = applyLag; + this.applyRate = applyRate; + this.isAutomaticFailoverEnabled = isAutomaticFailoverEnabled; + this.transportLag = transportLag; + this.timeLastSynced = timeLastSynced; + this.timeCreated = timeCreated; + this.timeLastRoleChanged = timeLastRoleChanged; + this.availabilityDomain = availabilityDomain; + this.timeLagRefreshedOn = timeLagRefreshedOn; + this.redoTransportMode = redoTransportMode; + this.automaticFailoverTarget = automaticFailoverTarget; + } + + @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 Autonomous Container Database that has a relationship with the peer Autonomous Container Database. Used only by Autonomous Database on Dedicated Exadata Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousContainerDatabaseId") + private String autonomousContainerDatabaseId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Autonomous Container Database that has a relationship with the peer Autonomous Container Database. Used only by Autonomous Database on Dedicated Exadata Infrastructure. + * + * @param autonomousContainerDatabaseId the value to set + * @return this builder + **/ + public Builder autonomousContainerDatabaseId(String autonomousContainerDatabaseId) { + this.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + this.__explicitlySet__.add("autonomousContainerDatabaseId"); + return this; + } + /** + * The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private Role role; + + /** + * The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + * + * @param role the value to set + * @return this builder + **/ + public Builder role(Role role) { + this.role = role; + this.__explicitlySet__.add("role"); + return this; + } + /** + * The current state of Autonomous Data Guard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of Autonomous Data Guard. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Additional information about the current lifecycleState, if available. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycleState, if available. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * 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. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private ProtectionMode protectionMode; + + /** + * 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. + * + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(ProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The lag time for my preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time for my 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 lag time between updates to the primary Autonomous Container Database and application of the redo data on the standby Autonomous Container Database, + * as computed by the reporting database. + * Example: {@code 9 seconds} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applyLag") + private String applyLag; + + /** + * The lag time between updates to the primary Autonomous Container Database and application of the redo data on the standby Autonomous Container Database, + * as computed by the reporting database. + * Example: {@code 9 seconds} + * + * @param applyLag the value to set + * @return this builder + **/ + public Builder applyLag(String applyLag) { + this.applyLag = applyLag; + this.__explicitlySet__.add("applyLag"); + return this; + } + /** + * The rate at which redo logs are synchronized between the associated Autonomous Container Databases. + * Example: {@code 180 Mb per second} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applyRate") + private String applyRate; + + /** + * The rate at which redo logs are synchronized between the associated Autonomous Container Databases. + * Example: {@code 180 Mb per second} + * + * @param applyRate the value to set + * @return this builder + **/ + public Builder applyRate(String applyRate) { + this.applyRate = applyRate; + this.__explicitlySet__.add("applyRate"); + return this; + } + /** + * Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutomaticFailoverEnabled") + private Boolean isAutomaticFailoverEnabled; + + /** + * Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + * + * @param isAutomaticFailoverEnabled the value to set + * @return this builder + **/ + public Builder isAutomaticFailoverEnabled(Boolean isAutomaticFailoverEnabled) { + this.isAutomaticFailoverEnabled = isAutomaticFailoverEnabled; + this.__explicitlySet__.add("isAutomaticFailoverEnabled"); + return this; + } + /** + * The approximate number of seconds of redo data not yet available on the standby Autonomous Container Database, + * as computed by the reporting database. + * Example: {@code 7 seconds} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportLag") + private String transportLag; + + /** + * The approximate number of seconds of redo data not yet available on the standby Autonomous Container Database, + * as computed by the reporting database. + * Example: {@code 7 seconds} + * + * @param transportLag the value to set + * @return this builder + **/ + public Builder transportLag(String transportLag) { + this.transportLag = transportLag; + this.__explicitlySet__.add("transportLag"); + return this; + } + /** + * The date and time of the last update to the apply lag, apply rate, and transport lag values. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastSynced") + private java.util.Date timeLastSynced; + + /** + * The date and time of the last update to the apply lag, apply rate, and transport lag values. + * @param timeLastSynced the value to set + * @return this builder + **/ + public Builder timeLastSynced(java.util.Date timeLastSynced) { + this.timeLastSynced = timeLastSynced; + this.__explicitlySet__.add("timeLastSynced"); + return this; + } + /** + * The date and time the Autonomous DataGuard association was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the Autonomous DataGuard association was created. + * @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 when the last role change action happened. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastRoleChanged") + private java.util.Date timeLastRoleChanged; + + /** + * The date and time when the last role change action happened. + * @param timeLastRoleChanged the value to set + * @return this builder + **/ + public Builder timeLastRoleChanged(java.util.Date timeLastRoleChanged) { + this.timeLastRoleChanged = timeLastRoleChanged; + this.__explicitlySet__.add("timeLastRoleChanged"); + return this; + } + /** + * The domain of the Autonomous Container Database + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The domain of the Autonomous Container Database + * + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * Timestamp when the lags were last calculated for a standby. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLagRefreshedOn") + private java.util.Date timeLagRefreshedOn; + + /** + * Timestamp when the lags were last calculated for a standby. + * @param timeLagRefreshedOn the value to set + * @return this builder + **/ + public Builder timeLagRefreshedOn(java.util.Date timeLagRefreshedOn) { + this.timeLagRefreshedOn = timeLagRefreshedOn; + this.__explicitlySet__.add("timeLagRefreshedOn"); + return this; + } + /** + * Automatically selected by backend based on the protection mode. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("redoTransportMode") + private String redoTransportMode; + + /** + * Automatically selected by backend based on the protection mode. + * + * @param redoTransportMode the value to set + * @return this builder + **/ + public Builder redoTransportMode(String redoTransportMode) { + this.redoTransportMode = redoTransportMode; + this.__explicitlySet__.add("redoTransportMode"); + return this; + } + /** + * Automatically selected by backend when observer is enabled. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("automaticFailoverTarget") + private String automaticFailoverTarget; + + /** + * Automatically selected by backend when observer is enabled. + * + * @param automaticFailoverTarget the value to set + * @return this builder + **/ + public Builder automaticFailoverTarget(String automaticFailoverTarget) { + this.automaticFailoverTarget = automaticFailoverTarget; + this.__explicitlySet__.add("automaticFailoverTarget"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousContainerDatabaseDataguard build() { + AutonomousContainerDatabaseDataguard model = + new AutonomousContainerDatabaseDataguard( + this.autonomousContainerDatabaseId, + this.role, + this.lifecycleState, + this.lifecycleDetails, + this.protectionMode, + this.fastStartFailOverLagLimitInSeconds, + this.applyLag, + this.applyRate, + this.isAutomaticFailoverEnabled, + this.transportLag, + this.timeLastSynced, + this.timeCreated, + this.timeLastRoleChanged, + this.availabilityDomain, + this.timeLagRefreshedOn, + this.redoTransportMode, + this.automaticFailoverTarget); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousContainerDatabaseDataguard model) { + if (model.wasPropertyExplicitlySet("autonomousContainerDatabaseId")) { + this.autonomousContainerDatabaseId(model.getAutonomousContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("role")) { + this.role(model.getRole()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("fastStartFailOverLagLimitInSeconds")) { + this.fastStartFailOverLagLimitInSeconds( + model.getFastStartFailOverLagLimitInSeconds()); + } + if (model.wasPropertyExplicitlySet("applyLag")) { + this.applyLag(model.getApplyLag()); + } + if (model.wasPropertyExplicitlySet("applyRate")) { + this.applyRate(model.getApplyRate()); + } + if (model.wasPropertyExplicitlySet("isAutomaticFailoverEnabled")) { + this.isAutomaticFailoverEnabled(model.getIsAutomaticFailoverEnabled()); + } + if (model.wasPropertyExplicitlySet("transportLag")) { + this.transportLag(model.getTransportLag()); + } + if (model.wasPropertyExplicitlySet("timeLastSynced")) { + this.timeLastSynced(model.getTimeLastSynced()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeLastRoleChanged")) { + this.timeLastRoleChanged(model.getTimeLastRoleChanged()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("timeLagRefreshedOn")) { + this.timeLagRefreshedOn(model.getTimeLagRefreshedOn()); + } + if (model.wasPropertyExplicitlySet("redoTransportMode")) { + this.redoTransportMode(model.getRedoTransportMode()); + } + if (model.wasPropertyExplicitlySet("automaticFailoverTarget")) { + this.automaticFailoverTarget(model.getAutomaticFailoverTarget()); + } + 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 Autonomous Container Database that has a relationship with the peer Autonomous Container Database. Used only by Autonomous Database on Dedicated Exadata Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousContainerDatabaseId") + private final String autonomousContainerDatabaseId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Autonomous Container Database that has a relationship with the peer Autonomous Container Database. Used only by Autonomous Database on Dedicated Exadata Infrastructure. + * + * @return the value + **/ + public String getAutonomousContainerDatabaseId() { + return autonomousContainerDatabaseId; + } + + /** + * The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + * + **/ + public enum Role { + Primary("PRIMARY"), + Standby("STANDBY"), + DisabledStandby("DISABLED_STANDBY"), + BackupCopy("BACKUP_COPY"), + SnapshotStandby("SNAPSHOT_STANDBY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Role.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Role v : Role.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Role(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Role create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Role', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private final Role role; + + /** + * The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + * + * @return the value + **/ + public Role getRole() { + return role; + } + + /** + * The current state of Autonomous Data Guard. + **/ + public enum LifecycleState { + Provisioning("PROVISIONING"), + Available("AVAILABLE"), + RoleChangeInProgress("ROLE_CHANGE_IN_PROGRESS"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + Failed("FAILED"), + Unavailable("UNAVAILABLE"), + Updating("UPDATING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(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 Autonomous Data Guard. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of Autonomous Data Guard. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Additional information about the current lifecycleState, if available. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycleState, if available. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * 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. + * + **/ + public enum ProtectionMode { + 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(ProtectionMode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ProtectionMode v : ProtectionMode.values()) { + if (v != UnknownEnumValue) { + 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); + } + LOG.warn( + "Received unknown value '{}' for enum 'ProtectionMode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * 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. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final ProtectionMode protectionMode; + + /** + * 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. + * + * @return the value + **/ + public ProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The lag time for my preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private final Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time for my preference based on data loss tolerance in seconds. + * @return the value + **/ + public Integer getFastStartFailOverLagLimitInSeconds() { + return fastStartFailOverLagLimitInSeconds; + } + + /** + * The lag time between updates to the primary Autonomous Container Database and application of the redo data on the standby Autonomous Container Database, + * as computed by the reporting database. + * Example: {@code 9 seconds} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applyLag") + private final String applyLag; + + /** + * The lag time between updates to the primary Autonomous Container Database and application of the redo data on the standby Autonomous Container Database, + * as computed by the reporting database. + * Example: {@code 9 seconds} + * + * @return the value + **/ + public String getApplyLag() { + return applyLag; + } + + /** + * The rate at which redo logs are synchronized between the associated Autonomous Container Databases. + * Example: {@code 180 Mb per second} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applyRate") + private final String applyRate; + + /** + * The rate at which redo logs are synchronized between the associated Autonomous Container Databases. + * Example: {@code 180 Mb per second} + * + * @return the value + **/ + public String getApplyRate() { + return applyRate; + } + + /** + * Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutomaticFailoverEnabled") + private final Boolean isAutomaticFailoverEnabled; + + /** + * Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + * + * @return the value + **/ + public Boolean getIsAutomaticFailoverEnabled() { + return isAutomaticFailoverEnabled; + } + + /** + * The approximate number of seconds of redo data not yet available on the standby Autonomous Container Database, + * as computed by the reporting database. + * Example: {@code 7 seconds} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportLag") + private final String transportLag; + + /** + * The approximate number of seconds of redo data not yet available on the standby Autonomous Container Database, + * as computed by the reporting database. + * Example: {@code 7 seconds} + * + * @return the value + **/ + public String getTransportLag() { + return transportLag; + } + + /** + * The date and time of the last update to the apply lag, apply rate, and transport lag values. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastSynced") + private final java.util.Date timeLastSynced; + + /** + * The date and time of the last update to the apply lag, apply rate, and transport lag values. + * @return the value + **/ + public java.util.Date getTimeLastSynced() { + return timeLastSynced; + } + + /** + * The date and time the Autonomous DataGuard association was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the Autonomous DataGuard association was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time when the last role change action happened. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastRoleChanged") + private final java.util.Date timeLastRoleChanged; + + /** + * The date and time when the last role change action happened. + * @return the value + **/ + public java.util.Date getTimeLastRoleChanged() { + return timeLastRoleChanged; + } + + /** + * The domain of the Autonomous Container Database + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The domain of the Autonomous Container Database + * + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * Timestamp when the lags were last calculated for a standby. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLagRefreshedOn") + private final java.util.Date timeLagRefreshedOn; + + /** + * Timestamp when the lags were last calculated for a standby. + * @return the value + **/ + public java.util.Date getTimeLagRefreshedOn() { + return timeLagRefreshedOn; + } + + /** + * Automatically selected by backend based on the protection mode. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("redoTransportMode") + private final String redoTransportMode; + + /** + * Automatically selected by backend based on the protection mode. + * + * @return the value + **/ + public String getRedoTransportMode() { + return redoTransportMode; + } + + /** + * Automatically selected by backend when observer is enabled. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("automaticFailoverTarget") + private final String automaticFailoverTarget; + + /** + * Automatically selected by backend when observer is enabled. + * + * @return the value + **/ + public String getAutomaticFailoverTarget() { + return automaticFailoverTarget; + } + + @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("AutonomousContainerDatabaseDataguard("); + sb.append("super=").append(super.toString()); + sb.append("autonomousContainerDatabaseId=") + .append(String.valueOf(this.autonomousContainerDatabaseId)); + sb.append(", role=").append(String.valueOf(this.role)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", fastStartFailOverLagLimitInSeconds=") + .append(String.valueOf(this.fastStartFailOverLagLimitInSeconds)); + sb.append(", applyLag=").append(String.valueOf(this.applyLag)); + sb.append(", applyRate=").append(String.valueOf(this.applyRate)); + sb.append(", isAutomaticFailoverEnabled=") + .append(String.valueOf(this.isAutomaticFailoverEnabled)); + sb.append(", transportLag=").append(String.valueOf(this.transportLag)); + sb.append(", timeLastSynced=").append(String.valueOf(this.timeLastSynced)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeLastRoleChanged=").append(String.valueOf(this.timeLastRoleChanged)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", timeLagRefreshedOn=").append(String.valueOf(this.timeLagRefreshedOn)); + sb.append(", redoTransportMode=").append(String.valueOf(this.redoTransportMode)); + sb.append(", automaticFailoverTarget=") + .append(String.valueOf(this.automaticFailoverTarget)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousContainerDatabaseDataguard)) { + return false; + } + + AutonomousContainerDatabaseDataguard other = (AutonomousContainerDatabaseDataguard) o; + return java.util.Objects.equals( + this.autonomousContainerDatabaseId, other.autonomousContainerDatabaseId) + && java.util.Objects.equals(this.role, other.role) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals( + this.fastStartFailOverLagLimitInSeconds, + other.fastStartFailOverLagLimitInSeconds) + && java.util.Objects.equals(this.applyLag, other.applyLag) + && java.util.Objects.equals(this.applyRate, other.applyRate) + && java.util.Objects.equals( + this.isAutomaticFailoverEnabled, other.isAutomaticFailoverEnabled) + && java.util.Objects.equals(this.transportLag, other.transportLag) + && java.util.Objects.equals(this.timeLastSynced, other.timeLastSynced) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeLastRoleChanged, other.timeLastRoleChanged) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.timeLagRefreshedOn, other.timeLagRefreshedOn) + && java.util.Objects.equals(this.redoTransportMode, other.redoTransportMode) + && java.util.Objects.equals( + this.automaticFailoverTarget, other.automaticFailoverTarget) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.autonomousContainerDatabaseId == null + ? 43 + : this.autonomousContainerDatabaseId.hashCode()); + result = (result * PRIME) + (this.role == null ? 43 : this.role.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.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.fastStartFailOverLagLimitInSeconds == null + ? 43 + : this.fastStartFailOverLagLimitInSeconds.hashCode()); + result = (result * PRIME) + (this.applyLag == null ? 43 : this.applyLag.hashCode()); + result = (result * PRIME) + (this.applyRate == null ? 43 : this.applyRate.hashCode()); + result = + (result * PRIME) + + (this.isAutomaticFailoverEnabled == null + ? 43 + : this.isAutomaticFailoverEnabled.hashCode()); + result = (result * PRIME) + (this.transportLag == null ? 43 : this.transportLag.hashCode()); + result = + (result * PRIME) + + (this.timeLastSynced == null ? 43 : this.timeLastSynced.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = + (result * PRIME) + + (this.timeLastRoleChanged == null + ? 43 + : this.timeLastRoleChanged.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.timeLagRefreshedOn == null + ? 43 + : this.timeLagRefreshedOn.hashCode()); + result = + (result * PRIME) + + (this.redoTransportMode == null ? 43 : this.redoTransportMode.hashCode()); + result = + (result * PRIME) + + (this.automaticFailoverTarget == null + ? 43 + : this.automaticFailoverTarget.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseSummary.java index b6026af835..ba4f68683e 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseSummary.java @@ -76,7 +76,11 @@ public final class AutonomousContainerDatabaseSummary "dbSplitThreshold", "vmFailoverReservation", "distributionAffinity", - "netServicesArchitecture" + "netServicesArchitecture", + "isMultipleStandby", + "isDataGuardEnabled", + "dataguard", + "dataguardGroupMembers" }) public AutonomousContainerDatabaseSummary( String id, @@ -132,7 +136,11 @@ public AutonomousContainerDatabaseSummary( Integer dbSplitThreshold, Integer vmFailoverReservation, DistributionAffinity distributionAffinity, - NetServicesArchitecture netServicesArchitecture) { + NetServicesArchitecture netServicesArchitecture, + Boolean isMultipleStandby, + Boolean isDataGuardEnabled, + AutonomousContainerDatabaseDataguard dataguard, + java.util.List dataguardGroupMembers) { super(); this.id = id; this.compartmentId = compartmentId; @@ -188,6 +196,10 @@ public AutonomousContainerDatabaseSummary( this.vmFailoverReservation = vmFailoverReservation; this.distributionAffinity = distributionAffinity; this.netServicesArchitecture = netServicesArchitecture; + this.isMultipleStandby = isMultipleStandby; + this.isDataGuardEnabled = isDataGuardEnabled; + this.dataguard = dataguard; + this.dataguardGroupMembers = dataguardGroupMembers; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -1065,6 +1077,68 @@ public Builder netServicesArchitecture(NetServicesArchitecture netServicesArchit this.__explicitlySet__.add("netServicesArchitecture"); return this; } + /** + * Whether it is multiple standby Autonomous Dataguard + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMultipleStandby") + private Boolean isMultipleStandby; + + /** + * Whether it is multiple standby Autonomous Dataguard + * + * @param isMultipleStandby the value to set + * @return this builder + **/ + public Builder isMultipleStandby(Boolean isMultipleStandby) { + this.isMultipleStandby = isMultipleStandby; + this.__explicitlySet__.add("isMultipleStandby"); + return this; + } + /** + * **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDataGuardEnabled") + private Boolean isDataGuardEnabled; + + /** + * **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. + * + * @param isDataGuardEnabled the value to set + * @return this builder + **/ + public Builder isDataGuardEnabled(Boolean isDataGuardEnabled) { + this.isDataGuardEnabled = isDataGuardEnabled; + this.__explicitlySet__.add("isDataGuardEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataguard") + private AutonomousContainerDatabaseDataguard dataguard; + + public Builder dataguard(AutonomousContainerDatabaseDataguard dataguard) { + this.dataguard = dataguard; + this.__explicitlySet__.add("dataguard"); + return this; + } + /** + * Array of Dg associations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataguardGroupMembers") + private java.util.List dataguardGroupMembers; + + /** + * Array of Dg associations. + * @param dataguardGroupMembers the value to set + * @return this builder + **/ + public Builder dataguardGroupMembers( + java.util.List dataguardGroupMembers) { + this.dataguardGroupMembers = dataguardGroupMembers; + this.__explicitlySet__.add("dataguardGroupMembers"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -1124,7 +1198,11 @@ public AutonomousContainerDatabaseSummary build() { this.dbSplitThreshold, this.vmFailoverReservation, this.distributionAffinity, - this.netServicesArchitecture); + this.netServicesArchitecture, + this.isMultipleStandby, + this.isDataGuardEnabled, + this.dataguard, + this.dataguardGroupMembers); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -1295,6 +1373,18 @@ public Builder copy(AutonomousContainerDatabaseSummary model) { if (model.wasPropertyExplicitlySet("netServicesArchitecture")) { this.netServicesArchitecture(model.getNetServicesArchitecture()); } + if (model.wasPropertyExplicitlySet("isMultipleStandby")) { + this.isMultipleStandby(model.getIsMultipleStandby()); + } + if (model.wasPropertyExplicitlySet("isDataGuardEnabled")) { + this.isDataGuardEnabled(model.getIsDataGuardEnabled()); + } + if (model.wasPropertyExplicitlySet("dataguard")) { + this.dataguard(model.getDataguard()); + } + if (model.wasPropertyExplicitlySet("dataguardGroupMembers")) { + this.dataguardGroupMembers(model.getDataguardGroupMembers()); + } return this; } } @@ -2518,6 +2608,59 @@ public NetServicesArchitecture getNetServicesArchitecture() { return netServicesArchitecture; } + /** + * Whether it is multiple standby Autonomous Dataguard + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMultipleStandby") + private final Boolean isMultipleStandby; + + /** + * Whether it is multiple standby Autonomous Dataguard + * + * @return the value + **/ + public Boolean getIsMultipleStandby() { + return isMultipleStandby; + } + + /** + * **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDataGuardEnabled") + private final Boolean isDataGuardEnabled; + + /** + * **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. + * + * @return the value + **/ + public Boolean getIsDataGuardEnabled() { + return isDataGuardEnabled; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataguard") + private final AutonomousContainerDatabaseDataguard dataguard; + + public AutonomousContainerDatabaseDataguard getDataguard() { + return dataguard; + } + + /** + * Array of Dg associations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataguardGroupMembers") + private final java.util.List dataguardGroupMembers; + + /** + * Array of Dg associations. + * @return the value + **/ + public java.util.List getDataguardGroupMembers() { + return dataguardGroupMembers; + } + @Override public String toString() { return this.toString(true); @@ -2596,6 +2739,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", distributionAffinity=").append(String.valueOf(this.distributionAffinity)); sb.append(", netServicesArchitecture=") .append(String.valueOf(this.netServicesArchitecture)); + sb.append(", isMultipleStandby=").append(String.valueOf(this.isMultipleStandby)); + sb.append(", isDataGuardEnabled=").append(String.valueOf(this.isDataGuardEnabled)); + sb.append(", dataguard=").append(String.valueOf(this.dataguard)); + sb.append(", dataguardGroupMembers=").append(String.valueOf(this.dataguardGroupMembers)); sb.append(")"); return sb.toString(); } @@ -2678,6 +2825,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.distributionAffinity, other.distributionAffinity) && java.util.Objects.equals( this.netServicesArchitecture, other.netServicesArchitecture) + && java.util.Objects.equals(this.isMultipleStandby, other.isMultipleStandby) + && java.util.Objects.equals(this.isDataGuardEnabled, other.isDataGuardEnabled) + && java.util.Objects.equals(this.dataguard, other.dataguard) + && java.util.Objects.equals(this.dataguardGroupMembers, other.dataguardGroupMembers) && super.equals(other); } @@ -2848,6 +2999,20 @@ public int hashCode() { + (this.netServicesArchitecture == null ? 43 : this.netServicesArchitecture.hashCode()); + result = + (result * PRIME) + + (this.isMultipleStandby == null ? 43 : this.isMultipleStandby.hashCode()); + result = + (result * PRIME) + + (this.isDataGuardEnabled == null + ? 43 + : this.isDataGuardEnabled.hashCode()); + result = (result * PRIME) + (this.dataguard == null ? 43 : this.dataguard.hashCode()); + result = + (result * PRIME) + + (this.dataguardGroupMembers == null + ? 43 + : this.dataguardGroupMembers.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/Backup.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/Backup.java index 1c9186ad2f..f3f4788310 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/Backup.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/Backup.java @@ -39,6 +39,12 @@ public final class Backup extends com.oracle.bmc.http.internal.ExplicitlySetBmcM "vaultId", "keyStoreId", "keyStoreWalletName", + "secondaryKmsKeyIds", + "retentionPeriodInDays", + "retentionPeriodInYears", + "timeExpiryScheduled", + "isUsingOracleManagedKeys", + "backupDestinationType", "encryptionKeyLocationDetails" }) public Backup( @@ -61,6 +67,12 @@ public Backup( String vaultId, String keyStoreId, String keyStoreWalletName, + java.util.List secondaryKmsKeyIds, + Integer retentionPeriodInDays, + Integer retentionPeriodInYears, + java.util.Date timeExpiryScheduled, + Boolean isUsingOracleManagedKeys, + BackupDestinationType backupDestinationType, EncryptionKeyLocationDetails encryptionKeyLocationDetails) { super(); this.id = id; @@ -82,6 +94,12 @@ public Backup( this.vaultId = vaultId; this.keyStoreId = keyStoreId; this.keyStoreWalletName = keyStoreWalletName; + this.secondaryKmsKeyIds = secondaryKmsKeyIds; + this.retentionPeriodInDays = retentionPeriodInDays; + this.retentionPeriodInYears = retentionPeriodInYears; + this.timeExpiryScheduled = timeExpiryScheduled; + this.isUsingOracleManagedKeys = isUsingOracleManagedKeys; + this.backupDestinationType = backupDestinationType; this.encryptionKeyLocationDetails = encryptionKeyLocationDetails; } @@ -397,6 +415,102 @@ public Builder keyStoreWalletName(String keyStoreWalletName) { this.__explicitlySet__.add("keyStoreWalletName"); return this; } + /** + * List of OCIDs of the key containers used as the secondary encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secondaryKmsKeyIds") + private java.util.List secondaryKmsKeyIds; + + /** + * List of OCIDs of the key containers used as the secondary encryption key in database transparent data encryption (TDE) operations. + * @param secondaryKmsKeyIds the value to set + * @return this builder + **/ + public Builder secondaryKmsKeyIds(java.util.List secondaryKmsKeyIds) { + this.secondaryKmsKeyIds = secondaryKmsKeyIds; + this.__explicitlySet__.add("secondaryKmsKeyIds"); + return this; + } + /** + * The retention period of the long term backup in days. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInDays") + private Integer retentionPeriodInDays; + + /** + * The retention period of the long term backup in days. + * @param retentionPeriodInDays the value to set + * @return this builder + **/ + public Builder retentionPeriodInDays(Integer retentionPeriodInDays) { + this.retentionPeriodInDays = retentionPeriodInDays; + this.__explicitlySet__.add("retentionPeriodInDays"); + return this; + } + /** + * The retention period of the long term backup in years. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInYears") + private Integer retentionPeriodInYears; + + /** + * The retention period of the long term backup in years. + * @param retentionPeriodInYears the value to set + * @return this builder + **/ + public Builder retentionPeriodInYears(Integer retentionPeriodInYears) { + this.retentionPeriodInYears = retentionPeriodInYears; + this.__explicitlySet__.add("retentionPeriodInYears"); + return this; + } + /** + * Expiration time of the long term database backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeExpiryScheduled") + private java.util.Date timeExpiryScheduled; + + /** + * Expiration time of the long term database backup. + * @param timeExpiryScheduled the value to set + * @return this builder + **/ + public Builder timeExpiryScheduled(java.util.Date timeExpiryScheduled) { + this.timeExpiryScheduled = timeExpiryScheduled; + this.__explicitlySet__.add("timeExpiryScheduled"); + return this; + } + /** + * True if Oracle Managed Keys is required for restore of the backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUsingOracleManagedKeys") + private Boolean isUsingOracleManagedKeys; + + /** + * True if Oracle Managed Keys is required for restore of the backup. + * @param isUsingOracleManagedKeys the value to set + * @return this builder + **/ + public Builder isUsingOracleManagedKeys(Boolean isUsingOracleManagedKeys) { + this.isUsingOracleManagedKeys = isUsingOracleManagedKeys; + this.__explicitlySet__.add("isUsingOracleManagedKeys"); + return this; + } + /** + * Type of the backup destination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupDestinationType") + private BackupDestinationType backupDestinationType; + + /** + * Type of the backup destination. + * @param backupDestinationType the value to set + * @return this builder + **/ + public Builder backupDestinationType(BackupDestinationType backupDestinationType) { + this.backupDestinationType = backupDestinationType; + this.__explicitlySet__.add("backupDestinationType"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("encryptionKeyLocationDetails") private EncryptionKeyLocationDetails encryptionKeyLocationDetails; @@ -433,6 +547,12 @@ public Backup build() { this.vaultId, this.keyStoreId, this.keyStoreWalletName, + this.secondaryKmsKeyIds, + this.retentionPeriodInDays, + this.retentionPeriodInYears, + this.timeExpiryScheduled, + this.isUsingOracleManagedKeys, + this.backupDestinationType, this.encryptionKeyLocationDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -499,6 +619,24 @@ public Builder copy(Backup model) { if (model.wasPropertyExplicitlySet("keyStoreWalletName")) { this.keyStoreWalletName(model.getKeyStoreWalletName()); } + if (model.wasPropertyExplicitlySet("secondaryKmsKeyIds")) { + this.secondaryKmsKeyIds(model.getSecondaryKmsKeyIds()); + } + if (model.wasPropertyExplicitlySet("retentionPeriodInDays")) { + this.retentionPeriodInDays(model.getRetentionPeriodInDays()); + } + if (model.wasPropertyExplicitlySet("retentionPeriodInYears")) { + this.retentionPeriodInYears(model.getRetentionPeriodInYears()); + } + if (model.wasPropertyExplicitlySet("timeExpiryScheduled")) { + this.timeExpiryScheduled(model.getTimeExpiryScheduled()); + } + if (model.wasPropertyExplicitlySet("isUsingOracleManagedKeys")) { + this.isUsingOracleManagedKeys(model.getIsUsingOracleManagedKeys()); + } + if (model.wasPropertyExplicitlySet("backupDestinationType")) { + this.backupDestinationType(model.getBackupDestinationType()); + } if (model.wasPropertyExplicitlySet("encryptionKeyLocationDetails")) { this.encryptionKeyLocationDetails(model.getEncryptionKeyLocationDetails()); } @@ -700,6 +838,7 @@ public enum LifecycleState { Deleted("DELETED"), Failed("FAILED"), Restoring("RESTORING"), + Updating("UPDATING"), Canceling("CANCELING"), Canceled("CANCELED"), @@ -941,6 +1080,138 @@ public String getKeyStoreWalletName() { return keyStoreWalletName; } + /** + * List of OCIDs of the key containers used as the secondary encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secondaryKmsKeyIds") + private final java.util.List secondaryKmsKeyIds; + + /** + * List of OCIDs of the key containers used as the secondary encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public java.util.List getSecondaryKmsKeyIds() { + return secondaryKmsKeyIds; + } + + /** + * The retention period of the long term backup in days. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInDays") + private final Integer retentionPeriodInDays; + + /** + * The retention period of the long term backup in days. + * @return the value + **/ + public Integer getRetentionPeriodInDays() { + return retentionPeriodInDays; + } + + /** + * The retention period of the long term backup in years. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInYears") + private final Integer retentionPeriodInYears; + + /** + * The retention period of the long term backup in years. + * @return the value + **/ + public Integer getRetentionPeriodInYears() { + return retentionPeriodInYears; + } + + /** + * Expiration time of the long term database backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeExpiryScheduled") + private final java.util.Date timeExpiryScheduled; + + /** + * Expiration time of the long term database backup. + * @return the value + **/ + public java.util.Date getTimeExpiryScheduled() { + return timeExpiryScheduled; + } + + /** + * True if Oracle Managed Keys is required for restore of the backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUsingOracleManagedKeys") + private final Boolean isUsingOracleManagedKeys; + + /** + * True if Oracle Managed Keys is required for restore of the backup. + * @return the value + **/ + public Boolean getIsUsingOracleManagedKeys() { + return isUsingOracleManagedKeys; + } + + /** + * Type of the backup destination. + **/ + public enum BackupDestinationType { + ObjectStore("OBJECT_STORE"), + 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(BackupDestinationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (BackupDestinationType v : BackupDestinationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + BackupDestinationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static BackupDestinationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'BackupDestinationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Type of the backup destination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupDestinationType") + private final BackupDestinationType backupDestinationType; + + /** + * Type of the backup destination. + * @return the value + **/ + public BackupDestinationType getBackupDestinationType() { + return backupDestinationType; + } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKeyLocationDetails") private final EncryptionKeyLocationDetails encryptionKeyLocationDetails; @@ -981,6 +1252,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", vaultId=").append(String.valueOf(this.vaultId)); sb.append(", keyStoreId=").append(String.valueOf(this.keyStoreId)); sb.append(", keyStoreWalletName=").append(String.valueOf(this.keyStoreWalletName)); + sb.append(", secondaryKmsKeyIds=").append(String.valueOf(this.secondaryKmsKeyIds)); + sb.append(", retentionPeriodInDays=").append(String.valueOf(this.retentionPeriodInDays)); + sb.append(", retentionPeriodInYears=").append(String.valueOf(this.retentionPeriodInYears)); + sb.append(", timeExpiryScheduled=").append(String.valueOf(this.timeExpiryScheduled)); + sb.append(", isUsingOracleManagedKeys=") + .append(String.valueOf(this.isUsingOracleManagedKeys)); + sb.append(", backupDestinationType=").append(String.valueOf(this.backupDestinationType)); sb.append(", encryptionKeyLocationDetails=") .append(String.valueOf(this.encryptionKeyLocationDetails)); sb.append(")"); @@ -1016,6 +1294,14 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.vaultId, other.vaultId) && java.util.Objects.equals(this.keyStoreId, other.keyStoreId) && java.util.Objects.equals(this.keyStoreWalletName, other.keyStoreWalletName) + && java.util.Objects.equals(this.secondaryKmsKeyIds, other.secondaryKmsKeyIds) + && java.util.Objects.equals(this.retentionPeriodInDays, other.retentionPeriodInDays) + && java.util.Objects.equals( + this.retentionPeriodInYears, other.retentionPeriodInYears) + && java.util.Objects.equals(this.timeExpiryScheduled, other.timeExpiryScheduled) + && java.util.Objects.equals( + this.isUsingOracleManagedKeys, other.isUsingOracleManagedKeys) + && java.util.Objects.equals(this.backupDestinationType, other.backupDestinationType) && java.util.Objects.equals( this.encryptionKeyLocationDetails, other.encryptionKeyLocationDetails) && super.equals(other); @@ -1064,6 +1350,36 @@ public int hashCode() { + (this.keyStoreWalletName == null ? 43 : this.keyStoreWalletName.hashCode()); + result = + (result * PRIME) + + (this.secondaryKmsKeyIds == null + ? 43 + : this.secondaryKmsKeyIds.hashCode()); + result = + (result * PRIME) + + (this.retentionPeriodInDays == null + ? 43 + : this.retentionPeriodInDays.hashCode()); + result = + (result * PRIME) + + (this.retentionPeriodInYears == null + ? 43 + : this.retentionPeriodInYears.hashCode()); + result = + (result * PRIME) + + (this.timeExpiryScheduled == null + ? 43 + : this.timeExpiryScheduled.hashCode()); + result = + (result * PRIME) + + (this.isUsingOracleManagedKeys == null + ? 43 + : this.isUsingOracleManagedKeys.hashCode()); + result = + (result * PRIME) + + (this.backupDestinationType == null + ? 43 + : this.backupDestinationType.hashCode()); result = (result * PRIME) + (this.encryptionKeyLocationDetails == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/BackupSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/BackupSummary.java index 6f85f378e6..ee996d9f03 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/BackupSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/BackupSummary.java @@ -43,6 +43,12 @@ public final class BackupSummary extends com.oracle.bmc.http.internal.Explicitly "vaultId", "keyStoreId", "keyStoreWalletName", + "secondaryKmsKeyIds", + "retentionPeriodInDays", + "retentionPeriodInYears", + "timeExpiryScheduled", + "isUsingOracleManagedKeys", + "backupDestinationType", "encryptionKeyLocationDetails" }) public BackupSummary( @@ -65,6 +71,12 @@ public BackupSummary( String vaultId, String keyStoreId, String keyStoreWalletName, + java.util.List secondaryKmsKeyIds, + Integer retentionPeriodInDays, + Integer retentionPeriodInYears, + java.util.Date timeExpiryScheduled, + Boolean isUsingOracleManagedKeys, + BackupDestinationType backupDestinationType, EncryptionKeyLocationDetails encryptionKeyLocationDetails) { super(); this.id = id; @@ -86,6 +98,12 @@ public BackupSummary( this.vaultId = vaultId; this.keyStoreId = keyStoreId; this.keyStoreWalletName = keyStoreWalletName; + this.secondaryKmsKeyIds = secondaryKmsKeyIds; + this.retentionPeriodInDays = retentionPeriodInDays; + this.retentionPeriodInYears = retentionPeriodInYears; + this.timeExpiryScheduled = timeExpiryScheduled; + this.isUsingOracleManagedKeys = isUsingOracleManagedKeys; + this.backupDestinationType = backupDestinationType; this.encryptionKeyLocationDetails = encryptionKeyLocationDetails; } @@ -401,6 +419,102 @@ public Builder keyStoreWalletName(String keyStoreWalletName) { this.__explicitlySet__.add("keyStoreWalletName"); return this; } + /** + * List of OCIDs of the key containers used as the secondary encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secondaryKmsKeyIds") + private java.util.List secondaryKmsKeyIds; + + /** + * List of OCIDs of the key containers used as the secondary encryption key in database transparent data encryption (TDE) operations. + * @param secondaryKmsKeyIds the value to set + * @return this builder + **/ + public Builder secondaryKmsKeyIds(java.util.List secondaryKmsKeyIds) { + this.secondaryKmsKeyIds = secondaryKmsKeyIds; + this.__explicitlySet__.add("secondaryKmsKeyIds"); + return this; + } + /** + * The retention period of the long term backup in days. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInDays") + private Integer retentionPeriodInDays; + + /** + * The retention period of the long term backup in days. + * @param retentionPeriodInDays the value to set + * @return this builder + **/ + public Builder retentionPeriodInDays(Integer retentionPeriodInDays) { + this.retentionPeriodInDays = retentionPeriodInDays; + this.__explicitlySet__.add("retentionPeriodInDays"); + return this; + } + /** + * The retention period of the long term backup in years. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInYears") + private Integer retentionPeriodInYears; + + /** + * The retention period of the long term backup in years. + * @param retentionPeriodInYears the value to set + * @return this builder + **/ + public Builder retentionPeriodInYears(Integer retentionPeriodInYears) { + this.retentionPeriodInYears = retentionPeriodInYears; + this.__explicitlySet__.add("retentionPeriodInYears"); + return this; + } + /** + * Expiration time of the long term database backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeExpiryScheduled") + private java.util.Date timeExpiryScheduled; + + /** + * Expiration time of the long term database backup. + * @param timeExpiryScheduled the value to set + * @return this builder + **/ + public Builder timeExpiryScheduled(java.util.Date timeExpiryScheduled) { + this.timeExpiryScheduled = timeExpiryScheduled; + this.__explicitlySet__.add("timeExpiryScheduled"); + return this; + } + /** + * True if Oracle Managed Keys is required for restore of the backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUsingOracleManagedKeys") + private Boolean isUsingOracleManagedKeys; + + /** + * True if Oracle Managed Keys is required for restore of the backup. + * @param isUsingOracleManagedKeys the value to set + * @return this builder + **/ + public Builder isUsingOracleManagedKeys(Boolean isUsingOracleManagedKeys) { + this.isUsingOracleManagedKeys = isUsingOracleManagedKeys; + this.__explicitlySet__.add("isUsingOracleManagedKeys"); + return this; + } + /** + * Type of the backup destination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupDestinationType") + private BackupDestinationType backupDestinationType; + + /** + * Type of the backup destination. + * @param backupDestinationType the value to set + * @return this builder + **/ + public Builder backupDestinationType(BackupDestinationType backupDestinationType) { + this.backupDestinationType = backupDestinationType; + this.__explicitlySet__.add("backupDestinationType"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("encryptionKeyLocationDetails") private EncryptionKeyLocationDetails encryptionKeyLocationDetails; @@ -437,6 +551,12 @@ public BackupSummary build() { this.vaultId, this.keyStoreId, this.keyStoreWalletName, + this.secondaryKmsKeyIds, + this.retentionPeriodInDays, + this.retentionPeriodInYears, + this.timeExpiryScheduled, + this.isUsingOracleManagedKeys, + this.backupDestinationType, this.encryptionKeyLocationDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -503,6 +623,24 @@ public Builder copy(BackupSummary model) { if (model.wasPropertyExplicitlySet("keyStoreWalletName")) { this.keyStoreWalletName(model.getKeyStoreWalletName()); } + if (model.wasPropertyExplicitlySet("secondaryKmsKeyIds")) { + this.secondaryKmsKeyIds(model.getSecondaryKmsKeyIds()); + } + if (model.wasPropertyExplicitlySet("retentionPeriodInDays")) { + this.retentionPeriodInDays(model.getRetentionPeriodInDays()); + } + if (model.wasPropertyExplicitlySet("retentionPeriodInYears")) { + this.retentionPeriodInYears(model.getRetentionPeriodInYears()); + } + if (model.wasPropertyExplicitlySet("timeExpiryScheduled")) { + this.timeExpiryScheduled(model.getTimeExpiryScheduled()); + } + if (model.wasPropertyExplicitlySet("isUsingOracleManagedKeys")) { + this.isUsingOracleManagedKeys(model.getIsUsingOracleManagedKeys()); + } + if (model.wasPropertyExplicitlySet("backupDestinationType")) { + this.backupDestinationType(model.getBackupDestinationType()); + } if (model.wasPropertyExplicitlySet("encryptionKeyLocationDetails")) { this.encryptionKeyLocationDetails(model.getEncryptionKeyLocationDetails()); } @@ -704,6 +842,7 @@ public enum LifecycleState { Deleted("DELETED"), Failed("FAILED"), Restoring("RESTORING"), + Updating("UPDATING"), Canceling("CANCELING"), Canceled("CANCELED"), @@ -945,6 +1084,138 @@ public String getKeyStoreWalletName() { return keyStoreWalletName; } + /** + * List of OCIDs of the key containers used as the secondary encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secondaryKmsKeyIds") + private final java.util.List secondaryKmsKeyIds; + + /** + * List of OCIDs of the key containers used as the secondary encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public java.util.List getSecondaryKmsKeyIds() { + return secondaryKmsKeyIds; + } + + /** + * The retention period of the long term backup in days. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInDays") + private final Integer retentionPeriodInDays; + + /** + * The retention period of the long term backup in days. + * @return the value + **/ + public Integer getRetentionPeriodInDays() { + return retentionPeriodInDays; + } + + /** + * The retention period of the long term backup in years. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInYears") + private final Integer retentionPeriodInYears; + + /** + * The retention period of the long term backup in years. + * @return the value + **/ + public Integer getRetentionPeriodInYears() { + return retentionPeriodInYears; + } + + /** + * Expiration time of the long term database backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeExpiryScheduled") + private final java.util.Date timeExpiryScheduled; + + /** + * Expiration time of the long term database backup. + * @return the value + **/ + public java.util.Date getTimeExpiryScheduled() { + return timeExpiryScheduled; + } + + /** + * True if Oracle Managed Keys is required for restore of the backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUsingOracleManagedKeys") + private final Boolean isUsingOracleManagedKeys; + + /** + * True if Oracle Managed Keys is required for restore of the backup. + * @return the value + **/ + public Boolean getIsUsingOracleManagedKeys() { + return isUsingOracleManagedKeys; + } + + /** + * Type of the backup destination. + **/ + public enum BackupDestinationType { + ObjectStore("OBJECT_STORE"), + 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(BackupDestinationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (BackupDestinationType v : BackupDestinationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + BackupDestinationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static BackupDestinationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'BackupDestinationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Type of the backup destination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupDestinationType") + private final BackupDestinationType backupDestinationType; + + /** + * Type of the backup destination. + * @return the value + **/ + public BackupDestinationType getBackupDestinationType() { + return backupDestinationType; + } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKeyLocationDetails") private final EncryptionKeyLocationDetails encryptionKeyLocationDetails; @@ -985,6 +1256,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", vaultId=").append(String.valueOf(this.vaultId)); sb.append(", keyStoreId=").append(String.valueOf(this.keyStoreId)); sb.append(", keyStoreWalletName=").append(String.valueOf(this.keyStoreWalletName)); + sb.append(", secondaryKmsKeyIds=").append(String.valueOf(this.secondaryKmsKeyIds)); + sb.append(", retentionPeriodInDays=").append(String.valueOf(this.retentionPeriodInDays)); + sb.append(", retentionPeriodInYears=").append(String.valueOf(this.retentionPeriodInYears)); + sb.append(", timeExpiryScheduled=").append(String.valueOf(this.timeExpiryScheduled)); + sb.append(", isUsingOracleManagedKeys=") + .append(String.valueOf(this.isUsingOracleManagedKeys)); + sb.append(", backupDestinationType=").append(String.valueOf(this.backupDestinationType)); sb.append(", encryptionKeyLocationDetails=") .append(String.valueOf(this.encryptionKeyLocationDetails)); sb.append(")"); @@ -1020,6 +1298,14 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.vaultId, other.vaultId) && java.util.Objects.equals(this.keyStoreId, other.keyStoreId) && java.util.Objects.equals(this.keyStoreWalletName, other.keyStoreWalletName) + && java.util.Objects.equals(this.secondaryKmsKeyIds, other.secondaryKmsKeyIds) + && java.util.Objects.equals(this.retentionPeriodInDays, other.retentionPeriodInDays) + && java.util.Objects.equals( + this.retentionPeriodInYears, other.retentionPeriodInYears) + && java.util.Objects.equals(this.timeExpiryScheduled, other.timeExpiryScheduled) + && java.util.Objects.equals( + this.isUsingOracleManagedKeys, other.isUsingOracleManagedKeys) + && java.util.Objects.equals(this.backupDestinationType, other.backupDestinationType) && java.util.Objects.equals( this.encryptionKeyLocationDetails, other.encryptionKeyLocationDetails) && super.equals(other); @@ -1068,6 +1354,36 @@ public int hashCode() { + (this.keyStoreWalletName == null ? 43 : this.keyStoreWalletName.hashCode()); + result = + (result * PRIME) + + (this.secondaryKmsKeyIds == null + ? 43 + : this.secondaryKmsKeyIds.hashCode()); + result = + (result * PRIME) + + (this.retentionPeriodInDays == null + ? 43 + : this.retentionPeriodInDays.hashCode()); + result = + (result * PRIME) + + (this.retentionPeriodInYears == null + ? 43 + : this.retentionPeriodInYears.hashCode()); + result = + (result * PRIME) + + (this.timeExpiryScheduled == null + ? 43 + : this.timeExpiryScheduled.hashCode()); + result = + (result * PRIME) + + (this.isUsingOracleManagedKeys == null + ? 43 + : this.isUsingOracleManagedKeys.hashCode()); + result = + (result * PRIME) + + (this.backupDestinationType == null + ? 43 + : this.backupDestinationType.hashCode()); result = (result * PRIME) + (this.encryptionKeyLocationDetails == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeExadbVmClusterSubscriptionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeExadbVmClusterSubscriptionDetails.java new file mode 100644 index 0000000000..00e935e1b9 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeExadbVmClusterSubscriptionDetails.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 configuration details for associating the Exadata VM cluster on Exascale Infrastructure with a different 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: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeExadbVmClusterSubscriptionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeExadbVmClusterSubscriptionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"subscriptionId", "isDefault"}) + public ChangeExadbVmClusterSubscriptionDetails(String subscriptionId, Boolean isDefault) { + super(); + this.subscriptionId = subscriptionId; + this.isDefault = isDefault; + } + + @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 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 the subscription is UCM or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private Boolean isDefault; + + /** + * Indicates if the subscription is UCM or not. + * + * @param isDefault the value to set + * @return this builder + **/ + public Builder isDefault(Boolean isDefault) { + this.isDefault = isDefault; + this.__explicitlySet__.add("isDefault"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeExadbVmClusterSubscriptionDetails build() { + ChangeExadbVmClusterSubscriptionDetails model = + new ChangeExadbVmClusterSubscriptionDetails( + this.subscriptionId, this.isDefault); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeExadbVmClusterSubscriptionDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } + if (model.wasPropertyExplicitlySet("isDefault")) { + this.isDefault(model.getIsDefault()); + } + 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 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 the subscription is UCM or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private final Boolean isDefault; + + /** + * Indicates if the subscription is UCM or not. + * + * @return the value + **/ + public Boolean getIsDefault() { + return isDefault; + } + + @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("ChangeExadbVmClusterSubscriptionDetails("); + sb.append("super=").append(super.toString()); + sb.append("subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(", isDefault=").append(String.valueOf(this.isDefault)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeExadbVmClusterSubscriptionDetails)) { + return false; + } + + ChangeExadbVmClusterSubscriptionDetails other = (ChangeExadbVmClusterSubscriptionDetails) o; + return java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && java.util.Objects.equals(this.isDefault, other.isDefault) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); + result = (result * PRIME) + (this.isDefault == null ? 43 : this.isDefault.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeExascaleDbStorageVaultSubscriptionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeExascaleDbStorageVaultSubscriptionDetails.java new file mode 100644 index 0000000000..c8d37c8ba9 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeExascaleDbStorageVaultSubscriptionDetails.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 configuration details for associating the Exadata Database Storage Vault with a different 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: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeExascaleDbStorageVaultSubscriptionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeExascaleDbStorageVaultSubscriptionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"subscriptionId", "isDefault"}) + public ChangeExascaleDbStorageVaultSubscriptionDetails( + String subscriptionId, Boolean isDefault) { + super(); + this.subscriptionId = subscriptionId; + this.isDefault = isDefault; + } + + @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 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 the subscription is UCM or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private Boolean isDefault; + + /** + * Indicates if the subscription is UCM or not. + * + * @param isDefault the value to set + * @return this builder + **/ + public Builder isDefault(Boolean isDefault) { + this.isDefault = isDefault; + this.__explicitlySet__.add("isDefault"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeExascaleDbStorageVaultSubscriptionDetails build() { + ChangeExascaleDbStorageVaultSubscriptionDetails model = + new ChangeExascaleDbStorageVaultSubscriptionDetails( + this.subscriptionId, this.isDefault); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeExascaleDbStorageVaultSubscriptionDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } + if (model.wasPropertyExplicitlySet("isDefault")) { + this.isDefault(model.getIsDefault()); + } + 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 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 the subscription is UCM or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private final Boolean isDefault; + + /** + * Indicates if the subscription is UCM or not. + * + * @return the value + **/ + public Boolean getIsDefault() { + return isDefault; + } + + @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("ChangeExascaleDbStorageVaultSubscriptionDetails("); + sb.append("super=").append(super.toString()); + sb.append("subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(", isDefault=").append(String.valueOf(this.isDefault)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeExascaleDbStorageVaultSubscriptionDetails)) { + return false; + } + + ChangeExascaleDbStorageVaultSubscriptionDetails other = + (ChangeExascaleDbStorageVaultSubscriptionDetails) o; + return java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && java.util.Objects.equals(this.isDefault, other.isDefault) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); + result = (result * PRIME) + (this.isDefault == null ? 43 : this.isDefault.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmCluster.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmCluster.java index b2915e3e04..17b15675f7 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmCluster.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmCluster.java @@ -60,6 +60,8 @@ public final class CloudVmCluster extends com.oracle.bmc.http.internal.Explicitl "diskRedundancy", "scanIpIds", "vipIds", + "scanIpv6Ids", + "vipv6Ids", "scanDnsRecordId", "freeformTags", "definedTags", @@ -73,6 +75,7 @@ public final class CloudVmCluster extends com.oracle.bmc.http.internal.Explicitl "giSoftwareImageId", "fileSystemConfigurationDetails", "cloudAutomationUpdateDetails", + "vmClusterType", "computeModel" }) public CloudVmCluster( @@ -115,6 +118,8 @@ public CloudVmCluster( DiskRedundancy diskRedundancy, java.util.List scanIpIds, java.util.List vipIds, + java.util.List scanIpv6Ids, + java.util.List vipv6Ids, String scanDnsRecordId, java.util.Map freeformTags, java.util.Map> definedTags, @@ -128,6 +133,7 @@ public CloudVmCluster( String giSoftwareImageId, java.util.List fileSystemConfigurationDetails, CloudAutomationUpdateDetails cloudAutomationUpdateDetails, + VmClusterType vmClusterType, ComputeModel computeModel) { super(); this.iormConfigCache = iormConfigCache; @@ -169,6 +175,8 @@ public CloudVmCluster( this.diskRedundancy = diskRedundancy; this.scanIpIds = scanIpIds; this.vipIds = vipIds; + this.scanIpv6Ids = scanIpv6Ids; + this.vipv6Ids = vipv6Ids; this.scanDnsRecordId = scanDnsRecordId; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -182,6 +190,7 @@ public CloudVmCluster( this.giSoftwareImageId = giSoftwareImageId; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.vmClusterType = vmClusterType; this.computeModel = computeModel; } @@ -825,8 +834,8 @@ public Builder diskRedundancy(DiskRedundancy diskRedundancy) { return this; } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. - * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv4 addresses associated with the cloud VM cluster. + * SCAN IPv4 addresses are typically used for load balancing and are not assigned to any interface. * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -836,8 +845,8 @@ public Builder diskRedundancy(DiskRedundancy diskRedundancy) { private java.util.List scanIpIds; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. - * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv4 addresses associated with the cloud VM cluster. + * SCAN IPv4 addresses are typically used for load balancing and are not assigned to any interface. * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -851,8 +860,8 @@ public Builder scanIpIds(java.util.List scanIpIds) { return this; } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the cloud VM cluster. - * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv4 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv4 address for each node in the Exadata Cloud Service instance to * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -862,8 +871,8 @@ public Builder scanIpIds(java.util.List scanIpIds) { private java.util.List vipIds; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the cloud VM cluster. - * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv4 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv4 address for each node in the Exadata Cloud Service instance to * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -876,6 +885,58 @@ public Builder vipIds(java.util.List vipIds) { this.__explicitlySet__.add("vipIds"); return this; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv6 addresses associated with the cloud VM cluster. + * SCAN IPv6 addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanIpv6Ids") + private java.util.List scanIpv6Ids; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv6 addresses associated with the cloud VM cluster. + * SCAN IPv6 addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + * @param scanIpv6Ids the value to set + * @return this builder + **/ + public Builder scanIpv6Ids(java.util.List scanIpv6Ids) { + this.scanIpv6Ids = scanIpv6Ids; + this.__explicitlySet__.add("scanIpv6Ids"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv6 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv6 address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vipv6Ids") + private java.util.List vipv6Ids; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv6 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv6 address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + * @param vipv6Ids the value to set + * @return this builder + **/ + public Builder vipv6Ids(java.util.List vipv6Ids) { + this.vipv6Ids = vipv6Ids; + this.__explicitlySet__.add("vipv6Ids"); + return this; + } /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. * @@ -1102,6 +1163,22 @@ public Builder cloudAutomationUpdateDetails( this.__explicitlySet__.add("cloudAutomationUpdateDetails"); return this; } + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterType") + private VmClusterType vmClusterType; + + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + * @param vmClusterType the value to set + * @return this builder + **/ + public Builder vmClusterType(VmClusterType vmClusterType) { + this.vmClusterType = vmClusterType; + this.__explicitlySet__.add("vmClusterType"); + return this; + } /** * The compute model of the Autonomous Database. This is required if using the {@code computeCount} parameter. If using {@code cpuCoreCount} then it is an error to specify {@code computeModel} to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. **/ @@ -1164,6 +1241,8 @@ public CloudVmCluster build() { this.diskRedundancy, this.scanIpIds, this.vipIds, + this.scanIpv6Ids, + this.vipv6Ids, this.scanDnsRecordId, this.freeformTags, this.definedTags, @@ -1177,6 +1256,7 @@ public CloudVmCluster build() { this.giSoftwareImageId, this.fileSystemConfigurationDetails, this.cloudAutomationUpdateDetails, + this.vmClusterType, this.computeModel); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -1303,6 +1383,12 @@ public Builder copy(CloudVmCluster model) { if (model.wasPropertyExplicitlySet("vipIds")) { this.vipIds(model.getVipIds()); } + if (model.wasPropertyExplicitlySet("scanIpv6Ids")) { + this.scanIpv6Ids(model.getScanIpv6Ids()); + } + if (model.wasPropertyExplicitlySet("vipv6Ids")) { + this.vipv6Ids(model.getVipv6Ids()); + } if (model.wasPropertyExplicitlySet("scanDnsRecordId")) { this.scanDnsRecordId(model.getScanDnsRecordId()); } @@ -1342,6 +1428,9 @@ public Builder copy(CloudVmCluster model) { if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); } + if (model.wasPropertyExplicitlySet("vmClusterType")) { + this.vmClusterType(model.getVmClusterType()); + } if (model.wasPropertyExplicitlySet("computeModel")) { this.computeModel(model.getComputeModel()); } @@ -2077,8 +2166,8 @@ public DiskRedundancy getDiskRedundancy() { } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. - * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv4 addresses associated with the cloud VM cluster. + * SCAN IPv4 addresses are typically used for load balancing and are not assigned to any interface. * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -2088,8 +2177,8 @@ public DiskRedundancy getDiskRedundancy() { private final java.util.List scanIpIds; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. - * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv4 addresses associated with the cloud VM cluster. + * SCAN IPv4 addresses are typically used for load balancing and are not assigned to any interface. * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -2101,8 +2190,8 @@ public java.util.List getScanIpIds() { } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the cloud VM cluster. - * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv4 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv4 address for each node in the Exadata Cloud Service instance to * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -2112,8 +2201,8 @@ public java.util.List getScanIpIds() { private final java.util.List vipIds; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the cloud VM cluster. - * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv4 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv4 address for each node in the Exadata Cloud Service instance to * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -2124,6 +2213,54 @@ public java.util.List getVipIds() { return vipIds; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv6 addresses associated with the cloud VM cluster. + * SCAN IPv6 addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanIpv6Ids") + private final java.util.List scanIpv6Ids; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv6 addresses associated with the cloud VM cluster. + * SCAN IPv6 addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + * @return the value + **/ + public java.util.List getScanIpv6Ids() { + return scanIpv6Ids; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv6 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv6 address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vipv6Ids") + private final java.util.List vipv6Ids; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv6 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv6 address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + * @return the value + **/ + public java.util.List getVipv6Ids() { + return vipv6Ids; + } + /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. * @@ -2320,6 +2457,68 @@ public CloudAutomationUpdateDetails getCloudAutomationUpdateDetails() { return cloudAutomationUpdateDetails; } + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + public enum VmClusterType { + Regular("REGULAR"), + Developer("DEVELOPER"), + + /** + * 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(VmClusterType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (VmClusterType v : VmClusterType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + VmClusterType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static VmClusterType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'VmClusterType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterType") + private final VmClusterType vmClusterType; + + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + * @return the value + **/ + public VmClusterType getVmClusterType() { + return vmClusterType; + } + /** * The compute model of the Autonomous Database. This is required if using the {@code computeCount} parameter. If using {@code cpuCoreCount} then it is an error to specify {@code computeModel} to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. **/ @@ -2438,6 +2637,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", diskRedundancy=").append(String.valueOf(this.diskRedundancy)); sb.append(", scanIpIds=").append(String.valueOf(this.scanIpIds)); sb.append(", vipIds=").append(String.valueOf(this.vipIds)); + sb.append(", scanIpv6Ids=").append(String.valueOf(this.scanIpv6Ids)); + sb.append(", vipv6Ids=").append(String.valueOf(this.vipv6Ids)); sb.append(", scanDnsRecordId=").append(String.valueOf(this.scanDnsRecordId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -2453,6 +2654,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.fileSystemConfigurationDetails)); sb.append(", cloudAutomationUpdateDetails=") .append(String.valueOf(this.cloudAutomationUpdateDetails)); + sb.append(", vmClusterType=").append(String.valueOf(this.vmClusterType)); sb.append(", computeModel=").append(String.valueOf(this.computeModel)); sb.append(")"); return sb.toString(); @@ -2511,6 +2713,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.diskRedundancy, other.diskRedundancy) && java.util.Objects.equals(this.scanIpIds, other.scanIpIds) && java.util.Objects.equals(this.vipIds, other.vipIds) + && java.util.Objects.equals(this.scanIpv6Ids, other.scanIpv6Ids) + && java.util.Objects.equals(this.vipv6Ids, other.vipv6Ids) && java.util.Objects.equals(this.scanDnsRecordId, other.scanDnsRecordId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -2527,6 +2731,7 @@ public boolean equals(Object o) { this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) && java.util.Objects.equals( this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) + && java.util.Objects.equals(this.vmClusterType, other.vmClusterType) && java.util.Objects.equals(this.computeModel, other.computeModel) && super.equals(other); } @@ -2632,6 +2837,8 @@ public int hashCode() { + (this.diskRedundancy == null ? 43 : this.diskRedundancy.hashCode()); result = (result * PRIME) + (this.scanIpIds == null ? 43 : this.scanIpIds.hashCode()); result = (result * PRIME) + (this.vipIds == null ? 43 : this.vipIds.hashCode()); + result = (result * PRIME) + (this.scanIpv6Ids == null ? 43 : this.scanIpv6Ids.hashCode()); + result = (result * PRIME) + (this.vipv6Ids == null ? 43 : this.vipv6Ids.hashCode()); result = (result * PRIME) + (this.scanDnsRecordId == null ? 43 : this.scanDnsRecordId.hashCode()); @@ -2673,6 +2880,9 @@ public int hashCode() { + (this.cloudAutomationUpdateDetails == null ? 43 : this.cloudAutomationUpdateDetails.hashCode()); + result = + (result * PRIME) + + (this.vmClusterType == null ? 43 : this.vmClusterType.hashCode()); result = (result * PRIME) + (this.computeModel == null ? 43 : this.computeModel.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmClusterSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmClusterSummary.java index 57ba9832a5..71a3b1b026 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmClusterSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmClusterSummary.java @@ -62,6 +62,8 @@ public final class CloudVmClusterSummary "diskRedundancy", "scanIpIds", "vipIds", + "scanIpv6Ids", + "vipv6Ids", "scanDnsRecordId", "freeformTags", "definedTags", @@ -75,6 +77,7 @@ public final class CloudVmClusterSummary "giSoftwareImageId", "fileSystemConfigurationDetails", "cloudAutomationUpdateDetails", + "vmClusterType", "computeModel" }) public CloudVmClusterSummary( @@ -116,6 +119,8 @@ public CloudVmClusterSummary( DiskRedundancy diskRedundancy, java.util.List scanIpIds, java.util.List vipIds, + java.util.List scanIpv6Ids, + java.util.List vipv6Ids, String scanDnsRecordId, java.util.Map freeformTags, java.util.Map> definedTags, @@ -129,6 +134,7 @@ public CloudVmClusterSummary( String giSoftwareImageId, java.util.List fileSystemConfigurationDetails, CloudAutomationUpdateDetails cloudAutomationUpdateDetails, + VmClusterType vmClusterType, ComputeModel computeModel) { super(); this.id = id; @@ -169,6 +175,8 @@ public CloudVmClusterSummary( this.diskRedundancy = diskRedundancy; this.scanIpIds = scanIpIds; this.vipIds = vipIds; + this.scanIpv6Ids = scanIpv6Ids; + this.vipv6Ids = vipv6Ids; this.scanDnsRecordId = scanDnsRecordId; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -182,6 +190,7 @@ public CloudVmClusterSummary( this.giSoftwareImageId = giSoftwareImageId; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.vmClusterType = vmClusterType; this.computeModel = computeModel; } @@ -816,8 +825,8 @@ public Builder diskRedundancy(DiskRedundancy diskRedundancy) { return this; } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. - * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv4 addresses associated with the cloud VM cluster. + * SCAN IPv4 addresses are typically used for load balancing and are not assigned to any interface. * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -827,8 +836,8 @@ public Builder diskRedundancy(DiskRedundancy diskRedundancy) { private java.util.List scanIpIds; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. - * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv4 addresses associated with the cloud VM cluster. + * SCAN IPv4 addresses are typically used for load balancing and are not assigned to any interface. * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -842,8 +851,8 @@ public Builder scanIpIds(java.util.List scanIpIds) { return this; } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the cloud VM cluster. - * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv4 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv4 address for each node in the Exadata Cloud Service instance to * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -853,8 +862,8 @@ public Builder scanIpIds(java.util.List scanIpIds) { private java.util.List vipIds; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the cloud VM cluster. - * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv4 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv4 address for each node in the Exadata Cloud Service instance to * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -867,6 +876,58 @@ public Builder vipIds(java.util.List vipIds) { this.__explicitlySet__.add("vipIds"); return this; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv6 addresses associated with the cloud VM cluster. + * SCAN IPv6 addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanIpv6Ids") + private java.util.List scanIpv6Ids; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv6 addresses associated with the cloud VM cluster. + * SCAN IPv6 addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + * @param scanIpv6Ids the value to set + * @return this builder + **/ + public Builder scanIpv6Ids(java.util.List scanIpv6Ids) { + this.scanIpv6Ids = scanIpv6Ids; + this.__explicitlySet__.add("scanIpv6Ids"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv6 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv6 address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vipv6Ids") + private java.util.List vipv6Ids; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv6 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv6 address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + * @param vipv6Ids the value to set + * @return this builder + **/ + public Builder vipv6Ids(java.util.List vipv6Ids) { + this.vipv6Ids = vipv6Ids; + this.__explicitlySet__.add("vipv6Ids"); + return this; + } /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. * @@ -1093,6 +1154,22 @@ public Builder cloudAutomationUpdateDetails( this.__explicitlySet__.add("cloudAutomationUpdateDetails"); return this; } + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterType") + private VmClusterType vmClusterType; + + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + * @param vmClusterType the value to set + * @return this builder + **/ + public Builder vmClusterType(VmClusterType vmClusterType) { + this.vmClusterType = vmClusterType; + this.__explicitlySet__.add("vmClusterType"); + return this; + } /** * The compute model of the Autonomous Database. This is required if using the {@code computeCount} parameter. If using {@code cpuCoreCount} then it is an error to specify {@code computeModel} to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. **/ @@ -1154,6 +1231,8 @@ public CloudVmClusterSummary build() { this.diskRedundancy, this.scanIpIds, this.vipIds, + this.scanIpv6Ids, + this.vipv6Ids, this.scanDnsRecordId, this.freeformTags, this.definedTags, @@ -1167,6 +1246,7 @@ public CloudVmClusterSummary build() { this.giSoftwareImageId, this.fileSystemConfigurationDetails, this.cloudAutomationUpdateDetails, + this.vmClusterType, this.computeModel); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -1290,6 +1370,12 @@ public Builder copy(CloudVmClusterSummary model) { if (model.wasPropertyExplicitlySet("vipIds")) { this.vipIds(model.getVipIds()); } + if (model.wasPropertyExplicitlySet("scanIpv6Ids")) { + this.scanIpv6Ids(model.getScanIpv6Ids()); + } + if (model.wasPropertyExplicitlySet("vipv6Ids")) { + this.vipv6Ids(model.getVipv6Ids()); + } if (model.wasPropertyExplicitlySet("scanDnsRecordId")) { this.scanDnsRecordId(model.getScanDnsRecordId()); } @@ -1329,6 +1415,9 @@ public Builder copy(CloudVmClusterSummary model) { if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); } + if (model.wasPropertyExplicitlySet("vmClusterType")) { + this.vmClusterType(model.getVmClusterType()); + } if (model.wasPropertyExplicitlySet("computeModel")) { this.computeModel(model.getComputeModel()); } @@ -2057,8 +2146,8 @@ public DiskRedundancy getDiskRedundancy() { } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. - * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv4 addresses associated with the cloud VM cluster. + * SCAN IPv4 addresses are typically used for load balancing and are not assigned to any interface. * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -2068,8 +2157,8 @@ public DiskRedundancy getDiskRedundancy() { private final java.util.List scanIpIds; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. - * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv4 addresses associated with the cloud VM cluster. + * SCAN IPv4 addresses are typically used for load balancing and are not assigned to any interface. * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -2081,8 +2170,8 @@ public java.util.List getScanIpIds() { } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the cloud VM cluster. - * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv4 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv4 address for each node in the Exadata Cloud Service instance to * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -2092,8 +2181,8 @@ public java.util.List getScanIpIds() { private final java.util.List vipIds; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the cloud VM cluster. - * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv4 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv4 address for each node in the Exadata Cloud Service instance to * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. *

**Note:** For a single-node DB system, this list is empty. @@ -2104,6 +2193,54 @@ public java.util.List getVipIds() { return vipIds; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv6 addresses associated with the cloud VM cluster. + * SCAN IPv6 addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanIpv6Ids") + private final java.util.List scanIpv6Ids; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IPv6 addresses associated with the cloud VM cluster. + * SCAN IPv6 addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + * @return the value + **/ + public java.util.List getScanIpv6Ids() { + return scanIpv6Ids; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv6 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv6 address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vipv6Ids") + private final java.util.List vipv6Ids; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) IPv6 addresses associated with the cloud VM cluster. + * The Cluster Ready Services (CRS) creates and maintains one VIP IPv6 address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + * @return the value + **/ + public java.util.List getVipv6Ids() { + return vipv6Ids; + } + /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. * @@ -2300,6 +2437,68 @@ public CloudAutomationUpdateDetails getCloudAutomationUpdateDetails() { return cloudAutomationUpdateDetails; } + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + public enum VmClusterType { + Regular("REGULAR"), + Developer("DEVELOPER"), + + /** + * 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(VmClusterType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (VmClusterType v : VmClusterType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + VmClusterType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static VmClusterType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'VmClusterType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterType") + private final VmClusterType vmClusterType; + + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + * @return the value + **/ + public VmClusterType getVmClusterType() { + return vmClusterType; + } + /** * The compute model of the Autonomous Database. This is required if using the {@code computeCount} parameter. If using {@code cpuCoreCount} then it is an error to specify {@code computeModel} to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. **/ @@ -2417,6 +2616,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", diskRedundancy=").append(String.valueOf(this.diskRedundancy)); sb.append(", scanIpIds=").append(String.valueOf(this.scanIpIds)); sb.append(", vipIds=").append(String.valueOf(this.vipIds)); + sb.append(", scanIpv6Ids=").append(String.valueOf(this.scanIpv6Ids)); + sb.append(", vipv6Ids=").append(String.valueOf(this.vipv6Ids)); sb.append(", scanDnsRecordId=").append(String.valueOf(this.scanDnsRecordId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -2432,6 +2633,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.fileSystemConfigurationDetails)); sb.append(", cloudAutomationUpdateDetails=") .append(String.valueOf(this.cloudAutomationUpdateDetails)); + sb.append(", vmClusterType=").append(String.valueOf(this.vmClusterType)); sb.append(", computeModel=").append(String.valueOf(this.computeModel)); sb.append(")"); return sb.toString(); @@ -2489,6 +2691,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.diskRedundancy, other.diskRedundancy) && java.util.Objects.equals(this.scanIpIds, other.scanIpIds) && java.util.Objects.equals(this.vipIds, other.vipIds) + && java.util.Objects.equals(this.scanIpv6Ids, other.scanIpv6Ids) + && java.util.Objects.equals(this.vipv6Ids, other.vipv6Ids) && java.util.Objects.equals(this.scanDnsRecordId, other.scanDnsRecordId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -2505,6 +2709,7 @@ public boolean equals(Object o) { this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) && java.util.Objects.equals( this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) + && java.util.Objects.equals(this.vmClusterType, other.vmClusterType) && java.util.Objects.equals(this.computeModel, other.computeModel) && super.equals(other); } @@ -2607,6 +2812,8 @@ public int hashCode() { + (this.diskRedundancy == null ? 43 : this.diskRedundancy.hashCode()); result = (result * PRIME) + (this.scanIpIds == null ? 43 : this.scanIpIds.hashCode()); result = (result * PRIME) + (this.vipIds == null ? 43 : this.vipIds.hashCode()); + result = (result * PRIME) + (this.scanIpv6Ids == null ? 43 : this.scanIpv6Ids.hashCode()); + result = (result * PRIME) + (this.vipv6Ids == null ? 43 : this.vipv6Ids.hashCode()); result = (result * PRIME) + (this.scanDnsRecordId == null ? 43 : this.scanDnsRecordId.hashCode()); @@ -2648,6 +2855,9 @@ public int hashCode() { + (this.cloudAutomationUpdateDetails == null ? 43 : this.cloudAutomationUpdateDetails.hashCode()); + result = + (result * PRIME) + + (this.vmClusterType == null ? 43 : this.vmClusterType.hashCode()); result = (result * PRIME) + (this.computeModel == null ? 43 : this.computeModel.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ConvertStandbyAutonomousContainerDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ConvertStandbyAutonomousContainerDatabaseDetails.java new file mode 100644 index 0000000000..0a126667c7 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ConvertStandbyAutonomousContainerDatabaseDetails.java @@ -0,0 +1,260 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 configuration details for change Autonomous Container Database Dataguard role + * + *
+ * 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 = ConvertStandbyAutonomousContainerDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ConvertStandbyAutonomousContainerDatabaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"role", "connectionStringsType"}) + public ConvertStandbyAutonomousContainerDatabaseDetails( + Role role, ConnectionStringsType connectionStringsType) { + super(); + this.role = role; + this.connectionStringsType = connectionStringsType; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private Role role; + + /** + * The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + * + * @param role the value to set + * @return this builder + **/ + public Builder role(Role role) { + this.role = role; + this.__explicitlySet__.add("role"); + return this; + } + /** + * type of connection strings when converting database to snapshot mode + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionStringsType") + private ConnectionStringsType connectionStringsType; + + /** + * type of connection strings when converting database to snapshot mode + * @param connectionStringsType the value to set + * @return this builder + **/ + public Builder connectionStringsType(ConnectionStringsType connectionStringsType) { + this.connectionStringsType = connectionStringsType; + this.__explicitlySet__.add("connectionStringsType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConvertStandbyAutonomousContainerDatabaseDetails build() { + ConvertStandbyAutonomousContainerDatabaseDetails model = + new ConvertStandbyAutonomousContainerDatabaseDetails( + this.role, this.connectionStringsType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ConvertStandbyAutonomousContainerDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("role")) { + this.role(model.getRole()); + } + if (model.wasPropertyExplicitlySet("connectionStringsType")) { + this.connectionStringsType(model.getConnectionStringsType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + * + **/ + public enum Role { + Primary("PRIMARY"), + Standby("STANDBY"), + DisabledStandby("DISABLED_STANDBY"), + BackupCopy("BACKUP_COPY"), + SnapshotStandby("SNAPSHOT_STANDBY"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Role v : Role.values()) { + map.put(v.getValue(), v); + } + } + + Role(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Role create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Role: " + key); + } + }; + /** + * The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private final Role role; + + /** + * The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + * + * @return the value + **/ + public Role getRole() { + return role; + } + + /** + * type of connection strings when converting database to snapshot mode + **/ + public enum ConnectionStringsType { + SnapshotServices("SNAPSHOT_SERVICES"), + PrimaryServices("PRIMARY_SERVICES"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ConnectionStringsType v : ConnectionStringsType.values()) { + map.put(v.getValue(), v); + } + } + + ConnectionStringsType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ConnectionStringsType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ConnectionStringsType: " + key); + } + }; + /** + * type of connection strings when converting database to snapshot mode + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionStringsType") + private final ConnectionStringsType connectionStringsType; + + /** + * type of connection strings when converting database to snapshot mode + * @return the value + **/ + public ConnectionStringsType getConnectionStringsType() { + return connectionStringsType; + } + + @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("ConvertStandbyAutonomousContainerDatabaseDetails("); + sb.append("super=").append(super.toString()); + sb.append("role=").append(String.valueOf(this.role)); + sb.append(", connectionStringsType=").append(String.valueOf(this.connectionStringsType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConvertStandbyAutonomousContainerDatabaseDetails)) { + return false; + } + + ConvertStandbyAutonomousContainerDatabaseDetails other = + (ConvertStandbyAutonomousContainerDatabaseDetails) o; + return java.util.Objects.equals(this.role, other.role) + && java.util.Objects.equals(this.connectionStringsType, other.connectionStringsType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.role == null ? 43 : this.role.hashCode()); + result = + (result * PRIME) + + (this.connectionStringsType == null + ? 43 + : this.connectionStringsType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateApplicationVipDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateApplicationVipDetails.java index f709b1dc47..d4441b4d59 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateApplicationVipDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateApplicationVipDetails.java @@ -28,20 +28,23 @@ public final class CreateApplicationVipDetails "dbNodeId", "cloudVmClusterId", "subnetId", - "ipAddress" + "ipAddress", + "ipv6Address" }) public CreateApplicationVipDetails( String hostnameLabel, String dbNodeId, String cloudVmClusterId, String subnetId, - String ipAddress) { + String ipAddress, + String ipv6Address) { super(); this.hostnameLabel = hostnameLabel; this.dbNodeId = dbNodeId; this.cloudVmClusterId = cloudVmClusterId; this.subnetId = subnetId; this.ipAddress = ipAddress; + this.ipv6Address = ipv6Address; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -111,13 +114,13 @@ public Builder subnetId(String subnetId) { return this; } /** - * The application virtual IP (VIP) address. + * The application virtual IP (VIP) IPv4 address. **/ @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") private String ipAddress; /** - * The application virtual IP (VIP) address. + * The application virtual IP (VIP) IPv4 address. * @param ipAddress the value to set * @return this builder **/ @@ -126,6 +129,22 @@ public Builder ipAddress(String ipAddress) { this.__explicitlySet__.add("ipAddress"); return this; } + /** + * The application virtual IP (VIP) IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6Address") + private String ipv6Address; + + /** + * The application virtual IP (VIP) IPv6 address. + * @param ipv6Address the value to set + * @return this builder + **/ + public Builder ipv6Address(String ipv6Address) { + this.ipv6Address = ipv6Address; + this.__explicitlySet__.add("ipv6Address"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -137,7 +156,8 @@ public CreateApplicationVipDetails build() { this.dbNodeId, this.cloudVmClusterId, this.subnetId, - this.ipAddress); + this.ipAddress, + this.ipv6Address); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -161,6 +181,9 @@ public Builder copy(CreateApplicationVipDetails model) { if (model.wasPropertyExplicitlySet("ipAddress")) { this.ipAddress(model.getIpAddress()); } + if (model.wasPropertyExplicitlySet("ipv6Address")) { + this.ipv6Address(model.getIpv6Address()); + } return this; } } @@ -233,19 +256,33 @@ public String getSubnetId() { } /** - * The application virtual IP (VIP) address. + * The application virtual IP (VIP) IPv4 address. **/ @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") private final String ipAddress; /** - * The application virtual IP (VIP) address. + * The application virtual IP (VIP) IPv4 address. * @return the value **/ public String getIpAddress() { return ipAddress; } + /** + * The application virtual IP (VIP) IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6Address") + private final String ipv6Address; + + /** + * The application virtual IP (VIP) IPv6 address. + * @return the value + **/ + public String getIpv6Address() { + return ipv6Address; + } + @Override public String toString() { return this.toString(true); @@ -265,6 +302,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", cloudVmClusterId=").append(String.valueOf(this.cloudVmClusterId)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", ipAddress=").append(String.valueOf(this.ipAddress)); + sb.append(", ipv6Address=").append(String.valueOf(this.ipv6Address)); sb.append(")"); return sb.toString(); } @@ -284,6 +322,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.cloudVmClusterId, other.cloudVmClusterId) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.ipAddress, other.ipAddress) + && java.util.Objects.equals(this.ipv6Address, other.ipv6Address) && super.equals(other); } @@ -300,6 +339,7 @@ public int hashCode() { + (this.cloudVmClusterId == null ? 43 : this.cloudVmClusterId.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); result = (result * PRIME) + (this.ipAddress == null ? 43 : this.ipAddress.hashCode()); + result = (result * PRIME) + (this.ipv6Address == null ? 43 : this.ipv6Address.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateBackupDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateBackupDetails.java index 1c7a92c77a..3c511b09a2 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateBackupDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateBackupDetails.java @@ -24,11 +24,22 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class CreateBackupDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"databaseId", "displayName"}) - public CreateBackupDetails(String databaseId, String displayName) { + @java.beans.ConstructorProperties({ + "databaseId", + "displayName", + "retentionPeriodInDays", + "retentionPeriodInYears" + }) + public CreateBackupDetails( + String databaseId, + String displayName, + Integer retentionPeriodInDays, + Integer retentionPeriodInYears) { super(); this.databaseId = databaseId; this.displayName = displayName; + this.retentionPeriodInDays = retentionPeriodInDays; + this.retentionPeriodInYears = retentionPeriodInYears; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -65,12 +76,49 @@ public Builder displayName(String displayName) { this.__explicitlySet__.add("displayName"); return this; } + /** + * The retention period of the long term backup in days. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInDays") + private Integer retentionPeriodInDays; + + /** + * The retention period of the long term backup in days. + * @param retentionPeriodInDays the value to set + * @return this builder + **/ + public Builder retentionPeriodInDays(Integer retentionPeriodInDays) { + this.retentionPeriodInDays = retentionPeriodInDays; + this.__explicitlySet__.add("retentionPeriodInDays"); + return this; + } + /** + * The retention period of the long term backup in years. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInYears") + private Integer retentionPeriodInYears; + + /** + * The retention period of the long term backup in years. + * @param retentionPeriodInYears the value to set + * @return this builder + **/ + public Builder retentionPeriodInYears(Integer retentionPeriodInYears) { + this.retentionPeriodInYears = retentionPeriodInYears; + this.__explicitlySet__.add("retentionPeriodInYears"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public CreateBackupDetails build() { - CreateBackupDetails model = new CreateBackupDetails(this.databaseId, this.displayName); + CreateBackupDetails model = + new CreateBackupDetails( + this.databaseId, + this.displayName, + this.retentionPeriodInDays, + this.retentionPeriodInYears); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -85,6 +133,12 @@ public Builder copy(CreateBackupDetails model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } + if (model.wasPropertyExplicitlySet("retentionPeriodInDays")) { + this.retentionPeriodInDays(model.getRetentionPeriodInDays()); + } + if (model.wasPropertyExplicitlySet("retentionPeriodInYears")) { + this.retentionPeriodInYears(model.getRetentionPeriodInYears()); + } return this; } } @@ -128,6 +182,34 @@ public String getDisplayName() { return displayName; } + /** + * The retention period of the long term backup in days. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInDays") + private final Integer retentionPeriodInDays; + + /** + * The retention period of the long term backup in days. + * @return the value + **/ + public Integer getRetentionPeriodInDays() { + return retentionPeriodInDays; + } + + /** + * The retention period of the long term backup in years. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInYears") + private final Integer retentionPeriodInYears; + + /** + * The retention period of the long term backup in years. + * @return the value + **/ + public Integer getRetentionPeriodInYears() { + return retentionPeriodInYears; + } + @Override public String toString() { return this.toString(true); @@ -144,6 +226,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("databaseId=").append(String.valueOf(this.databaseId)); sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", retentionPeriodInDays=").append(String.valueOf(this.retentionPeriodInDays)); + sb.append(", retentionPeriodInYears=").append(String.valueOf(this.retentionPeriodInYears)); sb.append(")"); return sb.toString(); } @@ -160,6 +244,9 @@ public boolean equals(Object o) { CreateBackupDetails other = (CreateBackupDetails) o; return java.util.Objects.equals(this.databaseId, other.databaseId) && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.retentionPeriodInDays, other.retentionPeriodInDays) + && java.util.Objects.equals( + this.retentionPeriodInYears, other.retentionPeriodInYears) && super.equals(other); } @@ -169,6 +256,16 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.retentionPeriodInDays == null + ? 43 + : this.retentionPeriodInDays.hashCode()); + result = + (result * PRIME) + + (this.retentionPeriodInYears == null + ? 43 + : this.retentionPeriodInYears.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudVmClusterDetails.java index e68351805c..4f2052e58d 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudVmClusterDetails.java @@ -57,7 +57,8 @@ public final class CreateCloudVmClusterDetails "dataCollectionOptions", "systemVersion", "fileSystemConfigurationDetails", - "cloudAutomationUpdateDetails" + "cloudAutomationUpdateDetails", + "vmClusterType" }) public CreateCloudVmClusterDetails( String compartmentId, @@ -93,7 +94,8 @@ public CreateCloudVmClusterDetails( DataCollectionOptions dataCollectionOptions, String systemVersion, java.util.List fileSystemConfigurationDetails, - CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { + CloudAutomationUpdateDetails cloudAutomationUpdateDetails, + VmClusterType vmClusterType) { super(); this.compartmentId = compartmentId; this.subscriptionId = subscriptionId; @@ -129,6 +131,7 @@ public CreateCloudVmClusterDetails( this.systemVersion = systemVersion; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.vmClusterType = vmClusterType; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -751,6 +754,22 @@ public Builder cloudAutomationUpdateDetails( this.__explicitlySet__.add("cloudAutomationUpdateDetails"); return this; } + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterType") + private VmClusterType vmClusterType; + + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + * @param vmClusterType the value to set + * @return this builder + **/ + public Builder vmClusterType(VmClusterType vmClusterType) { + this.vmClusterType = vmClusterType; + this.__explicitlySet__.add("vmClusterType"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -791,7 +810,8 @@ public CreateCloudVmClusterDetails build() { this.dataCollectionOptions, this.systemVersion, this.fileSystemConfigurationDetails, - this.cloudAutomationUpdateDetails); + this.cloudAutomationUpdateDetails, + this.vmClusterType); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -902,6 +922,9 @@ public Builder copy(CreateCloudVmClusterDetails model) { if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); } + if (model.wasPropertyExplicitlySet("vmClusterType")) { + this.vmClusterType(model.getVmClusterType()); + } return this; } } @@ -1499,6 +1522,55 @@ public CloudAutomationUpdateDetails getCloudAutomationUpdateDetails() { return cloudAutomationUpdateDetails; } + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + public enum VmClusterType { + Regular("REGULAR"), + Developer("DEVELOPER"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (VmClusterType v : VmClusterType.values()) { + map.put(v.getValue(), v); + } + } + + VmClusterType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static VmClusterType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid VmClusterType: " + key); + } + }; + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterType") + private final VmClusterType vmClusterType; + + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + * @return the value + **/ + public VmClusterType getVmClusterType() { + return vmClusterType; + } + @Override public String toString() { return this.toString(true); @@ -1551,6 +1623,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.fileSystemConfigurationDetails)); sb.append(", cloudAutomationUpdateDetails=") .append(String.valueOf(this.cloudAutomationUpdateDetails)); + sb.append(", vmClusterType=").append(String.valueOf(this.vmClusterType)); sb.append(")"); return sb.toString(); } @@ -1605,6 +1678,7 @@ public boolean equals(Object o) { this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) && java.util.Objects.equals( this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) + && java.util.Objects.equals(this.vmClusterType, other.vmClusterType) && super.equals(other); } @@ -1712,6 +1786,9 @@ public int hashCode() { + (this.cloudAutomationUpdateDetails == null ? 43 : this.cloudAutomationUpdateDetails.hashCode()); + result = + (result * PRIME) + + (this.vmClusterType == null ? 43 : this.vmClusterType.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExadbVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExadbVmClusterDetails.java index 80de4bc10b..066c974ff5 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExadbVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExadbVmClusterDetails.java @@ -51,7 +51,8 @@ public final class CreateExadbVmClusterDetails "freeformTags", "definedTags", "securityAttributes", - "dataCollectionOptions" + "dataCollectionOptions", + "subscriptionId" }) public CreateExadbVmClusterDetails( String compartmentId, @@ -81,7 +82,8 @@ public CreateExadbVmClusterDetails( java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> securityAttributes, - DataCollectionOptions dataCollectionOptions) { + DataCollectionOptions dataCollectionOptions, + String subscriptionId) { super(); this.compartmentId = compartmentId; this.availabilityDomain = availabilityDomain; @@ -111,6 +113,7 @@ public CreateExadbVmClusterDetails( this.definedTags = definedTags; this.securityAttributes = securityAttributes; this.dataCollectionOptions = dataCollectionOptions; + this.subscriptionId = subscriptionId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -517,10 +520,8 @@ public Builder backupNetworkNsgIds(java.util.List backupNetworkNsgIds) { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * **/ @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") @@ -529,10 +530,8 @@ public Builder backupNetworkNsgIds(java.util.List backupNetworkNsgIds) { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * * @param gridImageId the value to set * @return this builder @@ -635,6 +634,22 @@ public Builder dataCollectionOptions(DataCollectionOptions dataCollectionOptions this.__explicitlySet__.add("dataCollectionOptions"); 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(); @@ -669,7 +684,8 @@ public CreateExadbVmClusterDetails build() { this.freeformTags, this.definedTags, this.securityAttributes, - this.dataCollectionOptions); + this.dataCollectionOptions, + this.subscriptionId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -762,6 +778,9 @@ public Builder copy(CreateExadbVmClusterDetails model) { if (model.wasPropertyExplicitlySet("dataCollectionOptions")) { this.dataCollectionOptions(model.getDataCollectionOptions()); } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } return this; } } @@ -1171,10 +1190,8 @@ public java.util.List getBackupNetworkNsgIds() { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * **/ @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") @@ -1183,10 +1200,8 @@ public java.util.List getBackupNetworkNsgIds() { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * * @return the value **/ @@ -1275,6 +1290,20 @@ public DataCollectionOptions getDataCollectionOptions() { return dataCollectionOptions; } + /** + * 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); @@ -1318,6 +1347,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(")"); return sb.toString(); } @@ -1362,6 +1392,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && super.equals(other); } @@ -1443,6 +1474,9 @@ public int hashCode() { + (this.dataCollectionOptions == null ? 43 : this.dataCollectionOptions.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExascaleDbStorageVaultDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExascaleDbStorageVaultDetails.java index 233c0e3505..603e14a8c7 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExascaleDbStorageVaultDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExascaleDbStorageVaultDetails.java @@ -33,7 +33,9 @@ public final class CreateExascaleDbStorageVaultDetails "additionalFlashCacheInPercent", "freeformTags", "definedTags", - "exadataInfrastructureId" + "exadataInfrastructureId", + "clusterPlacementGroupId", + "subscriptionId" }) public CreateExascaleDbStorageVaultDetails( String compartmentId, @@ -45,7 +47,9 @@ public CreateExascaleDbStorageVaultDetails( Integer additionalFlashCacheInPercent, java.util.Map freeformTags, java.util.Map> definedTags, - String exadataInfrastructureId) { + String exadataInfrastructureId, + String clusterPlacementGroupId, + String subscriptionId) { super(); this.compartmentId = compartmentId; this.displayName = displayName; @@ -57,6 +61,8 @@ public CreateExascaleDbStorageVaultDetails( this.freeformTags = freeformTags; this.definedTags = definedTags; this.exadataInfrastructureId = exadataInfrastructureId; + this.clusterPlacementGroupId = clusterPlacementGroupId; + this.subscriptionId = subscriptionId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -232,6 +238,38 @@ public Builder exadataInfrastructureId(String exadataInfrastructureId) { this.__explicitlySet__.add("exadataInfrastructureId"); return this; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + * @param clusterPlacementGroupId the value to set + * @return this builder + **/ + public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { + this.clusterPlacementGroupId = clusterPlacementGroupId; + this.__explicitlySet__.add("clusterPlacementGroupId"); + 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(); @@ -248,7 +286,9 @@ public CreateExascaleDbStorageVaultDetails build() { this.additionalFlashCacheInPercent, this.freeformTags, this.definedTags, - this.exadataInfrastructureId); + this.exadataInfrastructureId, + this.clusterPlacementGroupId, + this.subscriptionId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -287,6 +327,12 @@ public Builder copy(CreateExascaleDbStorageVaultDetails model) { if (model.wasPropertyExplicitlySet("exadataInfrastructureId")) { this.exadataInfrastructureId(model.getExadataInfrastructureId()); } + if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { + this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); + } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } return this; } } @@ -451,6 +497,34 @@ public String getExadataInfrastructureId() { return exadataInfrastructureId; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private final String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + * @return the value + **/ + public String getClusterPlacementGroupId() { + return clusterPlacementGroupId; + } + + /** + * 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); @@ -478,6 +552,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", exadataInfrastructureId=") .append(String.valueOf(this.exadataInfrastructureId)); + sb.append(", clusterPlacementGroupId=") + .append(String.valueOf(this.clusterPlacementGroupId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(")"); return sb.toString(); } @@ -505,6 +582,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals( this.exadataInfrastructureId, other.exadataInfrastructureId) + && java.util.Objects.equals( + this.clusterPlacementGroupId, other.clusterPlacementGroupId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && super.equals(other); } @@ -540,6 +620,14 @@ public int hashCode() { + (this.exadataInfrastructureId == null ? 43 : this.exadataInfrastructureId.hashCode()); + result = + (result * PRIME) + + (this.clusterPlacementGroupId == null + ? 43 + : this.clusterPlacementGroupId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateVmClusterDetails.java index c0f9da483e..bf9db3fd72 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateVmClusterDetails.java @@ -47,6 +47,7 @@ public final class CreateVmClusterDetails "dataCollectionOptions", "systemVersion", "fileSystemConfigurationDetails", + "vmClusterType", "cloudAutomationUpdateDetails", "exascaleDbStorageVaultId" }) @@ -73,6 +74,7 @@ public CreateVmClusterDetails( DataCollectionOptions dataCollectionOptions, String systemVersion, java.util.List fileSystemConfigurationDetails, + VmClusterType vmClusterType, CloudAutomationUpdateDetails cloudAutomationUpdateDetails, String exascaleDbStorageVaultId) { super(); @@ -98,6 +100,7 @@ public CreateVmClusterDetails( this.dataCollectionOptions = dataCollectionOptions; this.systemVersion = systemVersion; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + this.vmClusterType = vmClusterType; this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; } @@ -469,6 +472,22 @@ public Builder fileSystemConfigurationDetails( this.__explicitlySet__.add("fileSystemConfigurationDetails"); return this; } + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterType") + private VmClusterType vmClusterType; + + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + * @param vmClusterType the value to set + * @return this builder + **/ + public Builder vmClusterType(VmClusterType vmClusterType) { + this.vmClusterType = vmClusterType; + this.__explicitlySet__.add("vmClusterType"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") private CloudAutomationUpdateDetails cloudAutomationUpdateDetails; @@ -524,6 +543,7 @@ public CreateVmClusterDetails build() { this.dataCollectionOptions, this.systemVersion, this.fileSystemConfigurationDetails, + this.vmClusterType, this.cloudAutomationUpdateDetails, this.exascaleDbStorageVaultId); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -600,6 +620,9 @@ public Builder copy(CreateVmClusterDetails model) { if (model.wasPropertyExplicitlySet("fileSystemConfigurationDetails")) { this.fileSystemConfigurationDetails(model.getFileSystemConfigurationDetails()); } + if (model.wasPropertyExplicitlySet("vmClusterType")) { + this.vmClusterType(model.getVmClusterType()); + } if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); } @@ -976,6 +999,55 @@ public java.util.List getFileSystemConfigurationD return fileSystemConfigurationDetails; } + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + public enum VmClusterType { + Regular("REGULAR"), + Developer("DEVELOPER"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (VmClusterType v : VmClusterType.values()) { + map.put(v.getValue(), v); + } + } + + VmClusterType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static VmClusterType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid VmClusterType: " + key); + } + }; + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterType") + private final VmClusterType vmClusterType; + + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + * @return the value + **/ + public VmClusterType getVmClusterType() { + return vmClusterType; + } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") private final CloudAutomationUpdateDetails cloudAutomationUpdateDetails; @@ -1036,6 +1108,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", systemVersion=").append(String.valueOf(this.systemVersion)); sb.append(", fileSystemConfigurationDetails=") .append(String.valueOf(this.fileSystemConfigurationDetails)); + sb.append(", vmClusterType=").append(String.valueOf(this.vmClusterType)); sb.append(", cloudAutomationUpdateDetails=") .append(String.valueOf(this.cloudAutomationUpdateDetails)); sb.append(", exascaleDbStorageVaultId=") @@ -1080,6 +1153,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.systemVersion, other.systemVersion) && java.util.Objects.equals( this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) + && java.util.Objects.equals(this.vmClusterType, other.vmClusterType) && java.util.Objects.equals( this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) && java.util.Objects.equals( @@ -1157,6 +1231,9 @@ public int hashCode() { + (this.fileSystemConfigurationDetails == null ? 43 : this.fileSystemConfigurationDetails.hashCode()); + result = + (result * PRIME) + + (this.vmClusterType == null ? 43 : this.vmClusterType.hashCode()); result = (result * PRIME) + (this.cloudAutomationUpdateDetails == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNode.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNode.java index 49ddf290e9..f928e6283d 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNode.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNode.java @@ -26,6 +26,8 @@ public final class DbNode extends com.oracle.bmc.http.internal.ExplicitlySetBmcM "backupVnicId", "hostIpId", "backupIpId", + "hostIpv6Id", + "backupIpv6Id", "vnic2Id", "backupVnic2Id", "lifecycleState", @@ -53,6 +55,8 @@ public DbNode( String backupVnicId, String hostIpId, String backupIpId, + String hostIpv6Id, + String backupIpv6Id, String vnic2Id, String backupVnic2Id, LifecycleState lifecycleState, @@ -79,6 +83,8 @@ public DbNode( this.backupVnicId = backupVnicId; this.hostIpId = hostIpId; this.backupIpId = backupIpId; + this.hostIpv6Id = hostIpv6Id; + this.backupIpv6Id = backupIpv6Id; this.vnic2Id = vnic2Id; this.backupVnic2Id = backupVnic2Id; this.lifecycleState = lifecycleState; @@ -167,8 +173,8 @@ public Builder backupVnicId(String backupVnicId) { return this; } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -178,8 +184,8 @@ public Builder backupVnicId(String backupVnicId) { private String hostIpId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -193,8 +199,8 @@ public Builder hostIpId(String hostIpId) { return this; } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -204,8 +210,8 @@ public Builder hostIpId(String hostIpId) { private String backupIpId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -218,6 +224,54 @@ public Builder backupIpId(String backupIpId) { this.__explicitlySet__.add("backupIpId"); return this; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostIpv6Id") + private String hostIpv6Id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + * @param hostIpv6Id the value to set + * @return this builder + **/ + public Builder hostIpv6Id(String hostIpv6Id) { + this.hostIpv6Id = hostIpv6Id; + this.__explicitlySet__.add("hostIpv6Id"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupIpv6Id") + private String backupIpv6Id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + * @param backupIpv6Id the value to set + * @return this builder + **/ + public Builder backupIpv6Id(String backupIpv6Id) { + this.backupIpv6Id = backupIpv6Id; + this.__explicitlySet__.add("backupIpv6Id"); + return this; + } /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the second VNIC. *

@@ -562,6 +616,8 @@ public DbNode build() { this.backupVnicId, this.hostIpId, this.backupIpId, + this.hostIpv6Id, + this.backupIpv6Id, this.vnic2Id, this.backupVnic2Id, this.lifecycleState, @@ -607,6 +663,12 @@ public Builder copy(DbNode model) { if (model.wasPropertyExplicitlySet("backupIpId")) { this.backupIpId(model.getBackupIpId()); } + if (model.wasPropertyExplicitlySet("hostIpv6Id")) { + this.hostIpv6Id(model.getHostIpv6Id()); + } + if (model.wasPropertyExplicitlySet("backupIpv6Id")) { + this.backupIpv6Id(model.getBackupIpv6Id()); + } if (model.wasPropertyExplicitlySet("vnic2Id")) { this.vnic2Id(model.getVnic2Id()); } @@ -736,8 +798,8 @@ public String getBackupVnicId() { } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -747,8 +809,8 @@ public String getBackupVnicId() { private final String hostIpId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -760,8 +822,8 @@ public String getHostIpId() { } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -771,8 +833,8 @@ public String getHostIpId() { private final String backupIpId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -783,6 +845,50 @@ public String getBackupIpId() { return backupIpId; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostIpv6Id") + private final String hostIpv6Id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + * @return the value + **/ + public String getHostIpv6Id() { + return hostIpv6Id; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupIpv6Id") + private final String backupIpv6Id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + * @return the value + **/ + public String getBackupIpv6Id() { + return backupIpv6Id; + } + /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the second VNIC. *

@@ -1198,6 +1304,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", backupVnicId=").append(String.valueOf(this.backupVnicId)); sb.append(", hostIpId=").append(String.valueOf(this.hostIpId)); sb.append(", backupIpId=").append(String.valueOf(this.backupIpId)); + sb.append(", hostIpv6Id=").append(String.valueOf(this.hostIpv6Id)); + sb.append(", backupIpv6Id=").append(String.valueOf(this.backupIpv6Id)); sb.append(", vnic2Id=").append(String.valueOf(this.vnic2Id)); sb.append(", backupVnic2Id=").append(String.valueOf(this.backupVnic2Id)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); @@ -1240,6 +1348,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.backupVnicId, other.backupVnicId) && java.util.Objects.equals(this.hostIpId, other.hostIpId) && java.util.Objects.equals(this.backupIpId, other.backupIpId) + && java.util.Objects.equals(this.hostIpv6Id, other.hostIpv6Id) + && java.util.Objects.equals(this.backupIpv6Id, other.backupIpv6Id) && java.util.Objects.equals(this.vnic2Id, other.vnic2Id) && java.util.Objects.equals(this.backupVnic2Id, other.backupVnic2Id) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) @@ -1276,6 +1386,8 @@ public int hashCode() { result = (result * PRIME) + (this.backupVnicId == null ? 43 : this.backupVnicId.hashCode()); result = (result * PRIME) + (this.hostIpId == null ? 43 : this.hostIpId.hashCode()); result = (result * PRIME) + (this.backupIpId == null ? 43 : this.backupIpId.hashCode()); + result = (result * PRIME) + (this.hostIpv6Id == null ? 43 : this.hostIpv6Id.hashCode()); + result = (result * PRIME) + (this.backupIpv6Id == null ? 43 : this.backupIpv6Id.hashCode()); result = (result * PRIME) + (this.vnic2Id == null ? 43 : this.vnic2Id.hashCode()); result = (result * PRIME) diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNodeSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNodeSummary.java index 2826523eab..723b62f487 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNodeSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNodeSummary.java @@ -31,6 +31,8 @@ public final class DbNodeSummary extends com.oracle.bmc.http.internal.Explicitly "backupVnicId", "hostIpId", "backupIpId", + "hostIpv6Id", + "backupIpv6Id", "vnic2Id", "backupVnic2Id", "lifecycleState", @@ -58,6 +60,8 @@ public DbNodeSummary( String backupVnicId, String hostIpId, String backupIpId, + String hostIpv6Id, + String backupIpv6Id, String vnic2Id, String backupVnic2Id, LifecycleState lifecycleState, @@ -84,6 +88,8 @@ public DbNodeSummary( this.backupVnicId = backupVnicId; this.hostIpId = hostIpId; this.backupIpId = backupIpId; + this.hostIpv6Id = hostIpv6Id; + this.backupIpv6Id = backupIpv6Id; this.vnic2Id = vnic2Id; this.backupVnic2Id = backupVnic2Id; this.lifecycleState = lifecycleState; @@ -172,8 +178,8 @@ public Builder backupVnicId(String backupVnicId) { return this; } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -183,8 +189,8 @@ public Builder backupVnicId(String backupVnicId) { private String hostIpId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -198,8 +204,8 @@ public Builder hostIpId(String hostIpId) { return this; } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -209,8 +215,8 @@ public Builder hostIpId(String hostIpId) { private String backupIpId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -223,6 +229,54 @@ public Builder backupIpId(String backupIpId) { this.__explicitlySet__.add("backupIpId"); return this; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostIpv6Id") + private String hostIpv6Id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + * @param hostIpv6Id the value to set + * @return this builder + **/ + public Builder hostIpv6Id(String hostIpv6Id) { + this.hostIpv6Id = hostIpv6Id; + this.__explicitlySet__.add("hostIpv6Id"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupIpv6Id") + private String backupIpv6Id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + * @param backupIpv6Id the value to set + * @return this builder + **/ + public Builder backupIpv6Id(String backupIpv6Id) { + this.backupIpv6Id = backupIpv6Id; + this.__explicitlySet__.add("backupIpv6Id"); + return this; + } /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the second VNIC. *

@@ -567,6 +621,8 @@ public DbNodeSummary build() { this.backupVnicId, this.hostIpId, this.backupIpId, + this.hostIpv6Id, + this.backupIpv6Id, this.vnic2Id, this.backupVnic2Id, this.lifecycleState, @@ -612,6 +668,12 @@ public Builder copy(DbNodeSummary model) { if (model.wasPropertyExplicitlySet("backupIpId")) { this.backupIpId(model.getBackupIpId()); } + if (model.wasPropertyExplicitlySet("hostIpv6Id")) { + this.hostIpv6Id(model.getHostIpv6Id()); + } + if (model.wasPropertyExplicitlySet("backupIpv6Id")) { + this.backupIpv6Id(model.getBackupIpv6Id()); + } if (model.wasPropertyExplicitlySet("vnic2Id")) { this.vnic2Id(model.getVnic2Id()); } @@ -741,8 +803,8 @@ public String getBackupVnicId() { } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -752,8 +814,8 @@ public String getBackupVnicId() { private final String hostIpId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -765,8 +827,8 @@ public String getHostIpId() { } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -776,8 +838,8 @@ public String getHostIpId() { private final String backupIpId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IP address associated with the database node. Use this OCID with either the - * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IP address + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv4 address associated with the database node. Use this OCID with either the + * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp} or the {@link #getPublicIpByPrivateIpId(GetPublicIpByPrivateIpIdRequest) getPublicIpByPrivateIpId} API to get the IPv4 address * needed to make a database connection. *

**Note:** Applies only to Exadata Cloud Service. @@ -788,6 +850,50 @@ public String getBackupIpId() { return backupIpId; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostIpv6Id") + private final String hostIpv6Id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + * @return the value + **/ + public String getHostIpv6Id() { + return hostIpv6Id; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupIpv6Id") + private final String backupIpv6Id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup IPv6 address associated with the database node. Use this OCID with the + * {@link #getIpv6(GetIpv6Request) getIpv6} API to get the IPv6 address needed to make a database connection. + *

+ **Note:** Applies only to Exadata Cloud Service. + * + * @return the value + **/ + public String getBackupIpv6Id() { + return backupIpv6Id; + } + /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the second VNIC. *

@@ -1203,6 +1309,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", backupVnicId=").append(String.valueOf(this.backupVnicId)); sb.append(", hostIpId=").append(String.valueOf(this.hostIpId)); sb.append(", backupIpId=").append(String.valueOf(this.backupIpId)); + sb.append(", hostIpv6Id=").append(String.valueOf(this.hostIpv6Id)); + sb.append(", backupIpv6Id=").append(String.valueOf(this.backupIpv6Id)); sb.append(", vnic2Id=").append(String.valueOf(this.vnic2Id)); sb.append(", backupVnic2Id=").append(String.valueOf(this.backupVnic2Id)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); @@ -1245,6 +1353,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.backupVnicId, other.backupVnicId) && java.util.Objects.equals(this.hostIpId, other.hostIpId) && java.util.Objects.equals(this.backupIpId, other.backupIpId) + && java.util.Objects.equals(this.hostIpv6Id, other.hostIpv6Id) + && java.util.Objects.equals(this.backupIpv6Id, other.backupIpv6Id) && java.util.Objects.equals(this.vnic2Id, other.vnic2Id) && java.util.Objects.equals(this.backupVnic2Id, other.backupVnic2Id) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) @@ -1281,6 +1391,8 @@ public int hashCode() { result = (result * PRIME) + (this.backupVnicId == null ? 43 : this.backupVnicId.hashCode()); result = (result * PRIME) + (this.hostIpId == null ? 43 : this.hostIpId.hashCode()); result = (result * PRIME) + (this.backupIpId == null ? 43 : this.backupIpId.hashCode()); + result = (result * PRIME) + (this.hostIpv6Id == null ? 43 : this.hostIpv6Id.hashCode()); + result = (result * PRIME) + (this.backupIpv6Id == null ? 43 : this.backupIpv6Id.hashCode()); result = (result * PRIME) + (this.vnic2Id == null ? 43 : this.vnic2Id.hashCode()); result = (result * PRIME) diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/EditAutonomousContainerDatabaseDataguardDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/EditAutonomousContainerDatabaseDataguardDetails.java new file mode 100644 index 0000000000..3a4790ed41 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/EditAutonomousContainerDatabaseDataguardDetails.java @@ -0,0 +1,294 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 configuration details for updating a Autonomous Container DatabaseData Guard for a Autonomous Container 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: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = EditAutonomousContainerDatabaseDataguardDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class EditAutonomousContainerDatabaseDataguardDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "isAutomaticFailoverEnabled", + "protectionMode", + "fastStartFailOverLagLimitInSeconds" + }) + public EditAutonomousContainerDatabaseDataguardDetails( + Boolean isAutomaticFailoverEnabled, + ProtectionMode protectionMode, + Integer fastStartFailOverLagLimitInSeconds) { + super(); + this.isAutomaticFailoverEnabled = isAutomaticFailoverEnabled; + this.protectionMode = protectionMode; + this.fastStartFailOverLagLimitInSeconds = fastStartFailOverLagLimitInSeconds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutomaticFailoverEnabled") + private Boolean isAutomaticFailoverEnabled; + + /** + * Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + * + * @param isAutomaticFailoverEnabled the value to set + * @return this builder + **/ + public Builder isAutomaticFailoverEnabled(Boolean isAutomaticFailoverEnabled) { + this.isAutomaticFailoverEnabled = isAutomaticFailoverEnabled; + this.__explicitlySet__.add("isAutomaticFailoverEnabled"); + return this; + } + /** + * 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. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private ProtectionMode protectionMode; + + /** + * 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. + * + * @param protectionMode the value to set + * @return this builder + **/ + public Builder protectionMode(ProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + /** + * The lag time for my preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time for my 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; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EditAutonomousContainerDatabaseDataguardDetails build() { + EditAutonomousContainerDatabaseDataguardDetails model = + new EditAutonomousContainerDatabaseDataguardDetails( + this.isAutomaticFailoverEnabled, + this.protectionMode, + this.fastStartFailOverLagLimitInSeconds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EditAutonomousContainerDatabaseDataguardDetails model) { + if (model.wasPropertyExplicitlySet("isAutomaticFailoverEnabled")) { + this.isAutomaticFailoverEnabled(model.getIsAutomaticFailoverEnabled()); + } + if (model.wasPropertyExplicitlySet("protectionMode")) { + this.protectionMode(model.getProtectionMode()); + } + if (model.wasPropertyExplicitlySet("fastStartFailOverLagLimitInSeconds")) { + this.fastStartFailOverLagLimitInSeconds( + model.getFastStartFailOverLagLimitInSeconds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutomaticFailoverEnabled") + private final Boolean isAutomaticFailoverEnabled; + + /** + * Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + * + * @return the value + **/ + public Boolean getIsAutomaticFailoverEnabled() { + return isAutomaticFailoverEnabled; + } + + /** + * 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. + * + **/ + public enum ProtectionMode { + MaximumAvailability("MAXIMUM_AVAILABILITY"), + MaximumPerformance("MAXIMUM_PERFORMANCE"), + ; + + 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 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. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private final ProtectionMode protectionMode; + + /** + * 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. + * + * @return the value + **/ + public ProtectionMode getProtectionMode() { + return protectionMode; + } + + /** + * The lag time for my preference based on data loss tolerance in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fastStartFailOverLagLimitInSeconds") + private final Integer fastStartFailOverLagLimitInSeconds; + + /** + * The lag time for my preference based on data loss tolerance in seconds. + * @return the value + **/ + public Integer getFastStartFailOverLagLimitInSeconds() { + return fastStartFailOverLagLimitInSeconds; + } + + @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("EditAutonomousContainerDatabaseDataguardDetails("); + sb.append("super=").append(super.toString()); + sb.append("isAutomaticFailoverEnabled=") + .append(String.valueOf(this.isAutomaticFailoverEnabled)); + sb.append(", protectionMode=").append(String.valueOf(this.protectionMode)); + sb.append(", fastStartFailOverLagLimitInSeconds=") + .append(String.valueOf(this.fastStartFailOverLagLimitInSeconds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EditAutonomousContainerDatabaseDataguardDetails)) { + return false; + } + + EditAutonomousContainerDatabaseDataguardDetails other = + (EditAutonomousContainerDatabaseDataguardDetails) o; + return java.util.Objects.equals( + this.isAutomaticFailoverEnabled, other.isAutomaticFailoverEnabled) + && java.util.Objects.equals(this.protectionMode, other.protectionMode) + && java.util.Objects.equals( + this.fastStartFailOverLagLimitInSeconds, + other.fastStartFailOverLagLimitInSeconds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.isAutomaticFailoverEnabled == null + ? 43 + : this.isAutomaticFailoverEnabled.hashCode()); + result = + (result * PRIME) + + (this.protectionMode == null ? 43 : this.protectionMode.hashCode()); + result = + (result * PRIME) + + (this.fastStartFailOverLagLimitInSeconds == null + ? 43 + : this.fastStartFailOverLagLimitInSeconds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmCluster.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmCluster.java index 0366880a77..b70999165f 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmCluster.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmCluster.java @@ -66,7 +66,9 @@ public final class ExadbVmCluster extends com.oracle.bmc.http.internal.Explicitl "snapshotFileSystemStorage", "totalFileSystemStorage", "exascaleDbStorageVaultId", - "memorySizeInGBs" + "memorySizeInGBs", + "clusterPlacementGroupId", + "subscriptionId" }) public ExadbVmCluster( ExadataIormConfig iormConfigCache, @@ -114,7 +116,9 @@ public ExadbVmCluster( ExadbVmClusterStorageDetails snapshotFileSystemStorage, ExadbVmClusterStorageDetails totalFileSystemStorage, String exascaleDbStorageVaultId, - Integer memorySizeInGBs) { + Integer memorySizeInGBs, + String clusterPlacementGroupId, + String subscriptionId) { super(); this.iormConfigCache = iormConfigCache; this.id = id; @@ -162,6 +166,8 @@ public ExadbVmCluster( this.totalFileSystemStorage = totalFileSystemStorage; this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; this.memorySizeInGBs = memorySizeInGBs; + this.clusterPlacementGroupId = clusterPlacementGroupId; + this.subscriptionId = subscriptionId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -542,10 +548,8 @@ public Builder giVersion(String giVersion) { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * **/ @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") @@ -554,10 +558,8 @@ public Builder giVersion(String giVersion) { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * * @param gridImageId the value to set * @return this builder @@ -982,6 +984,38 @@ public Builder memorySizeInGBs(Integer memorySizeInGBs) { this.__explicitlySet__.add("memorySizeInGBs"); return this; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + * @param clusterPlacementGroupId the value to set + * @return this builder + **/ + public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { + this.clusterPlacementGroupId = clusterPlacementGroupId; + this.__explicitlySet__.add("clusterPlacementGroupId"); + 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(); @@ -1034,7 +1068,9 @@ public ExadbVmCluster build() { this.snapshotFileSystemStorage, this.totalFileSystemStorage, this.exascaleDbStorageVaultId, - this.memorySizeInGBs); + this.memorySizeInGBs, + this.clusterPlacementGroupId, + this.subscriptionId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -1181,6 +1217,12 @@ public Builder copy(ExadbVmCluster model) { if (model.wasPropertyExplicitlySet("memorySizeInGBs")) { this.memorySizeInGBs(model.getMemorySizeInGBs()); } + if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { + this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); + } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } return this; } } @@ -1583,10 +1625,8 @@ public String getGiVersion() { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * **/ @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") @@ -1595,10 +1635,8 @@ public String getGiVersion() { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * * @return the value **/ @@ -2067,6 +2105,34 @@ public Integer getMemorySizeInGBs() { return memorySizeInGBs; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private final String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + * @return the value + **/ + public String getClusterPlacementGroupId() { + return clusterPlacementGroupId; + } + + /** + * 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); @@ -2130,6 +2196,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", exascaleDbStorageVaultId=") .append(String.valueOf(this.exascaleDbStorageVaultId)); sb.append(", memorySizeInGBs=").append(String.valueOf(this.memorySizeInGBs)); + sb.append(", clusterPlacementGroupId=") + .append(String.valueOf(this.clusterPlacementGroupId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(")"); return sb.toString(); } @@ -2195,6 +2264,9 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) && java.util.Objects.equals(this.memorySizeInGBs, other.memorySizeInGBs) + && java.util.Objects.equals( + this.clusterPlacementGroupId, other.clusterPlacementGroupId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && super.equals(other); } @@ -2318,6 +2390,14 @@ public int hashCode() { result = (result * PRIME) + (this.memorySizeInGBs == null ? 43 : this.memorySizeInGBs.hashCode()); + result = + (result * PRIME) + + (this.clusterPlacementGroupId == null + ? 43 + : this.clusterPlacementGroupId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterSummary.java index bb98459af8..3d00f9735f 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterSummary.java @@ -68,7 +68,9 @@ public final class ExadbVmClusterSummary "snapshotFileSystemStorage", "totalFileSystemStorage", "exascaleDbStorageVaultId", - "memorySizeInGBs" + "memorySizeInGBs", + "clusterPlacementGroupId", + "subscriptionId" }) public ExadbVmClusterSummary( String id, @@ -115,7 +117,9 @@ public ExadbVmClusterSummary( ExadbVmClusterStorageDetails snapshotFileSystemStorage, ExadbVmClusterStorageDetails totalFileSystemStorage, String exascaleDbStorageVaultId, - Integer memorySizeInGBs) { + Integer memorySizeInGBs, + String clusterPlacementGroupId, + String subscriptionId) { super(); this.id = id; this.compartmentId = compartmentId; @@ -162,6 +166,8 @@ public ExadbVmClusterSummary( this.totalFileSystemStorage = totalFileSystemStorage; this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; this.memorySizeInGBs = memorySizeInGBs; + this.clusterPlacementGroupId = clusterPlacementGroupId; + this.subscriptionId = subscriptionId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -533,10 +539,8 @@ public Builder giVersion(String giVersion) { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * **/ @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") @@ -545,10 +549,8 @@ public Builder giVersion(String giVersion) { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * * @param gridImageId the value to set * @return this builder @@ -973,6 +975,38 @@ public Builder memorySizeInGBs(Integer memorySizeInGBs) { this.__explicitlySet__.add("memorySizeInGBs"); return this; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + * @param clusterPlacementGroupId the value to set + * @return this builder + **/ + public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { + this.clusterPlacementGroupId = clusterPlacementGroupId; + this.__explicitlySet__.add("clusterPlacementGroupId"); + 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(); @@ -1024,7 +1058,9 @@ public ExadbVmClusterSummary build() { this.snapshotFileSystemStorage, this.totalFileSystemStorage, this.exascaleDbStorageVaultId, - this.memorySizeInGBs); + this.memorySizeInGBs, + this.clusterPlacementGroupId, + this.subscriptionId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -1168,6 +1204,12 @@ public Builder copy(ExadbVmClusterSummary model) { if (model.wasPropertyExplicitlySet("memorySizeInGBs")) { this.memorySizeInGBs(model.getMemorySizeInGBs()); } + if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { + this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); + } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } return this; } } @@ -1563,10 +1605,8 @@ public String getGiVersion() { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * **/ @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") @@ -1575,10 +1615,8 @@ public String getGiVersion() { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * * @return the value **/ @@ -2047,6 +2085,34 @@ public Integer getMemorySizeInGBs() { return memorySizeInGBs; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private final String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + * @return the value + **/ + public String getClusterPlacementGroupId() { + return clusterPlacementGroupId; + } + + /** + * 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); @@ -2109,6 +2175,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", exascaleDbStorageVaultId=") .append(String.valueOf(this.exascaleDbStorageVaultId)); sb.append(", memorySizeInGBs=").append(String.valueOf(this.memorySizeInGBs)); + sb.append(", clusterPlacementGroupId=") + .append(String.valueOf(this.clusterPlacementGroupId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(")"); return sb.toString(); } @@ -2173,6 +2242,9 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) && java.util.Objects.equals(this.memorySizeInGBs, other.memorySizeInGBs) + && java.util.Objects.equals( + this.clusterPlacementGroupId, other.clusterPlacementGroupId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && super.equals(other); } @@ -2293,6 +2365,14 @@ public int hashCode() { result = (result * PRIME) + (this.memorySizeInGBs == null ? 43 : this.memorySizeInGBs.hashCode()); + result = + (result * PRIME) + + (this.clusterPlacementGroupId == null + ? 43 + : this.clusterPlacementGroupId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVault.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVault.java index 09a7637735..e831c1ccc6 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVault.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVault.java @@ -40,7 +40,9 @@ public final class ExascaleDbStorageVault "exadataInfrastructureId", "systemTags", "highCapacityDatabaseStorage", - "additionalFlashCacheInPercent" + "additionalFlashCacheInPercent", + "clusterPlacementGroupId", + "subscriptionId" }) public ExascaleDbStorageVault( String id, @@ -59,7 +61,9 @@ public ExascaleDbStorageVault( String exadataInfrastructureId, java.util.Map> systemTags, ExascaleDbStorageDetails highCapacityDatabaseStorage, - Integer additionalFlashCacheInPercent) { + Integer additionalFlashCacheInPercent, + String clusterPlacementGroupId, + String subscriptionId) { super(); this.id = id; this.compartmentId = compartmentId; @@ -78,6 +82,8 @@ public ExascaleDbStorageVault( this.systemTags = systemTags; this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + this.clusterPlacementGroupId = clusterPlacementGroupId; + this.subscriptionId = subscriptionId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -375,6 +381,38 @@ public Builder additionalFlashCacheInPercent(Integer additionalFlashCacheInPerce this.__explicitlySet__.add("additionalFlashCacheInPercent"); return this; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + * @param clusterPlacementGroupId the value to set + * @return this builder + **/ + public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { + this.clusterPlacementGroupId = clusterPlacementGroupId; + this.__explicitlySet__.add("clusterPlacementGroupId"); + 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(); @@ -398,7 +436,9 @@ public ExascaleDbStorageVault build() { this.exadataInfrastructureId, this.systemTags, this.highCapacityDatabaseStorage, - this.additionalFlashCacheInPercent); + this.additionalFlashCacheInPercent, + this.clusterPlacementGroupId, + this.subscriptionId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -458,6 +498,12 @@ public Builder copy(ExascaleDbStorageVault model) { if (model.wasPropertyExplicitlySet("additionalFlashCacheInPercent")) { this.additionalFlashCacheInPercent(model.getAdditionalFlashCacheInPercent()); } + if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { + this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); + } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } return this; } } @@ -782,6 +828,34 @@ public Integer getAdditionalFlashCacheInPercent() { return additionalFlashCacheInPercent; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private final String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + * @return the value + **/ + public String getClusterPlacementGroupId() { + return clusterPlacementGroupId; + } + + /** + * 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); @@ -816,6 +890,9 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.highCapacityDatabaseStorage)); sb.append(", additionalFlashCacheInPercent=") .append(String.valueOf(this.additionalFlashCacheInPercent)); + sb.append(", clusterPlacementGroupId=") + .append(String.valueOf(this.clusterPlacementGroupId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(")"); return sb.toString(); } @@ -850,6 +927,9 @@ public boolean equals(Object o) { this.highCapacityDatabaseStorage, other.highCapacityDatabaseStorage) && java.util.Objects.equals( this.additionalFlashCacheInPercent, other.additionalFlashCacheInPercent) + && java.util.Objects.equals( + this.clusterPlacementGroupId, other.clusterPlacementGroupId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && super.equals(other); } @@ -898,6 +978,14 @@ public int hashCode() { + (this.additionalFlashCacheInPercent == null ? 43 : this.additionalFlashCacheInPercent.hashCode()); + result = + (result * PRIME) + + (this.clusterPlacementGroupId == null + ? 43 + : this.clusterPlacementGroupId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVaultSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVaultSummary.java index 5f96bda383..4e066ba9ed 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVaultSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVaultSummary.java @@ -39,7 +39,9 @@ public final class ExascaleDbStorageVaultSummary "highCapacityDatabaseStorage", "additionalFlashCacheInPercent", "vmClusterCount", - "exadataInfrastructureId" + "exadataInfrastructureId", + "clusterPlacementGroupId", + "subscriptionId" }) public ExascaleDbStorageVaultSummary( String id, @@ -57,7 +59,9 @@ public ExascaleDbStorageVaultSummary( ExascaleDbStorageDetails highCapacityDatabaseStorage, Integer additionalFlashCacheInPercent, Integer vmClusterCount, - String exadataInfrastructureId) { + String exadataInfrastructureId, + String clusterPlacementGroupId, + String subscriptionId) { super(); this.id = id; this.compartmentId = compartmentId; @@ -75,6 +79,8 @@ public ExascaleDbStorageVaultSummary( this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; this.vmClusterCount = vmClusterCount; this.exadataInfrastructureId = exadataInfrastructureId; + this.clusterPlacementGroupId = clusterPlacementGroupId; + this.subscriptionId = subscriptionId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -352,6 +358,38 @@ public Builder exadataInfrastructureId(String exadataInfrastructureId) { this.__explicitlySet__.add("exadataInfrastructureId"); return this; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + * @param clusterPlacementGroupId the value to set + * @return this builder + **/ + public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { + this.clusterPlacementGroupId = clusterPlacementGroupId; + this.__explicitlySet__.add("clusterPlacementGroupId"); + 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(); @@ -374,7 +412,9 @@ public ExascaleDbStorageVaultSummary build() { this.highCapacityDatabaseStorage, this.additionalFlashCacheInPercent, this.vmClusterCount, - this.exadataInfrastructureId); + this.exadataInfrastructureId, + this.clusterPlacementGroupId, + this.subscriptionId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -431,6 +471,12 @@ public Builder copy(ExascaleDbStorageVaultSummary model) { if (model.wasPropertyExplicitlySet("exadataInfrastructureId")) { this.exadataInfrastructureId(model.getExadataInfrastructureId()); } + if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { + this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); + } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } return this; } } @@ -685,6 +731,34 @@ public String getExadataInfrastructureId() { return exadataInfrastructureId; } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private final String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. + * @return the value + **/ + public String getClusterPlacementGroupId() { + return clusterPlacementGroupId; + } + + /** + * 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); @@ -718,6 +792,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", vmClusterCount=").append(String.valueOf(this.vmClusterCount)); sb.append(", exadataInfrastructureId=") .append(String.valueOf(this.exadataInfrastructureId)); + sb.append(", clusterPlacementGroupId=") + .append(String.valueOf(this.clusterPlacementGroupId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(")"); return sb.toString(); } @@ -751,6 +828,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.vmClusterCount, other.vmClusterCount) && java.util.Objects.equals( this.exadataInfrastructureId, other.exadataInfrastructureId) + && java.util.Objects.equals( + this.clusterPlacementGroupId, other.clusterPlacementGroupId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && super.equals(other); } @@ -798,6 +878,14 @@ public int hashCode() { + (this.exadataInfrastructureId == null ? 43 : this.exadataInfrastructureId.hashCode()); + result = + (result * PRIME) + + (this.clusterPlacementGroupId == null + ? 43 + : this.clusterPlacementGroupId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRun.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRun.java index eea3e3d27f..72cc234685 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRun.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRun.java @@ -37,6 +37,7 @@ public final class MaintenanceRun extends com.oracle.bmc.http.internal.Explicitl "maintenanceSubtype", "isDstFileUpdateEnabled", "peerMaintenanceRunId", + "peerMaintenanceRunIds", "patchingMode", "patchFailureCount", "targetDbServerVersion", @@ -71,6 +72,7 @@ public MaintenanceRun( MaintenanceSubtype maintenanceSubtype, Boolean isDstFileUpdateEnabled, String peerMaintenanceRunId, + java.util.List peerMaintenanceRunIds, PatchingMode patchingMode, Integer patchFailureCount, String targetDbServerVersion, @@ -104,6 +106,7 @@ public MaintenanceRun( this.maintenanceSubtype = maintenanceSubtype; this.isDstFileUpdateEnabled = isDstFileUpdateEnabled; this.peerMaintenanceRunId = peerMaintenanceRunId; + this.peerMaintenanceRunIds = peerMaintenanceRunIds; this.patchingMode = patchingMode; this.patchFailureCount = patchFailureCount; this.targetDbServerVersion = targetDbServerVersion; @@ -382,6 +385,22 @@ public Builder peerMaintenanceRunId(String peerMaintenanceRunId) { this.__explicitlySet__.add("peerMaintenanceRunId"); return this; } + /** + * The list of OCIDs for the maintenance runs associated with their Autonomous Data Guard peer container databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerMaintenanceRunIds") + private java.util.List peerMaintenanceRunIds; + + /** + * The list of OCIDs for the maintenance runs associated with their Autonomous Data Guard peer container databases. + * @param peerMaintenanceRunIds the value to set + * @return this builder + **/ + public Builder peerMaintenanceRunIds(java.util.List peerMaintenanceRunIds) { + this.peerMaintenanceRunIds = peerMaintenanceRunIds; + this.__explicitlySet__.add("peerMaintenanceRunIds"); + return this; + } /** * Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING. *

@@ -665,6 +684,7 @@ public MaintenanceRun build() { this.maintenanceSubtype, this.isDstFileUpdateEnabled, this.peerMaintenanceRunId, + this.peerMaintenanceRunIds, this.patchingMode, this.patchFailureCount, this.targetDbServerVersion, @@ -737,6 +757,9 @@ public Builder copy(MaintenanceRun model) { if (model.wasPropertyExplicitlySet("peerMaintenanceRunId")) { this.peerMaintenanceRunId(model.getPeerMaintenanceRunId()); } + if (model.wasPropertyExplicitlySet("peerMaintenanceRunIds")) { + this.peerMaintenanceRunIds(model.getPeerMaintenanceRunIds()); + } if (model.wasPropertyExplicitlySet("patchingMode")) { this.patchingMode(model.getPatchingMode()); } @@ -1240,6 +1263,20 @@ public String getPeerMaintenanceRunId() { return peerMaintenanceRunId; } + /** + * The list of OCIDs for the maintenance runs associated with their Autonomous Data Guard peer container databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerMaintenanceRunIds") + private final java.util.List peerMaintenanceRunIds; + + /** + * The list of OCIDs for the maintenance runs associated with their Autonomous Data Guard peer container databases. + * @return the value + **/ + public java.util.List getPeerMaintenanceRunIds() { + return peerMaintenanceRunIds; + } + /** * Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING. *

@@ -1597,6 +1634,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", maintenanceSubtype=").append(String.valueOf(this.maintenanceSubtype)); sb.append(", isDstFileUpdateEnabled=").append(String.valueOf(this.isDstFileUpdateEnabled)); sb.append(", peerMaintenanceRunId=").append(String.valueOf(this.peerMaintenanceRunId)); + sb.append(", peerMaintenanceRunIds=").append(String.valueOf(this.peerMaintenanceRunIds)); sb.append(", patchingMode=").append(String.valueOf(this.patchingMode)); sb.append(", patchFailureCount=").append(String.valueOf(this.patchFailureCount)); sb.append(", targetDbServerVersion=").append(String.valueOf(this.targetDbServerVersion)); @@ -1652,6 +1690,7 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.isDstFileUpdateEnabled, other.isDstFileUpdateEnabled) && java.util.Objects.equals(this.peerMaintenanceRunId, other.peerMaintenanceRunId) + && java.util.Objects.equals(this.peerMaintenanceRunIds, other.peerMaintenanceRunIds) && java.util.Objects.equals(this.patchingMode, other.patchingMode) && java.util.Objects.equals(this.patchFailureCount, other.patchFailureCount) && java.util.Objects.equals(this.targetDbServerVersion, other.targetDbServerVersion) @@ -1729,6 +1768,11 @@ public int hashCode() { + (this.peerMaintenanceRunId == null ? 43 : this.peerMaintenanceRunId.hashCode()); + result = + (result * PRIME) + + (this.peerMaintenanceRunIds == null + ? 43 + : this.peerMaintenanceRunIds.hashCode()); result = (result * PRIME) + (this.patchingMode == null ? 43 : this.patchingMode.hashCode()); result = (result * PRIME) diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunSummary.java index 030a0de091..6fef028efd 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunSummary.java @@ -40,6 +40,7 @@ public final class MaintenanceRunSummary "maintenanceSubtype", "isDstFileUpdateEnabled", "peerMaintenanceRunId", + "peerMaintenanceRunIds", "patchingMode", "patchFailureCount", "targetDbServerVersion", @@ -74,6 +75,7 @@ public MaintenanceRunSummary( MaintenanceSubtype maintenanceSubtype, Boolean isDstFileUpdateEnabled, String peerMaintenanceRunId, + java.util.List peerMaintenanceRunIds, PatchingMode patchingMode, Integer patchFailureCount, String targetDbServerVersion, @@ -107,6 +109,7 @@ public MaintenanceRunSummary( this.maintenanceSubtype = maintenanceSubtype; this.isDstFileUpdateEnabled = isDstFileUpdateEnabled; this.peerMaintenanceRunId = peerMaintenanceRunId; + this.peerMaintenanceRunIds = peerMaintenanceRunIds; this.patchingMode = patchingMode; this.patchFailureCount = patchFailureCount; this.targetDbServerVersion = targetDbServerVersion; @@ -385,6 +388,22 @@ public Builder peerMaintenanceRunId(String peerMaintenanceRunId) { this.__explicitlySet__.add("peerMaintenanceRunId"); return this; } + /** + * The list of OCIDs for the maintenance runs associated with their Autonomous Data Guard peer container databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerMaintenanceRunIds") + private java.util.List peerMaintenanceRunIds; + + /** + * The list of OCIDs for the maintenance runs associated with their Autonomous Data Guard peer container databases. + * @param peerMaintenanceRunIds the value to set + * @return this builder + **/ + public Builder peerMaintenanceRunIds(java.util.List peerMaintenanceRunIds) { + this.peerMaintenanceRunIds = peerMaintenanceRunIds; + this.__explicitlySet__.add("peerMaintenanceRunIds"); + return this; + } /** * Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING. *

@@ -668,6 +687,7 @@ public MaintenanceRunSummary build() { this.maintenanceSubtype, this.isDstFileUpdateEnabled, this.peerMaintenanceRunId, + this.peerMaintenanceRunIds, this.patchingMode, this.patchFailureCount, this.targetDbServerVersion, @@ -740,6 +760,9 @@ public Builder copy(MaintenanceRunSummary model) { if (model.wasPropertyExplicitlySet("peerMaintenanceRunId")) { this.peerMaintenanceRunId(model.getPeerMaintenanceRunId()); } + if (model.wasPropertyExplicitlySet("peerMaintenanceRunIds")) { + this.peerMaintenanceRunIds(model.getPeerMaintenanceRunIds()); + } if (model.wasPropertyExplicitlySet("patchingMode")) { this.patchingMode(model.getPatchingMode()); } @@ -1243,6 +1266,20 @@ public String getPeerMaintenanceRunId() { return peerMaintenanceRunId; } + /** + * The list of OCIDs for the maintenance runs associated with their Autonomous Data Guard peer container databases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerMaintenanceRunIds") + private final java.util.List peerMaintenanceRunIds; + + /** + * The list of OCIDs for the maintenance runs associated with their Autonomous Data Guard peer container databases. + * @return the value + **/ + public java.util.List getPeerMaintenanceRunIds() { + return peerMaintenanceRunIds; + } + /** * Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING. *

@@ -1600,6 +1637,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", maintenanceSubtype=").append(String.valueOf(this.maintenanceSubtype)); sb.append(", isDstFileUpdateEnabled=").append(String.valueOf(this.isDstFileUpdateEnabled)); sb.append(", peerMaintenanceRunId=").append(String.valueOf(this.peerMaintenanceRunId)); + sb.append(", peerMaintenanceRunIds=").append(String.valueOf(this.peerMaintenanceRunIds)); sb.append(", patchingMode=").append(String.valueOf(this.patchingMode)); sb.append(", patchFailureCount=").append(String.valueOf(this.patchFailureCount)); sb.append(", targetDbServerVersion=").append(String.valueOf(this.targetDbServerVersion)); @@ -1655,6 +1693,7 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.isDstFileUpdateEnabled, other.isDstFileUpdateEnabled) && java.util.Objects.equals(this.peerMaintenanceRunId, other.peerMaintenanceRunId) + && java.util.Objects.equals(this.peerMaintenanceRunIds, other.peerMaintenanceRunIds) && java.util.Objects.equals(this.patchingMode, other.patchingMode) && java.util.Objects.equals(this.patchFailureCount, other.patchFailureCount) && java.util.Objects.equals(this.targetDbServerVersion, other.targetDbServerVersion) @@ -1732,6 +1771,11 @@ public int hashCode() { + (this.peerMaintenanceRunId == null ? 43 : this.peerMaintenanceRunId.hashCode()); + result = + (result * PRIME) + + (this.peerMaintenanceRunIds == null + ? 43 + : this.peerMaintenanceRunIds.hashCode()); result = (result * PRIME) + (this.patchingMode == null ? 43 : this.patchingMode.hashCode()); result = (result * PRIME) diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateBackupDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateBackupDetails.java new file mode 100644 index 0000000000..cc09001c6b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateBackupDetails.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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; + +/** + * Describes the parameters for updating the backup 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: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateBackupDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateBackupDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"retentionPeriodInDays", "retentionPeriodInYears"}) + public UpdateBackupDetails(Integer retentionPeriodInDays, Integer retentionPeriodInYears) { + super(); + this.retentionPeriodInDays = retentionPeriodInDays; + this.retentionPeriodInYears = retentionPeriodInYears; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The retention period of the long term backup in days. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInDays") + private Integer retentionPeriodInDays; + + /** + * The retention period of the long term backup in days. + * @param retentionPeriodInDays the value to set + * @return this builder + **/ + public Builder retentionPeriodInDays(Integer retentionPeriodInDays) { + this.retentionPeriodInDays = retentionPeriodInDays; + this.__explicitlySet__.add("retentionPeriodInDays"); + return this; + } + /** + * The retention period of the long term backup in years. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInYears") + private Integer retentionPeriodInYears; + + /** + * The retention period of the long term backup in years. + * @param retentionPeriodInYears the value to set + * @return this builder + **/ + public Builder retentionPeriodInYears(Integer retentionPeriodInYears) { + this.retentionPeriodInYears = retentionPeriodInYears; + this.__explicitlySet__.add("retentionPeriodInYears"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateBackupDetails build() { + UpdateBackupDetails model = + new UpdateBackupDetails( + this.retentionPeriodInDays, this.retentionPeriodInYears); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateBackupDetails model) { + if (model.wasPropertyExplicitlySet("retentionPeriodInDays")) { + this.retentionPeriodInDays(model.getRetentionPeriodInDays()); + } + if (model.wasPropertyExplicitlySet("retentionPeriodInYears")) { + this.retentionPeriodInYears(model.getRetentionPeriodInYears()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The retention period of the long term backup in days. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInDays") + private final Integer retentionPeriodInDays; + + /** + * The retention period of the long term backup in days. + * @return the value + **/ + public Integer getRetentionPeriodInDays() { + return retentionPeriodInDays; + } + + /** + * The retention period of the long term backup in years. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInYears") + private final Integer retentionPeriodInYears; + + /** + * The retention period of the long term backup in years. + * @return the value + **/ + public Integer getRetentionPeriodInYears() { + return retentionPeriodInYears; + } + + @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("UpdateBackupDetails("); + sb.append("super=").append(super.toString()); + sb.append("retentionPeriodInDays=").append(String.valueOf(this.retentionPeriodInDays)); + sb.append(", retentionPeriodInYears=").append(String.valueOf(this.retentionPeriodInYears)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateBackupDetails)) { + return false; + } + + UpdateBackupDetails other = (UpdateBackupDetails) o; + return java.util.Objects.equals(this.retentionPeriodInDays, other.retentionPeriodInDays) + && java.util.Objects.equals( + this.retentionPeriodInYears, other.retentionPeriodInYears) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.retentionPeriodInDays == null + ? 43 + : this.retentionPeriodInDays.hashCode()); + result = + (result * PRIME) + + (this.retentionPeriodInYears == null + ? 43 + : this.retentionPeriodInYears.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExadbVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExadbVmClusterDetails.java index 9869bec826..e42249a16a 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExadbVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExadbVmClusterDetails.java @@ -328,10 +328,8 @@ public Builder systemVersion(String systemVersion) { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * **/ @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") @@ -340,10 +338,8 @@ public Builder systemVersion(String systemVersion) { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * * @param gridImageId the value to set * @return this builder @@ -718,10 +714,8 @@ public String getSystemVersion() { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * **/ @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") @@ -730,10 +724,8 @@ public String getSystemVersion() { /** * Grid Setup will be done using this grid image id. *

- * The grid image id can be extracted from - * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= - * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using - * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * The grid image ID can be obtained using the API /20160918/giVersions/{majorVersion}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain=. + * The list of supported major versions can be obtained using the API /20160918/giVersions?compartmentId=&shape=ExaDbXS&availabilityDomain= * * @return the value **/ diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/VmCluster.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/VmCluster.java index 455f4431f4..d09f98971a 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/VmCluster.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/VmCluster.java @@ -51,6 +51,7 @@ public final class VmCluster extends com.oracle.bmc.http.internal.ExplicitlySetB "dataCollectionOptions", "giSoftwareImageId", "fileSystemConfigurationDetails", + "vmClusterType", "cloudAutomationUpdateDetails", "exascaleDbStorageVaultId", "storageManagementType", @@ -87,6 +88,7 @@ public VmCluster( DataCollectionOptions dataCollectionOptions, String giSoftwareImageId, java.util.List fileSystemConfigurationDetails, + VmClusterType vmClusterType, CloudAutomationUpdateDetails cloudAutomationUpdateDetails, String exascaleDbStorageVaultId, StorageManagementType storageManagementType, @@ -122,6 +124,7 @@ public VmCluster( this.dataCollectionOptions = dataCollectionOptions; this.giSoftwareImageId = giSoftwareImageId; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + this.vmClusterType = vmClusterType; this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; this.storageManagementType = storageManagementType; @@ -625,6 +628,22 @@ public Builder fileSystemConfigurationDetails( this.__explicitlySet__.add("fileSystemConfigurationDetails"); return this; } + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterType") + private VmClusterType vmClusterType; + + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + * @param vmClusterType the value to set + * @return this builder + **/ + public Builder vmClusterType(VmClusterType vmClusterType) { + this.vmClusterType = vmClusterType; + this.__explicitlySet__.add("vmClusterType"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") private CloudAutomationUpdateDetails cloudAutomationUpdateDetails; @@ -720,6 +739,7 @@ public VmCluster build() { this.dataCollectionOptions, this.giSoftwareImageId, this.fileSystemConfigurationDetails, + this.vmClusterType, this.cloudAutomationUpdateDetails, this.exascaleDbStorageVaultId, this.storageManagementType, @@ -822,6 +842,9 @@ public Builder copy(VmCluster model) { if (model.wasPropertyExplicitlySet("fileSystemConfigurationDetails")) { this.fileSystemConfigurationDetails(model.getFileSystemConfigurationDetails()); } + if (model.wasPropertyExplicitlySet("vmClusterType")) { + this.vmClusterType(model.getVmClusterType()); + } if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); } @@ -1384,6 +1407,68 @@ public java.util.List getFileSystemConfigurationD return fileSystemConfigurationDetails; } + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + public enum VmClusterType { + Regular("REGULAR"), + Developer("DEVELOPER"), + + /** + * 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(VmClusterType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (VmClusterType v : VmClusterType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + VmClusterType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static VmClusterType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'VmClusterType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterType") + private final VmClusterType vmClusterType; + + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + * @return the value + **/ + public VmClusterType getVmClusterType() { + return vmClusterType; + } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") private final CloudAutomationUpdateDetails cloudAutomationUpdateDetails; @@ -1577,6 +1662,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", giSoftwareImageId=").append(String.valueOf(this.giSoftwareImageId)); sb.append(", fileSystemConfigurationDetails=") .append(String.valueOf(this.fileSystemConfigurationDetails)); + sb.append(", vmClusterType=").append(String.valueOf(this.vmClusterType)); sb.append(", cloudAutomationUpdateDetails=") .append(String.valueOf(this.cloudAutomationUpdateDetails)); sb.append(", exascaleDbStorageVaultId=") @@ -1632,6 +1718,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.giSoftwareImageId, other.giSoftwareImageId) && java.util.Objects.equals( this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) + && java.util.Objects.equals(this.vmClusterType, other.vmClusterType) && java.util.Objects.equals( this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) && java.util.Objects.equals( @@ -1733,6 +1820,9 @@ public int hashCode() { + (this.fileSystemConfigurationDetails == null ? 43 : this.fileSystemConfigurationDetails.hashCode()); + result = + (result * PRIME) + + (this.vmClusterType == null ? 43 : this.vmClusterType.hashCode()); result = (result * PRIME) + (this.cloudAutomationUpdateDetails == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/VmClusterSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/VmClusterSummary.java index 0de255cf95..1946d01f8a 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/VmClusterSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/VmClusterSummary.java @@ -51,6 +51,7 @@ public final class VmClusterSummary extends com.oracle.bmc.http.internal.Explici "dataCollectionOptions", "giSoftwareImageId", "fileSystemConfigurationDetails", + "vmClusterType", "cloudAutomationUpdateDetails", "exascaleDbStorageVaultId", "storageManagementType", @@ -87,6 +88,7 @@ public VmClusterSummary( DataCollectionOptions dataCollectionOptions, String giSoftwareImageId, java.util.List fileSystemConfigurationDetails, + VmClusterType vmClusterType, CloudAutomationUpdateDetails cloudAutomationUpdateDetails, String exascaleDbStorageVaultId, StorageManagementType storageManagementType, @@ -122,6 +124,7 @@ public VmClusterSummary( this.dataCollectionOptions = dataCollectionOptions; this.giSoftwareImageId = giSoftwareImageId; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + this.vmClusterType = vmClusterType; this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; this.storageManagementType = storageManagementType; @@ -625,6 +628,22 @@ public Builder fileSystemConfigurationDetails( this.__explicitlySet__.add("fileSystemConfigurationDetails"); return this; } + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterType") + private VmClusterType vmClusterType; + + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + * @param vmClusterType the value to set + * @return this builder + **/ + public Builder vmClusterType(VmClusterType vmClusterType) { + this.vmClusterType = vmClusterType; + this.__explicitlySet__.add("vmClusterType"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") private CloudAutomationUpdateDetails cloudAutomationUpdateDetails; @@ -720,6 +739,7 @@ public VmClusterSummary build() { this.dataCollectionOptions, this.giSoftwareImageId, this.fileSystemConfigurationDetails, + this.vmClusterType, this.cloudAutomationUpdateDetails, this.exascaleDbStorageVaultId, this.storageManagementType, @@ -822,6 +842,9 @@ public Builder copy(VmClusterSummary model) { if (model.wasPropertyExplicitlySet("fileSystemConfigurationDetails")) { this.fileSystemConfigurationDetails(model.getFileSystemConfigurationDetails()); } + if (model.wasPropertyExplicitlySet("vmClusterType")) { + this.vmClusterType(model.getVmClusterType()); + } if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); } @@ -1384,6 +1407,68 @@ public java.util.List getFileSystemConfigurationD return fileSystemConfigurationDetails; } + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + public enum VmClusterType { + Regular("REGULAR"), + Developer("DEVELOPER"), + + /** + * 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(VmClusterType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (VmClusterType v : VmClusterType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + VmClusterType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static VmClusterType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'VmClusterType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterType") + private final VmClusterType vmClusterType; + + /** + * The vmcluster type for the VM cluster/Cloud VM cluster. + * @return the value + **/ + public VmClusterType getVmClusterType() { + return vmClusterType; + } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") private final CloudAutomationUpdateDetails cloudAutomationUpdateDetails; @@ -1577,6 +1662,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", giSoftwareImageId=").append(String.valueOf(this.giSoftwareImageId)); sb.append(", fileSystemConfigurationDetails=") .append(String.valueOf(this.fileSystemConfigurationDetails)); + sb.append(", vmClusterType=").append(String.valueOf(this.vmClusterType)); sb.append(", cloudAutomationUpdateDetails=") .append(String.valueOf(this.cloudAutomationUpdateDetails)); sb.append(", exascaleDbStorageVaultId=") @@ -1632,6 +1718,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.giSoftwareImageId, other.giSoftwareImageId) && java.util.Objects.equals( this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) + && java.util.Objects.equals(this.vmClusterType, other.vmClusterType) && java.util.Objects.equals( this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) && java.util.Objects.equals( @@ -1733,6 +1820,9 @@ public int hashCode() { + (this.fileSystemConfigurationDetails == null ? 43 : this.fileSystemConfigurationDetails.hashCode()); + result = + (result * PRIME) + + (this.vmClusterType == null ? 43 : this.vmClusterType.hashCode()); result = (result * PRIME) + (this.cloudAutomationUpdateDetails == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/AddStandbyAutonomousContainerDatabaseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/AddStandbyAutonomousContainerDatabaseRequest.java new file mode 100644 index 0000000000..8cf38d2552 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/AddStandbyAutonomousContainerDatabaseRequest.java @@ -0,0 +1,378 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 AddStandbyAutonomousContainerDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class AddStandbyAutonomousContainerDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.AddStandbyAutonomousContainerDatabaseDetails> { + + /** + * Request to Add Standy Autonomous Container Database Dataguard. + */ + private com.oracle.bmc.database.model.AddStandbyAutonomousContainerDatabaseDetails + addStandbyAutonomousContainerDatabaseDetails; + + /** + * Request to Add Standy Autonomous Container Database Dataguard. + */ + public com.oracle.bmc.database.model.AddStandbyAutonomousContainerDatabaseDetails + getAddStandbyAutonomousContainerDatabaseDetails() { + return addStandbyAutonomousContainerDatabaseDetails; + } + /** + * 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; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + 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 + * may 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 + * may 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.AddStandbyAutonomousContainerDatabaseDetails getBody$() { + return addStandbyAutonomousContainerDatabaseDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddStandbyAutonomousContainerDatabaseRequest, + com.oracle.bmc.database.model.AddStandbyAutonomousContainerDatabaseDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to Add Standy Autonomous Container Database Dataguard. + */ + private com.oracle.bmc.database.model.AddStandbyAutonomousContainerDatabaseDetails + addStandbyAutonomousContainerDatabaseDetails = null; + + /** + * Request to Add Standy Autonomous Container Database Dataguard. + * @param addStandbyAutonomousContainerDatabaseDetails the value to set + * @return this builder instance + */ + public Builder addStandbyAutonomousContainerDatabaseDetails( + com.oracle.bmc.database.model.AddStandbyAutonomousContainerDatabaseDetails + addStandbyAutonomousContainerDatabaseDetails) { + this.addStandbyAutonomousContainerDatabaseDetails = + addStandbyAutonomousContainerDatabaseDetails; + return this; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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(AddStandbyAutonomousContainerDatabaseRequest o) { + addStandbyAutonomousContainerDatabaseDetails( + o.getAddStandbyAutonomousContainerDatabaseDetails()); + autonomousContainerDatabaseId(o.getAutonomousContainerDatabaseId()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddStandbyAutonomousContainerDatabaseRequest 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 AddStandbyAutonomousContainerDatabaseRequest + */ + public AddStandbyAutonomousContainerDatabaseRequest build() { + AddStandbyAutonomousContainerDatabaseRequest 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.database.model.AddStandbyAutonomousContainerDatabaseDetails body) { + addStandbyAutonomousContainerDatabaseDetails(body); + return this; + } + + /** + * Build the instance of AddStandbyAutonomousContainerDatabaseRequest 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 AddStandbyAutonomousContainerDatabaseRequest + */ + public AddStandbyAutonomousContainerDatabaseRequest buildWithoutInvocationCallback() { + AddStandbyAutonomousContainerDatabaseRequest request = + new AddStandbyAutonomousContainerDatabaseRequest(); + request.addStandbyAutonomousContainerDatabaseDetails = + addStandbyAutonomousContainerDatabaseDetails; + request.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + return request; + // new AddStandbyAutonomousContainerDatabaseRequest(addStandbyAutonomousContainerDatabaseDetails, autonomousContainerDatabaseId, 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() + .addStandbyAutonomousContainerDatabaseDetails( + addStandbyAutonomousContainerDatabaseDetails) + .autonomousContainerDatabaseId(autonomousContainerDatabaseId) + .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(",addStandbyAutonomousContainerDatabaseDetails=") + .append(String.valueOf(this.addStandbyAutonomousContainerDatabaseDetails)); + sb.append(",autonomousContainerDatabaseId=") + .append(String.valueOf(this.autonomousContainerDatabaseId)); + 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 AddStandbyAutonomousContainerDatabaseRequest)) { + return false; + } + + AddStandbyAutonomousContainerDatabaseRequest other = + (AddStandbyAutonomousContainerDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.addStandbyAutonomousContainerDatabaseDetails, + other.addStandbyAutonomousContainerDatabaseDetails) + && java.util.Objects.equals( + this.autonomousContainerDatabaseId, other.autonomousContainerDatabaseId) + && 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.addStandbyAutonomousContainerDatabaseDetails == null + ? 43 + : this.addStandbyAutonomousContainerDatabaseDetails.hashCode()); + result = + (result * PRIME) + + (this.autonomousContainerDatabaseId == null + ? 43 + : this.autonomousContainerDatabaseId.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-database/src/main/java/com/oracle/bmc/database/requests/ChangeExadbVmClusterSubscriptionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeExadbVmClusterSubscriptionRequest.java new file mode 100644 index 0000000000..fe06b0e27b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeExadbVmClusterSubscriptionRequest.java @@ -0,0 +1,370 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 ChangeExadbVmClusterSubscriptionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeExadbVmClusterSubscriptionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ChangeExadbVmClusterSubscriptionDetails> { + + /** + * Associate a Exadata VM cluster on Exascale Infrastructure with a different subscription. + */ + private com.oracle.bmc.database.model.ChangeExadbVmClusterSubscriptionDetails + changeExadbVmClusterSubscriptionDetails; + + /** + * Associate a Exadata VM cluster on Exascale Infrastructure with a different subscription. + */ + public com.oracle.bmc.database.model.ChangeExadbVmClusterSubscriptionDetails + getChangeExadbVmClusterSubscriptionDetails() { + return changeExadbVmClusterSubscriptionDetails; + } + /** + * The Exadata VM cluster [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId; + + /** + * The Exadata VM cluster [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + public String getExadbVmClusterId() { + return exadbVmClusterId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + 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.database.model.ChangeExadbVmClusterSubscriptionDetails getBody$() { + return changeExadbVmClusterSubscriptionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeExadbVmClusterSubscriptionRequest, + com.oracle.bmc.database.model.ChangeExadbVmClusterSubscriptionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Associate a Exadata VM cluster on Exascale Infrastructure with a different subscription. + */ + private com.oracle.bmc.database.model.ChangeExadbVmClusterSubscriptionDetails + changeExadbVmClusterSubscriptionDetails = null; + + /** + * Associate a Exadata VM cluster on Exascale Infrastructure with a different subscription. + * @param changeExadbVmClusterSubscriptionDetails the value to set + * @return this builder instance + */ + public Builder changeExadbVmClusterSubscriptionDetails( + com.oracle.bmc.database.model.ChangeExadbVmClusterSubscriptionDetails + changeExadbVmClusterSubscriptionDetails) { + this.changeExadbVmClusterSubscriptionDetails = changeExadbVmClusterSubscriptionDetails; + return this; + } + + /** + * The Exadata VM cluster [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId = null; + + /** + * The Exadata VM cluster [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + * @param exadbVmClusterId the value to set + * @return this builder instance + */ + public Builder exadbVmClusterId(String exadbVmClusterId) { + this.exadbVmClusterId = exadbVmClusterId; + 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 + * may 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 + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + 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; + } + + /** + * 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(ChangeExadbVmClusterSubscriptionRequest o) { + changeExadbVmClusterSubscriptionDetails(o.getChangeExadbVmClusterSubscriptionDetails()); + exadbVmClusterId(o.getExadbVmClusterId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeExadbVmClusterSubscriptionRequest 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 ChangeExadbVmClusterSubscriptionRequest + */ + public ChangeExadbVmClusterSubscriptionRequest build() { + ChangeExadbVmClusterSubscriptionRequest 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.database.model.ChangeExadbVmClusterSubscriptionDetails body) { + changeExadbVmClusterSubscriptionDetails(body); + return this; + } + + /** + * Build the instance of ChangeExadbVmClusterSubscriptionRequest 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 ChangeExadbVmClusterSubscriptionRequest + */ + public ChangeExadbVmClusterSubscriptionRequest buildWithoutInvocationCallback() { + ChangeExadbVmClusterSubscriptionRequest request = + new ChangeExadbVmClusterSubscriptionRequest(); + request.changeExadbVmClusterSubscriptionDetails = + changeExadbVmClusterSubscriptionDetails; + request.exadbVmClusterId = exadbVmClusterId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ChangeExadbVmClusterSubscriptionRequest(changeExadbVmClusterSubscriptionDetails, exadbVmClusterId, 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() + .changeExadbVmClusterSubscriptionDetails(changeExadbVmClusterSubscriptionDetails) + .exadbVmClusterId(exadbVmClusterId) + .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(",changeExadbVmClusterSubscriptionDetails=") + .append(String.valueOf(this.changeExadbVmClusterSubscriptionDetails)); + sb.append(",exadbVmClusterId=").append(String.valueOf(this.exadbVmClusterId)); + 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 ChangeExadbVmClusterSubscriptionRequest)) { + return false; + } + + ChangeExadbVmClusterSubscriptionRequest other = (ChangeExadbVmClusterSubscriptionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.changeExadbVmClusterSubscriptionDetails, + other.changeExadbVmClusterSubscriptionDetails) + && java.util.Objects.equals(this.exadbVmClusterId, other.exadbVmClusterId) + && 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.changeExadbVmClusterSubscriptionDetails == null + ? 43 + : this.changeExadbVmClusterSubscriptionDetails.hashCode()); + result = + (result * PRIME) + + (this.exadbVmClusterId == null ? 43 : this.exadbVmClusterId.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-database/src/main/java/com/oracle/bmc/database/requests/ChangeExascaleDbStorageVaultSubscriptionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeExascaleDbStorageVaultSubscriptionRequest.java new file mode 100644 index 0000000000..488ebee67d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeExascaleDbStorageVaultSubscriptionRequest.java @@ -0,0 +1,381 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 ChangeExascaleDbStorageVaultSubscriptionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeExascaleDbStorageVaultSubscriptionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultSubscriptionDetails> { + + /** + * Associate a Exadata Database Storage Vault with a different subscription. + */ + private com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultSubscriptionDetails + changeExascaleDbStorageVaultSubscriptionDetails; + + /** + * Associate a Exadata Database Storage Vault with a different subscription. + */ + public com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultSubscriptionDetails + getChangeExascaleDbStorageVaultSubscriptionDetails() { + return changeExascaleDbStorageVaultSubscriptionDetails; + } + /** + * The Exadata Database Storage Vault [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + private String exascaleDbStorageVaultId; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + 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.database.model.ChangeExascaleDbStorageVaultSubscriptionDetails + getBody$() { + return changeExascaleDbStorageVaultSubscriptionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeExascaleDbStorageVaultSubscriptionRequest, + com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultSubscriptionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Associate a Exadata Database Storage Vault with a different subscription. + */ + private com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultSubscriptionDetails + changeExascaleDbStorageVaultSubscriptionDetails = null; + + /** + * Associate a Exadata Database Storage Vault with a different subscription. + * @param changeExascaleDbStorageVaultSubscriptionDetails the value to set + * @return this builder instance + */ + public Builder changeExascaleDbStorageVaultSubscriptionDetails( + com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultSubscriptionDetails + changeExascaleDbStorageVaultSubscriptionDetails) { + this.changeExascaleDbStorageVaultSubscriptionDetails = + changeExascaleDbStorageVaultSubscriptionDetails; + return this; + } + + /** + * The Exadata Database Storage Vault [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + private String exascaleDbStorageVaultId = null; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * @param exascaleDbStorageVaultId the value to set + * @return this builder instance + */ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + 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 + * may 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 + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + 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; + } + + /** + * 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(ChangeExascaleDbStorageVaultSubscriptionRequest o) { + changeExascaleDbStorageVaultSubscriptionDetails( + o.getChangeExascaleDbStorageVaultSubscriptionDetails()); + exascaleDbStorageVaultId(o.getExascaleDbStorageVaultId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeExascaleDbStorageVaultSubscriptionRequest 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 ChangeExascaleDbStorageVaultSubscriptionRequest + */ + public ChangeExascaleDbStorageVaultSubscriptionRequest build() { + ChangeExascaleDbStorageVaultSubscriptionRequest 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.database.model.ChangeExascaleDbStorageVaultSubscriptionDetails + body) { + changeExascaleDbStorageVaultSubscriptionDetails(body); + return this; + } + + /** + * Build the instance of ChangeExascaleDbStorageVaultSubscriptionRequest 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 ChangeExascaleDbStorageVaultSubscriptionRequest + */ + public ChangeExascaleDbStorageVaultSubscriptionRequest buildWithoutInvocationCallback() { + ChangeExascaleDbStorageVaultSubscriptionRequest request = + new ChangeExascaleDbStorageVaultSubscriptionRequest(); + request.changeExascaleDbStorageVaultSubscriptionDetails = + changeExascaleDbStorageVaultSubscriptionDetails; + request.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ChangeExascaleDbStorageVaultSubscriptionRequest(changeExascaleDbStorageVaultSubscriptionDetails, exascaleDbStorageVaultId, 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() + .changeExascaleDbStorageVaultSubscriptionDetails( + changeExascaleDbStorageVaultSubscriptionDetails) + .exascaleDbStorageVaultId(exascaleDbStorageVaultId) + .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(",changeExascaleDbStorageVaultSubscriptionDetails=") + .append(String.valueOf(this.changeExascaleDbStorageVaultSubscriptionDetails)); + sb.append(",exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + 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 ChangeExascaleDbStorageVaultSubscriptionRequest)) { + return false; + } + + ChangeExascaleDbStorageVaultSubscriptionRequest other = + (ChangeExascaleDbStorageVaultSubscriptionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.changeExascaleDbStorageVaultSubscriptionDetails, + other.changeExascaleDbStorageVaultSubscriptionDetails) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && 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.changeExascaleDbStorageVaultSubscriptionDetails == null + ? 43 + : this.changeExascaleDbStorageVaultSubscriptionDetails.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.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-database/src/main/java/com/oracle/bmc/database/requests/ConvertStandbyAutonomousContainerDatabaseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ConvertStandbyAutonomousContainerDatabaseRequest.java new file mode 100644 index 0000000000..5fc84109ae --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ConvertStandbyAutonomousContainerDatabaseRequest.java @@ -0,0 +1,382 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 ConvertStandbyAutonomousContainerDatabaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ConvertStandbyAutonomousContainerDatabaseRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ConvertStandbyAutonomousContainerDatabaseDetails> { + + /** + * Request to Convert Standby Autonomous Container Database . + */ + private com.oracle.bmc.database.model.ConvertStandbyAutonomousContainerDatabaseDetails + convertStandbyAutonomousContainerDatabaseDetails; + + /** + * Request to Convert Standby Autonomous Container Database . + */ + public com.oracle.bmc.database.model.ConvertStandbyAutonomousContainerDatabaseDetails + getConvertStandbyAutonomousContainerDatabaseDetails() { + return convertStandbyAutonomousContainerDatabaseDetails; + } + /** + * 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; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + 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 + * may 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 + * may 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.ConvertStandbyAutonomousContainerDatabaseDetails + getBody$() { + return convertStandbyAutonomousContainerDatabaseDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ConvertStandbyAutonomousContainerDatabaseRequest, + com.oracle.bmc.database.model + .ConvertStandbyAutonomousContainerDatabaseDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to Convert Standby Autonomous Container Database . + */ + private com.oracle.bmc.database.model.ConvertStandbyAutonomousContainerDatabaseDetails + convertStandbyAutonomousContainerDatabaseDetails = null; + + /** + * Request to Convert Standby Autonomous Container Database . + * @param convertStandbyAutonomousContainerDatabaseDetails the value to set + * @return this builder instance + */ + public Builder convertStandbyAutonomousContainerDatabaseDetails( + com.oracle.bmc.database.model.ConvertStandbyAutonomousContainerDatabaseDetails + convertStandbyAutonomousContainerDatabaseDetails) { + this.convertStandbyAutonomousContainerDatabaseDetails = + convertStandbyAutonomousContainerDatabaseDetails; + return this; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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(ConvertStandbyAutonomousContainerDatabaseRequest o) { + convertStandbyAutonomousContainerDatabaseDetails( + o.getConvertStandbyAutonomousContainerDatabaseDetails()); + autonomousContainerDatabaseId(o.getAutonomousContainerDatabaseId()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ConvertStandbyAutonomousContainerDatabaseRequest 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 ConvertStandbyAutonomousContainerDatabaseRequest + */ + public ConvertStandbyAutonomousContainerDatabaseRequest build() { + ConvertStandbyAutonomousContainerDatabaseRequest 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.database.model.ConvertStandbyAutonomousContainerDatabaseDetails + body) { + convertStandbyAutonomousContainerDatabaseDetails(body); + return this; + } + + /** + * Build the instance of ConvertStandbyAutonomousContainerDatabaseRequest 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 ConvertStandbyAutonomousContainerDatabaseRequest + */ + public ConvertStandbyAutonomousContainerDatabaseRequest buildWithoutInvocationCallback() { + ConvertStandbyAutonomousContainerDatabaseRequest request = + new ConvertStandbyAutonomousContainerDatabaseRequest(); + request.convertStandbyAutonomousContainerDatabaseDetails = + convertStandbyAutonomousContainerDatabaseDetails; + request.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + return request; + // new ConvertStandbyAutonomousContainerDatabaseRequest(convertStandbyAutonomousContainerDatabaseDetails, autonomousContainerDatabaseId, 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() + .convertStandbyAutonomousContainerDatabaseDetails( + convertStandbyAutonomousContainerDatabaseDetails) + .autonomousContainerDatabaseId(autonomousContainerDatabaseId) + .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(",convertStandbyAutonomousContainerDatabaseDetails=") + .append(String.valueOf(this.convertStandbyAutonomousContainerDatabaseDetails)); + sb.append(",autonomousContainerDatabaseId=") + .append(String.valueOf(this.autonomousContainerDatabaseId)); + 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 ConvertStandbyAutonomousContainerDatabaseRequest)) { + return false; + } + + ConvertStandbyAutonomousContainerDatabaseRequest other = + (ConvertStandbyAutonomousContainerDatabaseRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.convertStandbyAutonomousContainerDatabaseDetails, + other.convertStandbyAutonomousContainerDatabaseDetails) + && java.util.Objects.equals( + this.autonomousContainerDatabaseId, other.autonomousContainerDatabaseId) + && 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.convertStandbyAutonomousContainerDatabaseDetails == null + ? 43 + : this.convertStandbyAutonomousContainerDatabaseDetails.hashCode()); + result = + (result * PRIME) + + (this.autonomousContainerDatabaseId == null + ? 43 + : this.autonomousContainerDatabaseId.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-database/src/main/java/com/oracle/bmc/database/requests/EditAutonomousContainerDatabaseDataguardRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/EditAutonomousContainerDatabaseDataguardRequest.java new file mode 100644 index 0000000000..d9393e51f6 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/EditAutonomousContainerDatabaseDataguardRequest.java @@ -0,0 +1,381 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 EditAutonomousContainerDatabaseDataguardRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class EditAutonomousContainerDatabaseDataguardRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.EditAutonomousContainerDatabaseDataguardDetails> { + + /** + * Request Edit Autonomous Container Database Dataguard. + */ + private com.oracle.bmc.database.model.EditAutonomousContainerDatabaseDataguardDetails + editAutonomousContainerDatabaseDataguardDetails; + + /** + * Request Edit Autonomous Container Database Dataguard. + */ + public com.oracle.bmc.database.model.EditAutonomousContainerDatabaseDataguardDetails + getEditAutonomousContainerDatabaseDataguardDetails() { + return editAutonomousContainerDatabaseDataguardDetails; + } + /** + * 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; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + 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 + * may 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 + * may 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; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.EditAutonomousContainerDatabaseDataguardDetails + getBody$() { + return editAutonomousContainerDatabaseDataguardDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + EditAutonomousContainerDatabaseDataguardRequest, + com.oracle.bmc.database.model.EditAutonomousContainerDatabaseDataguardDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request Edit Autonomous Container Database Dataguard. + */ + private com.oracle.bmc.database.model.EditAutonomousContainerDatabaseDataguardDetails + editAutonomousContainerDatabaseDataguardDetails = null; + + /** + * Request Edit Autonomous Container Database Dataguard. + * @param editAutonomousContainerDatabaseDataguardDetails the value to set + * @return this builder instance + */ + public Builder editAutonomousContainerDatabaseDataguardDetails( + com.oracle.bmc.database.model.EditAutonomousContainerDatabaseDataguardDetails + editAutonomousContainerDatabaseDataguardDetails) { + this.editAutonomousContainerDatabaseDataguardDetails = + editAutonomousContainerDatabaseDataguardDetails; + return this; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + 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 + * may 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(EditAutonomousContainerDatabaseDataguardRequest o) { + editAutonomousContainerDatabaseDataguardDetails( + o.getEditAutonomousContainerDatabaseDataguardDetails()); + autonomousContainerDatabaseId(o.getAutonomousContainerDatabaseId()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of EditAutonomousContainerDatabaseDataguardRequest 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 EditAutonomousContainerDatabaseDataguardRequest + */ + public EditAutonomousContainerDatabaseDataguardRequest build() { + EditAutonomousContainerDatabaseDataguardRequest 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.database.model.EditAutonomousContainerDatabaseDataguardDetails + body) { + editAutonomousContainerDatabaseDataguardDetails(body); + return this; + } + + /** + * Build the instance of EditAutonomousContainerDatabaseDataguardRequest 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 EditAutonomousContainerDatabaseDataguardRequest + */ + public EditAutonomousContainerDatabaseDataguardRequest buildWithoutInvocationCallback() { + EditAutonomousContainerDatabaseDataguardRequest request = + new EditAutonomousContainerDatabaseDataguardRequest(); + request.editAutonomousContainerDatabaseDataguardDetails = + editAutonomousContainerDatabaseDataguardDetails; + request.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + return request; + // new EditAutonomousContainerDatabaseDataguardRequest(editAutonomousContainerDatabaseDataguardDetails, autonomousContainerDatabaseId, 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() + .editAutonomousContainerDatabaseDataguardDetails( + editAutonomousContainerDatabaseDataguardDetails) + .autonomousContainerDatabaseId(autonomousContainerDatabaseId) + .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(",editAutonomousContainerDatabaseDataguardDetails=") + .append(String.valueOf(this.editAutonomousContainerDatabaseDataguardDetails)); + sb.append(",autonomousContainerDatabaseId=") + .append(String.valueOf(this.autonomousContainerDatabaseId)); + 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 EditAutonomousContainerDatabaseDataguardRequest)) { + return false; + } + + EditAutonomousContainerDatabaseDataguardRequest other = + (EditAutonomousContainerDatabaseDataguardRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.editAutonomousContainerDatabaseDataguardDetails, + other.editAutonomousContainerDatabaseDataguardDetails) + && java.util.Objects.equals( + this.autonomousContainerDatabaseId, other.autonomousContainerDatabaseId) + && 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.editAutonomousContainerDatabaseDataguardDetails == null + ? 43 + : this.editAutonomousContainerDatabaseDataguardDetails.hashCode()); + result = + (result * PRIME) + + (this.autonomousContainerDatabaseId == null + ? 43 + : this.autonomousContainerDatabaseId.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-database/src/main/java/com/oracle/bmc/database/requests/FailoverAutonomousContainerDatabaseDataguardRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/FailoverAutonomousContainerDatabaseDataguardRequest.java new file mode 100644 index 0000000000..6e9673f962 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/FailoverAutonomousContainerDatabaseDataguardRequest.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 FailoverAutonomousContainerDatabaseDataguardRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class FailoverAutonomousContainerDatabaseDataguardRequest + 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; + } + /** + * 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 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< + FailoverAutonomousContainerDatabaseDataguardRequest, 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; + } + + /** + * 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 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(FailoverAutonomousContainerDatabaseDataguardRequest o) { + autonomousContainerDatabaseId(o.getAutonomousContainerDatabaseId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of FailoverAutonomousContainerDatabaseDataguardRequest 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 FailoverAutonomousContainerDatabaseDataguardRequest + */ + public FailoverAutonomousContainerDatabaseDataguardRequest build() { + FailoverAutonomousContainerDatabaseDataguardRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of FailoverAutonomousContainerDatabaseDataguardRequest 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 FailoverAutonomousContainerDatabaseDataguardRequest + */ + public FailoverAutonomousContainerDatabaseDataguardRequest + buildWithoutInvocationCallback() { + FailoverAutonomousContainerDatabaseDataguardRequest request = + new FailoverAutonomousContainerDatabaseDataguardRequest(); + request.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new FailoverAutonomousContainerDatabaseDataguardRequest(autonomousContainerDatabaseId, 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() + .autonomousContainerDatabaseId(autonomousContainerDatabaseId) + .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(",autonomousContainerDatabaseId=") + .append(String.valueOf(this.autonomousContainerDatabaseId)); + 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 FailoverAutonomousContainerDatabaseDataguardRequest)) { + return false; + } + + FailoverAutonomousContainerDatabaseDataguardRequest other = + (FailoverAutonomousContainerDatabaseDataguardRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.autonomousContainerDatabaseId, other.autonomousContainerDatabaseId) + && 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.autonomousContainerDatabaseId == null + ? 43 + : this.autonomousContainerDatabaseId.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-database/src/main/java/com/oracle/bmc/database/requests/ListBackupsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListBackupsRequest.java index d6cb92f739..4767b23e13 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListBackupsRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListBackupsRequest.java @@ -106,6 +106,72 @@ public static ShapeFamily create(String key) { public ShapeFamily getShapeFamily() { return shapeFamily; } + /** + * A filter to return only resources that match the given database version. + */ + private String version; + + /** + * A filter to return only resources that match the given database version. + */ + public String getVersion() { + return version; + } + /** + * A filter to return only backups that matches with the given type of Backup. + */ + private String type; + + /** + * A filter to return only backups that matches with the given type of Backup. + */ + public String getType() { + return type; + } + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.BackupSummary.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + public com.oracle.bmc.database.model.BackupSummary.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * The start of date-time range of expiration for the long term backups to be fetched. + */ + private java.util.Date timeExpiryScheduledGreaterThanOrEqualTo; + + /** + * The start of date-time range of expiration for the long term backups to be fetched. + */ + public java.util.Date getTimeExpiryScheduledGreaterThanOrEqualTo() { + return timeExpiryScheduledGreaterThanOrEqualTo; + } + /** + * The end of date-time range of expiration for the long term backups to be fetched. + */ + private java.util.Date timeExpiryScheduledLessThan; + + /** + * The end of date-time range of expiration for the long term backups to be fetched. + */ + public java.util.Date getTimeExpiryScheduledLessThan() { + return timeExpiryScheduledLessThan; + } + /** + * A filter to return only resources that match the given backup destination type. + */ + private String backupDestinationType; + + /** + * A filter to return only resources that match the given backup destination type. + */ + public String getBackupDestinationType() { + return backupDestinationType; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -189,6 +255,98 @@ public Builder shapeFamily(ShapeFamily shapeFamily) { return this; } + /** + * A filter to return only resources that match the given database version. + */ + private String version = null; + + /** + * A filter to return only resources that match the given database version. + * @param version the value to set + * @return this builder instance + */ + public Builder version(String version) { + this.version = version; + return this; + } + + /** + * A filter to return only backups that matches with the given type of Backup. + */ + private String type = null; + + /** + * A filter to return only backups that matches with the given type of Backup. + * @param type the value to set + * @return this builder instance + */ + public Builder type(String type) { + this.type = type; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.BackupSummary.LifecycleState lifecycleState = null; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.database.model.BackupSummary.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * The start of date-time range of expiration for the long term backups to be fetched. + */ + private java.util.Date timeExpiryScheduledGreaterThanOrEqualTo = null; + + /** + * The start of date-time range of expiration for the long term backups to be fetched. + * @param timeExpiryScheduledGreaterThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder timeExpiryScheduledGreaterThanOrEqualTo( + java.util.Date timeExpiryScheduledGreaterThanOrEqualTo) { + this.timeExpiryScheduledGreaterThanOrEqualTo = timeExpiryScheduledGreaterThanOrEqualTo; + return this; + } + + /** + * The end of date-time range of expiration for the long term backups to be fetched. + */ + private java.util.Date timeExpiryScheduledLessThan = null; + + /** + * The end of date-time range of expiration for the long term backups to be fetched. + * @param timeExpiryScheduledLessThan the value to set + * @return this builder instance + */ + public Builder timeExpiryScheduledLessThan(java.util.Date timeExpiryScheduledLessThan) { + this.timeExpiryScheduledLessThan = timeExpiryScheduledLessThan; + return this; + } + + /** + * A filter to return only resources that match the given backup destination type. + */ + private String backupDestinationType = null; + + /** + * A filter to return only resources that match the given backup destination type. + * @param backupDestinationType the value to set + * @return this builder instance + */ + public Builder backupDestinationType(String backupDestinationType) { + this.backupDestinationType = backupDestinationType; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -222,6 +380,12 @@ public Builder copy(ListBackupsRequest o) { limit(o.getLimit()); page(o.getPage()); shapeFamily(o.getShapeFamily()); + version(o.getVersion()); + type(o.getType()); + lifecycleState(o.getLifecycleState()); + timeExpiryScheduledGreaterThanOrEqualTo(o.getTimeExpiryScheduledGreaterThanOrEqualTo()); + timeExpiryScheduledLessThan(o.getTimeExpiryScheduledLessThan()); + backupDestinationType(o.getBackupDestinationType()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -259,8 +423,15 @@ public ListBackupsRequest buildWithoutInvocationCallback() { request.limit = limit; request.page = page; request.shapeFamily = shapeFamily; + request.version = version; + request.type = type; + request.lifecycleState = lifecycleState; + request.timeExpiryScheduledGreaterThanOrEqualTo = + timeExpiryScheduledGreaterThanOrEqualTo; + request.timeExpiryScheduledLessThan = timeExpiryScheduledLessThan; + request.backupDestinationType = backupDestinationType; return request; - // new ListBackupsRequest(databaseId, compartmentId, limit, page, shapeFamily); + // new ListBackupsRequest(databaseId, compartmentId, limit, page, shapeFamily, version, type, lifecycleState, timeExpiryScheduledGreaterThanOrEqualTo, timeExpiryScheduledLessThan, backupDestinationType); } } @@ -274,7 +445,13 @@ public Builder toBuilder() { .compartmentId(compartmentId) .limit(limit) .page(page) - .shapeFamily(shapeFamily); + .shapeFamily(shapeFamily) + .version(version) + .type(type) + .lifecycleState(lifecycleState) + .timeExpiryScheduledGreaterThanOrEqualTo(timeExpiryScheduledGreaterThanOrEqualTo) + .timeExpiryScheduledLessThan(timeExpiryScheduledLessThan) + .backupDestinationType(backupDestinationType); } /** @@ -295,6 +472,14 @@ public String toString() { sb.append(",limit=").append(String.valueOf(this.limit)); sb.append(",page=").append(String.valueOf(this.page)); sb.append(",shapeFamily=").append(String.valueOf(this.shapeFamily)); + sb.append(",version=").append(String.valueOf(this.version)); + sb.append(",type=").append(String.valueOf(this.type)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",timeExpiryScheduledGreaterThanOrEqualTo=") + .append(String.valueOf(this.timeExpiryScheduledGreaterThanOrEqualTo)); + sb.append(",timeExpiryScheduledLessThan=") + .append(String.valueOf(this.timeExpiryScheduledLessThan)); + sb.append(",backupDestinationType=").append(String.valueOf(this.backupDestinationType)); sb.append(")"); return sb.toString(); } @@ -314,7 +499,17 @@ public boolean equals(Object o) { && 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.shapeFamily, other.shapeFamily); + && java.util.Objects.equals(this.shapeFamily, other.shapeFamily) + && java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals( + this.timeExpiryScheduledGreaterThanOrEqualTo, + other.timeExpiryScheduledGreaterThanOrEqualTo) + && java.util.Objects.equals( + this.timeExpiryScheduledLessThan, other.timeExpiryScheduledLessThan) + && java.util.Objects.equals( + this.backupDestinationType, other.backupDestinationType); } @Override @@ -328,6 +523,26 @@ public int 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.shapeFamily == null ? 43 : this.shapeFamily.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.timeExpiryScheduledGreaterThanOrEqualTo == null + ? 43 + : this.timeExpiryScheduledGreaterThanOrEqualTo.hashCode()); + result = + (result * PRIME) + + (this.timeExpiryScheduledLessThan == null + ? 43 + : this.timeExpiryScheduledLessThan.hashCode()); + result = + (result * PRIME) + + (this.backupDestinationType == null + ? 43 + : this.backupDestinationType.hashCode()); return result; } } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListCloudVmClustersRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListCloudVmClustersRequest.java index 804f621954..87eb797afe 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListCloudVmClustersRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListCloudVmClustersRequest.java @@ -187,6 +187,17 @@ public String getDisplayName() { public String getOpcRequestId() { return opcRequestId; } + /** + * A filter to return only cloud vmclusters that match the given cloud vmcluster type exactly. + */ + private com.oracle.bmc.database.model.CloudVmClusterSummary.VmClusterType vmClusterType; + + /** + * A filter to return only cloud vmclusters that match the given cloud vmcluster type exactly. + */ + public com.oracle.bmc.database.model.CloudVmClusterSummary.VmClusterType getVmClusterType() { + return vmClusterType; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -336,6 +347,23 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * A filter to return only cloud vmclusters that match the given cloud vmcluster type exactly. + */ + private com.oracle.bmc.database.model.CloudVmClusterSummary.VmClusterType vmClusterType = + null; + + /** + * A filter to return only cloud vmclusters that match the given cloud vmcluster type exactly. + * @param vmClusterType the value to set + * @return this builder instance + */ + public Builder vmClusterType( + com.oracle.bmc.database.model.CloudVmClusterSummary.VmClusterType vmClusterType) { + this.vmClusterType = vmClusterType; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -373,6 +401,7 @@ public Builder copy(ListCloudVmClustersRequest o) { lifecycleState(o.getLifecycleState()); displayName(o.getDisplayName()); opcRequestId(o.getOpcRequestId()); + vmClusterType(o.getVmClusterType()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -414,8 +443,9 @@ public ListCloudVmClustersRequest buildWithoutInvocationCallback() { request.lifecycleState = lifecycleState; request.displayName = displayName; request.opcRequestId = opcRequestId; + request.vmClusterType = vmClusterType; return request; - // new ListCloudVmClustersRequest(compartmentId, cloudExadataInfrastructureId, limit, page, sortBy, sortOrder, lifecycleState, displayName, opcRequestId); + // new ListCloudVmClustersRequest(compartmentId, cloudExadataInfrastructureId, limit, page, sortBy, sortOrder, lifecycleState, displayName, opcRequestId, vmClusterType); } } @@ -433,7 +463,8 @@ public Builder toBuilder() { .sortOrder(sortOrder) .lifecycleState(lifecycleState) .displayName(displayName) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .vmClusterType(vmClusterType); } /** @@ -459,6 +490,7 @@ public String toString() { sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(",displayName=").append(String.valueOf(this.displayName)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",vmClusterType=").append(String.valueOf(this.vmClusterType)); sb.append(")"); return sb.toString(); } @@ -483,7 +515,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.displayName, other.displayName) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.vmClusterType, other.vmClusterType); } @Override @@ -507,6 +540,9 @@ public int hashCode() { + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.vmClusterType == null ? 43 : this.vmClusterType.hashCode()); return result; } } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListDatabaseSoftwareImagesRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListDatabaseSoftwareImagesRequest.java index b1f25e776a..85716ff961 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListDatabaseSoftwareImagesRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListDatabaseSoftwareImagesRequest.java @@ -205,6 +205,17 @@ public com.oracle.bmc.database.model.DatabaseSoftwareImageSummary.ImageType getI public String getPatchSetGreaterThanOrEqualTo() { return patchSetGreaterThanOrEqualTo; } + /** + * The DB system [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). If provided, filters the results to the set of database versions which are supported for the DB system. + */ + private String dbSystemId; + + /** + * The DB system [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). If provided, filters the results to the set of database versions which are supported for the DB system. + */ + public String getDbSystemId() { + return dbSystemId; + } /** * If provided, filters the results to the set of database versions which are supported for Upgrade. */ @@ -386,6 +397,21 @@ public Builder patchSetGreaterThanOrEqualTo(String patchSetGreaterThanOrEqualTo) return this; } + /** + * The DB system [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). If provided, filters the results to the set of database versions which are supported for the DB system. + */ + private String dbSystemId = null; + + /** + * The DB system [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). If provided, filters the results to the set of database versions which are supported for the DB system. + * @param dbSystemId the value to set + * @return this builder instance + */ + public Builder dbSystemId(String dbSystemId) { + this.dbSystemId = dbSystemId; + return this; + } + /** * If provided, filters the results to the set of database versions which are supported for Upgrade. */ @@ -439,6 +465,7 @@ public Builder copy(ListDatabaseSoftwareImagesRequest o) { imageType(o.getImageType()); imageShapeFamily(o.getImageShapeFamily()); patchSetGreaterThanOrEqualTo(o.getPatchSetGreaterThanOrEqualTo()); + dbSystemId(o.getDbSystemId()); isUpgradeSupported(o.getIsUpgradeSupported()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); @@ -482,9 +509,10 @@ public ListDatabaseSoftwareImagesRequest buildWithoutInvocationCallback() { request.imageType = imageType; request.imageShapeFamily = imageShapeFamily; request.patchSetGreaterThanOrEqualTo = patchSetGreaterThanOrEqualTo; + request.dbSystemId = dbSystemId; request.isUpgradeSupported = isUpgradeSupported; return request; - // new ListDatabaseSoftwareImagesRequest(compartmentId, limit, page, sortBy, sortOrder, lifecycleState, displayName, imageType, imageShapeFamily, patchSetGreaterThanOrEqualTo, isUpgradeSupported); + // new ListDatabaseSoftwareImagesRequest(compartmentId, limit, page, sortBy, sortOrder, lifecycleState, displayName, imageType, imageShapeFamily, patchSetGreaterThanOrEqualTo, dbSystemId, isUpgradeSupported); } } @@ -504,6 +532,7 @@ public Builder toBuilder() { .imageType(imageType) .imageShapeFamily(imageShapeFamily) .patchSetGreaterThanOrEqualTo(patchSetGreaterThanOrEqualTo) + .dbSystemId(dbSystemId) .isUpgradeSupported(isUpgradeSupported); } @@ -531,6 +560,7 @@ public String toString() { sb.append(",imageShapeFamily=").append(String.valueOf(this.imageShapeFamily)); sb.append(",patchSetGreaterThanOrEqualTo=") .append(String.valueOf(this.patchSetGreaterThanOrEqualTo)); + sb.append(",dbSystemId=").append(String.valueOf(this.dbSystemId)); sb.append(",isUpgradeSupported=").append(String.valueOf(this.isUpgradeSupported)); sb.append(")"); return sb.toString(); @@ -558,6 +588,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.imageShapeFamily, other.imageShapeFamily) && java.util.Objects.equals( this.patchSetGreaterThanOrEqualTo, other.patchSetGreaterThanOrEqualTo) + && java.util.Objects.equals(this.dbSystemId, other.dbSystemId) && java.util.Objects.equals(this.isUpgradeSupported, other.isUpgradeSupported); } @@ -585,6 +616,7 @@ public int hashCode() { + (this.patchSetGreaterThanOrEqualTo == null ? 43 : this.patchSetGreaterThanOrEqualTo.hashCode()); + result = (result * PRIME) + (this.dbSystemId == null ? 43 : this.dbSystemId.hashCode()); result = (result * PRIME) + (this.isUpgradeSupported == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClustersRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClustersRequest.java index e66a6d7b81..c3fd55e428 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClustersRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClustersRequest.java @@ -167,6 +167,17 @@ public com.oracle.bmc.database.model.ExadbVmClusterSummary.LifecycleState getLif public String getExascaleDbStorageVaultId() { return exascaleDbStorageVaultId; } + /** + * A filter to return only resources that match the given cluster placement group ID exactly. + */ + private String clusterPlacementGroupId; + + /** + * A filter to return only resources that match the given cluster placement group ID exactly. + */ + public String getClusterPlacementGroupId() { + return clusterPlacementGroupId; + } /** * A filter to return only resources that match the entire display name given. The match is not case sensitive. */ @@ -312,6 +323,21 @@ public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { return this; } + /** + * A filter to return only resources that match the given cluster placement group ID exactly. + */ + private String clusterPlacementGroupId = null; + + /** + * A filter to return only resources that match the given cluster placement group ID exactly. + * @param clusterPlacementGroupId the value to set + * @return this builder instance + */ + public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { + this.clusterPlacementGroupId = clusterPlacementGroupId; + return this; + } + /** * A filter to return only resources that match the entire display name given. The match is not case sensitive. */ @@ -379,6 +405,7 @@ public Builder copy(ListExadbVmClustersRequest o) { sortOrder(o.getSortOrder()); lifecycleState(o.getLifecycleState()); exascaleDbStorageVaultId(o.getExascaleDbStorageVaultId()); + clusterPlacementGroupId(o.getClusterPlacementGroupId()); displayName(o.getDisplayName()); opcRequestId(o.getOpcRequestId()); invocationCallback(o.getInvocationCallback()); @@ -420,10 +447,11 @@ public ListExadbVmClustersRequest buildWithoutInvocationCallback() { request.sortOrder = sortOrder; request.lifecycleState = lifecycleState; request.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + request.clusterPlacementGroupId = clusterPlacementGroupId; request.displayName = displayName; request.opcRequestId = opcRequestId; return request; - // new ListExadbVmClustersRequest(compartmentId, limit, page, sortBy, sortOrder, lifecycleState, exascaleDbStorageVaultId, displayName, opcRequestId); + // new ListExadbVmClustersRequest(compartmentId, limit, page, sortBy, sortOrder, lifecycleState, exascaleDbStorageVaultId, clusterPlacementGroupId, displayName, opcRequestId); } } @@ -440,6 +468,7 @@ public Builder toBuilder() { .sortOrder(sortOrder) .lifecycleState(lifecycleState) .exascaleDbStorageVaultId(exascaleDbStorageVaultId) + .clusterPlacementGroupId(clusterPlacementGroupId) .displayName(displayName) .opcRequestId(opcRequestId); } @@ -465,6 +494,7 @@ public String toString() { sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(",exascaleDbStorageVaultId=") .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(",clusterPlacementGroupId=").append(String.valueOf(this.clusterPlacementGroupId)); sb.append(",displayName=").append(String.valueOf(this.displayName)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(")"); @@ -490,6 +520,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals( this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals( + this.clusterPlacementGroupId, other.clusterPlacementGroupId) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @@ -513,6 +545,11 @@ public int hashCode() { + (this.exascaleDbStorageVaultId == null ? 43 : this.exascaleDbStorageVaultId.hashCode()); + result = + (result * PRIME) + + (this.clusterPlacementGroupId == null + ? 43 + : this.clusterPlacementGroupId.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.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/ListExascaleDbStorageVaultsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExascaleDbStorageVaultsRequest.java index 49dd64847a..351f4ac838 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExascaleDbStorageVaultsRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExascaleDbStorageVaultsRequest.java @@ -153,6 +153,17 @@ public SortOrder getSortOrder() { public com.oracle.bmc.database.model.ExascaleDbStorageVault.LifecycleState getLifecycleState() { return lifecycleState; } + /** + * A filter to return only resources that match the given cluster placement group ID exactly. + */ + private String clusterPlacementGroupId; + + /** + * A filter to return only resources that match the given cluster placement group ID exactly. + */ + public String getClusterPlacementGroupId() { + return clusterPlacementGroupId; + } /** * A filter to return only resources that match the entire display name given. The match is not case sensitive. */ @@ -291,6 +302,21 @@ public Builder lifecycleState( return this; } + /** + * A filter to return only resources that match the given cluster placement group ID exactly. + */ + private String clusterPlacementGroupId = null; + + /** + * A filter to return only resources that match the given cluster placement group ID exactly. + * @param clusterPlacementGroupId the value to set + * @return this builder instance + */ + public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { + this.clusterPlacementGroupId = clusterPlacementGroupId; + return this; + } + /** * A filter to return only resources that match the entire display name given. The match is not case sensitive. */ @@ -372,6 +398,7 @@ public Builder copy(ListExascaleDbStorageVaultsRequest o) { sortBy(o.getSortBy()); sortOrder(o.getSortOrder()); lifecycleState(o.getLifecycleState()); + clusterPlacementGroupId(o.getClusterPlacementGroupId()); displayName(o.getDisplayName()); opcRequestId(o.getOpcRequestId()); exadataInfrastructureId(o.getExadataInfrastructureId()); @@ -413,11 +440,12 @@ public ListExascaleDbStorageVaultsRequest buildWithoutInvocationCallback() { request.sortBy = sortBy; request.sortOrder = sortOrder; request.lifecycleState = lifecycleState; + request.clusterPlacementGroupId = clusterPlacementGroupId; request.displayName = displayName; request.opcRequestId = opcRequestId; request.exadataInfrastructureId = exadataInfrastructureId; return request; - // new ListExascaleDbStorageVaultsRequest(compartmentId, limit, page, sortBy, sortOrder, lifecycleState, displayName, opcRequestId, exadataInfrastructureId); + // new ListExascaleDbStorageVaultsRequest(compartmentId, limit, page, sortBy, sortOrder, lifecycleState, clusterPlacementGroupId, displayName, opcRequestId, exadataInfrastructureId); } } @@ -433,6 +461,7 @@ public Builder toBuilder() { .sortBy(sortBy) .sortOrder(sortOrder) .lifecycleState(lifecycleState) + .clusterPlacementGroupId(clusterPlacementGroupId) .displayName(displayName) .opcRequestId(opcRequestId) .exadataInfrastructureId(exadataInfrastructureId); @@ -457,6 +486,7 @@ public String toString() { sb.append(",sortBy=").append(String.valueOf(this.sortBy)); sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",clusterPlacementGroupId=").append(String.valueOf(this.clusterPlacementGroupId)); sb.append(",displayName=").append(String.valueOf(this.displayName)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(",exadataInfrastructureId=").append(String.valueOf(this.exadataInfrastructureId)); @@ -481,6 +511,8 @@ 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.clusterPlacementGroupId, other.clusterPlacementGroupId) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) && java.util.Objects.equals( @@ -501,6 +533,11 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.clusterPlacementGroupId == null + ? 43 + : this.clusterPlacementGroupId.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); result = diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListVmClustersRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListVmClustersRequest.java index 46de217efa..39db1d9678 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListVmClustersRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListVmClustersRequest.java @@ -187,6 +187,17 @@ public String getDisplayName() { public String getOpcRequestId() { return opcRequestId; } + /** + * A filter to return only vmclusters that match the given vmcluster type exactly. + */ + private com.oracle.bmc.database.model.VmClusterSummary.VmClusterType vmClusterType; + + /** + * A filter to return only vmclusters that match the given vmcluster type exactly. + */ + public com.oracle.bmc.database.model.VmClusterSummary.VmClusterType getVmClusterType() { + return vmClusterType; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -335,6 +346,22 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * A filter to return only vmclusters that match the given vmcluster type exactly. + */ + private com.oracle.bmc.database.model.VmClusterSummary.VmClusterType vmClusterType = null; + + /** + * A filter to return only vmclusters that match the given vmcluster type exactly. + * @param vmClusterType the value to set + * @return this builder instance + */ + public Builder vmClusterType( + com.oracle.bmc.database.model.VmClusterSummary.VmClusterType vmClusterType) { + this.vmClusterType = vmClusterType; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -372,6 +399,7 @@ public Builder copy(ListVmClustersRequest o) { lifecycleState(o.getLifecycleState()); displayName(o.getDisplayName()); opcRequestId(o.getOpcRequestId()); + vmClusterType(o.getVmClusterType()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -413,8 +441,9 @@ public ListVmClustersRequest buildWithoutInvocationCallback() { request.lifecycleState = lifecycleState; request.displayName = displayName; request.opcRequestId = opcRequestId; + request.vmClusterType = vmClusterType; return request; - // new ListVmClustersRequest(compartmentId, exadataInfrastructureId, limit, page, sortBy, sortOrder, lifecycleState, displayName, opcRequestId); + // new ListVmClustersRequest(compartmentId, exadataInfrastructureId, limit, page, sortBy, sortOrder, lifecycleState, displayName, opcRequestId, vmClusterType); } } @@ -432,7 +461,8 @@ public Builder toBuilder() { .sortOrder(sortOrder) .lifecycleState(lifecycleState) .displayName(displayName) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .vmClusterType(vmClusterType); } /** @@ -457,6 +487,7 @@ public String toString() { sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(",displayName=").append(String.valueOf(this.displayName)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",vmClusterType=").append(String.valueOf(this.vmClusterType)); sb.append(")"); return sb.toString(); } @@ -481,7 +512,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.displayName, other.displayName) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.vmClusterType, other.vmClusterType); } @Override @@ -505,6 +537,9 @@ public int hashCode() { + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.vmClusterType == null ? 43 : this.vmClusterType.hashCode()); return result; } } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/MigrateAutonomousContainerDatabaseDataguardAssociationRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/MigrateAutonomousContainerDatabaseDataguardAssociationRequest.java new file mode 100644 index 0000000000..7e65745a3f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/MigrateAutonomousContainerDatabaseDataguardAssociationRequest.java @@ -0,0 +1,299 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 MigrateAutonomousContainerDatabaseDataguardAssociationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class MigrateAutonomousContainerDatabaseDataguardAssociationRequest + 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 Autonomous Container Database-Autonomous Data Guard association [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + private String autonomousContainerDatabaseDataguardAssociationId; + + /** + * The Autonomous Container Database-Autonomous Data Guard association [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + public String getAutonomousContainerDatabaseDataguardAssociationId() { + return autonomousContainerDatabaseDataguardAssociationId; + } + /** + * 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 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< + MigrateAutonomousContainerDatabaseDataguardAssociationRequest, 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 Autonomous Container Database-Autonomous Data Guard association [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + private String autonomousContainerDatabaseDataguardAssociationId = null; + + /** + * The Autonomous Container Database-Autonomous Data Guard association [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * @param autonomousContainerDatabaseDataguardAssociationId the value to set + * @return this builder instance + */ + public Builder autonomousContainerDatabaseDataguardAssociationId( + String autonomousContainerDatabaseDataguardAssociationId) { + this.autonomousContainerDatabaseDataguardAssociationId = + autonomousContainerDatabaseDataguardAssociationId; + 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 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(MigrateAutonomousContainerDatabaseDataguardAssociationRequest o) { + autonomousContainerDatabaseId(o.getAutonomousContainerDatabaseId()); + autonomousContainerDatabaseDataguardAssociationId( + o.getAutonomousContainerDatabaseDataguardAssociationId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of MigrateAutonomousContainerDatabaseDataguardAssociationRequest 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 MigrateAutonomousContainerDatabaseDataguardAssociationRequest + */ + public MigrateAutonomousContainerDatabaseDataguardAssociationRequest build() { + MigrateAutonomousContainerDatabaseDataguardAssociationRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of MigrateAutonomousContainerDatabaseDataguardAssociationRequest 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 MigrateAutonomousContainerDatabaseDataguardAssociationRequest + */ + public MigrateAutonomousContainerDatabaseDataguardAssociationRequest + buildWithoutInvocationCallback() { + MigrateAutonomousContainerDatabaseDataguardAssociationRequest request = + new MigrateAutonomousContainerDatabaseDataguardAssociationRequest(); + request.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + request.autonomousContainerDatabaseDataguardAssociationId = + autonomousContainerDatabaseDataguardAssociationId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new MigrateAutonomousContainerDatabaseDataguardAssociationRequest(autonomousContainerDatabaseId, autonomousContainerDatabaseDataguardAssociationId, 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() + .autonomousContainerDatabaseId(autonomousContainerDatabaseId) + .autonomousContainerDatabaseDataguardAssociationId( + autonomousContainerDatabaseDataguardAssociationId) + .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(",autonomousContainerDatabaseId=") + .append(String.valueOf(this.autonomousContainerDatabaseId)); + sb.append(",autonomousContainerDatabaseDataguardAssociationId=") + .append(String.valueOf(this.autonomousContainerDatabaseDataguardAssociationId)); + 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 MigrateAutonomousContainerDatabaseDataguardAssociationRequest)) { + return false; + } + + MigrateAutonomousContainerDatabaseDataguardAssociationRequest other = + (MigrateAutonomousContainerDatabaseDataguardAssociationRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.autonomousContainerDatabaseId, other.autonomousContainerDatabaseId) + && java.util.Objects.equals( + this.autonomousContainerDatabaseDataguardAssociationId, + other.autonomousContainerDatabaseDataguardAssociationId) + && 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.autonomousContainerDatabaseId == null + ? 43 + : this.autonomousContainerDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.autonomousContainerDatabaseDataguardAssociationId == null + ? 43 + : this.autonomousContainerDatabaseDataguardAssociationId + .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-database/src/main/java/com/oracle/bmc/database/requests/ReinstateAutonomousContainerDatabaseDataguardRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ReinstateAutonomousContainerDatabaseDataguardRequest.java new file mode 100644 index 0000000000..46a5dc2be7 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ReinstateAutonomousContainerDatabaseDataguardRequest.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 ReinstateAutonomousContainerDatabaseDataguardRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ReinstateAutonomousContainerDatabaseDataguardRequest + 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; + } + /** + * 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 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< + ReinstateAutonomousContainerDatabaseDataguardRequest, 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; + } + + /** + * 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 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(ReinstateAutonomousContainerDatabaseDataguardRequest o) { + autonomousContainerDatabaseId(o.getAutonomousContainerDatabaseId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ReinstateAutonomousContainerDatabaseDataguardRequest 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 ReinstateAutonomousContainerDatabaseDataguardRequest + */ + public ReinstateAutonomousContainerDatabaseDataguardRequest build() { + ReinstateAutonomousContainerDatabaseDataguardRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ReinstateAutonomousContainerDatabaseDataguardRequest 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 ReinstateAutonomousContainerDatabaseDataguardRequest + */ + public ReinstateAutonomousContainerDatabaseDataguardRequest + buildWithoutInvocationCallback() { + ReinstateAutonomousContainerDatabaseDataguardRequest request = + new ReinstateAutonomousContainerDatabaseDataguardRequest(); + request.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ReinstateAutonomousContainerDatabaseDataguardRequest(autonomousContainerDatabaseId, 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() + .autonomousContainerDatabaseId(autonomousContainerDatabaseId) + .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(",autonomousContainerDatabaseId=") + .append(String.valueOf(this.autonomousContainerDatabaseId)); + 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 ReinstateAutonomousContainerDatabaseDataguardRequest)) { + return false; + } + + ReinstateAutonomousContainerDatabaseDataguardRequest other = + (ReinstateAutonomousContainerDatabaseDataguardRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.autonomousContainerDatabaseId, other.autonomousContainerDatabaseId) + && 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.autonomousContainerDatabaseId == null + ? 43 + : this.autonomousContainerDatabaseId.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-database/src/main/java/com/oracle/bmc/database/requests/SwitchoverAutonomousContainerDatabaseDataguardRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/SwitchoverAutonomousContainerDatabaseDataguardRequest.java new file mode 100644 index 0000000000..0356cfdfc8 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/SwitchoverAutonomousContainerDatabaseDataguardRequest.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 SwitchoverAutonomousContainerDatabaseDataguardRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class SwitchoverAutonomousContainerDatabaseDataguardRequest + 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; + } + /** + * 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 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< + SwitchoverAutonomousContainerDatabaseDataguardRequest, 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; + } + + /** + * 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 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(SwitchoverAutonomousContainerDatabaseDataguardRequest o) { + autonomousContainerDatabaseId(o.getAutonomousContainerDatabaseId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SwitchoverAutonomousContainerDatabaseDataguardRequest 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 SwitchoverAutonomousContainerDatabaseDataguardRequest + */ + public SwitchoverAutonomousContainerDatabaseDataguardRequest build() { + SwitchoverAutonomousContainerDatabaseDataguardRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of SwitchoverAutonomousContainerDatabaseDataguardRequest 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 SwitchoverAutonomousContainerDatabaseDataguardRequest + */ + public SwitchoverAutonomousContainerDatabaseDataguardRequest + buildWithoutInvocationCallback() { + SwitchoverAutonomousContainerDatabaseDataguardRequest request = + new SwitchoverAutonomousContainerDatabaseDataguardRequest(); + request.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new SwitchoverAutonomousContainerDatabaseDataguardRequest(autonomousContainerDatabaseId, 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() + .autonomousContainerDatabaseId(autonomousContainerDatabaseId) + .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(",autonomousContainerDatabaseId=") + .append(String.valueOf(this.autonomousContainerDatabaseId)); + 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 SwitchoverAutonomousContainerDatabaseDataguardRequest)) { + return false; + } + + SwitchoverAutonomousContainerDatabaseDataguardRequest other = + (SwitchoverAutonomousContainerDatabaseDataguardRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.autonomousContainerDatabaseId, other.autonomousContainerDatabaseId) + && 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.autonomousContainerDatabaseId == null + ? 43 + : this.autonomousContainerDatabaseId.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-database/src/main/java/com/oracle/bmc/database/requests/UpdateBackupRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateBackupRequest.java new file mode 100644 index 0000000000..81f221fbb3 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateBackupRequest.java @@ -0,0 +1,303 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 UpdateBackupRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateBackupRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.UpdateBackupDetails> { + + /** + * The backup [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + private String backupId; + + /** + * The backup [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + public String getBackupId() { + return backupId; + } + /** + * Request to update the properties of a Backup. + */ + private com.oracle.bmc.database.model.UpdateBackupDetails updateBackupDetails; + + /** + * Request to update the properties of a Backup. + */ + public com.oracle.bmc.database.model.UpdateBackupDetails getUpdateBackupDetails() { + return updateBackupDetails; + } + /** + * 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 identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.UpdateBackupDetails getBody$() { + return updateBackupDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateBackupRequest, com.oracle.bmc.database.model.UpdateBackupDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The backup [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + */ + private String backupId = null; + + /** + * The backup [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * @param backupId the value to set + * @return this builder instance + */ + public Builder backupId(String backupId) { + this.backupId = backupId; + return this; + } + + /** + * Request to update the properties of a Backup. + */ + private com.oracle.bmc.database.model.UpdateBackupDetails updateBackupDetails = null; + + /** + * Request to update the properties of a Backup. + * @param updateBackupDetails the value to set + * @return this builder instance + */ + public Builder updateBackupDetails( + com.oracle.bmc.database.model.UpdateBackupDetails updateBackupDetails) { + this.updateBackupDetails = updateBackupDetails; + 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 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(UpdateBackupRequest o) { + backupId(o.getBackupId()); + updateBackupDetails(o.getUpdateBackupDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateBackupRequest 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 UpdateBackupRequest + */ + public UpdateBackupRequest build() { + UpdateBackupRequest 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.database.model.UpdateBackupDetails body) { + updateBackupDetails(body); + return this; + } + + /** + * Build the instance of UpdateBackupRequest 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 UpdateBackupRequest + */ + public UpdateBackupRequest buildWithoutInvocationCallback() { + UpdateBackupRequest request = new UpdateBackupRequest(); + request.backupId = backupId; + request.updateBackupDetails = updateBackupDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateBackupRequest(backupId, updateBackupDetails, 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() + .backupId(backupId) + .updateBackupDetails(updateBackupDetails) + .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(",backupId=").append(String.valueOf(this.backupId)); + sb.append(",updateBackupDetails=").append(String.valueOf(this.updateBackupDetails)); + 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 UpdateBackupRequest)) { + return false; + } + + UpdateBackupRequest other = (UpdateBackupRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.backupId, other.backupId) + && java.util.Objects.equals(this.updateBackupDetails, other.updateBackupDetails) + && 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.backupId == null ? 43 : this.backupId.hashCode()); + result = + (result * PRIME) + + (this.updateBackupDetails == null + ? 43 + : this.updateBackupDetails.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-database/src/main/java/com/oracle/bmc/database/responses/AddStandbyAutonomousContainerDatabaseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/AddStandbyAutonomousContainerDatabaseResponse.java new file mode 100644 index 0000000000..9c68d9172f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/AddStandbyAutonomousContainerDatabaseResponse.java @@ -0,0 +1,260 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 AddStandbyAutonomousContainerDatabaseResponse + 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 of the work request. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier of the work 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 AutonomousContainerDatabase instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabase autonomousContainerDatabase; + + /** + * The returned AutonomousContainerDatabase instance. + * @return the value + */ + public com.oracle.bmc.database.model.AutonomousContainerDatabase + getAutonomousContainerDatabase() { + return autonomousContainerDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcWorkRequestId", + "opcRequestId", + "autonomousContainerDatabase" + }) + private AddStandbyAutonomousContainerDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.database.model.AutonomousContainerDatabase autonomousContainerDatabase) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.autonomousContainerDatabase = autonomousContainerDatabase; + } + + 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 of the work request. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier of the work 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 AutonomousContainerDatabase instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabase + autonomousContainerDatabase; + + /** + * The returned AutonomousContainerDatabase instance. + * @param autonomousContainerDatabase the value to set + * @return this builder + */ + public Builder autonomousContainerDatabase( + com.oracle.bmc.database.model.AutonomousContainerDatabase + autonomousContainerDatabase) { + this.autonomousContainerDatabase = autonomousContainerDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddStandbyAutonomousContainerDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + autonomousContainerDatabase(o.getAutonomousContainerDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddStandbyAutonomousContainerDatabaseResponse build() { + return new AddStandbyAutonomousContainerDatabaseResponse( + __httpStatusCode__, + headers, + etag, + opcWorkRequestId, + opcRequestId, + autonomousContainerDatabase); + } + } + + /** + * 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(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",autonomousContainerDatabase=") + .append(String.valueOf(autonomousContainerDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddStandbyAutonomousContainerDatabaseResponse)) { + return false; + } + + AddStandbyAutonomousContainerDatabaseResponse other = + (AddStandbyAutonomousContainerDatabaseResponse) o; + return super.equals(o) + && 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.autonomousContainerDatabase, other.autonomousContainerDatabase); + } + + @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.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.autonomousContainerDatabase == null + ? 43 + : this.autonomousContainerDatabase.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeExadbVmClusterSubscriptionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeExadbVmClusterSubscriptionResponse.java new file mode 100644 index 0000000000..2f510138a4 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeExadbVmClusterSubscriptionResponse.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 ChangeExadbVmClusterSubscriptionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID 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 ChangeExadbVmClusterSubscriptionResponse( + 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 work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID 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(ChangeExadbVmClusterSubscriptionResponse 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 ChangeExadbVmClusterSubscriptionResponse build() { + return new ChangeExadbVmClusterSubscriptionResponse( + __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 ChangeExadbVmClusterSubscriptionResponse)) { + return false; + } + + ChangeExadbVmClusterSubscriptionResponse other = + (ChangeExadbVmClusterSubscriptionResponse) 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-database/src/main/java/com/oracle/bmc/database/responses/ChangeExascaleDbStorageVaultSubscriptionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeExascaleDbStorageVaultSubscriptionResponse.java new file mode 100644 index 0000000000..15538b275e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeExascaleDbStorageVaultSubscriptionResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 ChangeExascaleDbStorageVaultSubscriptionResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID 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 ChangeExascaleDbStorageVaultSubscriptionResponse( + 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 work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID 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(ChangeExascaleDbStorageVaultSubscriptionResponse 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 ChangeExascaleDbStorageVaultSubscriptionResponse build() { + return new ChangeExascaleDbStorageVaultSubscriptionResponse( + __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 ChangeExascaleDbStorageVaultSubscriptionResponse)) { + return false; + } + + ChangeExascaleDbStorageVaultSubscriptionResponse other = + (ChangeExascaleDbStorageVaultSubscriptionResponse) 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-database/src/main/java/com/oracle/bmc/database/responses/ConvertStandbyAutonomousContainerDatabaseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ConvertStandbyAutonomousContainerDatabaseResponse.java new file mode 100644 index 0000000000..54650cfd9e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ConvertStandbyAutonomousContainerDatabaseResponse.java @@ -0,0 +1,260 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 ConvertStandbyAutonomousContainerDatabaseResponse + 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 of the work request. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier of the work 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 AutonomousContainerDatabase instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabase autonomousContainerDatabase; + + /** + * The returned AutonomousContainerDatabase instance. + * @return the value + */ + public com.oracle.bmc.database.model.AutonomousContainerDatabase + getAutonomousContainerDatabase() { + return autonomousContainerDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcWorkRequestId", + "opcRequestId", + "autonomousContainerDatabase" + }) + private ConvertStandbyAutonomousContainerDatabaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.database.model.AutonomousContainerDatabase autonomousContainerDatabase) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.autonomousContainerDatabase = autonomousContainerDatabase; + } + + 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 of the work request. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier of the work 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 AutonomousContainerDatabase instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabase + autonomousContainerDatabase; + + /** + * The returned AutonomousContainerDatabase instance. + * @param autonomousContainerDatabase the value to set + * @return this builder + */ + public Builder autonomousContainerDatabase( + com.oracle.bmc.database.model.AutonomousContainerDatabase + autonomousContainerDatabase) { + this.autonomousContainerDatabase = autonomousContainerDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ConvertStandbyAutonomousContainerDatabaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + autonomousContainerDatabase(o.getAutonomousContainerDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ConvertStandbyAutonomousContainerDatabaseResponse build() { + return new ConvertStandbyAutonomousContainerDatabaseResponse( + __httpStatusCode__, + headers, + etag, + opcWorkRequestId, + opcRequestId, + autonomousContainerDatabase); + } + } + + /** + * 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(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",autonomousContainerDatabase=") + .append(String.valueOf(autonomousContainerDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConvertStandbyAutonomousContainerDatabaseResponse)) { + return false; + } + + ConvertStandbyAutonomousContainerDatabaseResponse other = + (ConvertStandbyAutonomousContainerDatabaseResponse) o; + return super.equals(o) + && 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.autonomousContainerDatabase, other.autonomousContainerDatabase); + } + + @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.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.autonomousContainerDatabase == null + ? 43 + : this.autonomousContainerDatabase.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/EditAutonomousContainerDatabaseDataguardResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/EditAutonomousContainerDatabaseDataguardResponse.java new file mode 100644 index 0000000000..a372b11cbb --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/EditAutonomousContainerDatabaseDataguardResponse.java @@ -0,0 +1,260 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 EditAutonomousContainerDatabaseDataguardResponse + 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 of the work request. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier of the work 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 AutonomousContainerDatabase instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabase autonomousContainerDatabase; + + /** + * The returned AutonomousContainerDatabase instance. + * @return the value + */ + public com.oracle.bmc.database.model.AutonomousContainerDatabase + getAutonomousContainerDatabase() { + return autonomousContainerDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcWorkRequestId", + "opcRequestId", + "autonomousContainerDatabase" + }) + private EditAutonomousContainerDatabaseDataguardResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.database.model.AutonomousContainerDatabase autonomousContainerDatabase) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.autonomousContainerDatabase = autonomousContainerDatabase; + } + + 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 of the work request. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier of the work 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 AutonomousContainerDatabase instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabase + autonomousContainerDatabase; + + /** + * The returned AutonomousContainerDatabase instance. + * @param autonomousContainerDatabase the value to set + * @return this builder + */ + public Builder autonomousContainerDatabase( + com.oracle.bmc.database.model.AutonomousContainerDatabase + autonomousContainerDatabase) { + this.autonomousContainerDatabase = autonomousContainerDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(EditAutonomousContainerDatabaseDataguardResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + autonomousContainerDatabase(o.getAutonomousContainerDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public EditAutonomousContainerDatabaseDataguardResponse build() { + return new EditAutonomousContainerDatabaseDataguardResponse( + __httpStatusCode__, + headers, + etag, + opcWorkRequestId, + opcRequestId, + autonomousContainerDatabase); + } + } + + /** + * 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(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",autonomousContainerDatabase=") + .append(String.valueOf(autonomousContainerDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EditAutonomousContainerDatabaseDataguardResponse)) { + return false; + } + + EditAutonomousContainerDatabaseDataguardResponse other = + (EditAutonomousContainerDatabaseDataguardResponse) o; + return super.equals(o) + && 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.autonomousContainerDatabase, other.autonomousContainerDatabase); + } + + @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.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.autonomousContainerDatabase == null + ? 43 + : this.autonomousContainerDatabase.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/FailoverAutonomousContainerDatabaseDataguardResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/FailoverAutonomousContainerDatabaseDataguardResponse.java new file mode 100644 index 0000000000..3d6b3e792f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/FailoverAutonomousContainerDatabaseDataguardResponse.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 FailoverAutonomousContainerDatabaseDataguardResponse + 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 must contact Oracle about + * a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you must contact Oracle about + * a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * The returned AutonomousContainerDatabase instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabase autonomousContainerDatabase; + + /** + * The returned AutonomousContainerDatabase instance. + * @return the value + */ + public com.oracle.bmc.database.model.AutonomousContainerDatabase + getAutonomousContainerDatabase() { + return autonomousContainerDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "opcWorkRequestId", + "autonomousContainerDatabase" + }) + private FailoverAutonomousContainerDatabaseDataguardResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + String opcWorkRequestId, + com.oracle.bmc.database.model.AutonomousContainerDatabase autonomousContainerDatabase) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + this.autonomousContainerDatabase = autonomousContainerDatabase; + } + + 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 must contact Oracle about + * a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you must contact Oracle about + * a particular request, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID 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; + } + + /** + * The returned AutonomousContainerDatabase instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabase + autonomousContainerDatabase; + + /** + * The returned AutonomousContainerDatabase instance. + * @param autonomousContainerDatabase the value to set + * @return this builder + */ + public Builder autonomousContainerDatabase( + com.oracle.bmc.database.model.AutonomousContainerDatabase + autonomousContainerDatabase) { + this.autonomousContainerDatabase = autonomousContainerDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(FailoverAutonomousContainerDatabaseDataguardResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + autonomousContainerDatabase(o.getAutonomousContainerDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public FailoverAutonomousContainerDatabaseDataguardResponse build() { + return new FailoverAutonomousContainerDatabaseDataguardResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + opcWorkRequestId, + autonomousContainerDatabase); + } + } + + /** + * 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(",autonomousContainerDatabase=") + .append(String.valueOf(autonomousContainerDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FailoverAutonomousContainerDatabaseDataguardResponse)) { + return false; + } + + FailoverAutonomousContainerDatabaseDataguardResponse other = + (FailoverAutonomousContainerDatabaseDataguardResponse) 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.autonomousContainerDatabase, other.autonomousContainerDatabase); + } + + @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.autonomousContainerDatabase == null + ? 43 + : this.autonomousContainerDatabase.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/MigrateAutonomousContainerDatabaseDataguardAssociationResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/MigrateAutonomousContainerDatabaseDataguardAssociationResponse.java new file mode 100644 index 0000000000..184f9ed8a9 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/MigrateAutonomousContainerDatabaseDataguardAssociationResponse.java @@ -0,0 +1,270 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 MigrateAutonomousContainerDatabaseDataguardAssociationResponse + 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 must contact Oracle about + * a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you must contact Oracle about + * a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * The returned AutonomousContainerDatabaseDataguardAssociation instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabaseDataguardAssociation + autonomousContainerDatabaseDataguardAssociation; + + /** + * The returned AutonomousContainerDatabaseDataguardAssociation instance. + * @return the value + */ + public com.oracle.bmc.database.model.AutonomousContainerDatabaseDataguardAssociation + getAutonomousContainerDatabaseDataguardAssociation() { + return autonomousContainerDatabaseDataguardAssociation; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "opcWorkRequestId", + "autonomousContainerDatabaseDataguardAssociation" + }) + private MigrateAutonomousContainerDatabaseDataguardAssociationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + String opcWorkRequestId, + com.oracle.bmc.database.model.AutonomousContainerDatabaseDataguardAssociation + autonomousContainerDatabaseDataguardAssociation) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + this.autonomousContainerDatabaseDataguardAssociation = + autonomousContainerDatabaseDataguardAssociation; + } + + 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 must contact Oracle about + * a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you must contact Oracle about + * a particular request, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID 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; + } + + /** + * The returned AutonomousContainerDatabaseDataguardAssociation instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabaseDataguardAssociation + autonomousContainerDatabaseDataguardAssociation; + + /** + * The returned AutonomousContainerDatabaseDataguardAssociation instance. + * @param autonomousContainerDatabaseDataguardAssociation the value to set + * @return this builder + */ + public Builder autonomousContainerDatabaseDataguardAssociation( + com.oracle.bmc.database.model.AutonomousContainerDatabaseDataguardAssociation + autonomousContainerDatabaseDataguardAssociation) { + this.autonomousContainerDatabaseDataguardAssociation = + autonomousContainerDatabaseDataguardAssociation; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(MigrateAutonomousContainerDatabaseDataguardAssociationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + autonomousContainerDatabaseDataguardAssociation( + o.getAutonomousContainerDatabaseDataguardAssociation()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public MigrateAutonomousContainerDatabaseDataguardAssociationResponse build() { + return new MigrateAutonomousContainerDatabaseDataguardAssociationResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + opcWorkRequestId, + autonomousContainerDatabaseDataguardAssociation); + } + } + + /** + * 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(",autonomousContainerDatabaseDataguardAssociation=") + .append(String.valueOf(autonomousContainerDatabaseDataguardAssociation)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MigrateAutonomousContainerDatabaseDataguardAssociationResponse)) { + return false; + } + + MigrateAutonomousContainerDatabaseDataguardAssociationResponse other = + (MigrateAutonomousContainerDatabaseDataguardAssociationResponse) 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.autonomousContainerDatabaseDataguardAssociation, + other.autonomousContainerDatabaseDataguardAssociation); + } + + @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.autonomousContainerDatabaseDataguardAssociation == null + ? 43 + : this.autonomousContainerDatabaseDataguardAssociation.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ReinstateAutonomousContainerDatabaseDataguardResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ReinstateAutonomousContainerDatabaseDataguardResponse.java new file mode 100644 index 0000000000..6d993e6d1e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ReinstateAutonomousContainerDatabaseDataguardResponse.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 ReinstateAutonomousContainerDatabaseDataguardResponse + 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 must contact Oracle about + * a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you must contact Oracle about + * a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * The returned AutonomousContainerDatabase instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabase autonomousContainerDatabase; + + /** + * The returned AutonomousContainerDatabase instance. + * @return the value + */ + public com.oracle.bmc.database.model.AutonomousContainerDatabase + getAutonomousContainerDatabase() { + return autonomousContainerDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "opcWorkRequestId", + "autonomousContainerDatabase" + }) + private ReinstateAutonomousContainerDatabaseDataguardResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + String opcWorkRequestId, + com.oracle.bmc.database.model.AutonomousContainerDatabase autonomousContainerDatabase) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + this.autonomousContainerDatabase = autonomousContainerDatabase; + } + + 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 must contact Oracle about + * a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you must contact Oracle about + * a particular request, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID 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; + } + + /** + * The returned AutonomousContainerDatabase instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabase + autonomousContainerDatabase; + + /** + * The returned AutonomousContainerDatabase instance. + * @param autonomousContainerDatabase the value to set + * @return this builder + */ + public Builder autonomousContainerDatabase( + com.oracle.bmc.database.model.AutonomousContainerDatabase + autonomousContainerDatabase) { + this.autonomousContainerDatabase = autonomousContainerDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ReinstateAutonomousContainerDatabaseDataguardResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + autonomousContainerDatabase(o.getAutonomousContainerDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ReinstateAutonomousContainerDatabaseDataguardResponse build() { + return new ReinstateAutonomousContainerDatabaseDataguardResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + opcWorkRequestId, + autonomousContainerDatabase); + } + } + + /** + * 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(",autonomousContainerDatabase=") + .append(String.valueOf(autonomousContainerDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReinstateAutonomousContainerDatabaseDataguardResponse)) { + return false; + } + + ReinstateAutonomousContainerDatabaseDataguardResponse other = + (ReinstateAutonomousContainerDatabaseDataguardResponse) 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.autonomousContainerDatabase, other.autonomousContainerDatabase); + } + + @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.autonomousContainerDatabase == null + ? 43 + : this.autonomousContainerDatabase.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/SwitchoverAutonomousContainerDatabaseDataguardResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/SwitchoverAutonomousContainerDatabaseDataguardResponse.java new file mode 100644 index 0000000000..af42b180be --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/SwitchoverAutonomousContainerDatabaseDataguardResponse.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 SwitchoverAutonomousContainerDatabaseDataguardResponse + 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 must contact Oracle about + * a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you must contact Oracle about + * a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * The returned AutonomousContainerDatabase instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabase autonomousContainerDatabase; + + /** + * The returned AutonomousContainerDatabase instance. + * @return the value + */ + public com.oracle.bmc.database.model.AutonomousContainerDatabase + getAutonomousContainerDatabase() { + return autonomousContainerDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "opcWorkRequestId", + "autonomousContainerDatabase" + }) + private SwitchoverAutonomousContainerDatabaseDataguardResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + String opcWorkRequestId, + com.oracle.bmc.database.model.AutonomousContainerDatabase autonomousContainerDatabase) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + this.autonomousContainerDatabase = autonomousContainerDatabase; + } + + 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 must contact Oracle about + * a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you must contact Oracle about + * a particular request, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID 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; + } + + /** + * The returned AutonomousContainerDatabase instance. + */ + private com.oracle.bmc.database.model.AutonomousContainerDatabase + autonomousContainerDatabase; + + /** + * The returned AutonomousContainerDatabase instance. + * @param autonomousContainerDatabase the value to set + * @return this builder + */ + public Builder autonomousContainerDatabase( + com.oracle.bmc.database.model.AutonomousContainerDatabase + autonomousContainerDatabase) { + this.autonomousContainerDatabase = autonomousContainerDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SwitchoverAutonomousContainerDatabaseDataguardResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + autonomousContainerDatabase(o.getAutonomousContainerDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SwitchoverAutonomousContainerDatabaseDataguardResponse build() { + return new SwitchoverAutonomousContainerDatabaseDataguardResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + opcWorkRequestId, + autonomousContainerDatabase); + } + } + + /** + * 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(",autonomousContainerDatabase=") + .append(String.valueOf(autonomousContainerDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SwitchoverAutonomousContainerDatabaseDataguardResponse)) { + return false; + } + + SwitchoverAutonomousContainerDatabaseDataguardResponse other = + (SwitchoverAutonomousContainerDatabaseDataguardResponse) 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.autonomousContainerDatabase, other.autonomousContainerDatabase); + } + + @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.autonomousContainerDatabase == null + ? 43 + : this.autonomousContainerDatabase.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateBackupResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateBackupResponse.java new file mode 100644 index 0000000000..debe6ad87d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateBackupResponse.java @@ -0,0 +1,247 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or 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 UpdateBackupResponse 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; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID 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 Backup instance. + */ + private com.oracle.bmc.database.model.Backup backup; + + /** + * The returned Backup instance. + * @return the value + */ + public com.oracle.bmc.database.model.Backup getBackup() { + return backup; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcWorkRequestId", + "opcRequestId", + "backup" + }) + private UpdateBackupResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.database.model.Backup backup) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.backup = backup; + } + + 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; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID 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 Backup instance. + */ + private com.oracle.bmc.database.model.Backup backup; + + /** + * The returned Backup instance. + * @param backup the value to set + * @return this builder + */ + public Builder backup(com.oracle.bmc.database.model.Backup backup) { + this.backup = backup; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateBackupResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + backup(o.getBackup()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateBackupResponse build() { + return new UpdateBackupResponse( + __httpStatusCode__, headers, etag, opcWorkRequestId, opcRequestId, backup); + } + } + + /** + * 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(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",backup=").append(String.valueOf(backup)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateBackupResponse)) { + return false; + } + + UpdateBackupResponse other = (UpdateBackupResponse) o; + return super.equals(o) + && 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.backup, other.backup); + } + + @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.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.backup == null ? 43 : this.backup.hashCode()); + return result; + } +} diff --git a/bmc-databasemanagement/pom.xml b/bmc-databasemanagement/pom.xml index ebec11dddc..96c8e12267 100644 --- a/bmc-databasemanagement/pom.xml +++ b/bmc-databasemanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-databasemanagement @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-databasemigration/pom.xml b/bmc-databasemigration/pom.xml index e2dd9b06bc..aee382e5ca 100644 --- a/bmc-databasemigration/pom.xml +++ b/bmc-databasemigration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-databasemigration @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-databasetools/pom.xml b/bmc-databasetools/pom.xml index 687cdf667d..2d5b9c0528 100644 --- a/bmc-databasetools/pom.xml +++ b/bmc-databasetools/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-databasetools @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-datacatalog/pom.xml b/bmc-datacatalog/pom.xml index c5682f7470..465e1fc97c 100644 --- a/bmc-datacatalog/pom.xml +++ b/bmc-datacatalog/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-datacatalog @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-dataflow/pom.xml b/bmc-dataflow/pom.xml index 3a1ee4e1ba..ba98d39351 100644 --- a/bmc-dataflow/pom.xml +++ b/bmc-dataflow/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-dataflow @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-dataintegration/pom.xml b/bmc-dataintegration/pom.xml index 1568bc6543..cb0628fed4 100644 --- a/bmc-dataintegration/pom.xml +++ b/bmc-dataintegration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-dataintegration @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-datalabelingservice/pom.xml b/bmc-datalabelingservice/pom.xml index 23f7639c59..f30e84b96e 100644 --- a/bmc-datalabelingservice/pom.xml +++ b/bmc-datalabelingservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-datalabelingservice @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-datalabelingservicedataplane/pom.xml b/bmc-datalabelingservicedataplane/pom.xml index b7e9817585..c5578dcbe7 100644 --- a/bmc-datalabelingservicedataplane/pom.xml +++ b/bmc-datalabelingservicedataplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-datalabelingservicedataplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-datasafe/pom.xml b/bmc-datasafe/pom.xml index dc45ad2365..3683f1c250 100644 --- a/bmc-datasafe/pom.xml +++ b/bmc-datasafe/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-datasafe @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafe.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafe.java index ad8b51f83f..3b1db8a754 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafe.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafe.java @@ -519,6 +519,19 @@ ChangeSensitiveDataModelCompartmentResponse changeSensitiveDataModelCompartment( ChangeSensitiveTypeCompartmentResponse changeSensitiveTypeCompartment( ChangeSensitiveTypeCompartmentRequest request); + /** + * Moves the sensitive type group 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 ChangeSensitiveTypeGroupCompartment API. + */ + ChangeSensitiveTypeGroupCompartmentResponse changeSensitiveTypeGroupCompartment( + ChangeSensitiveTypeGroupCompartmentRequest request); + /** * Moves the specified sensitive types export into a different compartment. * @param request The request object containing the details to send @@ -915,6 +928,20 @@ CreateSensitiveDataModelResponse createSensitiveDataModel( */ CreateSensitiveTypeResponse createSensitiveType(CreateSensitiveTypeRequest request); + /** + * Creates a new sensitive type group. + * + * @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 CreateSensitiveTypeGroup API. + */ + CreateSensitiveTypeGroupResponse createSensitiveTypeGroup( + CreateSensitiveTypeGroupRequest request); + /** * Generates a downloadable file corresponding to the specified list of sensitive types. It's a prerequisite for the * DownloadSensitiveTypesExport operation. Use this endpoint to generate a sensitive Types Export file and then use @@ -1139,6 +1166,18 @@ DeleteLibraryMaskingFormatResponse deleteLibraryMaskingFormat( DeleteMaskingPolicyHealthReportResponse deleteMaskingPolicyHealthReport( DeleteMaskingPolicyHealthReportRequest request); + /** + * Deletes the specified masking report. + * @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 DeleteMaskingReport API. + */ + DeleteMaskingReportResponse deleteMaskingReport(DeleteMaskingReportRequest request); + /** * Deletes the specified on-premises connector. * @param request The request object containing the details to send @@ -1256,6 +1295,19 @@ DeleteSensitiveDataModelResponse deleteSensitiveDataModel( */ DeleteSensitiveTypeResponse deleteSensitiveType(DeleteSensitiveTypeRequest request); + /** + * Deletes the specified sensitive type group. + * @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 DeleteSensitiveTypeGroup API. + */ + DeleteSensitiveTypeGroupResponse deleteSensitiveTypeGroup( + DeleteSensitiveTypeGroupRequest request); + /** * Deletes the specified sensitive types export. * @param request The request object containing the details to send @@ -2160,6 +2212,19 @@ GetSecurityPolicyEntryStateResponse getSecurityPolicyEntryState( */ GetSensitiveTypeResponse getSensitiveType(GetSensitiveTypeRequest request); + /** + * Gets the details of the specified sensitive type group. + * + * @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 GetSensitiveTypeGroup API. + */ + GetSensitiveTypeGroupResponse getSensitiveTypeGroup(GetSensitiveTypeGroupRequest request); + /** * Gets the details of the specified sensitive types export by identifier. * @param request The request object containing the details to send @@ -2777,6 +2842,20 @@ ListFindingsChangeAuditLogsResponse listFindingsChangeAuditLogs( */ ListGrantsResponse listGrants(ListGrantsRequest request); + /** + * Gets the list of sensitive type Ids present in the specified sensitive type group. + * + * @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 ListGroupedSensitiveTypes API. + */ + ListGroupedSensitiveTypesResponse listGroupedSensitiveTypes( + ListGroupedSensitiveTypesRequest request); + /** * Gets a list of library masking formats based on the specified query parameters. * @@ -2832,6 +2911,19 @@ ListLibraryMaskingFormatsResponse listLibraryMaskingFormats( */ ListMaskingColumnsResponse listMaskingColumns(ListMaskingColumnsRequest request); + /** + * Gets a list of masking errors in a masking run based on the specified query parameters. + * + * @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 ListMaskingErrors API. + */ + ListMaskingErrorsResponse listMaskingErrors(ListMaskingErrorsRequest request); + /** * Gets a list of masking objects present in the specified masking policy and based on the specified query parameters. * @@ -3278,6 +3370,29 @@ ListSecurityPolicyEntryStatesResponse listSecurityPolicyEntryStates( ListSecurityPolicyReportsResponse listSecurityPolicyReports( ListSecurityPolicyReportsRequest request); + /** + * Gets consolidated sensitive columns analytics data based on the specified query parameters. + *

+ * When you perform the ListSensitiveColumnAnalytics operation, if the parameter compartmentIdInSubtree is set to \"true,\" and if the + * parameter accessLevel is set to ACCESSIBLE, then the operation returns compartments in which the requestor has INSPECT + * permissions on at least one resource, directly or indirectly (in subcompartments). If the operation is performed at the + * root compartment and the requestor does not have access to at least one subcompartment of the compartment specified by + * compartmentId, then \"Not Authorized\" is returned. + *

+ * To use ListSensitiveColumnAnalytics to get a full list of all compartments and subcompartments in the tenancy from the root compartment, + * set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE. + * + * @param 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 ListSensitiveColumnAnalytics API. + */ + ListSensitiveColumnAnalyticsResponse listSensitiveColumnAnalytics( + ListSensitiveColumnAnalyticsRequest request); + /** * Gets a list of sensitive columns present in the specified sensitive data model based on the specified query parameters. * @@ -3344,6 +3459,19 @@ ListSensitiveDataModelSensitiveTypesResponse listSensitiveDataModelSensitiveType */ ListSensitiveSchemasResponse listSensitiveSchemas(ListSensitiveSchemasRequest request); + /** + * Gets a list of sensitive type groups based on the specified query parameters. + * + * @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 ListSensitiveTypeGroups API. + */ + ListSensitiveTypeGroupsResponse listSensitiveTypeGroups(ListSensitiveTypeGroupsRequest request); + /** * Gets a list of sensitive types based on the specified query parameters. * @@ -3786,6 +3914,21 @@ ListTargetAlertPolicyAssociationsResponse listTargetAlertPolicyAssociations( PatchDiscoveryJobResultsResponse patchDiscoveryJobResults( PatchDiscoveryJobResultsRequest request); + /** + * Patches one or more sensitive types in a sensitive type group. You can use this operation to add or remove + * sensitive type ids in a sensitive type group. + * + * @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 PatchGroupedSensitiveTypes API. + */ + PatchGroupedSensitiveTypesResponse patchGroupedSensitiveTypes( + PatchGroupedSensitiveTypesRequest request); + /** * Patches one or more columns in the specified masking policy. Use it to create, or update * masking columns. To create masking columns, use CreateMaskingColumnDetails as the patch @@ -4449,6 +4592,19 @@ UpdateSensitiveDataModelResponse updateSensitiveDataModel( */ UpdateSensitiveTypeResponse updateSensitiveType(UpdateSensitiveTypeRequest request); + /** + * Updates one or more attributes of the specified sensitive type group. + * @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 UpdateSensitiveTypeGroup API. + */ + UpdateSensitiveTypeGroupResponse updateSensitiveTypeGroup( + UpdateSensitiveTypeGroupRequest request); + /** * Updates one or more attributes of the specified sensitive types export. * @param request The request object containing the details to send diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsync.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsync.java index a7ebb28f19..49c735a734 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsync.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsync.java @@ -635,6 +635,24 @@ java.util.concurrent.Future changeRetention( ChangeSensitiveTypeCompartmentResponse> handler); + /** + * Moves the sensitive type group 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 + changeSensitiveTypeGroupCompartment( + ChangeSensitiveTypeGroupCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeSensitiveTypeGroupCompartmentRequest, + ChangeSensitiveTypeGroupCompartmentResponse> + handler); + /** * Moves the specified sensitive types export into a different compartment. * @@ -1131,6 +1149,23 @@ java.util.concurrent.Future createSensitiveType( CreateSensitiveTypeRequest, CreateSensitiveTypeResponse> handler); + /** + * Creates a new sensitive type group. + * + * + * @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 createSensitiveTypeGroup( + CreateSensitiveTypeGroupRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateSensitiveTypeGroupRequest, CreateSensitiveTypeGroupResponse> + handler); + /** * Generates a downloadable file corresponding to the specified list of sensitive types. It's a prerequisite for the * DownloadSensitiveTypesExport operation. Use this endpoint to generate a sensitive Types Export file and then use @@ -1420,6 +1455,22 @@ java.util.concurrent.Future deleteMaskingPolicy( DeleteMaskingPolicyHealthReportResponse> handler); + /** + * Deletes the specified masking report. + * + * @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 deleteMaskingReport( + DeleteMaskingReportRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteMaskingReportRequest, DeleteMaskingReportResponse> + handler); + /** * Deletes the specified on-premises connector. * @@ -1570,6 +1621,22 @@ java.util.concurrent.Future deleteSensitiveType( DeleteSensitiveTypeRequest, DeleteSensitiveTypeResponse> handler); + /** + * Deletes the specified sensitive type group. + * + * @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 deleteSensitiveTypeGroup( + DeleteSensitiveTypeGroupRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteSensitiveTypeGroupRequest, DeleteSensitiveTypeGroupResponse> + handler); + /** * Deletes the specified sensitive types export. * @@ -2724,6 +2791,23 @@ java.util.concurrent.Future getSensitiveType( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets the details of the specified sensitive type group. + * + * + * @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 getSensitiveTypeGroup( + GetSensitiveTypeGroupRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSensitiveTypeGroupRequest, GetSensitiveTypeGroupResponse> + handler); + /** * Gets the details of the specified sensitive types export by identifier. * @@ -3472,6 +3556,23 @@ java.util.concurrent.Future listGrants( ListGrantsRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets the list of sensitive type Ids present in the specified sensitive type group. + * + * + * @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 listGroupedSensitiveTypes( + ListGroupedSensitiveTypesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListGroupedSensitiveTypesRequest, ListGroupedSensitiveTypesResponse> + handler); + /** * Gets a list of library masking formats based on the specified query parameters. * @@ -3542,6 +3643,23 @@ java.util.concurrent.Future listMaskingColumns( ListMaskingColumnsRequest, ListMaskingColumnsResponse> handler); + /** + * Gets a list of masking errors in a masking run based on the specified query parameters. + * + * + * @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 listMaskingErrors( + ListMaskingErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListMaskingErrorsRequest, ListMaskingErrorsResponse> + handler); + /** * Gets a list of masking objects present in the specified masking policy and based on the specified query parameters. * @@ -4091,6 +4209,33 @@ java.util.concurrent.Future listSecurityPolic ListSecurityPolicyReportsRequest, ListSecurityPolicyReportsResponse> handler); + /** + * Gets consolidated sensitive columns analytics data based on the specified query parameters. + *

+ * When you perform the ListSensitiveColumnAnalytics operation, if the parameter compartmentIdInSubtree is set to \"true,\" and if the + * parameter accessLevel is set to ACCESSIBLE, then the operation returns compartments in which the requestor has INSPECT + * permissions on at least one resource, directly or indirectly (in subcompartments). If the operation is performed at the + * root compartment and the requestor does not have access to at least one subcompartment of the compartment specified by + * compartmentId, then \"Not Authorized\" is returned. + *

+ * To use ListSensitiveColumnAnalytics to get a full list of all compartments and subcompartments in the tenancy from the root compartment, + * set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE. + * + * + * @param 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 listSensitiveColumnAnalytics( + ListSensitiveColumnAnalyticsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSensitiveColumnAnalyticsRequest, + ListSensitiveColumnAnalyticsResponse> + handler); + /** * Gets a list of sensitive columns present in the specified sensitive data model based on the specified query parameters. * @@ -4178,6 +4323,23 @@ java.util.concurrent.Future listSensitiveSchemas( ListSensitiveSchemasRequest, ListSensitiveSchemasResponse> handler); + /** + * Gets a list of sensitive type groups based on the specified query parameters. + * + * + * @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 listSensitiveTypeGroups( + ListSensitiveTypeGroupsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSensitiveTypeGroupsRequest, ListSensitiveTypeGroupsResponse> + handler); + /** * Gets a list of sensitive types based on the specified query parameters. * @@ -4710,6 +4872,24 @@ java.util.concurrent.Future patchDiscoveryJobR PatchDiscoveryJobResultsRequest, PatchDiscoveryJobResultsResponse> handler); + /** + * Patches one or more sensitive types in a sensitive type group. You can use this operation to add or remove + * sensitive type ids in a sensitive type group. + * + * + * @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 patchGroupedSensitiveTypes( + PatchGroupedSensitiveTypesRequest request, + com.oracle.bmc.responses.AsyncHandler< + PatchGroupedSensitiveTypesRequest, PatchGroupedSensitiveTypesResponse> + handler); + /** * Patches one or more columns in the specified masking policy. Use it to create, or update * masking columns. To create masking columns, use CreateMaskingColumnDetails as the patch @@ -5567,6 +5747,22 @@ java.util.concurrent.Future updateSensitiveType( UpdateSensitiveTypeRequest, UpdateSensitiveTypeResponse> handler); + /** + * Updates one or more attributes of the specified sensitive type group. + * + * @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 updateSensitiveTypeGroup( + UpdateSensitiveTypeGroupRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateSensitiveTypeGroupRequest, UpdateSensitiveTypeGroupResponse> + handler); + /** * Updates one or more attributes of the specified sensitive types export. * diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsyncClient.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsyncClient.java index 3a3ddc0ba6..9272ee5b26 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsyncClient.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsyncClient.java @@ -2303,6 +2303,66 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + changeSensitiveTypeGroupCompartment( + ChangeSensitiveTypeGroupCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeSensitiveTypeGroupCompartmentRequest, + ChangeSensitiveTypeGroupCompartmentResponse> + handler) { + LOG.trace("Called async changeSensitiveTypeGroupCompartment"); + final ChangeSensitiveTypeGroupCompartmentRequest interceptedRequest = + ChangeSensitiveTypeGroupCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeSensitiveTypeGroupCompartmentConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "ChangeSensitiveTypeGroupCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/ChangeSensitiveTypeGroupCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeSensitiveTypeGroupCompartmentResponse> + transformer = + ChangeSensitiveTypeGroupCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeSensitiveTypeGroupCompartmentRequest, + ChangeSensitiveTypeGroupCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeSensitiveTypeGroupCompartmentRequest, + ChangeSensitiveTypeGroupCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeSensitiveTypeGroupCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeSensitiveTypeGroupCompartmentRequest, + ChangeSensitiveTypeGroupCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeSensitiveTypesExportCompartment( @@ -3686,6 +3746,60 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future createSensitiveTypeGroup( + CreateSensitiveTypeGroupRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateSensitiveTypeGroupRequest, CreateSensitiveTypeGroupResponse> + handler) { + LOG.trace("Called async createSensitiveTypeGroup"); + final CreateSensitiveTypeGroupRequest interceptedRequest = + CreateSensitiveTypeGroupConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSensitiveTypeGroupConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "CreateSensitiveTypeGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/CreateSensitiveTypeGroup"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateSensitiveTypeGroupResponse> + transformer = + CreateSensitiveTypeGroupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateSensitiveTypeGroupRequest, CreateSensitiveTypeGroupResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateSensitiveTypeGroupRequest, CreateSensitiveTypeGroupResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateSensitiveTypeGroupDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateSensitiveTypeGroupRequest, CreateSensitiveTypeGroupResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createSensitiveTypesExport( @@ -4543,6 +4657,53 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deleteMaskingReport( + DeleteMaskingReportRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteMaskingReportRequest, DeleteMaskingReportResponse> + handler) { + LOG.trace("Called async deleteMaskingReport"); + final DeleteMaskingReportRequest interceptedRequest = + DeleteMaskingReportConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteMaskingReportConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "DeleteMaskingReport", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingReport/DeleteMaskingReport"); + final java.util.function.Function + transformer = + DeleteMaskingReportConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteMaskingReportRequest, DeleteMaskingReportResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteMaskingReportRequest, DeleteMaskingReportResponse>, + 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< + DeleteMaskingReportRequest, DeleteMaskingReportResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteOnPremConnector( DeleteOnPremConnectorRequest request, @@ -4977,6 +5138,54 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deleteSensitiveTypeGroup( + DeleteSensitiveTypeGroupRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteSensitiveTypeGroupRequest, DeleteSensitiveTypeGroupResponse> + handler) { + LOG.trace("Called async deleteSensitiveTypeGroup"); + final DeleteSensitiveTypeGroupRequest interceptedRequest = + DeleteSensitiveTypeGroupConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSensitiveTypeGroupConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "DeleteSensitiveTypeGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/DeleteSensitiveTypeGroup"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteSensitiveTypeGroupResponse> + transformer = + DeleteSensitiveTypeGroupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteSensitiveTypeGroupRequest, DeleteSensitiveTypeGroupResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteSensitiveTypeGroupRequest, DeleteSensitiveTypeGroupResponse>, + 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< + DeleteSensitiveTypeGroupRequest, DeleteSensitiveTypeGroupResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteSensitiveTypesExport( @@ -8327,6 +8536,53 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getSensitiveTypeGroup( + GetSensitiveTypeGroupRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSensitiveTypeGroupRequest, GetSensitiveTypeGroupResponse> + handler) { + LOG.trace("Called async getSensitiveTypeGroup"); + final GetSensitiveTypeGroupRequest interceptedRequest = + GetSensitiveTypeGroupConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSensitiveTypeGroupConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "GetSensitiveTypeGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/GetSensitiveTypeGroup"); + final java.util.function.Function + transformer = + GetSensitiveTypeGroupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetSensitiveTypeGroupRequest, GetSensitiveTypeGroupResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetSensitiveTypeGroupRequest, GetSensitiveTypeGroupResponse>, + 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< + GetSensitiveTypeGroupRequest, GetSensitiveTypeGroupResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getSensitiveTypesExport( GetSensitiveTypesExportRequest request, @@ -10089,6 +10345,55 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listGroupedSensitiveTypes( + ListGroupedSensitiveTypesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListGroupedSensitiveTypesRequest, ListGroupedSensitiveTypesResponse> + handler) { + LOG.trace("Called async listGroupedSensitiveTypes"); + final ListGroupedSensitiveTypesRequest interceptedRequest = + ListGroupedSensitiveTypesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListGroupedSensitiveTypesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "ListGroupedSensitiveTypes", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/ListGroupedSensitiveTypes"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListGroupedSensitiveTypesResponse> + transformer = + ListGroupedSensitiveTypesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListGroupedSensitiveTypesRequest, ListGroupedSensitiveTypesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListGroupedSensitiveTypesRequest, + ListGroupedSensitiveTypesResponse>, + 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< + ListGroupedSensitiveTypesRequest, ListGroupedSensitiveTypesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listLibraryMaskingFormats( ListLibraryMaskingFormatsRequest request, @@ -10277,6 +10582,52 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listMaskingErrors( + ListMaskingErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListMaskingErrorsRequest, ListMaskingErrorsResponse> + handler) { + LOG.trace("Called async listMaskingErrors"); + final ListMaskingErrorsRequest interceptedRequest = + ListMaskingErrorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMaskingErrorsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "ListMaskingErrors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingErrorSummary/ListMaskingErrors"); + final java.util.function.Function + transformer = + ListMaskingErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListMaskingErrorsRequest, ListMaskingErrorsResponse>, + 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< + ListMaskingErrorsRequest, ListMaskingErrorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listMaskingObjects( ListMaskingObjectsRequest request, @@ -11532,6 +11883,57 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + listSensitiveColumnAnalytics( + ListSensitiveColumnAnalyticsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSensitiveColumnAnalyticsRequest, + ListSensitiveColumnAnalyticsResponse> + handler) { + LOG.trace("Called async listSensitiveColumnAnalytics"); + final ListSensitiveColumnAnalyticsRequest interceptedRequest = + ListSensitiveColumnAnalyticsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSensitiveColumnAnalyticsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "ListSensitiveColumnAnalytics", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveDataModel/ListSensitiveColumnAnalytics"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListSensitiveColumnAnalyticsResponse> + transformer = + ListSensitiveColumnAnalyticsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSensitiveColumnAnalyticsRequest, ListSensitiveColumnAnalyticsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSensitiveColumnAnalyticsRequest, + ListSensitiveColumnAnalyticsResponse>, + 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< + ListSensitiveColumnAnalyticsRequest, ListSensitiveColumnAnalyticsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listSensitiveColumns( ListSensitiveColumnsRequest request, @@ -11775,6 +12177,54 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listSensitiveTypeGroups( + ListSensitiveTypeGroupsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSensitiveTypeGroupsRequest, ListSensitiveTypeGroupsResponse> + handler) { + LOG.trace("Called async listSensitiveTypeGroups"); + final ListSensitiveTypeGroupsRequest interceptedRequest = + ListSensitiveTypeGroupsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSensitiveTypeGroupsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "ListSensitiveTypeGroups", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroupSummary/ListSensitiveTypeGroups"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListSensitiveTypeGroupsResponse> + transformer = + ListSensitiveTypeGroupsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSensitiveTypeGroupsRequest, ListSensitiveTypeGroupsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSensitiveTypeGroupsRequest, ListSensitiveTypeGroupsResponse>, + 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< + ListSensitiveTypeGroupsRequest, ListSensitiveTypeGroupsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listSensitiveTypes( ListSensitiveTypesRequest request, @@ -12800,6 +13250,7 @@ public java.util.concurrent.Future maskData( final MaskDataRequest interceptedRequest = MaskDataConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = MaskDataConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "DataSafe", @@ -12992,6 +13443,62 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + patchGroupedSensitiveTypes( + PatchGroupedSensitiveTypesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PatchGroupedSensitiveTypesRequest, + PatchGroupedSensitiveTypesResponse> + handler) { + LOG.trace("Called async patchGroupedSensitiveTypes"); + final PatchGroupedSensitiveTypesRequest interceptedRequest = + PatchGroupedSensitiveTypesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchGroupedSensitiveTypesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "PatchGroupedSensitiveTypes", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/PatchGroupedSensitiveTypes"); + final java.util.function.Function< + javax.ws.rs.core.Response, PatchGroupedSensitiveTypesResponse> + transformer = + PatchGroupedSensitiveTypesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + PatchGroupedSensitiveTypesRequest, PatchGroupedSensitiveTypesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + PatchGroupedSensitiveTypesRequest, + PatchGroupedSensitiveTypesResponse>, + java.util.concurrent.Future> + futureSupplier = + client.patchFutureSupplier( + interceptedRequest, + interceptedRequest.getPatchGroupedSensitiveTypesDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + PatchGroupedSensitiveTypesRequest, PatchGroupedSensitiveTypesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future patchMaskingColumns( PatchMaskingColumnsRequest request, @@ -15668,6 +16175,59 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future updateSensitiveTypeGroup( + UpdateSensitiveTypeGroupRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateSensitiveTypeGroupRequest, UpdateSensitiveTypeGroupResponse> + handler) { + LOG.trace("Called async updateSensitiveTypeGroup"); + final UpdateSensitiveTypeGroupRequest interceptedRequest = + UpdateSensitiveTypeGroupConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSensitiveTypeGroupConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "UpdateSensitiveTypeGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/UpdateSensitiveTypeGroup"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateSensitiveTypeGroupResponse> + transformer = + UpdateSensitiveTypeGroupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateSensitiveTypeGroupRequest, UpdateSensitiveTypeGroupResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateSensitiveTypeGroupRequest, UpdateSensitiveTypeGroupResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateSensitiveTypeGroupDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateSensitiveTypeGroupRequest, UpdateSensitiveTypeGroupResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateSensitiveTypesExport( diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeClient.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeClient.java index 86bda2fb98..d3664d6c49 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeClient.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeClient.java @@ -2006,6 +2006,52 @@ public ChangeSensitiveTypeCompartmentResponse changeSensitiveTypeCompartment( }); } + @Override + public ChangeSensitiveTypeGroupCompartmentResponse changeSensitiveTypeGroupCompartment( + ChangeSensitiveTypeGroupCompartmentRequest request) { + LOG.trace("Called changeSensitiveTypeGroupCompartment"); + final ChangeSensitiveTypeGroupCompartmentRequest interceptedRequest = + ChangeSensitiveTypeGroupCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeSensitiveTypeGroupCompartmentConverter.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( + "DataSafe", + "ChangeSensitiveTypeGroupCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/ChangeSensitiveTypeGroupCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeSensitiveTypeGroupCompartmentResponse> + transformer = + ChangeSensitiveTypeGroupCompartmentConverter.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 + .getChangeSensitiveTypeGroupCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeSensitiveTypesExportCompartmentResponse changeSensitiveTypesExportCompartment( ChangeSensitiveTypesExportCompartmentRequest request) { @@ -3094,6 +3140,49 @@ public CreateSensitiveTypeResponse createSensitiveType(CreateSensitiveTypeReques }); } + @Override + public CreateSensitiveTypeGroupResponse createSensitiveTypeGroup( + CreateSensitiveTypeGroupRequest request) { + LOG.trace("Called createSensitiveTypeGroup"); + final CreateSensitiveTypeGroupRequest interceptedRequest = + CreateSensitiveTypeGroupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSensitiveTypeGroupConverter.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( + "DataSafe", + "CreateSensitiveTypeGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/CreateSensitiveTypeGroup"); + java.util.function.Function + transformer = + CreateSensitiveTypeGroupConverter.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.getCreateSensitiveTypeGroupDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateSensitiveTypesExportResponse createSensitiveTypesExport( CreateSensitiveTypesExportRequest request) { @@ -3775,6 +3864,44 @@ public DeleteMaskingPolicyHealthReportResponse deleteMaskingPolicyHealthReport( }); } + @Override + public DeleteMaskingReportResponse deleteMaskingReport(DeleteMaskingReportRequest request) { + LOG.trace("Called deleteMaskingReport"); + final DeleteMaskingReportRequest interceptedRequest = + DeleteMaskingReportConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteMaskingReportConverter.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( + "DataSafe", + "DeleteMaskingReport", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingReport/DeleteMaskingReport"); + java.util.function.Function + transformer = + DeleteMaskingReportConverter.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 DeleteOnPremConnectorResponse deleteOnPremConnector( DeleteOnPremConnectorRequest request) { @@ -4126,6 +4253,45 @@ public DeleteSensitiveTypeResponse deleteSensitiveType(DeleteSensitiveTypeReques }); } + @Override + public DeleteSensitiveTypeGroupResponse deleteSensitiveTypeGroup( + DeleteSensitiveTypeGroupRequest request) { + LOG.trace("Called deleteSensitiveTypeGroup"); + final DeleteSensitiveTypeGroupRequest interceptedRequest = + DeleteSensitiveTypeGroupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSensitiveTypeGroupConverter.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( + "DataSafe", + "DeleteSensitiveTypeGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/DeleteSensitiveTypeGroup"); + java.util.function.Function + transformer = + DeleteSensitiveTypeGroupConverter.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 DeleteSensitiveTypesExportResponse deleteSensitiveTypesExport( DeleteSensitiveTypesExportRequest request) { @@ -6748,6 +6914,44 @@ public GetSensitiveTypeResponse getSensitiveType(GetSensitiveTypeRequest request }); } + @Override + public GetSensitiveTypeGroupResponse getSensitiveTypeGroup( + GetSensitiveTypeGroupRequest request) { + LOG.trace("Called getSensitiveTypeGroup"); + final GetSensitiveTypeGroupRequest interceptedRequest = + GetSensitiveTypeGroupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSensitiveTypeGroupConverter.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( + "DataSafe", + "GetSensitiveTypeGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/GetSensitiveTypeGroup"); + java.util.function.Function + transformer = + GetSensitiveTypeGroupConverter.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 GetSensitiveTypesExportResponse getSensitiveTypesExport( GetSensitiveTypesExportRequest request) { @@ -8129,6 +8333,44 @@ public ListGrantsResponse listGrants(ListGrantsRequest request) { }); } + @Override + public ListGroupedSensitiveTypesResponse listGroupedSensitiveTypes( + ListGroupedSensitiveTypesRequest request) { + LOG.trace("Called listGroupedSensitiveTypes"); + final ListGroupedSensitiveTypesRequest interceptedRequest = + ListGroupedSensitiveTypesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListGroupedSensitiveTypesConverter.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( + "DataSafe", + "ListGroupedSensitiveTypes", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/ListGroupedSensitiveTypes"); + java.util.function.Function + transformer = + ListGroupedSensitiveTypesConverter.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 ListLibraryMaskingFormatsResponse listLibraryMaskingFormats( ListLibraryMaskingFormatsRequest request) { @@ -8278,6 +8520,43 @@ public ListMaskingColumnsResponse listMaskingColumns(ListMaskingColumnsRequest r }); } + @Override + public ListMaskingErrorsResponse listMaskingErrors(ListMaskingErrorsRequest request) { + LOG.trace("Called listMaskingErrors"); + final ListMaskingErrorsRequest interceptedRequest = + ListMaskingErrorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMaskingErrorsConverter.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( + "DataSafe", + "ListMaskingErrors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingErrorSummary/ListMaskingErrors"); + java.util.function.Function + transformer = + ListMaskingErrorsConverter.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 ListMaskingObjectsResponse listMaskingObjects(ListMaskingObjectsRequest request) { LOG.trace("Called listMaskingObjects"); @@ -9255,6 +9534,44 @@ public ListSecurityPolicyReportsResponse listSecurityPolicyReports( }); } + @Override + public ListSensitiveColumnAnalyticsResponse listSensitiveColumnAnalytics( + ListSensitiveColumnAnalyticsRequest request) { + LOG.trace("Called listSensitiveColumnAnalytics"); + final ListSensitiveColumnAnalyticsRequest interceptedRequest = + ListSensitiveColumnAnalyticsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSensitiveColumnAnalyticsConverter.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( + "DataSafe", + "ListSensitiveColumnAnalytics", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveDataModel/ListSensitiveColumnAnalytics"); + java.util.function.Function + transformer = + ListSensitiveColumnAnalyticsConverter.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 ListSensitiveColumnsResponse listSensitiveColumns(ListSensitiveColumnsRequest request) { LOG.trace("Called listSensitiveColumns"); @@ -9444,6 +9761,44 @@ public ListSensitiveSchemasResponse listSensitiveSchemas(ListSensitiveSchemasReq }); } + @Override + public ListSensitiveTypeGroupsResponse listSensitiveTypeGroups( + ListSensitiveTypeGroupsRequest request) { + LOG.trace("Called listSensitiveTypeGroups"); + final ListSensitiveTypeGroupsRequest interceptedRequest = + ListSensitiveTypeGroupsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSensitiveTypeGroupsConverter.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( + "DataSafe", + "ListSensitiveTypeGroups", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroupSummary/ListSensitiveTypeGroups"); + java.util.function.Function + transformer = + ListSensitiveTypeGroupsConverter.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 ListSensitiveTypesResponse listSensitiveTypes(ListSensitiveTypesRequest request) { LOG.trace("Called listSensitiveTypes"); @@ -10242,6 +10597,7 @@ public MaskDataResponse maskData(MaskDataRequest request) { 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( @@ -10393,6 +10749,49 @@ public PatchDiscoveryJobResultsResponse patchDiscoveryJobResults( }); } + @Override + public PatchGroupedSensitiveTypesResponse patchGroupedSensitiveTypes( + PatchGroupedSensitiveTypesRequest request) { + LOG.trace("Called patchGroupedSensitiveTypes"); + final PatchGroupedSensitiveTypesRequest interceptedRequest = + PatchGroupedSensitiveTypesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchGroupedSensitiveTypesConverter.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( + "DataSafe", + "PatchGroupedSensitiveTypes", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/PatchGroupedSensitiveTypes"); + java.util.function.Function + transformer = + PatchGroupedSensitiveTypesConverter.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 + .getPatchGroupedSensitiveTypesDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public PatchMaskingColumnsResponse patchMaskingColumns(PatchMaskingColumnsRequest request) { LOG.trace("Called patchMaskingColumns"); @@ -12514,6 +12913,48 @@ public UpdateSensitiveTypeResponse updateSensitiveType(UpdateSensitiveTypeReques }); } + @Override + public UpdateSensitiveTypeGroupResponse updateSensitiveTypeGroup( + UpdateSensitiveTypeGroupRequest request) { + LOG.trace("Called updateSensitiveTypeGroup"); + final UpdateSensitiveTypeGroupRequest interceptedRequest = + UpdateSensitiveTypeGroupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSensitiveTypeGroupConverter.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( + "DataSafe", + "UpdateSensitiveTypeGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveTypeGroup/UpdateSensitiveTypeGroup"); + java.util.function.Function + transformer = + UpdateSensitiveTypeGroupConverter.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.getUpdateSensitiveTypeGroupDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateSensitiveTypesExportResponse updateSensitiveTypesExport( UpdateSensitiveTypesExportRequest request) { diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafePaginators.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafePaginators.java index 78548d9eb8..95d8a0eb11 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafePaginators.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafePaginators.java @@ -3264,6 +3264,124 @@ public java.util.List apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listGroupedSensitiveTypes 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 listGroupedSensitiveTypesResponseIterator( + final ListGroupedSensitiveTypesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListGroupedSensitiveTypesRequest.Builder, ListGroupedSensitiveTypesRequest, + ListGroupedSensitiveTypesResponse>( + new java.util.function.Supplier() { + @Override + public ListGroupedSensitiveTypesRequest.Builder get() { + return ListGroupedSensitiveTypesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListGroupedSensitiveTypesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListGroupedSensitiveTypesRequest.Builder>, + ListGroupedSensitiveTypesRequest>() { + @Override + public ListGroupedSensitiveTypesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListGroupedSensitiveTypesRequest.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< + ListGroupedSensitiveTypesRequest, ListGroupedSensitiveTypesResponse>() { + @Override + public ListGroupedSensitiveTypesResponse apply( + ListGroupedSensitiveTypesRequest request) { + return client.listGroupedSensitiveTypes(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.datasafe.model.GroupedSensitiveTypeSummary} objects + * contained in responses from the listGroupedSensitiveTypes 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.datasafe.model.GroupedSensitiveTypeSummary} objects + * contained in responses received from the service. + */ + public Iterable + listGroupedSensitiveTypesRecordIterator( + final ListGroupedSensitiveTypesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListGroupedSensitiveTypesRequest.Builder, ListGroupedSensitiveTypesRequest, + ListGroupedSensitiveTypesResponse, + com.oracle.bmc.datasafe.model.GroupedSensitiveTypeSummary>( + new java.util.function.Supplier() { + @Override + public ListGroupedSensitiveTypesRequest.Builder get() { + return ListGroupedSensitiveTypesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListGroupedSensitiveTypesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListGroupedSensitiveTypesRequest.Builder>, + ListGroupedSensitiveTypesRequest>() { + @Override + public ListGroupedSensitiveTypesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListGroupedSensitiveTypesRequest.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< + ListGroupedSensitiveTypesRequest, ListGroupedSensitiveTypesResponse>() { + @Override + public ListGroupedSensitiveTypesResponse apply( + ListGroupedSensitiveTypesRequest request) { + return client.listGroupedSensitiveTypes(request); + } + }, + new java.util.function.Function< + ListGroupedSensitiveTypesResponse, + java.util.List< + com.oracle.bmc.datasafe.model.GroupedSensitiveTypeSummary>>() { + @Override + public java.util.List + apply(ListGroupedSensitiveTypesResponse response) { + return response.getGroupedSensitiveTypeCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listLibraryMaskingFormats operation. This iterable * will fetch more data from the server as needed. @@ -3722,6 +3840,119 @@ public java.util.List apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listMaskingErrors 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 listMaskingErrorsResponseIterator( + final ListMaskingErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListMaskingErrorsRequest.Builder, ListMaskingErrorsRequest, + ListMaskingErrorsResponse>( + new java.util.function.Supplier() { + @Override + public ListMaskingErrorsRequest.Builder get() { + return ListMaskingErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMaskingErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaskingErrorsRequest.Builder>, + ListMaskingErrorsRequest>() { + @Override + public ListMaskingErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaskingErrorsRequest.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< + ListMaskingErrorsRequest, ListMaskingErrorsResponse>() { + @Override + public ListMaskingErrorsResponse apply(ListMaskingErrorsRequest request) { + return client.listMaskingErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.datasafe.model.MaskingErrorSummary} objects + * contained in responses from the listMaskingErrors 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.datasafe.model.MaskingErrorSummary} objects + * contained in responses received from the service. + */ + public Iterable + listMaskingErrorsRecordIterator(final ListMaskingErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListMaskingErrorsRequest.Builder, ListMaskingErrorsRequest, + ListMaskingErrorsResponse, com.oracle.bmc.datasafe.model.MaskingErrorSummary>( + new java.util.function.Supplier() { + @Override + public ListMaskingErrorsRequest.Builder get() { + return ListMaskingErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMaskingErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaskingErrorsRequest.Builder>, + ListMaskingErrorsRequest>() { + @Override + public ListMaskingErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaskingErrorsRequest.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< + ListMaskingErrorsRequest, ListMaskingErrorsResponse>() { + @Override + public ListMaskingErrorsResponse apply(ListMaskingErrorsRequest request) { + return client.listMaskingErrors(request); + } + }, + new java.util.function.Function< + ListMaskingErrorsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListMaskingErrorsResponse response) { + return response.getMaskingErrorCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listMaskingObjects operation. This iterable * will fetch more data from the server as needed. @@ -6512,6 +6743,128 @@ public ListSecurityPolicyReportsResponse apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listSensitiveColumnAnalytics 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 + listSensitiveColumnAnalyticsResponseIterator( + final ListSensitiveColumnAnalyticsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSensitiveColumnAnalyticsRequest.Builder, ListSensitiveColumnAnalyticsRequest, + ListSensitiveColumnAnalyticsResponse>( + new java.util.function.Supplier() { + @Override + public ListSensitiveColumnAnalyticsRequest.Builder get() { + return ListSensitiveColumnAnalyticsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSensitiveColumnAnalyticsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSensitiveColumnAnalyticsRequest.Builder>, + ListSensitiveColumnAnalyticsRequest>() { + @Override + public ListSensitiveColumnAnalyticsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSensitiveColumnAnalyticsRequest.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< + ListSensitiveColumnAnalyticsRequest, + ListSensitiveColumnAnalyticsResponse>() { + @Override + public ListSensitiveColumnAnalyticsResponse apply( + ListSensitiveColumnAnalyticsRequest request) { + return client.listSensitiveColumnAnalytics(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.datasafe.model.SensitiveColumnAnalyticsSummary} objects + * contained in responses from the listSensitiveColumnAnalytics 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.datasafe.model.SensitiveColumnAnalyticsSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSensitiveColumnAnalyticsRecordIterator( + final ListSensitiveColumnAnalyticsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSensitiveColumnAnalyticsRequest.Builder, ListSensitiveColumnAnalyticsRequest, + ListSensitiveColumnAnalyticsResponse, + com.oracle.bmc.datasafe.model.SensitiveColumnAnalyticsSummary>( + new java.util.function.Supplier() { + @Override + public ListSensitiveColumnAnalyticsRequest.Builder get() { + return ListSensitiveColumnAnalyticsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSensitiveColumnAnalyticsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSensitiveColumnAnalyticsRequest.Builder>, + ListSensitiveColumnAnalyticsRequest>() { + @Override + public ListSensitiveColumnAnalyticsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSensitiveColumnAnalyticsRequest.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< + ListSensitiveColumnAnalyticsRequest, + ListSensitiveColumnAnalyticsResponse>() { + @Override + public ListSensitiveColumnAnalyticsResponse apply( + ListSensitiveColumnAnalyticsRequest request) { + return client.listSensitiveColumnAnalytics(request); + } + }, + new java.util.function.Function< + ListSensitiveColumnAnalyticsResponse, + java.util.List< + com.oracle.bmc.datasafe.model.SensitiveColumnAnalyticsSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.datasafe.model.SensitiveColumnAnalyticsSummary> + apply(ListSensitiveColumnAnalyticsResponse response) { + return response.getSensitiveColumnAnalyticsCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listSensitiveColumns operation. This iterable * will fetch more data from the server as needed. @@ -7097,6 +7450,122 @@ public ListSensitiveSchemasResponse apply(ListSensitiveSchemasRequest request) { }); } + /** + * Creates a new iterable which will iterate over the responses received from the listSensitiveTypeGroups 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 listSensitiveTypeGroupsResponseIterator( + final ListSensitiveTypeGroupsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSensitiveTypeGroupsRequest.Builder, ListSensitiveTypeGroupsRequest, + ListSensitiveTypeGroupsResponse>( + new java.util.function.Supplier() { + @Override + public ListSensitiveTypeGroupsRequest.Builder get() { + return ListSensitiveTypeGroupsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSensitiveTypeGroupsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSensitiveTypeGroupsRequest.Builder>, + ListSensitiveTypeGroupsRequest>() { + @Override + public ListSensitiveTypeGroupsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSensitiveTypeGroupsRequest.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< + ListSensitiveTypeGroupsRequest, ListSensitiveTypeGroupsResponse>() { + @Override + public ListSensitiveTypeGroupsResponse apply( + ListSensitiveTypeGroupsRequest request) { + return client.listSensitiveTypeGroups(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.datasafe.model.SensitiveTypeGroupSummary} objects + * contained in responses from the listSensitiveTypeGroups 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.datasafe.model.SensitiveTypeGroupSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSensitiveTypeGroupsRecordIterator(final ListSensitiveTypeGroupsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSensitiveTypeGroupsRequest.Builder, ListSensitiveTypeGroupsRequest, + ListSensitiveTypeGroupsResponse, + com.oracle.bmc.datasafe.model.SensitiveTypeGroupSummary>( + new java.util.function.Supplier() { + @Override + public ListSensitiveTypeGroupsRequest.Builder get() { + return ListSensitiveTypeGroupsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSensitiveTypeGroupsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSensitiveTypeGroupsRequest.Builder>, + ListSensitiveTypeGroupsRequest>() { + @Override + public ListSensitiveTypeGroupsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSensitiveTypeGroupsRequest.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< + ListSensitiveTypeGroupsRequest, ListSensitiveTypeGroupsResponse>() { + @Override + public ListSensitiveTypeGroupsResponse apply( + ListSensitiveTypeGroupsRequest request) { + return client.listSensitiveTypeGroups(request); + } + }, + new java.util.function.Function< + ListSensitiveTypeGroupsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListSensitiveTypeGroupsResponse response) { + return response.getSensitiveTypeGroupCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listSensitiveTypes operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeWaiters.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeWaiters.java index 218a423acc..6f6397662b 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeWaiters.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeWaiters.java @@ -3187,6 +3187,114 @@ public boolean test(GetSensitiveTypeResponse response) { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetState 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 com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forSensitiveTypeGroup( + GetSensitiveTypeGroupRequest request, + com.oracle.bmc.datasafe.model.SensitiveTypeGroupLifecycleState... + 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 forSensitiveTypeGroup( + 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 + forSensitiveTypeGroup( + GetSensitiveTypeGroupRequest request, + com.oracle.bmc.datasafe.model.SensitiveTypeGroupLifecycleState 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 forSensitiveTypeGroup( + 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 Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forSensitiveTypeGroup( + GetSensitiveTypeGroupRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.datasafe.model.SensitiveTypeGroupLifecycleState... + 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 forSensitiveTypeGroup( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for SensitiveTypeGroup. + private com.oracle.bmc.waiter.Waiter< + GetSensitiveTypeGroupRequest, GetSensitiveTypeGroupResponse> + forSensitiveTypeGroup( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetSensitiveTypeGroupRequest request, + final com.oracle.bmc.datasafe.model.SensitiveTypeGroupLifecycleState... + 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< + GetSensitiveTypeGroupRequest, GetSensitiveTypeGroupResponse>() { + @Override + public GetSensitiveTypeGroupResponse apply( + GetSensitiveTypeGroupRequest request) { + return client.getSensitiveTypeGroup(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetSensitiveTypeGroupResponse response) { + return targetStatesSet.contains( + response.getSensitiveTypeGroup().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.datasafe.model.SensitiveTypeGroupLifecycleState + .Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ChangeSensitiveTypeGroupCompartmentConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ChangeSensitiveTypeGroupCompartmentConverter.java new file mode 100644 index 0000000000..6991072855 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ChangeSensitiveTypeGroupCompartmentConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ChangeSensitiveTypeGroupCompartmentConverter { + 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(ChangeSensitiveTypeGroupCompartmentConverter.class); + + public static com.oracle.bmc.datasafe.requests.ChangeSensitiveTypeGroupCompartmentRequest + interceptRequest( + com.oracle.bmc.datasafe.requests.ChangeSensitiveTypeGroupCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.ChangeSensitiveTypeGroupCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSensitiveTypeGroupId(), "sensitiveTypeGroupId must not be blank"); + Validate.notNull( + request.getChangeSensitiveTypeGroupCompartmentDetails(), + "changeSensitiveTypeGroupCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("sensitiveTypeGroups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSensitiveTypeGroupId())) + .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 (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.datasafe.responses.ChangeSensitiveTypeGroupCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ChangeSensitiveTypeGroupCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .ChangeSensitiveTypeGroupCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .ChangeSensitiveTypeGroupCompartmentResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .ChangeSensitiveTypeGroupCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.ChangeSensitiveTypeGroupCompartmentResponse"); + 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.datasafe.responses + .ChangeSensitiveTypeGroupCompartmentResponse.Builder + builder = + com.oracle.bmc.datasafe.responses + .ChangeSensitiveTypeGroupCompartmentResponse + .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.datasafe.responses + .ChangeSensitiveTypeGroupCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/CreateSensitiveTypeGroupConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/CreateSensitiveTypeGroupConverter.java new file mode 100644 index 0000000000..3591e6d593 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/CreateSensitiveTypeGroupConverter.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class CreateSensitiveTypeGroupConverter { + 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(CreateSensitiveTypeGroupConverter.class); + + public static com.oracle.bmc.datasafe.requests.CreateSensitiveTypeGroupRequest interceptRequest( + com.oracle.bmc.datasafe.requests.CreateSensitiveTypeGroupRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.CreateSensitiveTypeGroupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateSensitiveTypeGroupDetails(), + "createSensitiveTypeGroupDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20181201").path("sensitiveTypeGroups"); + + 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.datasafe.responses.CreateSensitiveTypeGroupResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.CreateSensitiveTypeGroupResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.CreateSensitiveTypeGroupResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .CreateSensitiveTypeGroupResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .CreateSensitiveTypeGroupResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.CreateSensitiveTypeGroupResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .SensitiveTypeGroup>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model.SensitiveTypeGroup + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model.SensitiveTypeGroup + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model.SensitiveTypeGroup> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.CreateSensitiveTypeGroupResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .CreateSensitiveTypeGroupResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.sensitiveTypeGroup(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> 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> 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)); + } + + com.oracle.bmc.datasafe.responses.CreateSensitiveTypeGroupResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteMaskingReportConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteMaskingReportConverter.java new file mode 100644 index 0000000000..4d8fd5fe0d --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteMaskingReportConverter.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteMaskingReportConverter { + 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(DeleteMaskingReportConverter.class); + + public static com.oracle.bmc.datasafe.requests.DeleteMaskingReportRequest interceptRequest( + com.oracle.bmc.datasafe.requests.DeleteMaskingReportRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.DeleteMaskingReportRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMaskingReportId(), "maskingReportId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("maskingReports") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMaskingReportId())); + + 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.datasafe.responses.DeleteMaskingReportResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteMaskingReportResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteMaskingReportResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteMaskingReportResponse>() { + @Override + public com.oracle.bmc.datasafe.responses.DeleteMaskingReportResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.DeleteMaskingReportResponse"); + 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.datasafe.responses.DeleteMaskingReportResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .DeleteMaskingReportResponse.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.datasafe.responses.DeleteMaskingReportResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteSensitiveTypeGroupConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteSensitiveTypeGroupConverter.java new file mode 100644 index 0000000000..83b8b2da66 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteSensitiveTypeGroupConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteSensitiveTypeGroupConverter { + 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(DeleteSensitiveTypeGroupConverter.class); + + public static com.oracle.bmc.datasafe.requests.DeleteSensitiveTypeGroupRequest interceptRequest( + com.oracle.bmc.datasafe.requests.DeleteSensitiveTypeGroupRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.DeleteSensitiveTypeGroupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSensitiveTypeGroupId(), "sensitiveTypeGroupId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("sensitiveTypeGroups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSensitiveTypeGroupId())); + + 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.datasafe.responses.DeleteSensitiveTypeGroupResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteSensitiveTypeGroupResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteSensitiveTypeGroupResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .DeleteSensitiveTypeGroupResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .DeleteSensitiveTypeGroupResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.DeleteSensitiveTypeGroupResponse"); + 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.datasafe.responses.DeleteSensitiveTypeGroupResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .DeleteSensitiveTypeGroupResponse.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.datasafe.responses.DeleteSensitiveTypeGroupResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/GetSensitiveTypeGroupConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/GetSensitiveTypeGroupConverter.java new file mode 100644 index 0000000000..5c769a2255 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/GetSensitiveTypeGroupConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class GetSensitiveTypeGroupConverter { + 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(GetSensitiveTypeGroupConverter.class); + + public static com.oracle.bmc.datasafe.requests.GetSensitiveTypeGroupRequest interceptRequest( + com.oracle.bmc.datasafe.requests.GetSensitiveTypeGroupRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.GetSensitiveTypeGroupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSensitiveTypeGroupId(), "sensitiveTypeGroupId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("sensitiveTypeGroups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSensitiveTypeGroupId())); + + 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.datasafe.responses.GetSensitiveTypeGroupResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.GetSensitiveTypeGroupResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.GetSensitiveTypeGroupResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.GetSensitiveTypeGroupResponse>() { + @Override + public com.oracle.bmc.datasafe.responses.GetSensitiveTypeGroupResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.GetSensitiveTypeGroupResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .SensitiveTypeGroup>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model.SensitiveTypeGroup + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model.SensitiveTypeGroup + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model.SensitiveTypeGroup> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.GetSensitiveTypeGroupResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .GetSensitiveTypeGroupResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.sensitiveTypeGroup(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.datasafe.responses.GetSensitiveTypeGroupResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListFindingsConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListFindingsConverter.java index 00f314fe6a..2b43f2d9ec 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListFindingsConverter.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListFindingsConverter.java @@ -113,6 +113,31 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getTargetId())); } + if (request.getScimQuery() != null) { + target = + target.queryParam( + "scimQuery", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getScimQuery())); + } + + if (request.getField() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "field", + request.getField(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + if (request.getFindingKey() != null) { target = target.queryParam( diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListGroupedSensitiveTypesConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListGroupedSensitiveTypesConverter.java new file mode 100644 index 0000000000..cad04e4beb --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListGroupedSensitiveTypesConverter.java @@ -0,0 +1,197 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListGroupedSensitiveTypesConverter { + 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(ListGroupedSensitiveTypesConverter.class); + + public static com.oracle.bmc.datasafe.requests.ListGroupedSensitiveTypesRequest + interceptRequest( + com.oracle.bmc.datasafe.requests.ListGroupedSensitiveTypesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.ListGroupedSensitiveTypesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSensitiveTypeGroupId(), "sensitiveTypeGroupId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("sensitiveTypeGroups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSensitiveTypeGroupId())) + .path("groupedSensitiveTypes"); + + if (request.getSensitiveTypeId() != null) { + target = + target.queryParam( + "sensitiveTypeId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSensitiveTypeId())); + } + + 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.datasafe.responses.ListGroupedSensitiveTypesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ListGroupedSensitiveTypesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ListGroupedSensitiveTypesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .ListGroupedSensitiveTypesResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .ListGroupedSensitiveTypesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.ListGroupedSensitiveTypesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .GroupedSensitiveTypeCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model + .GroupedSensitiveTypeCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model + .GroupedSensitiveTypeCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .GroupedSensitiveTypeCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.ListGroupedSensitiveTypesResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .ListGroupedSensitiveTypesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.groupedSensitiveTypeCollection(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> 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> opcPrevPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-prev-page"); + if (opcPrevPageHeader.isPresent()) { + builder.opcPrevPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-prev-page", + opcPrevPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses.ListGroupedSensitiveTypesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListMaskingErrorsConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListMaskingErrorsConverter.java new file mode 100644 index 0000000000..64667f6302 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListMaskingErrorsConverter.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListMaskingErrorsConverter { + 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(ListMaskingErrorsConverter.class); + + public static com.oracle.bmc.datasafe.requests.ListMaskingErrorsRequest interceptRequest( + com.oracle.bmc.datasafe.requests.ListMaskingErrorsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.ListMaskingErrorsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMaskingReportId(), "maskingReportId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("maskingReports") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMaskingReportId())) + .path("maskingErrors"); + + if (request.getStepName() != null) { + target = + target.queryParam( + "stepName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStepName().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().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())); + } + + 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.datasafe.responses.ListMaskingErrorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ListMaskingErrorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ListMaskingErrorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ListMaskingErrorsResponse>() { + @Override + public com.oracle.bmc.datasafe.responses.ListMaskingErrorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.ListMaskingErrorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .MaskingErrorCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model + .MaskingErrorCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model + .MaskingErrorCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .MaskingErrorCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.ListMaskingErrorsResponse.Builder + builder = + com.oracle.bmc.datasafe.responses + .ListMaskingErrorsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.maskingErrorCollection(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)); + } + + java.util.Optional> opcPrevPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-prev-page"); + if (opcPrevPageHeader.isPresent()) { + builder.opcPrevPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-prev-page", + opcPrevPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses.ListMaskingErrorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListSensitiveColumnAnalyticsConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListSensitiveColumnAnalyticsConverter.java new file mode 100644 index 0000000000..95480185bf --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListSensitiveColumnAnalyticsConverter.java @@ -0,0 +1,266 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListSensitiveColumnAnalyticsConverter { + 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(ListSensitiveColumnAnalyticsConverter.class); + + public static com.oracle.bmc.datasafe.requests.ListSensitiveColumnAnalyticsRequest + interceptRequest( + com.oracle.bmc.datasafe.requests.ListSensitiveColumnAnalyticsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.ListSensitiveColumnAnalyticsRequest 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("/20181201").path("sensitiveColumnAnalytics"); + + 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.getAccessLevel() != null) { + target = + target.queryParam( + "accessLevel", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAccessLevel().getValue())); + } + + if (request.getTargetId() != null) { + target = + target.queryParam( + "targetId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTargetId())); + } + + if (request.getSensitiveTypeId() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "sensitiveTypeId", + request.getSensitiveTypeId(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getSensitiveTypeGroupId() != null) { + target = + target.queryParam( + "sensitiveTypeGroupId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSensitiveTypeGroupId())); + } + + if (request.getSensitiveDataModelId() != null) { + target = + target.queryParam( + "sensitiveDataModelId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSensitiveDataModelId())); + } + + if (request.getGroupBy() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "groupBy", + request.getGroupBy(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getSchemaName() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "schemaName", + request.getSchemaName(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getObjectName() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "objectName", + request.getObjectName(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getColumnName() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "columnName", + request.getColumnName(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + 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.datasafe.responses.ListSensitiveColumnAnalyticsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ListSensitiveColumnAnalyticsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ListSensitiveColumnAnalyticsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .ListSensitiveColumnAnalyticsResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .ListSensitiveColumnAnalyticsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.ListSensitiveColumnAnalyticsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .SensitiveColumnAnalyticsCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model + .SensitiveColumnAnalyticsCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model + .SensitiveColumnAnalyticsCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .SensitiveColumnAnalyticsCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses + .ListSensitiveColumnAnalyticsResponse.Builder + builder = + com.oracle.bmc.datasafe.responses + .ListSensitiveColumnAnalyticsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.sensitiveColumnAnalyticsCollection(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)); + } + + java.util.Optional> opcPrevPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-prev-page"); + if (opcPrevPageHeader.isPresent()) { + builder.opcPrevPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-prev-page", + opcPrevPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses + .ListSensitiveColumnAnalyticsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListSensitiveTypeGroupsConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListSensitiveTypeGroupsConverter.java new file mode 100644 index 0000000000..d8df50d37b --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListSensitiveTypeGroupsConverter.java @@ -0,0 +1,249 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListSensitiveTypeGroupsConverter { + 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(ListSensitiveTypeGroupsConverter.class); + + public static com.oracle.bmc.datasafe.requests.ListSensitiveTypeGroupsRequest interceptRequest( + com.oracle.bmc.datasafe.requests.ListSensitiveTypeGroupsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.ListSensitiveTypeGroupsRequest 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("/20181201").path("sensitiveTypeGroups"); + + 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.getAccessLevel() != null) { + target = + target.queryParam( + "accessLevel", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAccessLevel().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + 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.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getSensitiveTypeGroupId() != null) { + target = + target.queryParam( + "sensitiveTypeGroupId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSensitiveTypeGroupId())); + } + + if (request.getTimeCreatedGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "timeCreatedGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeCreatedGreaterThanOrEqualTo())); + } + + if (request.getTimeCreatedLessThan() != null) { + target = + target.queryParam( + "timeCreatedLessThan", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeCreatedLessThan())); + } + + 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.datasafe.responses.ListSensitiveTypeGroupsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ListSensitiveTypeGroupsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ListSensitiveTypeGroupsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .ListSensitiveTypeGroupsResponse>() { + @Override + public com.oracle.bmc.datasafe.responses.ListSensitiveTypeGroupsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.ListSensitiveTypeGroupsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .SensitiveTypeGroupCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model + .SensitiveTypeGroupCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model + .SensitiveTypeGroupCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .SensitiveTypeGroupCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.ListSensitiveTypeGroupsResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .ListSensitiveTypeGroupsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.sensitiveTypeGroupCollection(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)); + } + + java.util.Optional> opcPrevPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-prev-page"); + if (opcPrevPageHeader.isPresent()) { + builder.opcPrevPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-prev-page", + opcPrevPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses.ListSensitiveTypeGroupsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/MaskDataConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/MaskDataConverter.java index 70df410541..21dbef047d 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/MaskDataConverter.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/MaskDataConverter.java @@ -46,6 +46,10 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( 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()); } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/PatchGroupedSensitiveTypesConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/PatchGroupedSensitiveTypesConverter.java new file mode 100644 index 0000000000..88d9fdd275 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/PatchGroupedSensitiveTypesConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class PatchGroupedSensitiveTypesConverter { + 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(PatchGroupedSensitiveTypesConverter.class); + + public static com.oracle.bmc.datasafe.requests.PatchGroupedSensitiveTypesRequest + interceptRequest( + com.oracle.bmc.datasafe.requests.PatchGroupedSensitiveTypesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.PatchGroupedSensitiveTypesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSensitiveTypeGroupId(), "sensitiveTypeGroupId must not be blank"); + Validate.notNull( + request.getPatchGroupedSensitiveTypesDetails(), + "patchGroupedSensitiveTypesDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("sensitiveTypeGroups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSensitiveTypeGroupId())) + .path("groupedSensitiveTypes"); + + 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.datasafe.responses.PatchGroupedSensitiveTypesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.PatchGroupedSensitiveTypesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.PatchGroupedSensitiveTypesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .PatchGroupedSensitiveTypesResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .PatchGroupedSensitiveTypesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.PatchGroupedSensitiveTypesResponse"); + 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.datasafe.responses.PatchGroupedSensitiveTypesResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .PatchGroupedSensitiveTypesResponse + .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.datasafe.responses.PatchGroupedSensitiveTypesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/UpdateSensitiveTypeGroupConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/UpdateSensitiveTypeGroupConverter.java new file mode 100644 index 0000000000..0059aec178 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/UpdateSensitiveTypeGroupConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class UpdateSensitiveTypeGroupConverter { + 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(UpdateSensitiveTypeGroupConverter.class); + + public static com.oracle.bmc.datasafe.requests.UpdateSensitiveTypeGroupRequest interceptRequest( + com.oracle.bmc.datasafe.requests.UpdateSensitiveTypeGroupRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.UpdateSensitiveTypeGroupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSensitiveTypeGroupId(), "sensitiveTypeGroupId must not be blank"); + Validate.notNull( + request.getUpdateSensitiveTypeGroupDetails(), + "updateSensitiveTypeGroupDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("sensitiveTypeGroups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSensitiveTypeGroupId())); + + 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.datasafe.responses.UpdateSensitiveTypeGroupResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.UpdateSensitiveTypeGroupResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.UpdateSensitiveTypeGroupResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .UpdateSensitiveTypeGroupResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .UpdateSensitiveTypeGroupResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.UpdateSensitiveTypeGroupResponse"); + 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.datasafe.responses.UpdateSensitiveTypeGroupResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .UpdateSensitiveTypeGroupResponse.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.datasafe.responses.UpdateSensitiveTypeGroupResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ChangeSensitiveTypeGroupCompartmentDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ChangeSensitiveTypeGroupCompartmentDetails.java new file mode 100644 index 0000000000..1538799152 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ChangeSensitiveTypeGroupCompartmentDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * Details for which compartment to move the resource to. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeSensitiveTypeGroupCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeSensitiveTypeGroupCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeSensitiveTypeGroupCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the compartment where you want to move the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment where you want to move the sensitive type group. + * @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 ChangeSensitiveTypeGroupCompartmentDetails build() { + ChangeSensitiveTypeGroupCompartmentDetails model = + new ChangeSensitiveTypeGroupCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeSensitiveTypeGroupCompartmentDetails 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 of the compartment where you want to move the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment where you want to move the sensitive type group. + * @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("ChangeSensitiveTypeGroupCompartmentDetails("); + 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 ChangeSensitiveTypeGroupCompartmentDetails)) { + return false; + } + + ChangeSensitiveTypeGroupCompartmentDetails other = + (ChangeSensitiveTypeGroupCompartmentDetails) 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-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateDiscoveryJobDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateDiscoveryJobDetails.java index eb62102905..0ea090fa48 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateDiscoveryJobDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateDiscoveryJobDetails.java @@ -30,6 +30,7 @@ public final class CreateDiscoveryJobDetails "schemasForDiscovery", "tablesForDiscovery", "sensitiveTypeIdsForDiscovery", + "sensitiveTypeGroupIdsForDiscovery", "isSampleDataCollectionEnabled", "isAppDefinedRelationDiscoveryEnabled", "isIncludeAllSchemas", @@ -45,6 +46,7 @@ public CreateDiscoveryJobDetails( java.util.List schemasForDiscovery, java.util.List tablesForDiscovery, java.util.List sensitiveTypeIdsForDiscovery, + java.util.List sensitiveTypeGroupIdsForDiscovery, Boolean isSampleDataCollectionEnabled, Boolean isAppDefinedRelationDiscoveryEnabled, Boolean isIncludeAllSchemas, @@ -59,6 +61,7 @@ public CreateDiscoveryJobDetails( this.schemasForDiscovery = schemasForDiscovery; this.tablesForDiscovery = tablesForDiscovery; this.sensitiveTypeIdsForDiscovery = sensitiveTypeIdsForDiscovery; + this.sensitiveTypeGroupIdsForDiscovery = sensitiveTypeGroupIdsForDiscovery; this.isSampleDataCollectionEnabled = isSampleDataCollectionEnabled; this.isAppDefinedRelationDiscoveryEnabled = isAppDefinedRelationDiscoveryEnabled; this.isIncludeAllSchemas = isIncludeAllSchemas; @@ -204,6 +207,27 @@ public Builder sensitiveTypeIdsForDiscovery( this.__explicitlySet__.add("sensitiveTypeIdsForDiscovery"); return this; } + /** + * The OCIDs of the sensitive type groups to be used by the discovery job. All the sensitive types present in + * sensitive type group will be used for discovery. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeGroupIdsForDiscovery") + private java.util.List sensitiveTypeGroupIdsForDiscovery; + + /** + * The OCIDs of the sensitive type groups to be used by the discovery job. All the sensitive types present in + * sensitive type group will be used for discovery. + * + * @param sensitiveTypeGroupIdsForDiscovery the value to set + * @return this builder + **/ + public Builder sensitiveTypeGroupIdsForDiscovery( + java.util.List sensitiveTypeGroupIdsForDiscovery) { + this.sensitiveTypeGroupIdsForDiscovery = sensitiveTypeGroupIdsForDiscovery; + this.__explicitlySet__.add("sensitiveTypeGroupIdsForDiscovery"); + return this; + } /** * Indicates if the discovery job should collect and store sample data values for the discovered columns. Sample data * helps review the discovered columns and ensure that they actually contain sensitive data. As it collects original @@ -360,6 +384,7 @@ public CreateDiscoveryJobDetails build() { this.schemasForDiscovery, this.tablesForDiscovery, this.sensitiveTypeIdsForDiscovery, + this.sensitiveTypeGroupIdsForDiscovery, this.isSampleDataCollectionEnabled, this.isAppDefinedRelationDiscoveryEnabled, this.isIncludeAllSchemas, @@ -395,6 +420,10 @@ public Builder copy(CreateDiscoveryJobDetails model) { if (model.wasPropertyExplicitlySet("sensitiveTypeIdsForDiscovery")) { this.sensitiveTypeIdsForDiscovery(model.getSensitiveTypeIdsForDiscovery()); } + if (model.wasPropertyExplicitlySet("sensitiveTypeGroupIdsForDiscovery")) { + this.sensitiveTypeGroupIdsForDiscovery( + model.getSensitiveTypeGroupIdsForDiscovery()); + } if (model.wasPropertyExplicitlySet("isSampleDataCollectionEnabled")) { this.isSampleDataCollectionEnabled(model.getIsSampleDataCollectionEnabled()); } @@ -549,6 +578,24 @@ public java.util.List getSensitiveTypeIdsForDiscovery() { return sensitiveTypeIdsForDiscovery; } + /** + * The OCIDs of the sensitive type groups to be used by the discovery job. All the sensitive types present in + * sensitive type group will be used for discovery. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeGroupIdsForDiscovery") + private final java.util.List sensitiveTypeGroupIdsForDiscovery; + + /** + * The OCIDs of the sensitive type groups to be used by the discovery job. All the sensitive types present in + * sensitive type group will be used for discovery. + * + * @return the value + **/ + public java.util.List getSensitiveTypeGroupIdsForDiscovery() { + return sensitiveTypeGroupIdsForDiscovery; + } + /** * Indicates if the discovery job should collect and store sample data values for the discovered columns. Sample data * helps review the discovered columns and ensure that they actually contain sensitive data. As it collects original @@ -699,6 +746,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", tablesForDiscovery=").append(String.valueOf(this.tablesForDiscovery)); sb.append(", sensitiveTypeIdsForDiscovery=") .append(String.valueOf(this.sensitiveTypeIdsForDiscovery)); + sb.append(", sensitiveTypeGroupIdsForDiscovery=") + .append(String.valueOf(this.sensitiveTypeGroupIdsForDiscovery)); sb.append(", isSampleDataCollectionEnabled=") .append(String.valueOf(this.isSampleDataCollectionEnabled)); sb.append(", isAppDefinedRelationDiscoveryEnabled=") @@ -730,6 +779,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.tablesForDiscovery, other.tablesForDiscovery) && java.util.Objects.equals( this.sensitiveTypeIdsForDiscovery, other.sensitiveTypeIdsForDiscovery) + && java.util.Objects.equals( + this.sensitiveTypeGroupIdsForDiscovery, + other.sensitiveTypeGroupIdsForDiscovery) && java.util.Objects.equals( this.isSampleDataCollectionEnabled, other.isSampleDataCollectionEnabled) && java.util.Objects.equals( @@ -774,6 +826,11 @@ public int hashCode() { + (this.sensitiveTypeIdsForDiscovery == null ? 43 : this.sensitiveTypeIdsForDiscovery.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeGroupIdsForDiscovery == null + ? 43 + : this.sensitiveTypeGroupIdsForDiscovery.hashCode()); result = (result * PRIME) + (this.isSampleDataCollectionEnabled == null diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSensitiveDataModelDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSensitiveDataModelDetails.java index 494104e648..791c14005b 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSensitiveDataModelDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSensitiveDataModelDetails.java @@ -38,6 +38,7 @@ public final class CreateSensitiveDataModelDetails "schemasForDiscovery", "tablesForDiscovery", "sensitiveTypeIdsForDiscovery", + "sensitiveTypeGroupIdsForDiscovery", "isSampleDataCollectionEnabled", "isAppDefinedRelationDiscoveryEnabled", "isIncludeAllSchemas", @@ -54,6 +55,7 @@ public CreateSensitiveDataModelDetails( java.util.List schemasForDiscovery, java.util.List tablesForDiscovery, java.util.List sensitiveTypeIdsForDiscovery, + java.util.List sensitiveTypeGroupIdsForDiscovery, Boolean isSampleDataCollectionEnabled, Boolean isAppDefinedRelationDiscoveryEnabled, Boolean isIncludeAllSchemas, @@ -69,6 +71,7 @@ public CreateSensitiveDataModelDetails( this.schemasForDiscovery = schemasForDiscovery; this.tablesForDiscovery = tablesForDiscovery; this.sensitiveTypeIdsForDiscovery = sensitiveTypeIdsForDiscovery; + this.sensitiveTypeGroupIdsForDiscovery = sensitiveTypeGroupIdsForDiscovery; this.isSampleDataCollectionEnabled = isSampleDataCollectionEnabled; this.isAppDefinedRelationDiscoveryEnabled = isAppDefinedRelationDiscoveryEnabled; this.isIncludeAllSchemas = isIncludeAllSchemas; @@ -222,6 +225,27 @@ public Builder sensitiveTypeIdsForDiscovery( this.__explicitlySet__.add("sensitiveTypeIdsForDiscovery"); return this; } + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. All the sensitive types present in + * sensitive type group will be used for discovery. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeGroupIdsForDiscovery") + private java.util.List sensitiveTypeGroupIdsForDiscovery; + + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. All the sensitive types present in + * sensitive type group will be used for discovery. + * + * @param sensitiveTypeGroupIdsForDiscovery the value to set + * @return this builder + **/ + public Builder sensitiveTypeGroupIdsForDiscovery( + java.util.List sensitiveTypeGroupIdsForDiscovery) { + this.sensitiveTypeGroupIdsForDiscovery = sensitiveTypeGroupIdsForDiscovery; + this.__explicitlySet__.add("sensitiveTypeGroupIdsForDiscovery"); + return this; + } /** * Indicates if data discovery jobs should collect and store sample data values for the discovered columns. * Sample data helps review the discovered columns and ensure that they actually contain sensitive data. @@ -373,6 +397,7 @@ public CreateSensitiveDataModelDetails build() { this.schemasForDiscovery, this.tablesForDiscovery, this.sensitiveTypeIdsForDiscovery, + this.sensitiveTypeGroupIdsForDiscovery, this.isSampleDataCollectionEnabled, this.isAppDefinedRelationDiscoveryEnabled, this.isIncludeAllSchemas, @@ -411,6 +436,10 @@ public Builder copy(CreateSensitiveDataModelDetails model) { if (model.wasPropertyExplicitlySet("sensitiveTypeIdsForDiscovery")) { this.sensitiveTypeIdsForDiscovery(model.getSensitiveTypeIdsForDiscovery()); } + if (model.wasPropertyExplicitlySet("sensitiveTypeGroupIdsForDiscovery")) { + this.sensitiveTypeGroupIdsForDiscovery( + model.getSensitiveTypeGroupIdsForDiscovery()); + } if (model.wasPropertyExplicitlySet("isSampleDataCollectionEnabled")) { this.isSampleDataCollectionEnabled(model.getIsSampleDataCollectionEnabled()); } @@ -571,6 +600,24 @@ public java.util.List getSensitiveTypeIdsForDiscovery() { return sensitiveTypeIdsForDiscovery; } + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. All the sensitive types present in + * sensitive type group will be used for discovery. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeGroupIdsForDiscovery") + private final java.util.List sensitiveTypeGroupIdsForDiscovery; + + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. All the sensitive types present in + * sensitive type group will be used for discovery. + * + * @return the value + **/ + public java.util.List getSensitiveTypeGroupIdsForDiscovery() { + return sensitiveTypeGroupIdsForDiscovery; + } + /** * Indicates if data discovery jobs should collect and store sample data values for the discovered columns. * Sample data helps review the discovered columns and ensure that they actually contain sensitive data. @@ -716,6 +763,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", tablesForDiscovery=").append(String.valueOf(this.tablesForDiscovery)); sb.append(", sensitiveTypeIdsForDiscovery=") .append(String.valueOf(this.sensitiveTypeIdsForDiscovery)); + sb.append(", sensitiveTypeGroupIdsForDiscovery=") + .append(String.valueOf(this.sensitiveTypeGroupIdsForDiscovery)); sb.append(", isSampleDataCollectionEnabled=") .append(String.valueOf(this.isSampleDataCollectionEnabled)); sb.append(", isAppDefinedRelationDiscoveryEnabled=") @@ -748,6 +797,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.tablesForDiscovery, other.tablesForDiscovery) && java.util.Objects.equals( this.sensitiveTypeIdsForDiscovery, other.sensitiveTypeIdsForDiscovery) + && java.util.Objects.equals( + this.sensitiveTypeGroupIdsForDiscovery, + other.sensitiveTypeGroupIdsForDiscovery) && java.util.Objects.equals( this.isSampleDataCollectionEnabled, other.isSampleDataCollectionEnabled) && java.util.Objects.equals( @@ -787,6 +839,11 @@ public int hashCode() { + (this.sensitiveTypeIdsForDiscovery == null ? 43 : this.sensitiveTypeIdsForDiscovery.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeGroupIdsForDiscovery == null + ? 43 + : this.sensitiveTypeGroupIdsForDiscovery.hashCode()); result = (result * PRIME) + (this.isSampleDataCollectionEnabled == null diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAuditPolicyDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSensitiveTypeGroupDetails.java similarity index 74% rename from bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAuditPolicyDetails.java rename to bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSensitiveTypeGroupDetails.java index f3a2ab41e2..7ecfc9947f 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAuditPolicyDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSensitiveTypeGroupDetails.java @@ -1,11 +1,11 @@ /** - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ package com.oracle.bmc.datasafe.model; /** - * Details for the new audit policy. + * The details to create a sensitive type group. *
* 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 @@ -16,32 +16,29 @@ **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") @com.fasterxml.jackson.databind.annotation.JsonDeserialize( - builder = CreateAuditPolicyDetails.Builder.class + builder = CreateSensitiveTypeGroupDetails.Builder.class ) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) -public final class CreateAuditPolicyDetails +public final class CreateSensitiveTypeGroupDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ "displayName", "description", "compartmentId", - "targetId", "freeformTags", "definedTags" }) - public CreateAuditPolicyDetails( + public CreateSensitiveTypeGroupDetails( String displayName, String description, String compartmentId, - String targetId, java.util.Map freeformTags, java.util.Map> definedTags) { super(); this.displayName = displayName; this.description = description; this.compartmentId = compartmentId; - this.targetId = targetId; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -49,13 +46,13 @@ public CreateAuditPolicyDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The display name of the audit policy. The name does not have to be unique, and it is changeable. + * The display name of the sensitive type group. The name does not have to be unique. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private String displayName; /** - * The display name of the audit policy. The name does not have to be unique, and it is changeable. + * The display name of the sensitive type group. The name does not have to be unique. * @param displayName the value to set * @return this builder **/ @@ -65,13 +62,13 @@ public Builder displayName(String displayName) { return this; } /** - * The description of the audit policy. + * The description of the sensitive type group. **/ @com.fasterxml.jackson.annotation.JsonProperty("description") private String description; /** - * The description of the audit policy. + * The description of the sensitive type group. * @param description the value to set * @return this builder **/ @@ -81,13 +78,13 @@ public Builder description(String description) { return this; } /** - * The OCID of the compartment where you want to create the audit policy. + * The OCID of the compartment where the sensitive type group should be created. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** - * The OCID of the compartment where you want to create the audit policy. + * The OCID of the compartment where the sensitive type group should be created. * @param compartmentId the value to set * @return this builder **/ @@ -97,23 +94,7 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * The OCID of the target for which the audit policy has to be created. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("targetId") - private String targetId; - - /** - * The OCID of the target for which the audit policy has to be created. - * @param targetId the value to set - * @return this builder - **/ - public Builder targetId(String targetId) { - this.targetId = targetId; - this.__explicitlySet__.add("targetId"); - return this; - } - /** - * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + * 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"}} * @@ -122,7 +103,7 @@ public Builder targetId(String targetId) { private java.util.Map freeformTags; /** - * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + * 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"}} * @@ -135,8 +116,7 @@ public Builder freeformTags(java.util.Map freeformTags) { return this; } /** - * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) - *

+ * 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"}}} * **/ @@ -144,8 +124,7 @@ public Builder freeformTags(java.util.Map freeformTags) { private java.util.Map> definedTags; /** - * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) - *

+ * 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 @@ -161,13 +140,12 @@ public Builder definedTags( @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); - public CreateAuditPolicyDetails build() { - CreateAuditPolicyDetails model = - new CreateAuditPolicyDetails( + public CreateSensitiveTypeGroupDetails build() { + CreateSensitiveTypeGroupDetails model = + new CreateSensitiveTypeGroupDetails( this.displayName, this.description, this.compartmentId, - this.targetId, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -177,7 +155,7 @@ public CreateAuditPolicyDetails build() { } @com.fasterxml.jackson.annotation.JsonIgnore - public Builder copy(CreateAuditPolicyDetails model) { + public Builder copy(CreateSensitiveTypeGroupDetails model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -187,9 +165,6 @@ public Builder copy(CreateAuditPolicyDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } - if (model.wasPropertyExplicitlySet("targetId")) { - this.targetId(model.getTargetId()); - } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -212,13 +187,13 @@ public Builder toBuilder() { } /** - * The display name of the audit policy. The name does not have to be unique, and it is changeable. + * The display name of the sensitive type group. The name does not have to be unique. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private final String displayName; /** - * The display name of the audit policy. The name does not have to be unique, and it is changeable. + * The display name of the sensitive type group. The name does not have to be unique. * @return the value **/ public String getDisplayName() { @@ -226,13 +201,13 @@ public String getDisplayName() { } /** - * The description of the audit policy. + * The description of the sensitive type group. **/ @com.fasterxml.jackson.annotation.JsonProperty("description") private final String description; /** - * The description of the audit policy. + * The description of the sensitive type group. * @return the value **/ public String getDescription() { @@ -240,13 +215,13 @@ public String getDescription() { } /** - * The OCID of the compartment where you want to create the audit policy. + * The OCID of the compartment where the sensitive type group should be created. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** - * The OCID of the compartment where you want to create the audit policy. + * The OCID of the compartment where the sensitive type group should be created. * @return the value **/ public String getCompartmentId() { @@ -254,21 +229,7 @@ public String getCompartmentId() { } /** - * The OCID of the target for which the audit policy has to be created. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("targetId") - private final String targetId; - - /** - * The OCID of the target for which the audit policy has to be created. - * @return the value - **/ - public String getTargetId() { - return targetId; - } - - /** - * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + * 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"}} * @@ -277,7 +238,7 @@ public String getTargetId() { private final java.util.Map freeformTags; /** - * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + * 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"}} * @@ -288,8 +249,7 @@ public java.util.Map getFreeformTags() { } /** - * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) - *

+ * 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"}}} * **/ @@ -297,8 +257,7 @@ public java.util.Map getFreeformTags() { private final java.util.Map> definedTags; /** - * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) - *

+ * 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 @@ -319,12 +278,11 @@ public String toString() { */ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); - sb.append("CreateAuditPolicyDetails("); + sb.append("CreateSensitiveTypeGroupDetails("); sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); - sb.append(", targetId=").append(String.valueOf(this.targetId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -336,15 +294,14 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof CreateAuditPolicyDetails)) { + if (!(o instanceof CreateSensitiveTypeGroupDetails)) { return false; } - CreateAuditPolicyDetails other = (CreateAuditPolicyDetails) o; + CreateSensitiveTypeGroupDetails other = (CreateSensitiveTypeGroupDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.compartmentId, other.compartmentId) - && java.util.Objects.equals(this.targetId, other.targetId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -359,7 +316,6 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); - result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.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-datasafe/src/main/java/com/oracle/bmc/datasafe/model/DiscoveryJob.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/DiscoveryJob.java index af45240182..a57ca8bd42 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/DiscoveryJob.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/DiscoveryJob.java @@ -32,6 +32,7 @@ public final class DiscoveryJob extends com.oracle.bmc.http.internal.ExplicitlyS "schemasForDiscovery", "tablesForDiscovery", "sensitiveTypeIdsForDiscovery", + "sensitiveTypeGroupIdsForDiscovery", "isSampleDataCollectionEnabled", "isAppDefinedRelationDiscoveryEnabled", "isIncludeAllSchemas", @@ -59,6 +60,7 @@ public DiscoveryJob( java.util.List schemasForDiscovery, java.util.List tablesForDiscovery, java.util.List sensitiveTypeIdsForDiscovery, + java.util.List sensitiveTypeGroupIdsForDiscovery, Boolean isSampleDataCollectionEnabled, Boolean isAppDefinedRelationDiscoveryEnabled, Boolean isIncludeAllSchemas, @@ -85,6 +87,7 @@ public DiscoveryJob( this.schemasForDiscovery = schemasForDiscovery; this.tablesForDiscovery = tablesForDiscovery; this.sensitiveTypeIdsForDiscovery = sensitiveTypeIdsForDiscovery; + this.sensitiveTypeGroupIdsForDiscovery = sensitiveTypeGroupIdsForDiscovery; this.isSampleDataCollectionEnabled = isSampleDataCollectionEnabled; this.isAppDefinedRelationDiscoveryEnabled = isAppDefinedRelationDiscoveryEnabled; this.isIncludeAllSchemas = isIncludeAllSchemas; @@ -307,6 +310,25 @@ public Builder sensitiveTypeIdsForDiscovery( this.__explicitlySet__.add("sensitiveTypeIdsForDiscovery"); return this; } + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeGroupIdsForDiscovery") + private java.util.List sensitiveTypeGroupIdsForDiscovery; + + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. + * + * @param sensitiveTypeGroupIdsForDiscovery the value to set + * @return this builder + **/ + public Builder sensitiveTypeGroupIdsForDiscovery( + java.util.List sensitiveTypeGroupIdsForDiscovery) { + this.sensitiveTypeGroupIdsForDiscovery = sensitiveTypeGroupIdsForDiscovery; + this.__explicitlySet__.add("sensitiveTypeGroupIdsForDiscovery"); + return this; + } /** * Indicates if the discovery job should collect and store sample data values for the discovered columns. * Sample data helps review the discovered columns and ensure that they actually contain sensitive data. @@ -578,6 +600,7 @@ public DiscoveryJob build() { this.schemasForDiscovery, this.tablesForDiscovery, this.sensitiveTypeIdsForDiscovery, + this.sensitiveTypeGroupIdsForDiscovery, this.isSampleDataCollectionEnabled, this.isAppDefinedRelationDiscoveryEnabled, this.isIncludeAllSchemas, @@ -635,6 +658,10 @@ public Builder copy(DiscoveryJob model) { if (model.wasPropertyExplicitlySet("sensitiveTypeIdsForDiscovery")) { this.sensitiveTypeIdsForDiscovery(model.getSensitiveTypeIdsForDiscovery()); } + if (model.wasPropertyExplicitlySet("sensitiveTypeGroupIdsForDiscovery")) { + this.sensitiveTypeGroupIdsForDiscovery( + model.getSensitiveTypeGroupIdsForDiscovery()); + } if (model.wasPropertyExplicitlySet("isSampleDataCollectionEnabled")) { this.isSampleDataCollectionEnabled(model.getIsSampleDataCollectionEnabled()); } @@ -925,6 +952,22 @@ public java.util.List getSensitiveTypeIdsForDiscovery() { return sensitiveTypeIdsForDiscovery; } + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeGroupIdsForDiscovery") + private final java.util.List sensitiveTypeGroupIdsForDiscovery; + + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. + * + * @return the value + **/ + public java.util.List getSensitiveTypeGroupIdsForDiscovery() { + return sensitiveTypeGroupIdsForDiscovery; + } + /** * Indicates if the discovery job should collect and store sample data values for the discovered columns. * Sample data helps review the discovered columns and ensure that they actually contain sensitive data. @@ -1176,6 +1219,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", tablesForDiscovery=").append(String.valueOf(this.tablesForDiscovery)); sb.append(", sensitiveTypeIdsForDiscovery=") .append(String.valueOf(this.sensitiveTypeIdsForDiscovery)); + sb.append(", sensitiveTypeGroupIdsForDiscovery=") + .append(String.valueOf(this.sensitiveTypeGroupIdsForDiscovery)); sb.append(", isSampleDataCollectionEnabled=") .append(String.valueOf(this.isSampleDataCollectionEnabled)); sb.append(", isAppDefinedRelationDiscoveryEnabled=") @@ -1222,6 +1267,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.tablesForDiscovery, other.tablesForDiscovery) && java.util.Objects.equals( this.sensitiveTypeIdsForDiscovery, other.sensitiveTypeIdsForDiscovery) + && java.util.Objects.equals( + this.sensitiveTypeGroupIdsForDiscovery, + other.sensitiveTypeGroupIdsForDiscovery) && java.util.Objects.equals( this.isSampleDataCollectionEnabled, other.isSampleDataCollectionEnabled) && java.util.Objects.equals( @@ -1283,6 +1331,11 @@ public int hashCode() { + (this.sensitiveTypeIdsForDiscovery == null ? 43 : this.sensitiveTypeIdsForDiscovery.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeGroupIdsForDiscovery == null + ? 43 + : this.sensitiveTypeGroupIdsForDiscovery.hashCode()); result = (result * PRIME) + (this.isSampleDataCollectionEnabled == null diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/GroupedSensitiveTypeCollection.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/GroupedSensitiveTypeCollection.java new file mode 100644 index 0000000000..6a683f28ff --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/GroupedSensitiveTypeCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * A collection of sensitive types summary objects present in a sensitive type group. + *
+ * 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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = GroupedSensitiveTypeCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GroupedSensitiveTypeCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public GroupedSensitiveTypeCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of sensitive type id summary objects present in the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of sensitive type id summary objects present in the sensitive type group. + * @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 GroupedSensitiveTypeCollection build() { + GroupedSensitiveTypeCollection model = new GroupedSensitiveTypeCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GroupedSensitiveTypeCollection 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 sensitive type id summary objects present in the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of sensitive type id summary objects present in the sensitive type group. + * @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("GroupedSensitiveTypeCollection("); + 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 GroupedSensitiveTypeCollection)) { + return false; + } + + GroupedSensitiveTypeCollection other = (GroupedSensitiveTypeCollection) 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-datasafe/src/main/java/com/oracle/bmc/datasafe/model/GroupedSensitiveTypeSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/GroupedSensitiveTypeSummary.java new file mode 100644 index 0000000000..64a2d3bb22 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/GroupedSensitiveTypeSummary.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * Id of sensitive types present in a sensitive type group. + *
+ * 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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = GroupedSensitiveTypeSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GroupedSensitiveTypeSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"sensitiveTypeId"}) + public GroupedSensitiveTypeSummary(String sensitiveTypeId) { + super(); + this.sensitiveTypeId = sensitiveTypeId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the sensitive type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeId") + private String sensitiveTypeId; + + /** + * The OCID of the sensitive type. + * @param sensitiveTypeId the value to set + * @return this builder + **/ + public Builder sensitiveTypeId(String sensitiveTypeId) { + this.sensitiveTypeId = sensitiveTypeId; + this.__explicitlySet__.add("sensitiveTypeId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GroupedSensitiveTypeSummary build() { + GroupedSensitiveTypeSummary model = + new GroupedSensitiveTypeSummary(this.sensitiveTypeId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GroupedSensitiveTypeSummary model) { + if (model.wasPropertyExplicitlySet("sensitiveTypeId")) { + this.sensitiveTypeId(model.getSensitiveTypeId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the sensitive type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeId") + private final String sensitiveTypeId; + + /** + * The OCID of the sensitive type. + * @return the value + **/ + public String getSensitiveTypeId() { + return sensitiveTypeId; + } + + @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("GroupedSensitiveTypeSummary("); + sb.append("super=").append(super.toString()); + sb.append("sensitiveTypeId=").append(String.valueOf(this.sensitiveTypeId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GroupedSensitiveTypeSummary)) { + return false; + } + + GroupedSensitiveTypeSummary other = (GroupedSensitiveTypeSummary) o; + return java.util.Objects.equals(this.sensitiveTypeId, other.sensitiveTypeId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.sensitiveTypeId == null ? 43 : this.sensitiveTypeId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskDataDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskDataDetails.java index 5dbbbc195b..ba35671578 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskDataDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskDataDetails.java @@ -23,6 +23,7 @@ public final class MaskDataDetails extends com.oracle.bmc.http.internal.Explicit "targetId", "isDecrypt", "isRerun", + "reRunFromStep", "tablespace", "isIgnoreErrorsEnabled", "seed", @@ -38,6 +39,7 @@ public MaskDataDetails( String targetId, Boolean isDecrypt, Boolean isRerun, + ReRunFromStep reRunFromStep, String tablespace, Boolean isIgnoreErrorsEnabled, String seed, @@ -52,6 +54,7 @@ public MaskDataDetails( this.targetId = targetId; this.isDecrypt = isDecrypt; this.isRerun = isRerun; + this.reRunFromStep = reRunFromStep; this.tablespace = tablespace; this.isIgnoreErrorsEnabled = isIgnoreErrorsEnabled; this.seed = seed; @@ -134,6 +137,30 @@ public Builder isRerun(Boolean isRerun) { this.__explicitlySet__.add("isRerun"); return this; } + /** + * Specifies the step from which masking needs to be rerun. This param will be used only when isRerun attribute is true. + * If PRE_MASKING_SCRIPT is passed, it will rerun the pre-masking script, followed by masking, and then the post-masking script. + * If POST_MASKING_SCRIPT is passed, it will rerun only the post-masking script. + * If this field is not set and isRerun is set to true, then it will default to the last failed step. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reRunFromStep") + private ReRunFromStep reRunFromStep; + + /** + * Specifies the step from which masking needs to be rerun. This param will be used only when isRerun attribute is true. + * If PRE_MASKING_SCRIPT is passed, it will rerun the pre-masking script, followed by masking, and then the post-masking script. + * If POST_MASKING_SCRIPT is passed, it will rerun only the post-masking script. + * If this field is not set and isRerun is set to true, then it will default to the last failed step. + * + * @param reRunFromStep the value to set + * @return this builder + **/ + public Builder reRunFromStep(ReRunFromStep reRunFromStep) { + this.reRunFromStep = reRunFromStep; + this.__explicitlySet__.add("reRunFromStep"); + return this; + } /** * The tablespace that should be used to create the mapping tables, DMASK objects, and other temporary tables for data masking. * If no tablespace is provided, the DEFAULT tablespace is used. @@ -372,6 +399,7 @@ public MaskDataDetails build() { this.targetId, this.isDecrypt, this.isRerun, + this.reRunFromStep, this.tablespace, this.isIgnoreErrorsEnabled, this.seed, @@ -399,6 +427,9 @@ public Builder copy(MaskDataDetails model) { if (model.wasPropertyExplicitlySet("isRerun")) { this.isRerun(model.getIsRerun()); } + if (model.wasPropertyExplicitlySet("reRunFromStep")) { + this.reRunFromStep(model.getReRunFromStep()); + } if (model.wasPropertyExplicitlySet("tablespace")) { this.tablespace(model.getTablespace()); } @@ -506,6 +537,67 @@ public Boolean getIsRerun() { return isRerun; } + /** + * Specifies the step from which masking needs to be rerun. This param will be used only when isRerun attribute is true. + * If PRE_MASKING_SCRIPT is passed, it will rerun the pre-masking script, followed by masking, and then the post-masking script. + * If POST_MASKING_SCRIPT is passed, it will rerun only the post-masking script. + * If this field is not set and isRerun is set to true, then it will default to the last failed step. + * + **/ + public enum ReRunFromStep { + PreMaskingScript("PRE_MASKING_SCRIPT"), + PostMaskingScript("POST_MASKING_SCRIPT"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ReRunFromStep v : ReRunFromStep.values()) { + map.put(v.getValue(), v); + } + } + + ReRunFromStep(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ReRunFromStep create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ReRunFromStep: " + key); + } + }; + /** + * Specifies the step from which masking needs to be rerun. This param will be used only when isRerun attribute is true. + * If PRE_MASKING_SCRIPT is passed, it will rerun the pre-masking script, followed by masking, and then the post-masking script. + * If POST_MASKING_SCRIPT is passed, it will rerun only the post-masking script. + * If this field is not set and isRerun is set to true, then it will default to the last failed step. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reRunFromStep") + private final ReRunFromStep reRunFromStep; + + /** + * Specifies the step from which masking needs to be rerun. This param will be used only when isRerun attribute is true. + * If PRE_MASKING_SCRIPT is passed, it will rerun the pre-masking script, followed by masking, and then the post-masking script. + * If POST_MASKING_SCRIPT is passed, it will rerun only the post-masking script. + * If this field is not set and isRerun is set to true, then it will default to the last failed step. + * + * @return the value + **/ + public ReRunFromStep getReRunFromStep() { + return reRunFromStep; + } + /** * The tablespace that should be used to create the mapping tables, DMASK objects, and other temporary tables for data masking. * If no tablespace is provided, the DEFAULT tablespace is used. @@ -731,6 +823,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("targetId=").append(String.valueOf(this.targetId)); sb.append(", isDecrypt=").append(String.valueOf(this.isDecrypt)); sb.append(", isRerun=").append(String.valueOf(this.isRerun)); + sb.append(", reRunFromStep=").append(String.valueOf(this.reRunFromStep)); sb.append(", tablespace=").append(String.valueOf(this.tablespace)); sb.append(", isIgnoreErrorsEnabled=").append(String.valueOf(this.isIgnoreErrorsEnabled)); sb.append(", seed=").append(""); @@ -761,6 +854,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.targetId, other.targetId) && java.util.Objects.equals(this.isDecrypt, other.isDecrypt) && java.util.Objects.equals(this.isRerun, other.isRerun) + && java.util.Objects.equals(this.reRunFromStep, other.reRunFromStep) && java.util.Objects.equals(this.tablespace, other.tablespace) && java.util.Objects.equals(this.isIgnoreErrorsEnabled, other.isIgnoreErrorsEnabled) && java.util.Objects.equals(this.seed, other.seed) @@ -784,6 +878,9 @@ public int hashCode() { result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); result = (result * PRIME) + (this.isDecrypt == null ? 43 : this.isDecrypt.hashCode()); result = (result * PRIME) + (this.isRerun == null ? 43 : this.isRerun.hashCode()); + result = + (result * PRIME) + + (this.reRunFromStep == null ? 43 : this.reRunFromStep.hashCode()); result = (result * PRIME) + (this.tablespace == null ? 43 : this.tablespace.hashCode()); result = (result * PRIME) diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingErrorCollection.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingErrorCollection.java new file mode 100644 index 0000000000..71b7b0144f --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingErrorCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * A collection of masking error objects. + *
+ * 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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MaskingErrorCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MaskingErrorCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public MaskingErrorCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An array of masking error objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * An array of masking error 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 MaskingErrorCollection build() { + MaskingErrorCollection model = new MaskingErrorCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MaskingErrorCollection 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); + } + + /** + * An array of masking error objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * An array of masking error 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("MaskingErrorCollection("); + 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 MaskingErrorCollection)) { + return false; + } + + MaskingErrorCollection other = (MaskingErrorCollection) 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-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingErrorSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingErrorSummary.java new file mode 100644 index 0000000000..2456b0234b --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingErrorSummary.java @@ -0,0 +1,304 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * Summary of a masking error. A Masking error is an error seen during the masking run. + *
+ * 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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MaskingErrorSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MaskingErrorSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"stepName", "error", "failedStatement", "timeCreated"}) + public MaskingErrorSummary( + StepName stepName, String error, String failedStatement, java.util.Date timeCreated) { + super(); + this.stepName = stepName; + this.error = error; + this.failedStatement = failedStatement; + this.timeCreated = timeCreated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The stepName of the masking error. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private StepName stepName; + + /** + * The stepName of the masking error. + * @param stepName the value to set + * @return this builder + **/ + public Builder stepName(StepName stepName) { + this.stepName = stepName; + this.__explicitlySet__.add("stepName"); + return this; + } + /** + * The text of the masking error. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("error") + private String error; + + /** + * The text of the masking error. + * @param error the value to set + * @return this builder + **/ + public Builder error(String error) { + this.error = error; + this.__explicitlySet__.add("error"); + return this; + } + /** + * The statement resulting into the error. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("failedStatement") + private String failedStatement; + + /** + * The statement resulting into the error. + * @param failedStatement the value to set + * @return this builder + **/ + public Builder failedStatement(String failedStatement) { + this.failedStatement = failedStatement; + this.__explicitlySet__.add("failedStatement"); + return this; + } + /** + * The date and time the error entry was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the error entry was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MaskingErrorSummary build() { + MaskingErrorSummary model = + new MaskingErrorSummary( + this.stepName, this.error, this.failedStatement, this.timeCreated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MaskingErrorSummary model) { + if (model.wasPropertyExplicitlySet("stepName")) { + this.stepName(model.getStepName()); + } + if (model.wasPropertyExplicitlySet("error")) { + this.error(model.getError()); + } + if (model.wasPropertyExplicitlySet("failedStatement")) { + this.failedStatement(model.getFailedStatement()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The stepName of the masking error. + **/ + public enum StepName { + ExecuteMasking("EXECUTE_MASKING"), + PreMasking("PRE_MASKING"), + PostMasking("POST_MASKING"), + + /** + * 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(StepName.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (StepName v : StepName.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + StepName(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static StepName create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'StepName', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The stepName of the masking error. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private final StepName stepName; + + /** + * The stepName of the masking error. + * @return the value + **/ + public StepName getStepName() { + return stepName; + } + + /** + * The text of the masking error. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("error") + private final String error; + + /** + * The text of the masking error. + * @return the value + **/ + public String getError() { + return error; + } + + /** + * The statement resulting into the error. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("failedStatement") + private final String failedStatement; + + /** + * The statement resulting into the error. + * @return the value + **/ + public String getFailedStatement() { + return failedStatement; + } + + /** + * The date and time the error entry was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the error entry was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MaskingErrorSummary("); + sb.append("super=").append(super.toString()); + sb.append("stepName=").append(String.valueOf(this.stepName)); + sb.append(", error=").append(String.valueOf(this.error)); + sb.append(", failedStatement=").append(String.valueOf(this.failedStatement)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MaskingErrorSummary)) { + return false; + } + + MaskingErrorSummary other = (MaskingErrorSummary) o; + return java.util.Objects.equals(this.stepName, other.stepName) + && java.util.Objects.equals(this.error, other.error) + && java.util.Objects.equals(this.failedStatement, other.failedStatement) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + result = (result * PRIME) + (this.error == null ? 43 : this.error.hashCode()); + result = + (result * PRIME) + + (this.failedStatement == null ? 43 : this.failedStatement.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingReport.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingReport.java index 5cff0776e8..a07d14d3d2 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingReport.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingReport.java @@ -40,7 +40,10 @@ public final class MaskingReport extends com.oracle.bmc.http.internal.Explicitly "isRedoLoggingEnabled", "isRefreshStatsEnabled", "parallelDegree", - "recompile" + "recompile", + "maskingStatus", + "totalPreMaskingScriptErrors", + "totalPostMaskingScriptErrors" }) public MaskingReport( String id, @@ -61,7 +64,10 @@ public MaskingReport( Boolean isRedoLoggingEnabled, Boolean isRefreshStatsEnabled, String parallelDegree, - String recompile) { + String recompile, + MaskingStatus maskingStatus, + Long totalPreMaskingScriptErrors, + Long totalPostMaskingScriptErrors) { super(); this.id = id; this.compartmentId = compartmentId; @@ -82,6 +88,9 @@ public MaskingReport( this.isRefreshStatsEnabled = isRefreshStatsEnabled; this.parallelDegree = parallelDegree; this.recompile = recompile; + this.maskingStatus = maskingStatus; + this.totalPreMaskingScriptErrors = totalPreMaskingScriptErrors; + this.totalPostMaskingScriptErrors = totalPostMaskingScriptErrors; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -402,6 +411,54 @@ public Builder recompile(String recompile) { this.__explicitlySet__.add("recompile"); return this; } + /** + * The status of the masking job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maskingStatus") + private MaskingStatus maskingStatus; + + /** + * The status of the masking job. + * @param maskingStatus the value to set + * @return this builder + **/ + public Builder maskingStatus(MaskingStatus maskingStatus) { + this.maskingStatus = maskingStatus; + this.__explicitlySet__.add("maskingStatus"); + return this; + } + /** + * The total number of errors in pre-masking script. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalPreMaskingScriptErrors") + private Long totalPreMaskingScriptErrors; + + /** + * The total number of errors in pre-masking script. + * @param totalPreMaskingScriptErrors the value to set + * @return this builder + **/ + public Builder totalPreMaskingScriptErrors(Long totalPreMaskingScriptErrors) { + this.totalPreMaskingScriptErrors = totalPreMaskingScriptErrors; + this.__explicitlySet__.add("totalPreMaskingScriptErrors"); + return this; + } + /** + * The total number of errors in post-masking script. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalPostMaskingScriptErrors") + private Long totalPostMaskingScriptErrors; + + /** + * The total number of errors in post-masking script. + * @param totalPostMaskingScriptErrors the value to set + * @return this builder + **/ + public Builder totalPostMaskingScriptErrors(Long totalPostMaskingScriptErrors) { + this.totalPostMaskingScriptErrors = totalPostMaskingScriptErrors; + this.__explicitlySet__.add("totalPostMaskingScriptErrors"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -427,7 +484,10 @@ public MaskingReport build() { this.isRedoLoggingEnabled, this.isRefreshStatsEnabled, this.parallelDegree, - this.recompile); + this.recompile, + this.maskingStatus, + this.totalPreMaskingScriptErrors, + this.totalPostMaskingScriptErrors); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -493,6 +553,15 @@ public Builder copy(MaskingReport model) { if (model.wasPropertyExplicitlySet("recompile")) { this.recompile(model.getRecompile()); } + if (model.wasPropertyExplicitlySet("maskingStatus")) { + this.maskingStatus(model.getMaskingStatus()); + } + if (model.wasPropertyExplicitlySet("totalPreMaskingScriptErrors")) { + this.totalPreMaskingScriptErrors(model.getTotalPreMaskingScriptErrors()); + } + if (model.wasPropertyExplicitlySet("totalPostMaskingScriptErrors")) { + this.totalPostMaskingScriptErrors(model.getTotalPostMaskingScriptErrors()); + } return this; } } @@ -786,6 +855,96 @@ public String getRecompile() { return recompile; } + /** + * The status of the masking job. + **/ + public enum MaskingStatus { + Failed("FAILED"), + Success("SUCCESS"), + + /** + * 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(MaskingStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaskingStatus v : MaskingStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MaskingStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaskingStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MaskingStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The status of the masking job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maskingStatus") + private final MaskingStatus maskingStatus; + + /** + * The status of the masking job. + * @return the value + **/ + public MaskingStatus getMaskingStatus() { + return maskingStatus; + } + + /** + * The total number of errors in pre-masking script. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalPreMaskingScriptErrors") + private final Long totalPreMaskingScriptErrors; + + /** + * The total number of errors in pre-masking script. + * @return the value + **/ + public Long getTotalPreMaskingScriptErrors() { + return totalPreMaskingScriptErrors; + } + + /** + * The total number of errors in post-masking script. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalPostMaskingScriptErrors") + private final Long totalPostMaskingScriptErrors; + + /** + * The total number of errors in post-masking script. + * @return the value + **/ + public Long getTotalPostMaskingScriptErrors() { + return totalPostMaskingScriptErrors; + } + @Override public String toString() { return this.toString(true); @@ -821,6 +980,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isRefreshStatsEnabled=").append(String.valueOf(this.isRefreshStatsEnabled)); sb.append(", parallelDegree=").append(String.valueOf(this.parallelDegree)); sb.append(", recompile=").append(String.valueOf(this.recompile)); + sb.append(", maskingStatus=").append(String.valueOf(this.maskingStatus)); + sb.append(", totalPreMaskingScriptErrors=") + .append(String.valueOf(this.totalPreMaskingScriptErrors)); + sb.append(", totalPostMaskingScriptErrors=") + .append(String.valueOf(this.totalPostMaskingScriptErrors)); sb.append(")"); return sb.toString(); } @@ -856,6 +1020,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.isRefreshStatsEnabled, other.isRefreshStatsEnabled) && java.util.Objects.equals(this.parallelDegree, other.parallelDegree) && java.util.Objects.equals(this.recompile, other.recompile) + && java.util.Objects.equals(this.maskingStatus, other.maskingStatus) + && java.util.Objects.equals( + this.totalPreMaskingScriptErrors, other.totalPreMaskingScriptErrors) + && java.util.Objects.equals( + this.totalPostMaskingScriptErrors, other.totalPostMaskingScriptErrors) && super.equals(other); } @@ -932,6 +1101,19 @@ public int hashCode() { (result * PRIME) + (this.parallelDegree == null ? 43 : this.parallelDegree.hashCode()); result = (result * PRIME) + (this.recompile == null ? 43 : this.recompile.hashCode()); + result = + (result * PRIME) + + (this.maskingStatus == null ? 43 : this.maskingStatus.hashCode()); + result = + (result * PRIME) + + (this.totalPreMaskingScriptErrors == null + ? 43 + : this.totalPreMaskingScriptErrors.hashCode()); + result = + (result * PRIME) + + (this.totalPostMaskingScriptErrors == null + ? 43 + : this.totalPostMaskingScriptErrors.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingReportSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingReportSummary.java index ace873bfed..6c78cdef4e 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingReportSummary.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/MaskingReportSummary.java @@ -40,7 +40,10 @@ public final class MaskingReportSummary extends com.oracle.bmc.http.internal.Exp "isRedoLoggingEnabled", "isRefreshStatsEnabled", "parallelDegree", - "recompile" + "recompile", + "maskingStatus", + "totalPreMaskingScriptErrors", + "totalPostMaskingScriptErrors" }) public MaskingReportSummary( String id, @@ -61,7 +64,10 @@ public MaskingReportSummary( Boolean isRedoLoggingEnabled, Boolean isRefreshStatsEnabled, String parallelDegree, - String recompile) { + String recompile, + MaskingStatus maskingStatus, + Long totalPreMaskingScriptErrors, + Long totalPostMaskingScriptErrors) { super(); this.id = id; this.compartmentId = compartmentId; @@ -82,6 +88,9 @@ public MaskingReportSummary( this.isRefreshStatsEnabled = isRefreshStatsEnabled; this.parallelDegree = parallelDegree; this.recompile = recompile; + this.maskingStatus = maskingStatus; + this.totalPreMaskingScriptErrors = totalPreMaskingScriptErrors; + this.totalPostMaskingScriptErrors = totalPostMaskingScriptErrors; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -402,6 +411,54 @@ public Builder recompile(String recompile) { this.__explicitlySet__.add("recompile"); return this; } + /** + * The status of the masking job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maskingStatus") + private MaskingStatus maskingStatus; + + /** + * The status of the masking job. + * @param maskingStatus the value to set + * @return this builder + **/ + public Builder maskingStatus(MaskingStatus maskingStatus) { + this.maskingStatus = maskingStatus; + this.__explicitlySet__.add("maskingStatus"); + return this; + } + /** + * The total number of errors in pre-masking script. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalPreMaskingScriptErrors") + private Long totalPreMaskingScriptErrors; + + /** + * The total number of errors in pre-masking script. + * @param totalPreMaskingScriptErrors the value to set + * @return this builder + **/ + public Builder totalPreMaskingScriptErrors(Long totalPreMaskingScriptErrors) { + this.totalPreMaskingScriptErrors = totalPreMaskingScriptErrors; + this.__explicitlySet__.add("totalPreMaskingScriptErrors"); + return this; + } + /** + * The total number of errors in post-masking script. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalPostMaskingScriptErrors") + private Long totalPostMaskingScriptErrors; + + /** + * The total number of errors in post-masking script. + * @param totalPostMaskingScriptErrors the value to set + * @return this builder + **/ + public Builder totalPostMaskingScriptErrors(Long totalPostMaskingScriptErrors) { + this.totalPostMaskingScriptErrors = totalPostMaskingScriptErrors; + this.__explicitlySet__.add("totalPostMaskingScriptErrors"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -427,7 +484,10 @@ public MaskingReportSummary build() { this.isRedoLoggingEnabled, this.isRefreshStatsEnabled, this.parallelDegree, - this.recompile); + this.recompile, + this.maskingStatus, + this.totalPreMaskingScriptErrors, + this.totalPostMaskingScriptErrors); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -493,6 +553,15 @@ public Builder copy(MaskingReportSummary model) { if (model.wasPropertyExplicitlySet("recompile")) { this.recompile(model.getRecompile()); } + if (model.wasPropertyExplicitlySet("maskingStatus")) { + this.maskingStatus(model.getMaskingStatus()); + } + if (model.wasPropertyExplicitlySet("totalPreMaskingScriptErrors")) { + this.totalPreMaskingScriptErrors(model.getTotalPreMaskingScriptErrors()); + } + if (model.wasPropertyExplicitlySet("totalPostMaskingScriptErrors")) { + this.totalPostMaskingScriptErrors(model.getTotalPostMaskingScriptErrors()); + } return this; } } @@ -786,6 +855,96 @@ public String getRecompile() { return recompile; } + /** + * The status of the masking job. + **/ + public enum MaskingStatus { + Failed("FAILED"), + Success("SUCCESS"), + + /** + * 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(MaskingStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaskingStatus v : MaskingStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MaskingStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaskingStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MaskingStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The status of the masking job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maskingStatus") + private final MaskingStatus maskingStatus; + + /** + * The status of the masking job. + * @return the value + **/ + public MaskingStatus getMaskingStatus() { + return maskingStatus; + } + + /** + * The total number of errors in pre-masking script. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalPreMaskingScriptErrors") + private final Long totalPreMaskingScriptErrors; + + /** + * The total number of errors in pre-masking script. + * @return the value + **/ + public Long getTotalPreMaskingScriptErrors() { + return totalPreMaskingScriptErrors; + } + + /** + * The total number of errors in post-masking script. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalPostMaskingScriptErrors") + private final Long totalPostMaskingScriptErrors; + + /** + * The total number of errors in post-masking script. + * @return the value + **/ + public Long getTotalPostMaskingScriptErrors() { + return totalPostMaskingScriptErrors; + } + @Override public String toString() { return this.toString(true); @@ -821,6 +980,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isRefreshStatsEnabled=").append(String.valueOf(this.isRefreshStatsEnabled)); sb.append(", parallelDegree=").append(String.valueOf(this.parallelDegree)); sb.append(", recompile=").append(String.valueOf(this.recompile)); + sb.append(", maskingStatus=").append(String.valueOf(this.maskingStatus)); + sb.append(", totalPreMaskingScriptErrors=") + .append(String.valueOf(this.totalPreMaskingScriptErrors)); + sb.append(", totalPostMaskingScriptErrors=") + .append(String.valueOf(this.totalPostMaskingScriptErrors)); sb.append(")"); return sb.toString(); } @@ -856,6 +1020,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.isRefreshStatsEnabled, other.isRefreshStatsEnabled) && java.util.Objects.equals(this.parallelDegree, other.parallelDegree) && java.util.Objects.equals(this.recompile, other.recompile) + && java.util.Objects.equals(this.maskingStatus, other.maskingStatus) + && java.util.Objects.equals( + this.totalPreMaskingScriptErrors, other.totalPreMaskingScriptErrors) + && java.util.Objects.equals( + this.totalPostMaskingScriptErrors, other.totalPostMaskingScriptErrors) && super.equals(other); } @@ -932,6 +1101,19 @@ public int hashCode() { (result * PRIME) + (this.parallelDegree == null ? 43 : this.parallelDegree.hashCode()); result = (result * PRIME) + (this.recompile == null ? 43 : this.recompile.hashCode()); + result = + (result * PRIME) + + (this.maskingStatus == null ? 43 : this.maskingStatus.hashCode()); + result = + (result * PRIME) + + (this.totalPreMaskingScriptErrors == null + ? 43 + : this.totalPreMaskingScriptErrors.hashCode()); + result = + (result * PRIME) + + (this.totalPostMaskingScriptErrors == null + ? 43 + : this.totalPostMaskingScriptErrors.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/PatchGroupedSensitiveTypesDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/PatchGroupedSensitiveTypesDetails.java new file mode 100644 index 0000000000..bff07c8dc6 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/PatchGroupedSensitiveTypesDetails.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * Details to patch sensitive types in a sensitive type group. INSERT and REMOVE operations are allowed. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchGroupedSensitiveTypesDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchGroupedSensitiveTypesDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PatchGroupedSensitiveTypesDetails(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An array of patch instructions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * An array 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 PatchGroupedSensitiveTypesDetails build() { + PatchGroupedSensitiveTypesDetails model = + new PatchGroupedSensitiveTypesDetails(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchGroupedSensitiveTypesDetails 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); + } + + /** + * An array of patch instructions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * An array 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("PatchGroupedSensitiveTypesDetails("); + 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 PatchGroupedSensitiveTypesDetails)) { + return false; + } + + PatchGroupedSensitiveTypesDetails other = (PatchGroupedSensitiveTypesDetails) 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-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinition.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinition.java index 3a93b0cc15..ef840a0802 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinition.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinition.java @@ -813,6 +813,7 @@ public enum Category { CustomReports("CUSTOM_REPORTS"), Summary("SUMMARY"), ActivityAuditing("ACTIVITY_AUDITING"), + SecurityAssessment("SECURITY_ASSESSMENT"), FirewallViolations("FIREWALL_VIOLATIONS"), AllowedSql("ALLOWED_SQL"), diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinitionDataSource.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinitionDataSource.java index de3a919892..369c97c39d 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinitionDataSource.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinitionDataSource.java @@ -11,6 +11,7 @@ public enum ReportDefinitionDataSource { Events("EVENTS"), Alerts("ALERTS"), + SecurityAssessment("SECURITY_ASSESSMENT"), Violations("VIOLATIONS"), AllowedSql("ALLOWED_SQL"), diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinitionSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinitionSummary.java index 1d8f5b1bbc..348e4f815b 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinitionSummary.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinitionSummary.java @@ -479,6 +479,7 @@ public enum Category { CustomReports("CUSTOM_REPORTS"), Summary("SUMMARY"), ActivityAuditing("ACTIVITY_AUDITING"), + SecurityAssessment("SECURITY_ASSESSMENT"), FirewallViolations("FIREWALL_VIOLATIONS"), AllowedSql("ALLOWED_SQL"), diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveColumnAnalyticsCollection.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveColumnAnalyticsCollection.java new file mode 100644 index 0000000000..8154dd8512 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveColumnAnalyticsCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * A collection of sensitive column analytics summary objects. + *
+ * 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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SensitiveColumnAnalyticsCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SensitiveColumnAnalyticsCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public SensitiveColumnAnalyticsCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An array of sensitive column analytics summary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * An array of sensitive column analytics summary 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 SensitiveColumnAnalyticsCollection build() { + SensitiveColumnAnalyticsCollection model = + new SensitiveColumnAnalyticsCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SensitiveColumnAnalyticsCollection 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); + } + + /** + * An array of sensitive column analytics summary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * An array of sensitive column analytics summary 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("SensitiveColumnAnalyticsCollection("); + 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 SensitiveColumnAnalyticsCollection)) { + return false; + } + + SensitiveColumnAnalyticsCollection other = (SensitiveColumnAnalyticsCollection) 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-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveColumnAnalyticsDimensions.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveColumnAnalyticsDimensions.java new file mode 100644 index 0000000000..48f6c87150 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveColumnAnalyticsDimensions.java @@ -0,0 +1,347 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * The dimensions available for sensitive column analytics. + *
+ * 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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SensitiveColumnAnalyticsDimensions.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SensitiveColumnAnalyticsDimensions + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "targetId", + "schemaName", + "objectName", + "columnName", + "sensitiveTypeId", + "sensitiveDataModelId" + }) + public SensitiveColumnAnalyticsDimensions( + String targetId, + String schemaName, + String objectName, + String columnName, + String sensitiveTypeId, + String sensitiveDataModelId) { + super(); + this.targetId = targetId; + this.schemaName = schemaName; + this.objectName = objectName; + this.columnName = columnName; + this.sensitiveTypeId = sensitiveTypeId; + this.sensitiveDataModelId = sensitiveDataModelId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the target database associated with the sensitive column. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private String targetId; + + /** + * The OCID of the target database associated with the sensitive column. + * @param targetId the value to set + * @return this builder + **/ + public Builder targetId(String targetId) { + this.targetId = targetId; + this.__explicitlySet__.add("targetId"); + return this; + } + /** + * The database schema that contains the sensitive column. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemaName") + private String schemaName; + + /** + * The database schema that contains the sensitive column. + * @param schemaName the value to set + * @return this builder + **/ + public Builder schemaName(String schemaName) { + this.schemaName = schemaName; + this.__explicitlySet__.add("schemaName"); + return this; + } + /** + * The database object that contains the sensitive column. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectName") + private String objectName; + + /** + * The database object that contains the sensitive column. + * @param objectName the value to set + * @return this builder + **/ + public Builder objectName(String objectName) { + this.objectName = objectName; + this.__explicitlySet__.add("objectName"); + return this; + } + /** + * The name of the sensitive column. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("columnName") + private String columnName; + + /** + * The name of the sensitive column. + * @param columnName the value to set + * @return this builder + **/ + public Builder columnName(String columnName) { + this.columnName = columnName; + this.__explicitlySet__.add("columnName"); + return this; + } + /** + * The OCID of the sensitive type associated with the sensitive column. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeId") + private String sensitiveTypeId; + + /** + * The OCID of the sensitive type associated with the sensitive column. + * @param sensitiveTypeId the value to set + * @return this builder + **/ + public Builder sensitiveTypeId(String sensitiveTypeId) { + this.sensitiveTypeId = sensitiveTypeId; + this.__explicitlySet__.add("sensitiveTypeId"); + return this; + } + /** + * The OCID of the sensitive data model which contains the sensitive column. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveDataModelId") + private String sensitiveDataModelId; + + /** + * The OCID of the sensitive data model which contains the sensitive column. + * @param sensitiveDataModelId the value to set + * @return this builder + **/ + public Builder sensitiveDataModelId(String sensitiveDataModelId) { + this.sensitiveDataModelId = sensitiveDataModelId; + this.__explicitlySet__.add("sensitiveDataModelId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SensitiveColumnAnalyticsDimensions build() { + SensitiveColumnAnalyticsDimensions model = + new SensitiveColumnAnalyticsDimensions( + this.targetId, + this.schemaName, + this.objectName, + this.columnName, + this.sensitiveTypeId, + this.sensitiveDataModelId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SensitiveColumnAnalyticsDimensions model) { + if (model.wasPropertyExplicitlySet("targetId")) { + this.targetId(model.getTargetId()); + } + if (model.wasPropertyExplicitlySet("schemaName")) { + this.schemaName(model.getSchemaName()); + } + if (model.wasPropertyExplicitlySet("objectName")) { + this.objectName(model.getObjectName()); + } + if (model.wasPropertyExplicitlySet("columnName")) { + this.columnName(model.getColumnName()); + } + if (model.wasPropertyExplicitlySet("sensitiveTypeId")) { + this.sensitiveTypeId(model.getSensitiveTypeId()); + } + if (model.wasPropertyExplicitlySet("sensitiveDataModelId")) { + this.sensitiveDataModelId(model.getSensitiveDataModelId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the target database associated with the sensitive column. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private final String targetId; + + /** + * The OCID of the target database associated with the sensitive column. + * @return the value + **/ + public String getTargetId() { + return targetId; + } + + /** + * The database schema that contains the sensitive column. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemaName") + private final String schemaName; + + /** + * The database schema that contains the sensitive column. + * @return the value + **/ + public String getSchemaName() { + return schemaName; + } + + /** + * The database object that contains the sensitive column. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectName") + private final String objectName; + + /** + * The database object that contains the sensitive column. + * @return the value + **/ + public String getObjectName() { + return objectName; + } + + /** + * The name of the sensitive column. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("columnName") + private final String columnName; + + /** + * The name of the sensitive column. + * @return the value + **/ + public String getColumnName() { + return columnName; + } + + /** + * The OCID of the sensitive type associated with the sensitive column. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeId") + private final String sensitiveTypeId; + + /** + * The OCID of the sensitive type associated with the sensitive column. + * @return the value + **/ + public String getSensitiveTypeId() { + return sensitiveTypeId; + } + + /** + * The OCID of the sensitive data model which contains the sensitive column. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveDataModelId") + private final String sensitiveDataModelId; + + /** + * The OCID of the sensitive data model which contains the sensitive column. + * @return the value + **/ + public String getSensitiveDataModelId() { + return sensitiveDataModelId; + } + + @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("SensitiveColumnAnalyticsDimensions("); + sb.append("super=").append(super.toString()); + sb.append("targetId=").append(String.valueOf(this.targetId)); + sb.append(", schemaName=").append(String.valueOf(this.schemaName)); + sb.append(", objectName=").append(String.valueOf(this.objectName)); + sb.append(", columnName=").append(String.valueOf(this.columnName)); + sb.append(", sensitiveTypeId=").append(String.valueOf(this.sensitiveTypeId)); + sb.append(", sensitiveDataModelId=").append(String.valueOf(this.sensitiveDataModelId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SensitiveColumnAnalyticsDimensions)) { + return false; + } + + SensitiveColumnAnalyticsDimensions other = (SensitiveColumnAnalyticsDimensions) o; + return java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.schemaName, other.schemaName) + && java.util.Objects.equals(this.objectName, other.objectName) + && java.util.Objects.equals(this.columnName, other.columnName) + && java.util.Objects.equals(this.sensitiveTypeId, other.sensitiveTypeId) + && java.util.Objects.equals(this.sensitiveDataModelId, other.sensitiveDataModelId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = (result * PRIME) + (this.schemaName == null ? 43 : this.schemaName.hashCode()); + result = (result * PRIME) + (this.objectName == null ? 43 : this.objectName.hashCode()); + result = (result * PRIME) + (this.columnName == null ? 43 : this.columnName.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeId == null ? 43 : this.sensitiveTypeId.hashCode()); + result = + (result * PRIME) + + (this.sensitiveDataModelId == null + ? 43 + : this.sensitiveDataModelId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveColumnAnalyticsSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveColumnAnalyticsSummary.java new file mode 100644 index 0000000000..b0c4fada81 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveColumnAnalyticsSummary.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * The details of sensitive column analytics data. + *
+ * 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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SensitiveColumnAnalyticsSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SensitiveColumnAnalyticsSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"dimensions", "count"}) + public SensitiveColumnAnalyticsSummary( + SensitiveColumnAnalyticsDimensions dimensions, Long count) { + super(); + this.dimensions = dimensions; + this.count = count; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("dimensions") + private SensitiveColumnAnalyticsDimensions dimensions; + + public Builder dimensions(SensitiveColumnAnalyticsDimensions dimensions) { + this.dimensions = dimensions; + this.__explicitlySet__.add("dimensions"); + return this; + } + /** + * The total count for the aggregation metric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private Long count; + + /** + * The total count for the aggregation metric. + * @param count the value to set + * @return this builder + **/ + public Builder count(Long count) { + this.count = count; + this.__explicitlySet__.add("count"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SensitiveColumnAnalyticsSummary build() { + SensitiveColumnAnalyticsSummary model = + new SensitiveColumnAnalyticsSummary(this.dimensions, this.count); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SensitiveColumnAnalyticsSummary model) { + if (model.wasPropertyExplicitlySet("dimensions")) { + this.dimensions(model.getDimensions()); + } + if (model.wasPropertyExplicitlySet("count")) { + this.count(model.getCount()); + } + 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("dimensions") + private final SensitiveColumnAnalyticsDimensions dimensions; + + public SensitiveColumnAnalyticsDimensions getDimensions() { + return dimensions; + } + + /** + * The total count for the aggregation metric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private final Long count; + + /** + * The total count for the aggregation metric. + * @return the value + **/ + public Long getCount() { + return count; + } + + @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("SensitiveColumnAnalyticsSummary("); + sb.append("super=").append(super.toString()); + sb.append("dimensions=").append(String.valueOf(this.dimensions)); + sb.append(", count=").append(String.valueOf(this.count)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SensitiveColumnAnalyticsSummary)) { + return false; + } + + SensitiveColumnAnalyticsSummary other = (SensitiveColumnAnalyticsSummary) o; + return java.util.Objects.equals(this.dimensions, other.dimensions) + && java.util.Objects.equals(this.count, other.count) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.dimensions == null ? 43 : this.dimensions.hashCode()); + result = (result * PRIME) + (this.count == null ? 43 : this.count.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModel.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModel.java index 36059a0028..22acc02399 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModel.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModel.java @@ -38,6 +38,7 @@ public final class SensitiveDataModel extends com.oracle.bmc.http.internal.Expli "schemasForDiscovery", "tablesForDiscovery", "sensitiveTypeIdsForDiscovery", + "sensitiveTypeGroupIdsForDiscovery", "isSampleDataCollectionEnabled", "isAppDefinedRelationDiscoveryEnabled", "isIncludeAllSchemas", @@ -59,6 +60,7 @@ public SensitiveDataModel( java.util.List schemasForDiscovery, java.util.List tablesForDiscovery, java.util.List sensitiveTypeIdsForDiscovery, + java.util.List sensitiveTypeGroupIdsForDiscovery, Boolean isSampleDataCollectionEnabled, Boolean isAppDefinedRelationDiscoveryEnabled, Boolean isIncludeAllSchemas, @@ -79,6 +81,7 @@ public SensitiveDataModel( this.schemasForDiscovery = schemasForDiscovery; this.tablesForDiscovery = tablesForDiscovery; this.sensitiveTypeIdsForDiscovery = sensitiveTypeIdsForDiscovery; + this.sensitiveTypeGroupIdsForDiscovery = sensitiveTypeGroupIdsForDiscovery; this.isSampleDataCollectionEnabled = isSampleDataCollectionEnabled; this.isAppDefinedRelationDiscoveryEnabled = isAppDefinedRelationDiscoveryEnabled; this.isIncludeAllSchemas = isIncludeAllSchemas; @@ -297,6 +300,25 @@ public Builder sensitiveTypeIdsForDiscovery( this.__explicitlySet__.add("sensitiveTypeIdsForDiscovery"); return this; } + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeGroupIdsForDiscovery") + private java.util.List sensitiveTypeGroupIdsForDiscovery; + + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. + * + * @param sensitiveTypeGroupIdsForDiscovery the value to set + * @return this builder + **/ + public Builder sensitiveTypeGroupIdsForDiscovery( + java.util.List sensitiveTypeGroupIdsForDiscovery) { + this.sensitiveTypeGroupIdsForDiscovery = sensitiveTypeGroupIdsForDiscovery; + this.__explicitlySet__.add("sensitiveTypeGroupIdsForDiscovery"); + return this; + } /** * Indicates if data discovery jobs should collect and store sample data values for the discovered columns. * Sample data helps review the discovered columns and ensure that they actually contain sensitive data. @@ -472,6 +494,7 @@ public SensitiveDataModel build() { this.schemasForDiscovery, this.tablesForDiscovery, this.sensitiveTypeIdsForDiscovery, + this.sensitiveTypeGroupIdsForDiscovery, this.isSampleDataCollectionEnabled, this.isAppDefinedRelationDiscoveryEnabled, this.isIncludeAllSchemas, @@ -523,6 +546,10 @@ public Builder copy(SensitiveDataModel model) { if (model.wasPropertyExplicitlySet("sensitiveTypeIdsForDiscovery")) { this.sensitiveTypeIdsForDiscovery(model.getSensitiveTypeIdsForDiscovery()); } + if (model.wasPropertyExplicitlySet("sensitiveTypeGroupIdsForDiscovery")) { + this.sensitiveTypeGroupIdsForDiscovery( + model.getSensitiveTypeGroupIdsForDiscovery()); + } if (model.wasPropertyExplicitlySet("isSampleDataCollectionEnabled")) { this.isSampleDataCollectionEnabled(model.getIsSampleDataCollectionEnabled()); } @@ -742,6 +769,22 @@ public java.util.List getSensitiveTypeIdsForDiscovery() { return sensitiveTypeIdsForDiscovery; } + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeGroupIdsForDiscovery") + private final java.util.List sensitiveTypeGroupIdsForDiscovery; + + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. + * + * @return the value + **/ + public java.util.List getSensitiveTypeGroupIdsForDiscovery() { + return sensitiveTypeGroupIdsForDiscovery; + } + /** * Indicates if data discovery jobs should collect and store sample data values for the discovered columns. * Sample data helps review the discovered columns and ensure that they actually contain sensitive data. @@ -909,6 +952,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", tablesForDiscovery=").append(String.valueOf(this.tablesForDiscovery)); sb.append(", sensitiveTypeIdsForDiscovery=") .append(String.valueOf(this.sensitiveTypeIdsForDiscovery)); + sb.append(", sensitiveTypeGroupIdsForDiscovery=") + .append(String.valueOf(this.sensitiveTypeGroupIdsForDiscovery)); sb.append(", isSampleDataCollectionEnabled=") .append(String.valueOf(this.isSampleDataCollectionEnabled)); sb.append(", isAppDefinedRelationDiscoveryEnabled=") @@ -946,6 +991,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.tablesForDiscovery, other.tablesForDiscovery) && java.util.Objects.equals( this.sensitiveTypeIdsForDiscovery, other.sensitiveTypeIdsForDiscovery) + && java.util.Objects.equals( + this.sensitiveTypeGroupIdsForDiscovery, + other.sensitiveTypeGroupIdsForDiscovery) && java.util.Objects.equals( this.isSampleDataCollectionEnabled, other.isSampleDataCollectionEnabled) && java.util.Objects.equals( @@ -992,6 +1040,11 @@ public int hashCode() { + (this.sensitiveTypeIdsForDiscovery == null ? 43 : this.sensitiveTypeIdsForDiscovery.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeGroupIdsForDiscovery == null + ? 43 + : this.sensitiveTypeGroupIdsForDiscovery.hashCode()); result = (result * PRIME) + (this.isSampleDataCollectionEnabled == null diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveTypeGroup.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveTypeGroup.java new file mode 100644 index 0000000000..bd196e1902 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveTypeGroup.java @@ -0,0 +1,577 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * The details of the sensitive type group. + *
+ * 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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SensitiveTypeGroup.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SensitiveTypeGroup extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "compartmentId", + "lifecycleState", + "timeCreated", + "timeUpdated", + "sensitiveTypeCount", + "freeformTags", + "definedTags", + "systemTags" + }) + public SensitiveTypeGroup( + String id, + String displayName, + String description, + String compartmentId, + SensitiveTypeGroupLifecycleState lifecycleState, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Integer sensitiveTypeCount, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.sensitiveTypeCount = sensitiveTypeCount; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the sensitive type group. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The display name of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the sensitive type group. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The description of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description of the sensitive type group. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The OCID of the compartment that contains the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the sensitive type group. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The current state of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private SensitiveTypeGroupLifecycleState lifecycleState; + + /** + * The current state of the sensitive type group. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(SensitiveTypeGroupLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The date and time the sensitive type group was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the sensitive type group was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * @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 sensitive type group was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the sensitive type group was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/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; + } + /** + * The number of sensitive types in the specified sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeCount") + private Integer sensitiveTypeCount; + + /** + * The number of sensitive types in the specified sensitive type group. + * @param sensitiveTypeCount the value to set + * @return this builder + **/ + public Builder sensitiveTypeCount(Integer sensitiveTypeCount) { + this.sensitiveTypeCount = sensitiveTypeCount; + this.__explicitlySet__.add("sensitiveTypeCount"); + 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. For more information, see Resource Tags. + * 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. For more information, see Resource Tags. + * 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 SensitiveTypeGroup build() { + SensitiveTypeGroup model = + new SensitiveTypeGroup( + this.id, + this.displayName, + this.description, + this.compartmentId, + this.lifecycleState, + this.timeCreated, + this.timeUpdated, + this.sensitiveTypeCount, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SensitiveTypeGroup model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("sensitiveTypeCount")) { + this.sensitiveTypeCount(model.getSensitiveTypeCount()); + } + 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 of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the sensitive type group. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The display name of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the sensitive type group. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The description of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of the sensitive type group. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The OCID of the compartment that contains the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the sensitive type group. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The current state of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final SensitiveTypeGroupLifecycleState lifecycleState; + + /** + * The current state of the sensitive type group. + * @return the value + **/ + public SensitiveTypeGroupLifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The date and time the sensitive type group was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the sensitive type group was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the sensitive type group was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the sensitive type group was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The number of sensitive types in the specified sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeCount") + private final Integer sensitiveTypeCount; + + /** + * The number of sensitive types in the specified sensitive type group. + * @return the value + **/ + public Integer getSensitiveTypeCount() { + return sensitiveTypeCount; + } + + /** + * 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. For more information, see Resource Tags. + * 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. For more information, see Resource Tags. + * 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("SensitiveTypeGroup("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", sensitiveTypeCount=").append(String.valueOf(this.sensitiveTypeCount)); + 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 SensitiveTypeGroup)) { + return false; + } + + SensitiveTypeGroup other = (SensitiveTypeGroup) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.sensitiveTypeCount, other.sensitiveTypeCount) + && 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.description == null ? 43 : this.description.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.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeCount == null + ? 43 + : this.sensitiveTypeCount.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-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveTypeGroupCollection.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveTypeGroupCollection.java new file mode 100644 index 0000000000..45743f415b --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveTypeGroupCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * A collection of sensitive type group summary objects. + *
+ * 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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SensitiveTypeGroupCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SensitiveTypeGroupCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public SensitiveTypeGroupCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An array of sensitive type group summary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * An array of sensitive type group summary 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 SensitiveTypeGroupCollection build() { + SensitiveTypeGroupCollection model = new SensitiveTypeGroupCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SensitiveTypeGroupCollection 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); + } + + /** + * An array of sensitive type group summary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * An array of sensitive type group summary 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("SensitiveTypeGroupCollection("); + 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 SensitiveTypeGroupCollection)) { + return false; + } + + SensitiveTypeGroupCollection other = (SensitiveTypeGroupCollection) 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-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveTypeGroupLifecycleState.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveTypeGroupLifecycleState.java new file mode 100644 index 0000000000..cf391948d9 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveTypeGroupLifecycleState.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * The current state of a sensitive type group + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public enum SensitiveTypeGroupLifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Updating("UPDATING"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SensitiveTypeGroupLifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SensitiveTypeGroupLifecycleState v : SensitiveTypeGroupLifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + SensitiveTypeGroupLifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SensitiveTypeGroupLifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'SensitiveTypeGroupLifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveTypeGroupSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveTypeGroupSummary.java new file mode 100644 index 0000000000..51238d5662 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveTypeGroupSummary.java @@ -0,0 +1,578 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * Summary of the sensitive type group. + *
+ * 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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SensitiveTypeGroupSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SensitiveTypeGroupSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compartmentId", + "timeCreated", + "timeUpdated", + "lifecycleState", + "description", + "sensitiveTypeCount", + "freeformTags", + "definedTags", + "systemTags" + }) + public SensitiveTypeGroupSummary( + String id, + String displayName, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + SensitiveTypeGroupLifecycleState lifecycleState, + String description, + Integer sensitiveTypeCount, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.compartmentId = compartmentId; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.description = description; + this.sensitiveTypeCount = sensitiveTypeCount; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the sensitive type group. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The display name of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the sensitive type group. + * @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 of the compartment that contains sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains sensitive type group. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The date and time the sensitive type group was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the sensitive type group was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * @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 sensitive type group was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the sensitive type group was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/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; + } + /** + * The current state of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private SensitiveTypeGroupLifecycleState lifecycleState; + + /** + * The current state of the sensitive type group. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(SensitiveTypeGroupLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The description of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description of the sensitive type group. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The number of sensitive types in the specified sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeCount") + private Integer sensitiveTypeCount; + + /** + * The number of sensitive types in the specified sensitive type group. + * @param sensitiveTypeCount the value to set + * @return this builder + **/ + public Builder sensitiveTypeCount(Integer sensitiveTypeCount) { + this.sensitiveTypeCount = sensitiveTypeCount; + this.__explicitlySet__.add("sensitiveTypeCount"); + 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. For more information, see Resource Tags. + * 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. For more information, see Resource Tags. + * 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 SensitiveTypeGroupSummary build() { + SensitiveTypeGroupSummary model = + new SensitiveTypeGroupSummary( + this.id, + this.displayName, + this.compartmentId, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.description, + this.sensitiveTypeCount, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SensitiveTypeGroupSummary 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("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("sensitiveTypeCount")) { + this.sensitiveTypeCount(model.getSensitiveTypeCount()); + } + 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 of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the sensitive type group. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The display name of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the sensitive type group. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The OCID of the compartment that contains sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains sensitive type group. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The date and time the sensitive type group was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the sensitive type group was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the sensitive type group was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the sensitive type group was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final SensitiveTypeGroupLifecycleState lifecycleState; + + /** + * The current state of the sensitive type group. + * @return the value + **/ + public SensitiveTypeGroupLifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The description of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of the sensitive type group. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The number of sensitive types in the specified sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeCount") + private final Integer sensitiveTypeCount; + + /** + * The number of sensitive types in the specified sensitive type group. + * @return the value + **/ + public Integer getSensitiveTypeCount() { + return sensitiveTypeCount; + } + + /** + * 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. For more information, see Resource Tags. + * 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. For more information, see Resource Tags. + * 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("SensitiveTypeGroupSummary("); + 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(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", sensitiveTypeCount=").append(String.valueOf(this.sensitiveTypeCount)); + 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 SensitiveTypeGroupSummary)) { + return false; + } + + SensitiveTypeGroupSummary other = (SensitiveTypeGroupSummary) 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.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.sensitiveTypeCount, other.sensitiveTypeCount) + && 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.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.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeCount == null + ? 43 + : this.sensitiveTypeCount.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-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSensitiveDataModelDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSensitiveDataModelDetails.java index 6dbe5f5567..6f93546dc8 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSensitiveDataModelDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSensitiveDataModelDetails.java @@ -31,6 +31,7 @@ public final class UpdateSensitiveDataModelDetails "schemasForDiscovery", "tablesForDiscovery", "sensitiveTypeIdsForDiscovery", + "sensitiveTypeGroupIdsForDiscovery", "isSampleDataCollectionEnabled", "isAppDefinedRelationDiscoveryEnabled", "freeformTags", @@ -44,6 +45,7 @@ public UpdateSensitiveDataModelDetails( java.util.List schemasForDiscovery, java.util.List tablesForDiscovery, java.util.List sensitiveTypeIdsForDiscovery, + java.util.List sensitiveTypeGroupIdsForDiscovery, Boolean isSampleDataCollectionEnabled, Boolean isAppDefinedRelationDiscoveryEnabled, java.util.Map freeformTags, @@ -56,6 +58,7 @@ public UpdateSensitiveDataModelDetails( this.schemasForDiscovery = schemasForDiscovery; this.tablesForDiscovery = tablesForDiscovery; this.sensitiveTypeIdsForDiscovery = sensitiveTypeIdsForDiscovery; + this.sensitiveTypeGroupIdsForDiscovery = sensitiveTypeGroupIdsForDiscovery; this.isSampleDataCollectionEnabled = isSampleDataCollectionEnabled; this.isAppDefinedRelationDiscoveryEnabled = isAppDefinedRelationDiscoveryEnabled; this.freeformTags = freeformTags; @@ -193,6 +196,25 @@ public Builder sensitiveTypeIdsForDiscovery( this.__explicitlySet__.add("sensitiveTypeIdsForDiscovery"); return this; } + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeGroupIdsForDiscovery") + private java.util.List sensitiveTypeGroupIdsForDiscovery; + + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. + * + * @param sensitiveTypeGroupIdsForDiscovery the value to set + * @return this builder + **/ + public Builder sensitiveTypeGroupIdsForDiscovery( + java.util.List sensitiveTypeGroupIdsForDiscovery) { + this.sensitiveTypeGroupIdsForDiscovery = sensitiveTypeGroupIdsForDiscovery; + this.__explicitlySet__.add("sensitiveTypeGroupIdsForDiscovery"); + return this; + } /** * Indicates if data discovery jobs should collect and store sample data values for the discovered columns. * Sample data helps review the discovered columns and ensure that they actually contain sensitive data. @@ -305,6 +327,7 @@ public UpdateSensitiveDataModelDetails build() { this.schemasForDiscovery, this.tablesForDiscovery, this.sensitiveTypeIdsForDiscovery, + this.sensitiveTypeGroupIdsForDiscovery, this.isSampleDataCollectionEnabled, this.isAppDefinedRelationDiscoveryEnabled, this.freeformTags, @@ -338,6 +361,10 @@ public Builder copy(UpdateSensitiveDataModelDetails model) { if (model.wasPropertyExplicitlySet("sensitiveTypeIdsForDiscovery")) { this.sensitiveTypeIdsForDiscovery(model.getSensitiveTypeIdsForDiscovery()); } + if (model.wasPropertyExplicitlySet("sensitiveTypeGroupIdsForDiscovery")) { + this.sensitiveTypeGroupIdsForDiscovery( + model.getSensitiveTypeGroupIdsForDiscovery()); + } if (model.wasPropertyExplicitlySet("isSampleDataCollectionEnabled")) { this.isSampleDataCollectionEnabled(model.getIsSampleDataCollectionEnabled()); } @@ -480,6 +507,22 @@ public java.util.List getSensitiveTypeIdsForDiscovery() { return sensitiveTypeIdsForDiscovery; } + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeGroupIdsForDiscovery") + private final java.util.List sensitiveTypeGroupIdsForDiscovery; + + /** + * The OCIDs of the sensitive type groups to be used by data discovery jobs. + * + * @return the value + **/ + public java.util.List getSensitiveTypeGroupIdsForDiscovery() { + return sensitiveTypeGroupIdsForDiscovery; + } + /** * Indicates if data discovery jobs should collect and store sample data values for the discovered columns. * Sample data helps review the discovered columns and ensure that they actually contain sensitive data. @@ -590,6 +633,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", tablesForDiscovery=").append(String.valueOf(this.tablesForDiscovery)); sb.append(", sensitiveTypeIdsForDiscovery=") .append(String.valueOf(this.sensitiveTypeIdsForDiscovery)); + sb.append(", sensitiveTypeGroupIdsForDiscovery=") + .append(String.valueOf(this.sensitiveTypeGroupIdsForDiscovery)); sb.append(", isSampleDataCollectionEnabled=") .append(String.valueOf(this.isSampleDataCollectionEnabled)); sb.append(", isAppDefinedRelationDiscoveryEnabled=") @@ -618,6 +663,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.tablesForDiscovery, other.tablesForDiscovery) && java.util.Objects.equals( this.sensitiveTypeIdsForDiscovery, other.sensitiveTypeIdsForDiscovery) + && java.util.Objects.equals( + this.sensitiveTypeGroupIdsForDiscovery, + other.sensitiveTypeGroupIdsForDiscovery) && java.util.Objects.equals( this.isSampleDataCollectionEnabled, other.isSampleDataCollectionEnabled) && java.util.Objects.equals( @@ -651,6 +699,11 @@ public int hashCode() { + (this.sensitiveTypeIdsForDiscovery == null ? 43 : this.sensitiveTypeIdsForDiscovery.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeGroupIdsForDiscovery == null + ? 43 + : this.sensitiveTypeGroupIdsForDiscovery.hashCode()); result = (result * PRIME) + (this.isSampleDataCollectionEnabled == null diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSensitiveTypeGroupDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSensitiveTypeGroupDetails.java new file mode 100644 index 0000000000..ccfd45a627 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSensitiveTypeGroupDetails.java @@ -0,0 +1,277 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * Details to update a sensitive type group. + *
+ * 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: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateSensitiveTypeGroupDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateSensitiveTypeGroupDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"displayName", "description", "freeformTags", "definedTags"}) + public UpdateSensitiveTypeGroupDetails( + 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 { + /** + * The display name of the sensitive type group. The name does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the sensitive type group. The 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 description of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description of the sensitive type group. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.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 UpdateSensitiveTypeGroupDetails build() { + UpdateSensitiveTypeGroupDetails model = + new UpdateSensitiveTypeGroupDetails( + 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(UpdateSensitiveTypeGroupDetails 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); + } + + /** + * The display name of the sensitive type group. The name does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the sensitive type group. The name does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The description of the sensitive type group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of the sensitive type group. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.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("UpdateSensitiveTypeGroupDetails("); + 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 UpdateSensitiveTypeGroupDetails)) { + return false; + } + + UpdateSensitiveTypeGroupDetails other = (UpdateSensitiveTypeGroupDetails) 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-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ChangeSensitiveTypeGroupCompartmentRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ChangeSensitiveTypeGroupCompartmentRequest.java new file mode 100644 index 0000000000..dd6274f579 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ChangeSensitiveTypeGroupCompartmentRequest.java @@ -0,0 +1,376 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use ChangeSensitiveTypeGroupCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ChangeSensitiveTypeGroupCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.ChangeSensitiveTypeGroupCompartmentDetails> { + + /** + * The OCID of the sensitive type group. + */ + private String sensitiveTypeGroupId; + + /** + * The OCID of the sensitive type group. + */ + public String getSensitiveTypeGroupId() { + return sensitiveTypeGroupId; + } + /** + * Details of the move compartment request. + */ + private com.oracle.bmc.datasafe.model.ChangeSensitiveTypeGroupCompartmentDetails + changeSensitiveTypeGroupCompartmentDetails; + + /** + * Details of the move compartment request. + */ + public com.oracle.bmc.datasafe.model.ChangeSensitiveTypeGroupCompartmentDetails + getChangeSensitiveTypeGroupCompartmentDetails() { + return changeSensitiveTypeGroupCompartmentDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + 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.datasafe.model.ChangeSensitiveTypeGroupCompartmentDetails getBody$() { + return changeSensitiveTypeGroupCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeSensitiveTypeGroupCompartmentRequest, + com.oracle.bmc.datasafe.model.ChangeSensitiveTypeGroupCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the sensitive type group. + */ + private String sensitiveTypeGroupId = null; + + /** + * The OCID of the sensitive type group. + * @param sensitiveTypeGroupId the value to set + * @return this builder instance + */ + public Builder sensitiveTypeGroupId(String sensitiveTypeGroupId) { + this.sensitiveTypeGroupId = sensitiveTypeGroupId; + return this; + } + + /** + * Details of the move compartment request. + */ + private com.oracle.bmc.datasafe.model.ChangeSensitiveTypeGroupCompartmentDetails + changeSensitiveTypeGroupCompartmentDetails = null; + + /** + * Details of the move compartment request. + * @param changeSensitiveTypeGroupCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeSensitiveTypeGroupCompartmentDetails( + com.oracle.bmc.datasafe.model.ChangeSensitiveTypeGroupCompartmentDetails + changeSensitiveTypeGroupCompartmentDetails) { + this.changeSensitiveTypeGroupCompartmentDetails = + changeSensitiveTypeGroupCompartmentDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + 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; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. 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(ChangeSensitiveTypeGroupCompartmentRequest o) { + sensitiveTypeGroupId(o.getSensitiveTypeGroupId()); + changeSensitiveTypeGroupCompartmentDetails( + o.getChangeSensitiveTypeGroupCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeSensitiveTypeGroupCompartmentRequest 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 ChangeSensitiveTypeGroupCompartmentRequest + */ + public ChangeSensitiveTypeGroupCompartmentRequest build() { + ChangeSensitiveTypeGroupCompartmentRequest 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.datasafe.model.ChangeSensitiveTypeGroupCompartmentDetails body) { + changeSensitiveTypeGroupCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeSensitiveTypeGroupCompartmentRequest 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 ChangeSensitiveTypeGroupCompartmentRequest + */ + public ChangeSensitiveTypeGroupCompartmentRequest buildWithoutInvocationCallback() { + ChangeSensitiveTypeGroupCompartmentRequest request = + new ChangeSensitiveTypeGroupCompartmentRequest(); + request.sensitiveTypeGroupId = sensitiveTypeGroupId; + request.changeSensitiveTypeGroupCompartmentDetails = + changeSensitiveTypeGroupCompartmentDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeSensitiveTypeGroupCompartmentRequest(sensitiveTypeGroupId, changeSensitiveTypeGroupCompartmentDetails, 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() + .sensitiveTypeGroupId(sensitiveTypeGroupId) + .changeSensitiveTypeGroupCompartmentDetails( + changeSensitiveTypeGroupCompartmentDetails) + .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(",sensitiveTypeGroupId=").append(String.valueOf(this.sensitiveTypeGroupId)); + sb.append(",changeSensitiveTypeGroupCompartmentDetails=") + .append(String.valueOf(this.changeSensitiveTypeGroupCompartmentDetails)); + 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 ChangeSensitiveTypeGroupCompartmentRequest)) { + return false; + } + + ChangeSensitiveTypeGroupCompartmentRequest other = + (ChangeSensitiveTypeGroupCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.sensitiveTypeGroupId, other.sensitiveTypeGroupId) + && java.util.Objects.equals( + this.changeSensitiveTypeGroupCompartmentDetails, + other.changeSensitiveTypeGroupCompartmentDetails) + && 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.sensitiveTypeGroupId == null + ? 43 + : this.sensitiveTypeGroupId.hashCode()); + result = + (result * PRIME) + + (this.changeSensitiveTypeGroupCompartmentDetails == null + ? 43 + : this.changeSensitiveTypeGroupCompartmentDetails.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-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/CreateSensitiveTypeGroupRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/CreateSensitiveTypeGroupRequest.java new file mode 100644 index 0000000000..86d9bc6b9f --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/CreateSensitiveTypeGroupRequest.java @@ -0,0 +1,280 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use CreateSensitiveTypeGroupRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class CreateSensitiveTypeGroupRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.CreateSensitiveTypeGroupDetails> { + + /** + * Details of the sensitive type group. + */ + private com.oracle.bmc.datasafe.model.CreateSensitiveTypeGroupDetails + createSensitiveTypeGroupDetails; + + /** + * Details of the sensitive type group. + */ + public com.oracle.bmc.datasafe.model.CreateSensitiveTypeGroupDetails + getCreateSensitiveTypeGroupDetails() { + return createSensitiveTypeGroupDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. 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; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.CreateSensitiveTypeGroupDetails getBody$() { + return createSensitiveTypeGroupDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateSensitiveTypeGroupRequest, + com.oracle.bmc.datasafe.model.CreateSensitiveTypeGroupDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details of the sensitive type group. + */ + private com.oracle.bmc.datasafe.model.CreateSensitiveTypeGroupDetails + createSensitiveTypeGroupDetails = null; + + /** + * Details of the sensitive type group. + * @param createSensitiveTypeGroupDetails the value to set + * @return this builder instance + */ + public Builder createSensitiveTypeGroupDetails( + com.oracle.bmc.datasafe.model.CreateSensitiveTypeGroupDetails + createSensitiveTypeGroupDetails) { + this.createSensitiveTypeGroupDetails = createSensitiveTypeGroupDetails; + 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; + } + + /** + * 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(CreateSensitiveTypeGroupRequest o) { + createSensitiveTypeGroupDetails(o.getCreateSensitiveTypeGroupDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateSensitiveTypeGroupRequest 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 CreateSensitiveTypeGroupRequest + */ + public CreateSensitiveTypeGroupRequest build() { + CreateSensitiveTypeGroupRequest 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.datasafe.model.CreateSensitiveTypeGroupDetails body) { + createSensitiveTypeGroupDetails(body); + return this; + } + + /** + * Build the instance of CreateSensitiveTypeGroupRequest 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 CreateSensitiveTypeGroupRequest + */ + public CreateSensitiveTypeGroupRequest buildWithoutInvocationCallback() { + CreateSensitiveTypeGroupRequest request = new CreateSensitiveTypeGroupRequest(); + request.createSensitiveTypeGroupDetails = createSensitiveTypeGroupDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateSensitiveTypeGroupRequest(createSensitiveTypeGroupDetails, 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() + .createSensitiveTypeGroupDetails(createSensitiveTypeGroupDetails) + .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(",createSensitiveTypeGroupDetails=") + .append(String.valueOf(this.createSensitiveTypeGroupDetails)); + 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 CreateSensitiveTypeGroupRequest)) { + return false; + } + + CreateSensitiveTypeGroupRequest other = (CreateSensitiveTypeGroupRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createSensitiveTypeGroupDetails, other.createSensitiveTypeGroupDetails) + && 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.createSensitiveTypeGroupDetails == null + ? 43 + : this.createSensitiveTypeGroupDetails.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-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteMaskingReportRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteMaskingReportRequest.java new file mode 100644 index 0000000000..594da65e53 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteMaskingReportRequest.java @@ -0,0 +1,249 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use DeleteMaskingReportRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteMaskingReportRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the masking report. + */ + private String maskingReportId; + + /** + * The OCID of the masking report. + */ + public String getMaskingReportId() { + return maskingReportId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * 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< + DeleteMaskingReportRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the masking report. + */ + private String maskingReportId = null; + + /** + * The OCID of the masking report. + * @param maskingReportId the value to set + * @return this builder instance + */ + public Builder maskingReportId(String maskingReportId) { + this.maskingReportId = maskingReportId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + 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(DeleteMaskingReportRequest o) { + maskingReportId(o.getMaskingReportId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteMaskingReportRequest 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 DeleteMaskingReportRequest + */ + public DeleteMaskingReportRequest build() { + DeleteMaskingReportRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteMaskingReportRequest 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 DeleteMaskingReportRequest + */ + public DeleteMaskingReportRequest buildWithoutInvocationCallback() { + DeleteMaskingReportRequest request = new DeleteMaskingReportRequest(); + request.maskingReportId = maskingReportId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteMaskingReportRequest(maskingReportId, 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() + .maskingReportId(maskingReportId) + .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(",maskingReportId=").append(String.valueOf(this.maskingReportId)); + 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 DeleteMaskingReportRequest)) { + return false; + } + + DeleteMaskingReportRequest other = (DeleteMaskingReportRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.maskingReportId, other.maskingReportId) + && 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.maskingReportId == null ? 43 : this.maskingReportId.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-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteSensitiveTypeGroupRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteSensitiveTypeGroupRequest.java new file mode 100644 index 0000000000..d84938ec4d --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteSensitiveTypeGroupRequest.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use DeleteSensitiveTypeGroupRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteSensitiveTypeGroupRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the sensitive type group. + */ + private String sensitiveTypeGroupId; + + /** + * The OCID of the sensitive type group. + */ + public String getSensitiveTypeGroupId() { + return sensitiveTypeGroupId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * 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< + DeleteSensitiveTypeGroupRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the sensitive type group. + */ + private String sensitiveTypeGroupId = null; + + /** + * The OCID of the sensitive type group. + * @param sensitiveTypeGroupId the value to set + * @return this builder instance + */ + public Builder sensitiveTypeGroupId(String sensitiveTypeGroupId) { + this.sensitiveTypeGroupId = sensitiveTypeGroupId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + 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(DeleteSensitiveTypeGroupRequest o) { + sensitiveTypeGroupId(o.getSensitiveTypeGroupId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSensitiveTypeGroupRequest 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 DeleteSensitiveTypeGroupRequest + */ + public DeleteSensitiveTypeGroupRequest build() { + DeleteSensitiveTypeGroupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSensitiveTypeGroupRequest 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 DeleteSensitiveTypeGroupRequest + */ + public DeleteSensitiveTypeGroupRequest buildWithoutInvocationCallback() { + DeleteSensitiveTypeGroupRequest request = new DeleteSensitiveTypeGroupRequest(); + request.sensitiveTypeGroupId = sensitiveTypeGroupId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteSensitiveTypeGroupRequest(sensitiveTypeGroupId, 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() + .sensitiveTypeGroupId(sensitiveTypeGroupId) + .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(",sensitiveTypeGroupId=").append(String.valueOf(this.sensitiveTypeGroupId)); + 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 DeleteSensitiveTypeGroupRequest)) { + return false; + } + + DeleteSensitiveTypeGroupRequest other = (DeleteSensitiveTypeGroupRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.sensitiveTypeGroupId, other.sensitiveTypeGroupId) + && 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.sensitiveTypeGroupId == null + ? 43 + : this.sensitiveTypeGroupId.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-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/GetSensitiveTypeGroupRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/GetSensitiveTypeGroupRequest.java new file mode 100644 index 0000000000..ecc05d91ff --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/GetSensitiveTypeGroupRequest.java @@ -0,0 +1,198 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use GetSensitiveTypeGroupRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class GetSensitiveTypeGroupRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the sensitive type group. + */ + private String sensitiveTypeGroupId; + + /** + * The OCID of the sensitive type group. + */ + public String getSensitiveTypeGroupId() { + return sensitiveTypeGroupId; + } + /** + * 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< + GetSensitiveTypeGroupRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the sensitive type group. + */ + private String sensitiveTypeGroupId = null; + + /** + * The OCID of the sensitive type group. + * @param sensitiveTypeGroupId the value to set + * @return this builder instance + */ + public Builder sensitiveTypeGroupId(String sensitiveTypeGroupId) { + this.sensitiveTypeGroupId = sensitiveTypeGroupId; + 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(GetSensitiveTypeGroupRequest o) { + sensitiveTypeGroupId(o.getSensitiveTypeGroupId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSensitiveTypeGroupRequest 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 GetSensitiveTypeGroupRequest + */ + public GetSensitiveTypeGroupRequest build() { + GetSensitiveTypeGroupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSensitiveTypeGroupRequest 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 GetSensitiveTypeGroupRequest + */ + public GetSensitiveTypeGroupRequest buildWithoutInvocationCallback() { + GetSensitiveTypeGroupRequest request = new GetSensitiveTypeGroupRequest(); + request.sensitiveTypeGroupId = sensitiveTypeGroupId; + request.opcRequestId = opcRequestId; + return request; + // new GetSensitiveTypeGroupRequest(sensitiveTypeGroupId, 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().sensitiveTypeGroupId(sensitiveTypeGroupId).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(",sensitiveTypeGroupId=").append(String.valueOf(this.sensitiveTypeGroupId)); + 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 GetSensitiveTypeGroupRequest)) { + return false; + } + + GetSensitiveTypeGroupRequest other = (GetSensitiveTypeGroupRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.sensitiveTypeGroupId, other.sensitiveTypeGroupId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.sensitiveTypeGroupId == null + ? 43 + : this.sensitiveTypeGroupId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListFindingsRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListFindingsRequest.java index 631cfac841..5b2970293c 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListFindingsRequest.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListFindingsRequest.java @@ -225,6 +225,170 @@ public AccessLevel getAccessLevel() { public String getTargetId() { return targetId; } + /** + * The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + * of the System for Cross-Domain Identity Management (SCIM) specification, which is available + * at [RFC3339](https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, + * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + * (Numeric and boolean values should not be quoted.) + *

+ **Example:** | + * scimQuery=(severity eq 'high') and (targetId eq 'target_1') + * scimQuery=(category eq "Users") and (targetId eq "target_1") + * scimQuery=(reference eq 'CIS') and (targetId eq 'target_1') + *

+ * Supported fields: + * severity + * findingKey + * reference + * targetId + * isTopFinding + * title + * category + * remarks + * details + * summary + * isRiskModified + * + */ + private String scimQuery; + + /** + * The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + * of the System for Cross-Domain Identity Management (SCIM) specification, which is available + * at [RFC3339](https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, + * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + * (Numeric and boolean values should not be quoted.) + *

+ **Example:** | + * scimQuery=(severity eq 'high') and (targetId eq 'target_1') + * scimQuery=(category eq "Users") and (targetId eq "target_1") + * scimQuery=(reference eq 'CIS') and (targetId eq 'target_1') + *

+ * Supported fields: + * severity + * findingKey + * reference + * targetId + * isTopFinding + * title + * category + * remarks + * details + * summary + * isRiskModified + * + */ + public String getScimQuery() { + return scimQuery; + } + /** + * Specifies a subset of fields to be returned in the response. + */ + private java.util.List field; + + /** + * Specifies a subset of fields to be returned in the response. + **/ + public enum Field { + Severity("severity"), + FindingKey("findingKey"), + Reference("reference"), + TargetId("targetId"), + IsTopFinding("isTopFinding"), + Title("title"), + Category("category"), + Remarks("remarks"), + Details("details"), + Summary("summary"), + IsRiskModified("isRiskModified"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Field v : Field.values()) { + map.put(v.getValue(), v); + } + } + + Field(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Field create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Field: " + key); + } + }; + + /** + * Specifies a subset of fields to be returned in the response. + */ + public java.util.List getField() { + return field; + } + /** + * The field to sort by. You can specify only one sort order(sortOrder). The default order for category is alphabetical. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can specify only one sort order(sortOrder). The default order for category is alphabetical. + * + **/ + public enum SortBy { + Category("category"), + FindingKey("findingKey"), + Severity("severity"), + ; + + 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 specify only one sort order(sortOrder). The default order for category is alphabetical. + * + */ + public SortBy getSortBy() { + return sortBy; + } /** * Each finding in security assessment has an associated key (think of key as a finding's name). * For a given finding, the key will be the same across targets. The user can use these keys to filter the findings. @@ -427,6 +591,108 @@ public Builder targetId(String targetId) { return this; } + /** + * The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + * of the System for Cross-Domain Identity Management (SCIM) specification, which is available + * at [RFC3339](https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, + * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + * (Numeric and boolean values should not be quoted.) + *

+ **Example:** | + * scimQuery=(severity eq 'high') and (targetId eq 'target_1') + * scimQuery=(category eq "Users") and (targetId eq "target_1") + * scimQuery=(reference eq 'CIS') and (targetId eq 'target_1') + *

+ * Supported fields: + * severity + * findingKey + * reference + * targetId + * isTopFinding + * title + * category + * remarks + * details + * summary + * isRiskModified + * + */ + private String scimQuery = null; + + /** + * The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + * of the System for Cross-Domain Identity Management (SCIM) specification, which is available + * at [RFC3339](https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, + * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + * (Numeric and boolean values should not be quoted.) + *

+ **Example:** | + * scimQuery=(severity eq 'high') and (targetId eq 'target_1') + * scimQuery=(category eq "Users") and (targetId eq "target_1") + * scimQuery=(reference eq 'CIS') and (targetId eq 'target_1') + *

+ * Supported fields: + * severity + * findingKey + * reference + * targetId + * isTopFinding + * title + * category + * remarks + * details + * summary + * isRiskModified + * + * @param scimQuery the value to set + * @return this builder instance + */ + public Builder scimQuery(String scimQuery) { + this.scimQuery = scimQuery; + return this; + } + + /** + * Specifies a subset of fields to be returned in the response. + */ + private java.util.List field = null; + + /** + * Specifies a subset of fields to be returned in the response. + * @param field the value to set + * @return this builder instance + */ + public Builder field(java.util.List field) { + this.field = field; + return this; + } + + /** + * Singular setter. Specifies a subset of fields to be returned in the response. + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder field(Field singularValue) { + return this.field(java.util.Arrays.asList(singularValue)); + } + + /** + * The field to sort by. You can specify only one sort order(sortOrder). The default order for category is alphabetical. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can specify only one sort order(sortOrder). The default order for category is alphabetical. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + /** * Each finding in security assessment has an associated key (think of key as a finding's name). * For a given finding, the key will be the same across targets. The user can use these keys to filter the findings. @@ -485,6 +751,9 @@ public Builder copy(ListFindingsRequest o) { compartmentIdInSubtree(o.getCompartmentIdInSubtree()); accessLevel(o.getAccessLevel()); targetId(o.getTargetId()); + scimQuery(o.getScimQuery()); + field(o.getField()); + sortBy(o.getSortBy()); findingKey(o.getFindingKey()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); @@ -529,9 +798,12 @@ public ListFindingsRequest buildWithoutInvocationCallback() { request.compartmentIdInSubtree = compartmentIdInSubtree; request.accessLevel = accessLevel; request.targetId = targetId; + request.scimQuery = scimQuery; + request.field = field; + request.sortBy = sortBy; request.findingKey = findingKey; return request; - // new ListFindingsRequest(securityAssessmentId, opcRequestId, isTopFinding, severity, lifecycleState, references, limit, page, compartmentIdInSubtree, accessLevel, targetId, findingKey); + // new ListFindingsRequest(securityAssessmentId, opcRequestId, isTopFinding, severity, lifecycleState, references, limit, page, compartmentIdInSubtree, accessLevel, targetId, scimQuery, field, sortBy, findingKey); } } @@ -552,6 +824,9 @@ public Builder toBuilder() { .compartmentIdInSubtree(compartmentIdInSubtree) .accessLevel(accessLevel) .targetId(targetId) + .scimQuery(scimQuery) + .field(field) + .sortBy(sortBy) .findingKey(findingKey); } @@ -579,6 +854,9 @@ public String toString() { sb.append(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); sb.append(",accessLevel=").append(String.valueOf(this.accessLevel)); sb.append(",targetId=").append(String.valueOf(this.targetId)); + sb.append(",scimQuery=").append(String.valueOf(this.scimQuery)); + sb.append(",field=").append(String.valueOf(this.field)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); sb.append(",findingKey=").append(String.valueOf(this.findingKey)); sb.append(")"); return sb.toString(); @@ -607,6 +885,9 @@ public boolean equals(Object o) { this.compartmentIdInSubtree, other.compartmentIdInSubtree) && java.util.Objects.equals(this.accessLevel, other.accessLevel) && java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.scimQuery, other.scimQuery) + && java.util.Objects.equals(this.field, other.field) + && java.util.Objects.equals(this.sortBy, other.sortBy) && java.util.Objects.equals(this.findingKey, other.findingKey); } @@ -635,6 +916,9 @@ public int hashCode() { : this.compartmentIdInSubtree.hashCode()); result = (result * PRIME) + (this.accessLevel == null ? 43 : this.accessLevel.hashCode()); result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = (result * PRIME) + (this.scimQuery == null ? 43 : this.scimQuery.hashCode()); + result = (result * PRIME) + (this.field == null ? 43 : this.field.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); result = (result * PRIME) + (this.findingKey == null ? 43 : this.findingKey.hashCode()); return result; } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListGroupedSensitiveTypesRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListGroupedSensitiveTypesRequest.java new file mode 100644 index 0000000000..a87f736d83 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListGroupedSensitiveTypesRequest.java @@ -0,0 +1,298 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use ListGroupedSensitiveTypesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListGroupedSensitiveTypesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the sensitive type group. + */ + private String sensitiveTypeGroupId; + + /** + * The OCID of the sensitive type group. + */ + public String getSensitiveTypeGroupId() { + return sensitiveTypeGroupId; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A filter to return only items related to a specific sensitive type OCID. + */ + private String sensitiveTypeId; + + /** + * A filter to return only items related to a specific sensitive type OCID. + */ + public String getSensitiveTypeId() { + return sensitiveTypeId; + } + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit; + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page; + + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public String getPage() { + return page; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListGroupedSensitiveTypesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the sensitive type group. + */ + private String sensitiveTypeGroupId = null; + + /** + * The OCID of the sensitive type group. + * @param sensitiveTypeGroupId the value to set + * @return this builder instance + */ + public Builder sensitiveTypeGroupId(String sensitiveTypeGroupId) { + this.sensitiveTypeGroupId = sensitiveTypeGroupId; + 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; + } + + /** + * A filter to return only items related to a specific sensitive type OCID. + */ + private String sensitiveTypeId = null; + + /** + * A filter to return only items related to a specific sensitive type OCID. + * @param sensitiveTypeId the value to set + * @return this builder instance + */ + public Builder sensitiveTypeId(String sensitiveTypeId) { + this.sensitiveTypeId = sensitiveTypeId; + return this; + } + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/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 page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page = null; + + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/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; + } + + /** + * 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(ListGroupedSensitiveTypesRequest o) { + sensitiveTypeGroupId(o.getSensitiveTypeGroupId()); + opcRequestId(o.getOpcRequestId()); + sensitiveTypeId(o.getSensitiveTypeId()); + limit(o.getLimit()); + page(o.getPage()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListGroupedSensitiveTypesRequest 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 ListGroupedSensitiveTypesRequest + */ + public ListGroupedSensitiveTypesRequest build() { + ListGroupedSensitiveTypesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListGroupedSensitiveTypesRequest 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 ListGroupedSensitiveTypesRequest + */ + public ListGroupedSensitiveTypesRequest buildWithoutInvocationCallback() { + ListGroupedSensitiveTypesRequest request = new ListGroupedSensitiveTypesRequest(); + request.sensitiveTypeGroupId = sensitiveTypeGroupId; + request.opcRequestId = opcRequestId; + request.sensitiveTypeId = sensitiveTypeId; + request.limit = limit; + request.page = page; + return request; + // new ListGroupedSensitiveTypesRequest(sensitiveTypeGroupId, opcRequestId, sensitiveTypeId, limit, page); + } + } + + /** + * 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() + .sensitiveTypeGroupId(sensitiveTypeGroupId) + .opcRequestId(opcRequestId) + .sensitiveTypeId(sensitiveTypeId) + .limit(limit) + .page(page); + } + + /** + * 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(",sensitiveTypeGroupId=").append(String.valueOf(this.sensitiveTypeGroupId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sensitiveTypeId=").append(String.valueOf(this.sensitiveTypeId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListGroupedSensitiveTypesRequest)) { + return false; + } + + ListGroupedSensitiveTypesRequest other = (ListGroupedSensitiveTypesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.sensitiveTypeGroupId, other.sensitiveTypeGroupId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sensitiveTypeId, other.sensitiveTypeId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.sensitiveTypeGroupId == null + ? 43 + : this.sensitiveTypeGroupId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeId == null ? 43 : this.sensitiveTypeId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListMaskingErrorsRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListMaskingErrorsRequest.java new file mode 100644 index 0000000000..cba630da04 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListMaskingErrorsRequest.java @@ -0,0 +1,466 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use ListMaskingErrorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListMaskingErrorsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the masking report. + */ + private String maskingReportId; + + /** + * The OCID of the masking report. + */ + public String getMaskingReportId() { + return maskingReportId; + } + /** + * A filter to return only masking errors that match the specified step name. + */ + private StepName stepName; + + /** + * A filter to return only masking errors that match the specified step name. + **/ + public enum StepName { + ExecuteMasking("EXECUTE_MASKING"), + PreMasking("PRE_MASKING"), + PostMasking("POST_MASKING"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (StepName v : StepName.values()) { + map.put(v.getValue(), v); + } + } + + StepName(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static StepName create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid StepName: " + key); + } + }; + + /** + * A filter to return only masking errors that match the specified step name. + */ + public StepName getStepName() { + return stepName; + } + /** + * The field to sort by. The default order will be ascending. + */ + private SortBy sortBy; + + /** + * The field to sort by. The default order will be ascending. + **/ + public enum SortBy { + StepName("stepName"), + 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. The default order will be ascending. + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit; + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page; + + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either ascending (ASC) or descending (DESC). + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (ASC) or descending (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, either ascending (ASC) or descending (DESC). + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * 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< + ListMaskingErrorsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the masking report. + */ + private String maskingReportId = null; + + /** + * The OCID of the masking report. + * @param maskingReportId the value to set + * @return this builder instance + */ + public Builder maskingReportId(String maskingReportId) { + this.maskingReportId = maskingReportId; + return this; + } + + /** + * A filter to return only masking errors that match the specified step name. + */ + private StepName stepName = null; + + /** + * A filter to return only masking errors that match the specified step name. + * @param stepName the value to set + * @return this builder instance + */ + public Builder stepName(StepName stepName) { + this.stepName = stepName; + return this; + } + + /** + * The field to sort by. The default order will be ascending. + */ + private SortBy sortBy = null; + + /** + * The field to sort by. The default order will be ascending. + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/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 page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page = null; + + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/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 (ASC) or descending (DESC). + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending (ASC) or descending (DESC). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + 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(ListMaskingErrorsRequest o) { + maskingReportId(o.getMaskingReportId()); + stepName(o.getStepName()); + sortBy(o.getSortBy()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListMaskingErrorsRequest 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 ListMaskingErrorsRequest + */ + public ListMaskingErrorsRequest build() { + ListMaskingErrorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListMaskingErrorsRequest 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 ListMaskingErrorsRequest + */ + public ListMaskingErrorsRequest buildWithoutInvocationCallback() { + ListMaskingErrorsRequest request = new ListMaskingErrorsRequest(); + request.maskingReportId = maskingReportId; + request.stepName = stepName; + request.sortBy = sortBy; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.opcRequestId = opcRequestId; + return request; + // new ListMaskingErrorsRequest(maskingReportId, stepName, sortBy, limit, page, sortOrder, 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() + .maskingReportId(maskingReportId) + .stepName(stepName) + .sortBy(sortBy) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .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(",maskingReportId=").append(String.valueOf(this.maskingReportId)); + sb.append(",stepName=").append(String.valueOf(this.stepName)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + 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(",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 ListMaskingErrorsRequest)) { + return false; + } + + ListMaskingErrorsRequest other = (ListMaskingErrorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.maskingReportId, other.maskingReportId) + && java.util.Objects.equals(this.stepName, other.stepName) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && 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.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.maskingReportId == null ? 43 : this.maskingReportId.hashCode()); + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.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.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListSensitiveColumnAnalyticsRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListSensitiveColumnAnalyticsRequest.java new file mode 100644 index 0000000000..eaae886c59 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListSensitiveColumnAnalyticsRequest.java @@ -0,0 +1,743 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use ListSensitiveColumnAnalyticsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListSensitiveColumnAnalyticsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * A filter to return only resources that match the specified compartment OCID. + */ + private String compartmentId; + + /** + * A filter to return only resources that match the specified compartment OCID. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Default is false. + * When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + * + */ + private Boolean compartmentIdInSubtree; + + /** + * Default is false. + * When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + * + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } + /** + * Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + * Setting this to ACCESSIBLE returns only those compartments for which the + * user has INSPECT permissions directly or indirectly (permissions can be on a + * resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + * + */ + private AccessLevel accessLevel; + + /** + * Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + * Setting this to ACCESSIBLE returns only those compartments for which the + * user has INSPECT permissions directly or indirectly (permissions can be on a + * resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + * + **/ + public enum AccessLevel { + Restricted("RESTRICTED"), + Accessible("ACCESSIBLE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AccessLevel v : AccessLevel.values()) { + map.put(v.getValue(), v); + } + } + + AccessLevel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AccessLevel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid AccessLevel: " + key); + } + }; + + /** + * Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + * Setting this to ACCESSIBLE returns only those compartments for which the + * user has INSPECT permissions directly or indirectly (permissions can be on a + * resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + * + */ + public AccessLevel getAccessLevel() { + return accessLevel; + } + /** + * A filter to return only items related to a specific target OCID. + */ + private String targetId; + + /** + * A filter to return only items related to a specific target OCID. + */ + public String getTargetId() { + return targetId; + } + /** + * A filter to return only the sensitive columns that are associated with one of the sensitive types identified by the specified OCIDs. + */ + private java.util.List sensitiveTypeId; + + /** + * A filter to return only the sensitive columns that are associated with one of the sensitive types identified by the specified OCIDs. + */ + public java.util.List getSensitiveTypeId() { + return sensitiveTypeId; + } + /** + * An optional filter to return only resources that match the specified OCID of the sensitive type group resource. + */ + private String sensitiveTypeGroupId; + + /** + * An optional filter to return only resources that match the specified OCID of the sensitive type group resource. + */ + public String getSensitiveTypeGroupId() { + return sensitiveTypeGroupId; + } + /** + * A filter to return only the resources that match the specified sensitive data model OCID. + */ + private String sensitiveDataModelId; + + /** + * A filter to return only the resources that match the specified sensitive data model OCID. + */ + public String getSensitiveDataModelId() { + return sensitiveDataModelId; + } + /** + * The group by parameter to summarize the sensitive columns. + */ + private java.util.List groupBy; + + /** + * The group by parameter to summarize the sensitive columns. + **/ + public enum GroupBy { + TargetId("targetId"), + SensitiveTypeId("sensitiveTypeId"), + SensitiveDataModelId("sensitiveDataModelId"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (GroupBy v : GroupBy.values()) { + map.put(v.getValue(), v); + } + } + + GroupBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static GroupBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid GroupBy: " + key); + } + }; + + /** + * The group by parameter to summarize the sensitive columns. + */ + public java.util.List getGroupBy() { + return groupBy; + } + /** + * A filter to return only items related to specific schema name. + */ + private java.util.List schemaName; + + /** + * A filter to return only items related to specific schema name. + */ + public java.util.List getSchemaName() { + return schemaName; + } + /** + * A filter to return only items related to a specific object name. + */ + private java.util.List objectName; + + /** + * A filter to return only items related to a specific object name. + */ + public java.util.List getObjectName() { + return objectName; + } + /** + * A filter to return only a specific column based on column name. + */ + private java.util.List columnName; + + /** + * A filter to return only a specific column based on column name. + */ + public java.util.List getColumnName() { + return columnName; + } + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit; + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page; + + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + 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< + ListSensitiveColumnAnalyticsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A filter to return only resources that match the specified compartment OCID. + */ + private String compartmentId = null; + + /** + * A filter to return only resources that match the specified compartment OCID. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Default is false. + * When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + * + */ + private Boolean compartmentIdInSubtree = null; + + /** + * Default is false. + * When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + * + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + + /** + * Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + * Setting this to ACCESSIBLE returns only those compartments for which the + * user has INSPECT permissions directly or indirectly (permissions can be on a + * resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + * + */ + private AccessLevel accessLevel = null; + + /** + * Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + * Setting this to ACCESSIBLE returns only those compartments for which the + * user has INSPECT permissions directly or indirectly (permissions can be on a + * resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + * + * @param accessLevel the value to set + * @return this builder instance + */ + public Builder accessLevel(AccessLevel accessLevel) { + this.accessLevel = accessLevel; + return this; + } + + /** + * A filter to return only items related to a specific target OCID. + */ + private String targetId = null; + + /** + * A filter to return only items related to a specific target OCID. + * @param targetId the value to set + * @return this builder instance + */ + public Builder targetId(String targetId) { + this.targetId = targetId; + return this; + } + + /** + * A filter to return only the sensitive columns that are associated with one of the sensitive types identified by the specified OCIDs. + */ + private java.util.List sensitiveTypeId = null; + + /** + * A filter to return only the sensitive columns that are associated with one of the sensitive types identified by the specified OCIDs. + * @param sensitiveTypeId the value to set + * @return this builder instance + */ + public Builder sensitiveTypeId(java.util.List sensitiveTypeId) { + this.sensitiveTypeId = sensitiveTypeId; + return this; + } + + /** + * Singular setter. A filter to return only the sensitive columns that are associated with one of the sensitive types identified by the specified OCIDs. + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder sensitiveTypeId(String singularValue) { + return this.sensitiveTypeId(java.util.Arrays.asList(singularValue)); + } + + /** + * An optional filter to return only resources that match the specified OCID of the sensitive type group resource. + */ + private String sensitiveTypeGroupId = null; + + /** + * An optional filter to return only resources that match the specified OCID of the sensitive type group resource. + * @param sensitiveTypeGroupId the value to set + * @return this builder instance + */ + public Builder sensitiveTypeGroupId(String sensitiveTypeGroupId) { + this.sensitiveTypeGroupId = sensitiveTypeGroupId; + return this; + } + + /** + * A filter to return only the resources that match the specified sensitive data model OCID. + */ + private String sensitiveDataModelId = null; + + /** + * A filter to return only the resources that match the specified sensitive data model OCID. + * @param sensitiveDataModelId the value to set + * @return this builder instance + */ + public Builder sensitiveDataModelId(String sensitiveDataModelId) { + this.sensitiveDataModelId = sensitiveDataModelId; + return this; + } + + /** + * The group by parameter to summarize the sensitive columns. + */ + private java.util.List groupBy = null; + + /** + * The group by parameter to summarize the sensitive columns. + * @param groupBy the value to set + * @return this builder instance + */ + public Builder groupBy(java.util.List groupBy) { + this.groupBy = groupBy; + return this; + } + + /** + * Singular setter. The group by parameter to summarize the sensitive columns. + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder groupBy(GroupBy singularValue) { + return this.groupBy(java.util.Arrays.asList(singularValue)); + } + + /** + * A filter to return only items related to specific schema name. + */ + private java.util.List schemaName = null; + + /** + * A filter to return only items related to specific schema name. + * @param schemaName the value to set + * @return this builder instance + */ + public Builder schemaName(java.util.List schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Singular setter. A filter to return only items related to specific schema name. + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder schemaName(String singularValue) { + return this.schemaName(java.util.Arrays.asList(singularValue)); + } + + /** + * A filter to return only items related to a specific object name. + */ + private java.util.List objectName = null; + + /** + * A filter to return only items related to a specific object name. + * @param objectName the value to set + * @return this builder instance + */ + public Builder objectName(java.util.List objectName) { + this.objectName = objectName; + return this; + } + + /** + * Singular setter. A filter to return only items related to a specific object name. + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder objectName(String singularValue) { + return this.objectName(java.util.Arrays.asList(singularValue)); + } + + /** + * A filter to return only a specific column based on column name. + */ + private java.util.List columnName = null; + + /** + * A filter to return only a specific column based on column name. + * @param columnName the value to set + * @return this builder instance + */ + public Builder columnName(java.util.List columnName) { + this.columnName = columnName; + return this; + } + + /** + * Singular setter. A filter to return only a specific column based on column name. + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder columnName(String singularValue) { + return this.columnName(java.util.Arrays.asList(singularValue)); + } + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/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 page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page = null; + + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/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 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(ListSensitiveColumnAnalyticsRequest o) { + compartmentId(o.getCompartmentId()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); + accessLevel(o.getAccessLevel()); + targetId(o.getTargetId()); + sensitiveTypeId(o.getSensitiveTypeId()); + sensitiveTypeGroupId(o.getSensitiveTypeGroupId()); + sensitiveDataModelId(o.getSensitiveDataModelId()); + groupBy(o.getGroupBy()); + schemaName(o.getSchemaName()); + objectName(o.getObjectName()); + columnName(o.getColumnName()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSensitiveColumnAnalyticsRequest 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 ListSensitiveColumnAnalyticsRequest + */ + public ListSensitiveColumnAnalyticsRequest build() { + ListSensitiveColumnAnalyticsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSensitiveColumnAnalyticsRequest 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 ListSensitiveColumnAnalyticsRequest + */ + public ListSensitiveColumnAnalyticsRequest buildWithoutInvocationCallback() { + ListSensitiveColumnAnalyticsRequest request = new ListSensitiveColumnAnalyticsRequest(); + request.compartmentId = compartmentId; + request.compartmentIdInSubtree = compartmentIdInSubtree; + request.accessLevel = accessLevel; + request.targetId = targetId; + request.sensitiveTypeId = sensitiveTypeId; + request.sensitiveTypeGroupId = sensitiveTypeGroupId; + request.sensitiveDataModelId = sensitiveDataModelId; + request.groupBy = groupBy; + request.schemaName = schemaName; + request.objectName = objectName; + request.columnName = columnName; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListSensitiveColumnAnalyticsRequest(compartmentId, compartmentIdInSubtree, accessLevel, targetId, sensitiveTypeId, sensitiveTypeGroupId, sensitiveDataModelId, groupBy, schemaName, objectName, columnName, 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) + .compartmentIdInSubtree(compartmentIdInSubtree) + .accessLevel(accessLevel) + .targetId(targetId) + .sensitiveTypeId(sensitiveTypeId) + .sensitiveTypeGroupId(sensitiveTypeGroupId) + .sensitiveDataModelId(sensitiveDataModelId) + .groupBy(groupBy) + .schemaName(schemaName) + .objectName(objectName) + .columnName(columnName) + .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(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); + sb.append(",accessLevel=").append(String.valueOf(this.accessLevel)); + sb.append(",targetId=").append(String.valueOf(this.targetId)); + sb.append(",sensitiveTypeId=").append(String.valueOf(this.sensitiveTypeId)); + sb.append(",sensitiveTypeGroupId=").append(String.valueOf(this.sensitiveTypeGroupId)); + sb.append(",sensitiveDataModelId=").append(String.valueOf(this.sensitiveDataModelId)); + sb.append(",groupBy=").append(String.valueOf(this.groupBy)); + sb.append(",schemaName=").append(String.valueOf(this.schemaName)); + sb.append(",objectName=").append(String.valueOf(this.objectName)); + sb.append(",columnName=").append(String.valueOf(this.columnName)); + 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 ListSensitiveColumnAnalyticsRequest)) { + return false; + } + + ListSensitiveColumnAnalyticsRequest other = (ListSensitiveColumnAnalyticsRequest) 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.accessLevel, other.accessLevel) + && java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.sensitiveTypeId, other.sensitiveTypeId) + && java.util.Objects.equals(this.sensitiveTypeGroupId, other.sensitiveTypeGroupId) + && java.util.Objects.equals(this.sensitiveDataModelId, other.sensitiveDataModelId) + && java.util.Objects.equals(this.groupBy, other.groupBy) + && java.util.Objects.equals(this.schemaName, other.schemaName) + && java.util.Objects.equals(this.objectName, other.objectName) + && java.util.Objects.equals(this.columnName, other.columnName) + && 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.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); + result = (result * PRIME) + (this.accessLevel == null ? 43 : this.accessLevel.hashCode()); + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeId == null ? 43 : this.sensitiveTypeId.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeGroupId == null + ? 43 + : this.sensitiveTypeGroupId.hashCode()); + result = + (result * PRIME) + + (this.sensitiveDataModelId == null + ? 43 + : this.sensitiveDataModelId.hashCode()); + result = (result * PRIME) + (this.groupBy == null ? 43 : this.groupBy.hashCode()); + result = (result * PRIME) + (this.schemaName == null ? 43 : this.schemaName.hashCode()); + result = (result * PRIME) + (this.objectName == null ? 43 : this.objectName.hashCode()); + result = (result * PRIME) + (this.columnName == null ? 43 : this.columnName.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-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListSensitiveTypeGroupsRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListSensitiveTypeGroupsRequest.java new file mode 100644 index 0000000000..69ee2328ca --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListSensitiveTypeGroupsRequest.java @@ -0,0 +1,768 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use ListSensitiveTypeGroupsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListSensitiveTypeGroupsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * A filter to return only resources that match the specified compartment OCID. + */ + private String compartmentId; + + /** + * A filter to return only resources that match the specified compartment OCID. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Default is false. + * When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + * + */ + private Boolean compartmentIdInSubtree; + + /** + * Default is false. + * When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + * + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } + /** + * Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + * Setting this to ACCESSIBLE returns only those compartments for which the + * user has INSPECT permissions directly or indirectly (permissions can be on a + * resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + * + */ + private AccessLevel accessLevel; + + /** + * Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + * Setting this to ACCESSIBLE returns only those compartments for which the + * user has INSPECT permissions directly or indirectly (permissions can be on a + * resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + * + **/ + public enum AccessLevel { + Restricted("RESTRICTED"), + Accessible("ACCESSIBLE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AccessLevel v : AccessLevel.values()) { + map.put(v.getValue(), v); + } + } + + AccessLevel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AccessLevel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid AccessLevel: " + key); + } + }; + + /** + * Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + * Setting this to ACCESSIBLE returns only those compartments for which the + * user has INSPECT permissions directly or indirectly (permissions can be on a + * resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + * + */ + public AccessLevel getAccessLevel() { + return accessLevel; + } + /** + * A filter to return only resources that match the specified display name. + * + */ + private String displayName; + + /** + * A filter to return only resources that match the specified display name. + * + */ + public String getDisplayName() { + return displayName; + } + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit; + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page; + + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public String getPage() { + return page; + } + /** + * A filter to return only the resources that match the specified lifecycle state. + */ + private com.oracle.bmc.datasafe.model.SensitiveTypeGroupLifecycleState lifecycleState; + + /** + * A filter to return only the resources that match the specified lifecycle state. + */ + public com.oracle.bmc.datasafe.model.SensitiveTypeGroupLifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * An optional filter to return only resources that match the specified OCID of the sensitive type group resource. + */ + private String sensitiveTypeGroupId; + + /** + * An optional filter to return only resources that match the specified OCID of the sensitive type group resource. + */ + public String getSensitiveTypeGroupId() { + return sensitiveTypeGroupId; + } + /** + * A filter to return only the resources that were created after the specified date and time, as defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + */ + private java.util.Date timeCreatedGreaterThanOrEqualTo; + + /** + * A filter to return only the resources that were created after the specified date and time, as defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + */ + public java.util.Date getTimeCreatedGreaterThanOrEqualTo() { + return timeCreatedGreaterThanOrEqualTo; + } + /** + * Search for resources that were created before a specific date. + * Specifying this parameter corresponding {@code timeCreatedLessThan} + * parameter will retrieve all resources created before the + * specified created date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as + * defined by RFC 3339. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + */ + private java.util.Date timeCreatedLessThan; + + /** + * Search for resources that were created before a specific date. + * Specifying this parameter corresponding {@code timeCreatedLessThan} + * parameter will retrieve all resources created before the + * specified created date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as + * defined by RFC 3339. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + */ + public java.util.Date getTimeCreatedLessThan() { + return timeCreatedLessThan; + } + /** + * The sort order to use, either ascending (ASC) or descending (DESC). + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (ASC) or descending (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, either ascending (ASC) or descending (DESC). + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending. + * The default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending. + * The 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. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending. + * The default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * 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< + ListSensitiveTypeGroupsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A filter to return only resources that match the specified compartment OCID. + */ + private String compartmentId = null; + + /** + * A filter to return only resources that match the specified compartment OCID. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Default is false. + * When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + * + */ + private Boolean compartmentIdInSubtree = null; + + /** + * Default is false. + * When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + * + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + + /** + * Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + * Setting this to ACCESSIBLE returns only those compartments for which the + * user has INSPECT permissions directly or indirectly (permissions can be on a + * resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + * + */ + private AccessLevel accessLevel = null; + + /** + * Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + * Setting this to ACCESSIBLE returns only those compartments for which the + * user has INSPECT permissions directly or indirectly (permissions can be on a + * resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + * + * @param accessLevel the value to set + * @return this builder instance + */ + public Builder accessLevel(AccessLevel accessLevel) { + this.accessLevel = accessLevel; + return this; + } + + /** + * A filter to return only resources that match the specified display name. + * + */ + private String displayName = null; + + /** + * A filter to return only resources that match the specified display name. + * + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/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 page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page = null; + + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.oracle.com/iaas/en-us/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; + } + + /** + * A filter to return only the resources that match the specified lifecycle state. + */ + private com.oracle.bmc.datasafe.model.SensitiveTypeGroupLifecycleState lifecycleState = + null; + + /** + * A filter to return only the resources that match the specified lifecycle state. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.datasafe.model.SensitiveTypeGroupLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * An optional filter to return only resources that match the specified OCID of the sensitive type group resource. + */ + private String sensitiveTypeGroupId = null; + + /** + * An optional filter to return only resources that match the specified OCID of the sensitive type group resource. + * @param sensitiveTypeGroupId the value to set + * @return this builder instance + */ + public Builder sensitiveTypeGroupId(String sensitiveTypeGroupId) { + this.sensitiveTypeGroupId = sensitiveTypeGroupId; + return this; + } + + /** + * A filter to return only the resources that were created after the specified date and time, as defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + */ + private java.util.Date timeCreatedGreaterThanOrEqualTo = null; + + /** + * A filter to return only the resources that were created after the specified date and time, as defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + * @param timeCreatedGreaterThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder timeCreatedGreaterThanOrEqualTo( + java.util.Date timeCreatedGreaterThanOrEqualTo) { + this.timeCreatedGreaterThanOrEqualTo = timeCreatedGreaterThanOrEqualTo; + return this; + } + + /** + * Search for resources that were created before a specific date. + * Specifying this parameter corresponding {@code timeCreatedLessThan} + * parameter will retrieve all resources created before the + * specified created date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as + * defined by RFC 3339. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + */ + private java.util.Date timeCreatedLessThan = null; + + /** + * Search for resources that were created before a specific date. + * Specifying this parameter corresponding {@code timeCreatedLessThan} + * parameter will retrieve all resources created before the + * specified created date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as + * defined by RFC 3339. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + * @param timeCreatedLessThan the value to set + * @return this builder instance + */ + public Builder timeCreatedLessThan(java.util.Date timeCreatedLessThan) { + this.timeCreatedLessThan = timeCreatedLessThan; + return this; + } + + /** + * The sort order to use, either ascending (ASC) or descending (DESC). + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending (ASC) or descending (DESC). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending. + * The default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending. + * The 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; + } + + /** + * 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(ListSensitiveTypeGroupsRequest o) { + compartmentId(o.getCompartmentId()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); + accessLevel(o.getAccessLevel()); + displayName(o.getDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + lifecycleState(o.getLifecycleState()); + sensitiveTypeGroupId(o.getSensitiveTypeGroupId()); + timeCreatedGreaterThanOrEqualTo(o.getTimeCreatedGreaterThanOrEqualTo()); + timeCreatedLessThan(o.getTimeCreatedLessThan()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSensitiveTypeGroupsRequest 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 ListSensitiveTypeGroupsRequest + */ + public ListSensitiveTypeGroupsRequest build() { + ListSensitiveTypeGroupsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSensitiveTypeGroupsRequest 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 ListSensitiveTypeGroupsRequest + */ + public ListSensitiveTypeGroupsRequest buildWithoutInvocationCallback() { + ListSensitiveTypeGroupsRequest request = new ListSensitiveTypeGroupsRequest(); + request.compartmentId = compartmentId; + request.compartmentIdInSubtree = compartmentIdInSubtree; + request.accessLevel = accessLevel; + request.displayName = displayName; + request.limit = limit; + request.page = page; + request.lifecycleState = lifecycleState; + request.sensitiveTypeGroupId = sensitiveTypeGroupId; + request.timeCreatedGreaterThanOrEqualTo = timeCreatedGreaterThanOrEqualTo; + request.timeCreatedLessThan = timeCreatedLessThan; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListSensitiveTypeGroupsRequest(compartmentId, compartmentIdInSubtree, accessLevel, displayName, limit, page, lifecycleState, sensitiveTypeGroupId, timeCreatedGreaterThanOrEqualTo, timeCreatedLessThan, 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) + .compartmentIdInSubtree(compartmentIdInSubtree) + .accessLevel(accessLevel) + .displayName(displayName) + .limit(limit) + .page(page) + .lifecycleState(lifecycleState) + .sensitiveTypeGroupId(sensitiveTypeGroupId) + .timeCreatedGreaterThanOrEqualTo(timeCreatedGreaterThanOrEqualTo) + .timeCreatedLessThan(timeCreatedLessThan) + .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(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); + sb.append(",accessLevel=").append(String.valueOf(this.accessLevel)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",sensitiveTypeGroupId=").append(String.valueOf(this.sensitiveTypeGroupId)); + sb.append(",timeCreatedGreaterThanOrEqualTo=") + .append(String.valueOf(this.timeCreatedGreaterThanOrEqualTo)); + sb.append(",timeCreatedLessThan=").append(String.valueOf(this.timeCreatedLessThan)); + 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 ListSensitiveTypeGroupsRequest)) { + return false; + } + + ListSensitiveTypeGroupsRequest other = (ListSensitiveTypeGroupsRequest) 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.accessLevel, other.accessLevel) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.sensitiveTypeGroupId, other.sensitiveTypeGroupId) + && java.util.Objects.equals( + this.timeCreatedGreaterThanOrEqualTo, other.timeCreatedGreaterThanOrEqualTo) + && java.util.Objects.equals(this.timeCreatedLessThan, other.timeCreatedLessThan) + && 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.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); + result = (result * PRIME) + (this.accessLevel == null ? 43 : this.accessLevel.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.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.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeGroupId == null + ? 43 + : this.sensitiveTypeGroupId.hashCode()); + result = + (result * PRIME) + + (this.timeCreatedGreaterThanOrEqualTo == null + ? 43 + : this.timeCreatedGreaterThanOrEqualTo.hashCode()); + result = + (result * PRIME) + + (this.timeCreatedLessThan == null + ? 43 + : this.timeCreatedLessThan.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-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/MaskDataRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/MaskDataRequest.java index 2237655fd7..1f83a4d48e 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/MaskDataRequest.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/MaskDataRequest.java @@ -34,6 +34,25 @@ public String getMaskingPolicyId() { public com.oracle.bmc.datasafe.model.MaskDataDetails getMaskDataDetails() { return maskDataDetails; } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. 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; + } /** * Unique identifier for the request. */ @@ -94,6 +113,29 @@ public Builder maskDataDetails( 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; + } + /** * Unique identifier for the request. */ @@ -139,6 +181,7 @@ public Builder retryConfiguration( public Builder copy(MaskDataRequest o) { maskingPolicyId(o.getMaskingPolicyId()); maskDataDetails(o.getMaskDataDetails()); + opcRetryToken(o.getOpcRetryToken()); opcRequestId(o.getOpcRequestId()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); @@ -185,9 +228,10 @@ public MaskDataRequest buildWithoutInvocationCallback() { MaskDataRequest request = new MaskDataRequest(); request.maskingPolicyId = maskingPolicyId; request.maskDataDetails = maskDataDetails; + request.opcRetryToken = opcRetryToken; request.opcRequestId = opcRequestId; return request; - // new MaskDataRequest(maskingPolicyId, maskDataDetails, opcRequestId); + // new MaskDataRequest(maskingPolicyId, maskDataDetails, opcRetryToken, opcRequestId); } } @@ -199,6 +243,7 @@ public Builder toBuilder() { return new Builder() .maskingPolicyId(maskingPolicyId) .maskDataDetails(maskDataDetails) + .opcRetryToken(opcRetryToken) .opcRequestId(opcRequestId); } @@ -217,6 +262,7 @@ public String toString() { sb.append("super=").append(super.toString()); sb.append(",maskingPolicyId=").append(String.valueOf(this.maskingPolicyId)); sb.append(",maskDataDetails=").append(String.valueOf(this.maskDataDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(")"); return sb.toString(); @@ -235,6 +281,7 @@ public boolean equals(Object o) { return super.equals(o) && java.util.Objects.equals(this.maskingPolicyId, other.maskingPolicyId) && java.util.Objects.equals(this.maskDataDetails, other.maskDataDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @@ -248,6 +295,9 @@ public int hashCode() { result = (result * PRIME) + (this.maskDataDetails == null ? 43 : this.maskDataDetails.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-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/PatchGroupedSensitiveTypesRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/PatchGroupedSensitiveTypesRequest.java new file mode 100644 index 0000000000..b652b9860a --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/PatchGroupedSensitiveTypesRequest.java @@ -0,0 +1,319 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use PatchGroupedSensitiveTypesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class PatchGroupedSensitiveTypesRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.PatchGroupedSensitiveTypesDetails> { + + /** + * The OCID of the sensitive type group. + */ + private String sensitiveTypeGroupId; + + /** + * The OCID of the sensitive type group. + */ + public String getSensitiveTypeGroupId() { + return sensitiveTypeGroupId; + } + /** + * Details to patch sensitive type ids in a SensitiveTypeGroup. + */ + private com.oracle.bmc.datasafe.model.PatchGroupedSensitiveTypesDetails + patchGroupedSensitiveTypesDetails; + + /** + * Details to patch sensitive type ids in a SensitiveTypeGroup. + */ + public com.oracle.bmc.datasafe.model.PatchGroupedSensitiveTypesDetails + getPatchGroupedSensitiveTypesDetails() { + return patchGroupedSensitiveTypesDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.PatchGroupedSensitiveTypesDetails getBody$() { + return patchGroupedSensitiveTypesDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + PatchGroupedSensitiveTypesRequest, + com.oracle.bmc.datasafe.model.PatchGroupedSensitiveTypesDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the sensitive type group. + */ + private String sensitiveTypeGroupId = null; + + /** + * The OCID of the sensitive type group. + * @param sensitiveTypeGroupId the value to set + * @return this builder instance + */ + public Builder sensitiveTypeGroupId(String sensitiveTypeGroupId) { + this.sensitiveTypeGroupId = sensitiveTypeGroupId; + return this; + } + + /** + * Details to patch sensitive type ids in a SensitiveTypeGroup. + */ + private com.oracle.bmc.datasafe.model.PatchGroupedSensitiveTypesDetails + patchGroupedSensitiveTypesDetails = null; + + /** + * Details to patch sensitive type ids in a SensitiveTypeGroup. + * @param patchGroupedSensitiveTypesDetails the value to set + * @return this builder instance + */ + public Builder patchGroupedSensitiveTypesDetails( + com.oracle.bmc.datasafe.model.PatchGroupedSensitiveTypesDetails + patchGroupedSensitiveTypesDetails) { + this.patchGroupedSensitiveTypesDetails = patchGroupedSensitiveTypesDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + 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(PatchGroupedSensitiveTypesRequest o) { + sensitiveTypeGroupId(o.getSensitiveTypeGroupId()); + patchGroupedSensitiveTypesDetails(o.getPatchGroupedSensitiveTypesDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of PatchGroupedSensitiveTypesRequest 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 PatchGroupedSensitiveTypesRequest + */ + public PatchGroupedSensitiveTypesRequest build() { + PatchGroupedSensitiveTypesRequest 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.datasafe.model.PatchGroupedSensitiveTypesDetails body) { + patchGroupedSensitiveTypesDetails(body); + return this; + } + + /** + * Build the instance of PatchGroupedSensitiveTypesRequest 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 PatchGroupedSensitiveTypesRequest + */ + public PatchGroupedSensitiveTypesRequest buildWithoutInvocationCallback() { + PatchGroupedSensitiveTypesRequest request = new PatchGroupedSensitiveTypesRequest(); + request.sensitiveTypeGroupId = sensitiveTypeGroupId; + request.patchGroupedSensitiveTypesDetails = patchGroupedSensitiveTypesDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new PatchGroupedSensitiveTypesRequest(sensitiveTypeGroupId, patchGroupedSensitiveTypesDetails, 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() + .sensitiveTypeGroupId(sensitiveTypeGroupId) + .patchGroupedSensitiveTypesDetails(patchGroupedSensitiveTypesDetails) + .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(",sensitiveTypeGroupId=").append(String.valueOf(this.sensitiveTypeGroupId)); + sb.append(",patchGroupedSensitiveTypesDetails=") + .append(String.valueOf(this.patchGroupedSensitiveTypesDetails)); + 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 PatchGroupedSensitiveTypesRequest)) { + return false; + } + + PatchGroupedSensitiveTypesRequest other = (PatchGroupedSensitiveTypesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.sensitiveTypeGroupId, other.sensitiveTypeGroupId) + && java.util.Objects.equals( + this.patchGroupedSensitiveTypesDetails, + other.patchGroupedSensitiveTypesDetails) + && 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.sensitiveTypeGroupId == null + ? 43 + : this.sensitiveTypeGroupId.hashCode()); + result = + (result * PRIME) + + (this.patchGroupedSensitiveTypesDetails == null + ? 43 + : this.patchGroupedSensitiveTypesDetails.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-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UpdateSensitiveTypeGroupRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UpdateSensitiveTypeGroupRequest.java new file mode 100644 index 0000000000..15c182ddde --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UpdateSensitiveTypeGroupRequest.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use UpdateSensitiveTypeGroupRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class UpdateSensitiveTypeGroupRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.UpdateSensitiveTypeGroupDetails> { + + /** + * The OCID of the sensitive type group. + */ + private String sensitiveTypeGroupId; + + /** + * The OCID of the sensitive type group. + */ + public String getSensitiveTypeGroupId() { + return sensitiveTypeGroupId; + } + /** + * Details used to update the sensitive type group. + */ + private com.oracle.bmc.datasafe.model.UpdateSensitiveTypeGroupDetails + updateSensitiveTypeGroupDetails; + + /** + * Details used to update the sensitive type group. + */ + public com.oracle.bmc.datasafe.model.UpdateSensitiveTypeGroupDetails + getUpdateSensitiveTypeGroupDetails() { + return updateSensitiveTypeGroupDetails; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.UpdateSensitiveTypeGroupDetails getBody$() { + return updateSensitiveTypeGroupDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateSensitiveTypeGroupRequest, + com.oracle.bmc.datasafe.model.UpdateSensitiveTypeGroupDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the sensitive type group. + */ + private String sensitiveTypeGroupId = null; + + /** + * The OCID of the sensitive type group. + * @param sensitiveTypeGroupId the value to set + * @return this builder instance + */ + public Builder sensitiveTypeGroupId(String sensitiveTypeGroupId) { + this.sensitiveTypeGroupId = sensitiveTypeGroupId; + return this; + } + + /** + * Details used to update the sensitive type group. + */ + private com.oracle.bmc.datasafe.model.UpdateSensitiveTypeGroupDetails + updateSensitiveTypeGroupDetails = null; + + /** + * Details used to update the sensitive type group. + * @param updateSensitiveTypeGroupDetails the value to set + * @return this builder instance + */ + public Builder updateSensitiveTypeGroupDetails( + com.oracle.bmc.datasafe.model.UpdateSensitiveTypeGroupDetails + updateSensitiveTypeGroupDetails) { + this.updateSensitiveTypeGroupDetails = updateSensitiveTypeGroupDetails; + 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; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param 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(UpdateSensitiveTypeGroupRequest o) { + sensitiveTypeGroupId(o.getSensitiveTypeGroupId()); + updateSensitiveTypeGroupDetails(o.getUpdateSensitiveTypeGroupDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateSensitiveTypeGroupRequest 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 UpdateSensitiveTypeGroupRequest + */ + public UpdateSensitiveTypeGroupRequest build() { + UpdateSensitiveTypeGroupRequest 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.datasafe.model.UpdateSensitiveTypeGroupDetails body) { + updateSensitiveTypeGroupDetails(body); + return this; + } + + /** + * Build the instance of UpdateSensitiveTypeGroupRequest 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 UpdateSensitiveTypeGroupRequest + */ + public UpdateSensitiveTypeGroupRequest buildWithoutInvocationCallback() { + UpdateSensitiveTypeGroupRequest request = new UpdateSensitiveTypeGroupRequest(); + request.sensitiveTypeGroupId = sensitiveTypeGroupId; + request.updateSensitiveTypeGroupDetails = updateSensitiveTypeGroupDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new UpdateSensitiveTypeGroupRequest(sensitiveTypeGroupId, updateSensitiveTypeGroupDetails, 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() + .sensitiveTypeGroupId(sensitiveTypeGroupId) + .updateSensitiveTypeGroupDetails(updateSensitiveTypeGroupDetails) + .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(",sensitiveTypeGroupId=").append(String.valueOf(this.sensitiveTypeGroupId)); + sb.append(",updateSensitiveTypeGroupDetails=") + .append(String.valueOf(this.updateSensitiveTypeGroupDetails)); + 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 UpdateSensitiveTypeGroupRequest)) { + return false; + } + + UpdateSensitiveTypeGroupRequest other = (UpdateSensitiveTypeGroupRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.sensitiveTypeGroupId, other.sensitiveTypeGroupId) + && java.util.Objects.equals( + this.updateSensitiveTypeGroupDetails, other.updateSensitiveTypeGroupDetails) + && 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.sensitiveTypeGroupId == null + ? 43 + : this.sensitiveTypeGroupId.hashCode()); + result = + (result * PRIME) + + (this.updateSensitiveTypeGroupDetails == null + ? 43 + : this.updateSensitiveTypeGroupDetails.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-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ChangeSensitiveTypeGroupCompartmentResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ChangeSensitiveTypeGroupCompartmentResponse.java new file mode 100644 index 0000000000..31cde0b0d9 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ChangeSensitiveTypeGroupCompartmentResponse.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ChangeSensitiveTypeGroupCompartmentResponse + 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 ChangeSensitiveTypeGroupCompartmentResponse( + 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(ChangeSensitiveTypeGroupCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeSensitiveTypeGroupCompartmentResponse build() { + return new ChangeSensitiveTypeGroupCompartmentResponse( + __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 ChangeSensitiveTypeGroupCompartmentResponse)) { + return false; + } + + ChangeSensitiveTypeGroupCompartmentResponse other = + (ChangeSensitiveTypeGroupCompartmentResponse) 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-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/CreateSensitiveTypeGroupResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/CreateSensitiveTypeGroupResponse.java new file mode 100644 index 0000000000..0f99fab5eb --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/CreateSensitiveTypeGroupResponse.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class CreateSensitiveTypeGroupResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID 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 URI of the sensitive type group. + */ + private String location; + + /** + * The URI of the sensitive type group. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * The returned SensitiveTypeGroup instance. + */ + private com.oracle.bmc.datasafe.model.SensitiveTypeGroup sensitiveTypeGroup; + + /** + * The returned SensitiveTypeGroup instance. + * @return the value + */ + public com.oracle.bmc.datasafe.model.SensitiveTypeGroup getSensitiveTypeGroup() { + return sensitiveTypeGroup; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcWorkRequestId", + "opcRequestId", + "location", + "sensitiveTypeGroup" + }) + private CreateSensitiveTypeGroupResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcWorkRequestId, + String opcRequestId, + String location, + com.oracle.bmc.datasafe.model.SensitiveTypeGroup sensitiveTypeGroup) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.location = location; + this.sensitiveTypeGroup = sensitiveTypeGroup; + } + + 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. For more information, see [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID 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 URI of the sensitive type group. + */ + private String location; + + /** + * The URI of the sensitive type group. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * The returned SensitiveTypeGroup instance. + */ + private com.oracle.bmc.datasafe.model.SensitiveTypeGroup sensitiveTypeGroup; + + /** + * The returned SensitiveTypeGroup instance. + * @param sensitiveTypeGroup the value to set + * @return this builder + */ + public Builder sensitiveTypeGroup( + com.oracle.bmc.datasafe.model.SensitiveTypeGroup sensitiveTypeGroup) { + this.sensitiveTypeGroup = sensitiveTypeGroup; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSensitiveTypeGroupResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + location(o.getLocation()); + sensitiveTypeGroup(o.getSensitiveTypeGroup()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateSensitiveTypeGroupResponse build() { + return new CreateSensitiveTypeGroupResponse( + __httpStatusCode__, + headers, + etag, + opcWorkRequestId, + opcRequestId, + location, + sensitiveTypeGroup); + } + } + + /** + * 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(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",sensitiveTypeGroup=").append(String.valueOf(sensitiveTypeGroup)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSensitiveTypeGroupResponse)) { + return false; + } + + CreateSensitiveTypeGroupResponse other = (CreateSensitiveTypeGroupResponse) o; + return super.equals(o) + && 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.location, other.location) + && java.util.Objects.equals(this.sensitiveTypeGroup, other.sensitiveTypeGroup); + } + + @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.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.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.sensitiveTypeGroup == null + ? 43 + : this.sensitiveTypeGroup.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteMaskingReportResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteMaskingReportResponse.java new file mode 100644 index 0000000000..c2feaed6f0 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteMaskingReportResponse.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteMaskingReportResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID 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 DeleteMaskingReportResponse( + 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 of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID 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(DeleteMaskingReportResponse 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 DeleteMaskingReportResponse build() { + return new DeleteMaskingReportResponse( + __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 DeleteMaskingReportResponse)) { + return false; + } + + DeleteMaskingReportResponse other = (DeleteMaskingReportResponse) 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-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteSensitiveTypeGroupResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteSensitiveTypeGroupResponse.java new file mode 100644 index 0000000000..623fc7ed88 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteSensitiveTypeGroupResponse.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteSensitiveTypeGroupResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID 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 DeleteSensitiveTypeGroupResponse( + 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 of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID 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(DeleteSensitiveTypeGroupResponse 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 DeleteSensitiveTypeGroupResponse build() { + return new DeleteSensitiveTypeGroupResponse( + __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 DeleteSensitiveTypeGroupResponse)) { + return false; + } + + DeleteSensitiveTypeGroupResponse other = (DeleteSensitiveTypeGroupResponse) 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-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/GetSensitiveTypeGroupResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/GetSensitiveTypeGroupResponse.java new file mode 100644 index 0000000000..c33a519ed6 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/GetSensitiveTypeGroupResponse.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class GetSensitiveTypeGroupResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @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 SensitiveTypeGroup instance. + */ + private com.oracle.bmc.datasafe.model.SensitiveTypeGroup sensitiveTypeGroup; + + /** + * The returned SensitiveTypeGroup instance. + * @return the value + */ + public com.oracle.bmc.datasafe.model.SensitiveTypeGroup getSensitiveTypeGroup() { + return sensitiveTypeGroup; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "sensitiveTypeGroup" + }) + private GetSensitiveTypeGroupResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.datasafe.model.SensitiveTypeGroup sensitiveTypeGroup) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.sensitiveTypeGroup = sensitiveTypeGroup; + } + + 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. For more information, see [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @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 SensitiveTypeGroup instance. + */ + private com.oracle.bmc.datasafe.model.SensitiveTypeGroup sensitiveTypeGroup; + + /** + * The returned SensitiveTypeGroup instance. + * @param sensitiveTypeGroup the value to set + * @return this builder + */ + public Builder sensitiveTypeGroup( + com.oracle.bmc.datasafe.model.SensitiveTypeGroup sensitiveTypeGroup) { + this.sensitiveTypeGroup = sensitiveTypeGroup; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSensitiveTypeGroupResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + sensitiveTypeGroup(o.getSensitiveTypeGroup()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetSensitiveTypeGroupResponse build() { + return new GetSensitiveTypeGroupResponse( + __httpStatusCode__, headers, etag, opcRequestId, sensitiveTypeGroup); + } + } + + /** + * 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(",sensitiveTypeGroup=").append(String.valueOf(sensitiveTypeGroup)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSensitiveTypeGroupResponse)) { + return false; + } + + GetSensitiveTypeGroupResponse other = (GetSensitiveTypeGroupResponse) 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.sensitiveTypeGroup, other.sensitiveTypeGroup); + } + + @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.sensitiveTypeGroup == null + ? 43 + : this.sensitiveTypeGroup.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListGroupedSensitiveTypesResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListGroupedSensitiveTypesResponse.java new file mode 100644 index 0000000000..7c2bd05117 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListGroupedSensitiveTypesResponse.java @@ -0,0 +1,310 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListGroupedSensitiveTypesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @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; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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; + } + + /** + * 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 previous batch of items. + * + */ + private String opcPrevPage; + + /** + * 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 previous batch of items. + * + * @return the value + */ + public String getOpcPrevPage() { + return opcPrevPage; + } + + /** + * The returned GroupedSensitiveTypeCollection instance. + */ + private com.oracle.bmc.datasafe.model.GroupedSensitiveTypeCollection + groupedSensitiveTypeCollection; + + /** + * The returned GroupedSensitiveTypeCollection instance. + * @return the value + */ + public com.oracle.bmc.datasafe.model.GroupedSensitiveTypeCollection + getGroupedSensitiveTypeCollection() { + return groupedSensitiveTypeCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "opcNextPage", + "opcPrevPage", + "groupedSensitiveTypeCollection" + }) + private ListGroupedSensitiveTypesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + String opcNextPage, + String opcPrevPage, + com.oracle.bmc.datasafe.model.GroupedSensitiveTypeCollection + groupedSensitiveTypeCollection) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opcPrevPage = opcPrevPage; + this.groupedSensitiveTypeCollection = groupedSensitiveTypeCollection; + } + + 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. For more information, see [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @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; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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; + } + + /** + * 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 previous batch of items. + * + */ + private String opcPrevPage; + + /** + * 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 previous batch of items. + * + * @param opcPrevPage the value to set + * @return this builder + */ + public Builder opcPrevPage(String opcPrevPage) { + this.opcPrevPage = opcPrevPage; + return this; + } + + /** + * The returned GroupedSensitiveTypeCollection instance. + */ + private com.oracle.bmc.datasafe.model.GroupedSensitiveTypeCollection + groupedSensitiveTypeCollection; + + /** + * The returned GroupedSensitiveTypeCollection instance. + * @param groupedSensitiveTypeCollection the value to set + * @return this builder + */ + public Builder groupedSensitiveTypeCollection( + com.oracle.bmc.datasafe.model.GroupedSensitiveTypeCollection + groupedSensitiveTypeCollection) { + this.groupedSensitiveTypeCollection = groupedSensitiveTypeCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListGroupedSensitiveTypesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcPrevPage(o.getOpcPrevPage()); + groupedSensitiveTypeCollection(o.getGroupedSensitiveTypeCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListGroupedSensitiveTypesResponse build() { + return new ListGroupedSensitiveTypesResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + opcNextPage, + opcPrevPage, + groupedSensitiveTypeCollection); + } + } + + /** + * 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(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcPrevPage=").append(String.valueOf(opcPrevPage)); + sb.append(",groupedSensitiveTypeCollection=") + .append(String.valueOf(groupedSensitiveTypeCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListGroupedSensitiveTypesResponse)) { + return false; + } + + ListGroupedSensitiveTypesResponse other = (ListGroupedSensitiveTypesResponse) 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.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcPrevPage, other.opcPrevPage) + && java.util.Objects.equals( + this.groupedSensitiveTypeCollection, other.groupedSensitiveTypeCollection); + } + + @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.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcPrevPage == null ? 43 : this.opcPrevPage.hashCode()); + result = + (result * PRIME) + + (this.groupedSensitiveTypeCollection == null + ? 43 + : this.groupedSensitiveTypeCollection.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListMaskingErrorsResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListMaskingErrorsResponse.java new file mode 100644 index 0000000000..5127c2ffbb --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListMaskingErrorsResponse.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListMaskingErrorsResponse 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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; + } + + /** + * 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 previous batch of items. + * + */ + private String opcPrevPage; + + /** + * 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 previous batch of items. + * + * @return the value + */ + public String getOpcPrevPage() { + return opcPrevPage; + } + + /** + * The returned MaskingErrorCollection instance. + */ + private com.oracle.bmc.datasafe.model.MaskingErrorCollection maskingErrorCollection; + + /** + * The returned MaskingErrorCollection instance. + * @return the value + */ + public com.oracle.bmc.datasafe.model.MaskingErrorCollection getMaskingErrorCollection() { + return maskingErrorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "opcPrevPage", + "maskingErrorCollection" + }) + private ListMaskingErrorsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + String opcPrevPage, + com.oracle.bmc.datasafe.model.MaskingErrorCollection maskingErrorCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opcPrevPage = opcPrevPage; + this.maskingErrorCollection = maskingErrorCollection; + } + + 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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; + } + + /** + * 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 previous batch of items. + * + */ + private String opcPrevPage; + + /** + * 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 previous batch of items. + * + * @param opcPrevPage the value to set + * @return this builder + */ + public Builder opcPrevPage(String opcPrevPage) { + this.opcPrevPage = opcPrevPage; + return this; + } + + /** + * The returned MaskingErrorCollection instance. + */ + private com.oracle.bmc.datasafe.model.MaskingErrorCollection maskingErrorCollection; + + /** + * The returned MaskingErrorCollection instance. + * @param maskingErrorCollection the value to set + * @return this builder + */ + public Builder maskingErrorCollection( + com.oracle.bmc.datasafe.model.MaskingErrorCollection maskingErrorCollection) { + this.maskingErrorCollection = maskingErrorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListMaskingErrorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcPrevPage(o.getOpcPrevPage()); + maskingErrorCollection(o.getMaskingErrorCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListMaskingErrorsResponse build() { + return new ListMaskingErrorsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + opcPrevPage, + maskingErrorCollection); + } + } + + /** + * 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(",opcPrevPage=").append(String.valueOf(opcPrevPage)); + sb.append(",maskingErrorCollection=").append(String.valueOf(maskingErrorCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListMaskingErrorsResponse)) { + return false; + } + + ListMaskingErrorsResponse other = (ListMaskingErrorsResponse) 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.opcPrevPage, other.opcPrevPage) + && java.util.Objects.equals( + this.maskingErrorCollection, other.maskingErrorCollection); + } + + @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.opcPrevPage == null ? 43 : this.opcPrevPage.hashCode()); + result = + (result * PRIME) + + (this.maskingErrorCollection == null + ? 43 + : this.maskingErrorCollection.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListSensitiveColumnAnalyticsResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListSensitiveColumnAnalyticsResponse.java new file mode 100644 index 0000000000..012ae5e71e --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListSensitiveColumnAnalyticsResponse.java @@ -0,0 +1,271 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListSensitiveColumnAnalyticsResponse 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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; + } + + /** + * 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 previous batch of items. + * + */ + private String opcPrevPage; + + /** + * 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 previous batch of items. + * + * @return the value + */ + public String getOpcPrevPage() { + return opcPrevPage; + } + + /** + * The returned SensitiveColumnAnalyticsCollection instance. + */ + private com.oracle.bmc.datasafe.model.SensitiveColumnAnalyticsCollection + sensitiveColumnAnalyticsCollection; + + /** + * The returned SensitiveColumnAnalyticsCollection instance. + * @return the value + */ + public com.oracle.bmc.datasafe.model.SensitiveColumnAnalyticsCollection + getSensitiveColumnAnalyticsCollection() { + return sensitiveColumnAnalyticsCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "opcPrevPage", + "sensitiveColumnAnalyticsCollection" + }) + private ListSensitiveColumnAnalyticsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + String opcPrevPage, + com.oracle.bmc.datasafe.model.SensitiveColumnAnalyticsCollection + sensitiveColumnAnalyticsCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opcPrevPage = opcPrevPage; + this.sensitiveColumnAnalyticsCollection = sensitiveColumnAnalyticsCollection; + } + + 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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; + } + + /** + * 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 previous batch of items. + * + */ + private String opcPrevPage; + + /** + * 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 previous batch of items. + * + * @param opcPrevPage the value to set + * @return this builder + */ + public Builder opcPrevPage(String opcPrevPage) { + this.opcPrevPage = opcPrevPage; + return this; + } + + /** + * The returned SensitiveColumnAnalyticsCollection instance. + */ + private com.oracle.bmc.datasafe.model.SensitiveColumnAnalyticsCollection + sensitiveColumnAnalyticsCollection; + + /** + * The returned SensitiveColumnAnalyticsCollection instance. + * @param sensitiveColumnAnalyticsCollection the value to set + * @return this builder + */ + public Builder sensitiveColumnAnalyticsCollection( + com.oracle.bmc.datasafe.model.SensitiveColumnAnalyticsCollection + sensitiveColumnAnalyticsCollection) { + this.sensitiveColumnAnalyticsCollection = sensitiveColumnAnalyticsCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSensitiveColumnAnalyticsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcPrevPage(o.getOpcPrevPage()); + sensitiveColumnAnalyticsCollection(o.getSensitiveColumnAnalyticsCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSensitiveColumnAnalyticsResponse build() { + return new ListSensitiveColumnAnalyticsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + opcPrevPage, + sensitiveColumnAnalyticsCollection); + } + } + + /** + * 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(",opcPrevPage=").append(String.valueOf(opcPrevPage)); + sb.append(",sensitiveColumnAnalyticsCollection=") + .append(String.valueOf(sensitiveColumnAnalyticsCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSensitiveColumnAnalyticsResponse)) { + return false; + } + + ListSensitiveColumnAnalyticsResponse other = (ListSensitiveColumnAnalyticsResponse) 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.opcPrevPage, other.opcPrevPage) + && java.util.Objects.equals( + this.sensitiveColumnAnalyticsCollection, + other.sensitiveColumnAnalyticsCollection); + } + + @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.opcPrevPage == null ? 43 : this.opcPrevPage.hashCode()); + result = + (result * PRIME) + + (this.sensitiveColumnAnalyticsCollection == null + ? 43 + : this.sensitiveColumnAnalyticsCollection.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListSensitiveTypeGroupsResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListSensitiveTypeGroupsResponse.java new file mode 100644 index 0000000000..86e4815ec4 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListSensitiveTypeGroupsResponse.java @@ -0,0 +1,269 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListSensitiveTypeGroupsResponse 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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; + } + + /** + * 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 previous batch of items. + * + */ + private String opcPrevPage; + + /** + * 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 previous batch of items. + * + * @return the value + */ + public String getOpcPrevPage() { + return opcPrevPage; + } + + /** + * The returned SensitiveTypeGroupCollection instance. + */ + private com.oracle.bmc.datasafe.model.SensitiveTypeGroupCollection sensitiveTypeGroupCollection; + + /** + * The returned SensitiveTypeGroupCollection instance. + * @return the value + */ + public com.oracle.bmc.datasafe.model.SensitiveTypeGroupCollection + getSensitiveTypeGroupCollection() { + return sensitiveTypeGroupCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "opcPrevPage", + "sensitiveTypeGroupCollection" + }) + private ListSensitiveTypeGroupsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + String opcPrevPage, + com.oracle.bmc.datasafe.model.SensitiveTypeGroupCollection + sensitiveTypeGroupCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opcPrevPage = opcPrevPage; + this.sensitiveTypeGroupCollection = sensitiveTypeGroupCollection; + } + + 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For 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; + } + + /** + * 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 previous batch of items. + * + */ + private String opcPrevPage; + + /** + * 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 previous batch of items. + * + * @param opcPrevPage the value to set + * @return this builder + */ + public Builder opcPrevPage(String opcPrevPage) { + this.opcPrevPage = opcPrevPage; + return this; + } + + /** + * The returned SensitiveTypeGroupCollection instance. + */ + private com.oracle.bmc.datasafe.model.SensitiveTypeGroupCollection + sensitiveTypeGroupCollection; + + /** + * The returned SensitiveTypeGroupCollection instance. + * @param sensitiveTypeGroupCollection the value to set + * @return this builder + */ + public Builder sensitiveTypeGroupCollection( + com.oracle.bmc.datasafe.model.SensitiveTypeGroupCollection + sensitiveTypeGroupCollection) { + this.sensitiveTypeGroupCollection = sensitiveTypeGroupCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSensitiveTypeGroupsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcPrevPage(o.getOpcPrevPage()); + sensitiveTypeGroupCollection(o.getSensitiveTypeGroupCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSensitiveTypeGroupsResponse build() { + return new ListSensitiveTypeGroupsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + opcPrevPage, + sensitiveTypeGroupCollection); + } + } + + /** + * 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(",opcPrevPage=").append(String.valueOf(opcPrevPage)); + sb.append(",sensitiveTypeGroupCollection=") + .append(String.valueOf(sensitiveTypeGroupCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSensitiveTypeGroupsResponse)) { + return false; + } + + ListSensitiveTypeGroupsResponse other = (ListSensitiveTypeGroupsResponse) 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.opcPrevPage, other.opcPrevPage) + && java.util.Objects.equals( + this.sensitiveTypeGroupCollection, other.sensitiveTypeGroupCollection); + } + + @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.opcPrevPage == null ? 43 : this.opcPrevPage.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeGroupCollection == null + ? 43 + : this.sensitiveTypeGroupCollection.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/PatchGroupedSensitiveTypesResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/PatchGroupedSensitiveTypesResponse.java new file mode 100644 index 0000000000..2e1defe289 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/PatchGroupedSensitiveTypesResponse.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class PatchGroupedSensitiveTypesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID 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 PatchGroupedSensitiveTypesResponse( + 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 of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID 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(PatchGroupedSensitiveTypesResponse 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 PatchGroupedSensitiveTypesResponse build() { + return new PatchGroupedSensitiveTypesResponse( + __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 PatchGroupedSensitiveTypesResponse)) { + return false; + } + + PatchGroupedSensitiveTypesResponse other = (PatchGroupedSensitiveTypesResponse) 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-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/UpdateSensitiveTypeGroupResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/UpdateSensitiveTypeGroupResponse.java new file mode 100644 index 0000000000..a0ec2859ee --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/UpdateSensitiveTypeGroupResponse.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class UpdateSensitiveTypeGroupResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID 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 UpdateSensitiveTypeGroupResponse( + 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 of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID 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(UpdateSensitiveTypeGroupResponse 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 UpdateSensitiveTypeGroupResponse build() { + return new UpdateSensitiveTypeGroupResponse( + __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 UpdateSensitiveTypeGroupResponse)) { + return false; + } + + UpdateSensitiveTypeGroupResponse other = (UpdateSensitiveTypeGroupResponse) 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-datascience/pom.xml b/bmc-datascience/pom.xml index 2c0164361d..7354ab9e09 100644 --- a/bmc-datascience/pom.xml +++ b/bmc-datascience/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-datascience @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScience.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScience.java index 624036998d..1fd41eb1ab 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScience.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScience.java @@ -413,6 +413,86 @@ CreateDataSciencePrivateEndpointResponse createDataSciencePrivateEndpoint( */ CreateModelArtifactResponse createModelArtifact(CreateModelArtifactRequest request); + /** + * Creates model custom metadata artifact for specified model. + * + * 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 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 CreateModelCustomMetadatumArtifact API. + */ + CreateModelCustomMetadatumArtifactResponse createModelCustomMetadatumArtifact( + CreateModelCustomMetadatumArtifactRequest request); + + /** + * Creates model defined metadata artifact for specified model. + * + * 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 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 CreateModelDefinedMetadatumArtifact API. + */ + CreateModelDefinedMetadatumArtifactResponse createModelDefinedMetadatumArtifact( + CreateModelDefinedMetadatumArtifactRequest request); + /** * Creates a new model deployment. * @param request The request object containing the details to send @@ -651,6 +731,32 @@ DeleteDataSciencePrivateEndpointResponse deleteDataSciencePrivateEndpoint( */ DeleteModelResponse deleteModel(DeleteModelRequest request); + /** + * Deletes model custom metadata artifact for specified model metadata key. + * @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 DeleteModelCustomMetadatumArtifact API. + */ + DeleteModelCustomMetadatumArtifactResponse deleteModelCustomMetadatumArtifact( + DeleteModelCustomMetadatumArtifactRequest request); + + /** + * Deletes model defined metadata artifact for specified model metadata key. + * @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 DeleteModelDefinedMetadatumArtifact API. + */ + DeleteModelDefinedMetadatumArtifactResponse deleteModelDefinedMetadatumArtifact( + DeleteModelDefinedMetadatumArtifactRequest request); + /** * Deletes the specified model deployment. Any unsaved work in this model deployment is lost. * @param request The request object containing the details to send @@ -821,6 +927,32 @@ GetDataSciencePrivateEndpointResponse getDataSciencePrivateEndpoint( */ GetModelArtifactContentResponse getModelArtifactContent(GetModelArtifactContentRequest request); + /** + * Downloads model custom metadata artifact content for specified model metadata key. + * @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 GetModelCustomMetadatumArtifactContent API. + */ + GetModelCustomMetadatumArtifactContentResponse getModelCustomMetadatumArtifactContent( + GetModelCustomMetadatumArtifactContentRequest request); + + /** + * Downloads model defined metadata artifact content for specified model metadata key. + * @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 GetModelDefinedMetadatumArtifactContent API. + */ + GetModelDefinedMetadatumArtifactContentResponse getModelDefinedMetadatumArtifactContent( + GetModelDefinedMetadatumArtifactContentRequest request); + /** * Retrieves the model deployment for the specified `modelDeploymentId`. * @param request The request object containing the details to send @@ -965,6 +1097,32 @@ GetDataSciencePrivateEndpointResponse getDataSciencePrivateEndpoint( */ HeadModelArtifactResponse headModelArtifact(HeadModelArtifactRequest request); + /** + * Gets custom metadata artifact metadata for specified model metadata key. + * @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 HeadModelCustomMetadatumArtifact API. + */ + HeadModelCustomMetadatumArtifactResponse headModelCustomMetadatumArtifact( + HeadModelCustomMetadatumArtifactRequest request); + + /** + * Gets defined metadata artifact metadata for specified model metadata key. + * @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 HeadModelDefinedMetadatumArtifact API. + */ + HeadModelDefinedMetadatumArtifactResponse headModelDefinedMetadatumArtifact( + HeadModelDefinedMetadatumArtifactRequest request); + /** * Get the artifact metadata for a step in the pipeline. * @param request The request object containing the details to send @@ -1224,6 +1382,19 @@ ListNotebookSessionShapesResponse listNotebookSessionShapes( */ ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + /** + * Registers model artifact reference metadata + * @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 RegisterModelArtifactReference API. + */ + RegisterModelArtifactReferenceResponse registerModelArtifactReference( + RegisterModelArtifactReferenceRequest request); + /** * Restore archived model artifact * @param request The request object containing the details to send @@ -1289,6 +1460,86 @@ UpdateDataSciencePrivateEndpointResponse updateDataSciencePrivateEndpoint( */ UpdateModelResponse updateModel(UpdateModelRequest request); + /** + * Updates model custom metadata artifact for specified model metadata key. + * + * 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 UpdateModelCustomMetadatumArtifact API. + */ + UpdateModelCustomMetadatumArtifactResponse updateModelCustomMetadatumArtifact( + UpdateModelCustomMetadatumArtifactRequest request); + + /** + * Updates model defined metadata artifact for specified model metadata key. + * + * 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 UpdateModelDefinedMetadatumArtifact API. + */ + UpdateModelDefinedMetadatumArtifactResponse updateModelDefinedMetadatumArtifact( + UpdateModelDefinedMetadatumArtifactRequest request); + /** * Updates the properties of a model deployment. Some of the properties of `modelDeploymentConfigurationDetails` or `CategoryLogDetails` can also be updated with zero down time * when the model deployment's lifecycle state is ACTIVE or NEEDS_ATTENTION i.e `instanceShapeName`, `instanceCount` and `modelId`, separately `loadBalancerShape` or `CategoryLogDetails` diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsync.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsync.java index 7251a23b3c..c23d384fbb 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsync.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsync.java @@ -448,6 +448,42 @@ java.util.concurrent.Future createModelArtifact( CreateModelArtifactRequest, CreateModelArtifactResponse> handler); + /** + * Creates model custom metadata artifact for specified model. + * + * @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 + createModelCustomMetadatumArtifact( + CreateModelCustomMetadatumArtifactRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateModelCustomMetadatumArtifactRequest, + CreateModelCustomMetadatumArtifactResponse> + handler); + + /** + * Creates model defined metadata artifact for specified model. + * + * @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 + createModelDefinedMetadatumArtifact( + CreateModelDefinedMetadatumArtifactRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateModelDefinedMetadatumArtifactRequest, + CreateModelDefinedMetadatumArtifactResponse> + handler); + /** * Creates a new model deployment. * @@ -717,6 +753,42 @@ java.util.concurrent.Future deleteModel( DeleteModelRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Deletes model custom metadata artifact for specified model metadata key. + * + * @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 + deleteModelCustomMetadatumArtifact( + DeleteModelCustomMetadatumArtifactRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteModelCustomMetadatumArtifactRequest, + DeleteModelCustomMetadatumArtifactResponse> + handler); + + /** + * Deletes model defined metadata artifact for specified model metadata key. + * + * @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 + deleteModelDefinedMetadatumArtifact( + DeleteModelDefinedMetadatumArtifactRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteModelDefinedMetadatumArtifactRequest, + DeleteModelDefinedMetadatumArtifactResponse> + handler); + /** * Deletes the specified model deployment. Any unsaved work in this model deployment is lost. * @@ -935,6 +1007,42 @@ java.util.concurrent.Future getModelArtifactCon GetModelArtifactContentRequest, GetModelArtifactContentResponse> handler); + /** + * Downloads model custom metadata artifact content for specified model metadata key. + * + * @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 + getModelCustomMetadatumArtifactContent( + GetModelCustomMetadatumArtifactContentRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetModelCustomMetadatumArtifactContentRequest, + GetModelCustomMetadatumArtifactContentResponse> + handler); + + /** + * Downloads model defined metadata artifact content for specified model metadata key. + * + * @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 + getModelDefinedMetadatumArtifactContent( + GetModelDefinedMetadatumArtifactContentRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetModelDefinedMetadatumArtifactContentRequest, + GetModelDefinedMetadatumArtifactContentResponse> + handler); + /** * Retrieves the model deployment for the specified `modelDeploymentId`. * @@ -1118,6 +1226,42 @@ java.util.concurrent.Future headModelArtifact( HeadModelArtifactRequest, HeadModelArtifactResponse> handler); + /** + * Gets custom metadata artifact metadata for specified model metadata key. + * + * @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 + headModelCustomMetadatumArtifact( + HeadModelCustomMetadatumArtifactRequest request, + com.oracle.bmc.responses.AsyncHandler< + HeadModelCustomMetadatumArtifactRequest, + HeadModelCustomMetadatumArtifactResponse> + handler); + + /** + * Gets defined metadata artifact metadata for specified model metadata key. + * + * @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 + headModelDefinedMetadatumArtifact( + HeadModelDefinedMetadatumArtifactRequest request, + com.oracle.bmc.responses.AsyncHandler< + HeadModelDefinedMetadatumArtifactRequest, + HeadModelDefinedMetadatumArtifactResponse> + handler); + /** * Get the artifact metadata for a step in the pipeline. * @@ -1445,6 +1589,24 @@ java.util.concurrent.Future listWorkRequests( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Registers model artifact reference metadata + * + * @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 + registerModelArtifactReference( + RegisterModelArtifactReferenceRequest request, + com.oracle.bmc.responses.AsyncHandler< + RegisterModelArtifactReferenceRequest, + RegisterModelArtifactReferenceResponse> + handler); + /** * Restore archived model artifact * @@ -1526,6 +1688,42 @@ java.util.concurrent.Future updateModel( UpdateModelRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Updates model custom metadata artifact for specified model metadata key. + * + * @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 + updateModelCustomMetadatumArtifact( + UpdateModelCustomMetadatumArtifactRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateModelCustomMetadatumArtifactRequest, + UpdateModelCustomMetadatumArtifactResponse> + handler); + + /** + * Updates model defined metadata artifact for specified model metadata key. + * + * @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 + updateModelDefinedMetadatumArtifact( + UpdateModelDefinedMetadatumArtifactRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateModelDefinedMetadatumArtifactRequest, + UpdateModelDefinedMetadatumArtifactResponse> + handler); + /** * Updates the properties of a model deployment. Some of the properties of `modelDeploymentConfigurationDetails` or `CategoryLogDetails` can also be updated with zero down time * when the model deployment's lifecycle state is ACTIVE or NEEDS_ATTENTION i.e `instanceShapeName`, `instanceCount` and `modelId`, separately `loadBalancerShape` or `CategoryLogDetails` diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsyncClient.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsyncClient.java index 240dce3bdd..1199c1fbbd 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsyncClient.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsyncClient.java @@ -300,7 +300,7 @@ public DataScienceAsyncClient( LOG.warn( com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( "DataScienceAsyncClient", - "getJobArtifactContent,getModelArtifactContent,getStepArtifactContent")); + "getJobArtifactContent,getModelArtifactContent,getModelCustomMetadatumArtifactContent,getModelDefinedMetadatumArtifactContent,getStepArtifactContent")); } } @@ -1748,6 +1748,155 @@ protected void beforeRetryAction() { } } + @Override + public java.util.concurrent.Future + createModelCustomMetadatumArtifact( + CreateModelCustomMetadatumArtifactRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateModelCustomMetadatumArtifactRequest, + CreateModelCustomMetadatumArtifactResponse> + handler) { + LOG.trace("Called async createModelCustomMetadatumArtifact"); + if (request.getRetryConfiguration() != null + || authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + request = + com.oracle.bmc.retrier.Retriers.wrapBodyInputStreamIfNecessary( + request, CreateModelCustomMetadatumArtifactRequest.builder()); + } + final CreateModelCustomMetadatumArtifactRequest interceptedRequest = + CreateModelCustomMetadatumArtifactConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateModelCustomMetadatumArtifactConverter.fromRequest(client, interceptedRequest); + + ib.property( + com.oracle.bmc.http.internal.AuthnClientFilter.SIGNING_STRATEGY_PROPERTY_NAME, + com.oracle.bmc.http.signing.SigningStrategy.EXCLUDE_BODY); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "CreateModelCustomMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/CreateModelCustomMetadatumArtifact"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateModelCustomMetadatumArtifactResponse> + transformer = + CreateModelCustomMetadatumArtifactConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateModelCustomMetadatumArtifactRequest, + CreateModelCustomMetadatumArtifactResponse> + handlerToUse = + new com.oracle.bmc.responses.internal.StreamClosingAsyncHandler<>(handler); + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateModelCustomMetadatumArtifactRequest, + CreateModelCustomMetadatumArtifactResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getModelCustomMetadatumArtifact(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateModelCustomMetadatumArtifactRequest, + CreateModelCustomMetadatumArtifactResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() { + LOG.debug("Resetting stream"); + com.oracle.bmc.retrier.Retriers.tryResetStreamForRetry( + interceptedRequest.getModelCustomMetadatumArtifact(), true); + } + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + createModelDefinedMetadatumArtifact( + CreateModelDefinedMetadatumArtifactRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateModelDefinedMetadatumArtifactRequest, + CreateModelDefinedMetadatumArtifactResponse> + handler) { + LOG.trace("Called async createModelDefinedMetadatumArtifact"); + if (request.getRetryConfiguration() != null + || authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + request = + com.oracle.bmc.retrier.Retriers.wrapBodyInputStreamIfNecessary( + request, CreateModelDefinedMetadatumArtifactRequest.builder()); + } + final CreateModelDefinedMetadatumArtifactRequest interceptedRequest = + CreateModelDefinedMetadatumArtifactConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateModelDefinedMetadatumArtifactConverter.fromRequest( + client, interceptedRequest); + + ib.property( + com.oracle.bmc.http.internal.AuthnClientFilter.SIGNING_STRATEGY_PROPERTY_NAME, + com.oracle.bmc.http.signing.SigningStrategy.EXCLUDE_BODY); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "CreateModelDefinedMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/CreateModelDefinedMetadatumArtifact"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateModelDefinedMetadatumArtifactResponse> + transformer = + CreateModelDefinedMetadatumArtifactConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateModelDefinedMetadatumArtifactRequest, + CreateModelDefinedMetadatumArtifactResponse> + handlerToUse = + new com.oracle.bmc.responses.internal.StreamClosingAsyncHandler<>(handler); + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateModelDefinedMetadatumArtifactRequest, + CreateModelDefinedMetadatumArtifactResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getModelDefinedMetadatumArtifact(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateModelDefinedMetadatumArtifactRequest, + CreateModelDefinedMetadatumArtifactResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() { + LOG.debug("Resetting stream"); + com.oracle.bmc.retrier.Retriers.tryResetStreamForRetry( + interceptedRequest.getModelDefinedMetadatumArtifact(), true); + } + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createModelDeployment( CreateModelDeploymentRequest request, @@ -2606,6 +2755,113 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + deleteModelCustomMetadatumArtifact( + DeleteModelCustomMetadatumArtifactRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteModelCustomMetadatumArtifactRequest, + DeleteModelCustomMetadatumArtifactResponse> + handler) { + LOG.trace("Called async deleteModelCustomMetadatumArtifact"); + final DeleteModelCustomMetadatumArtifactRequest interceptedRequest = + DeleteModelCustomMetadatumArtifactConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteModelCustomMetadatumArtifactConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "DeleteModelCustomMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/DeleteModelCustomMetadatumArtifact"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteModelCustomMetadatumArtifactResponse> + transformer = + DeleteModelCustomMetadatumArtifactConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteModelCustomMetadatumArtifactRequest, + DeleteModelCustomMetadatumArtifactResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteModelCustomMetadatumArtifactRequest, + DeleteModelCustomMetadatumArtifactResponse>, + 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< + DeleteModelCustomMetadatumArtifactRequest, + DeleteModelCustomMetadatumArtifactResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deleteModelDefinedMetadatumArtifact( + DeleteModelDefinedMetadatumArtifactRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteModelDefinedMetadatumArtifactRequest, + DeleteModelDefinedMetadatumArtifactResponse> + handler) { + LOG.trace("Called async deleteModelDefinedMetadatumArtifact"); + final DeleteModelDefinedMetadatumArtifactRequest interceptedRequest = + DeleteModelDefinedMetadatumArtifactConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteModelDefinedMetadatumArtifactConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "DeleteModelDefinedMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/DeleteModelDefinedMetadatumArtifact"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteModelDefinedMetadatumArtifactResponse> + transformer = + DeleteModelDefinedMetadatumArtifactConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteModelDefinedMetadatumArtifactRequest, + DeleteModelDefinedMetadatumArtifactResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteModelDefinedMetadatumArtifactRequest, + DeleteModelDefinedMetadatumArtifactResponse>, + 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< + DeleteModelDefinedMetadatumArtifactRequest, + DeleteModelDefinedMetadatumArtifactResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteModelDeployment( DeleteModelDeploymentRequest request, @@ -3248,6 +3504,115 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + getModelCustomMetadatumArtifactContent( + GetModelCustomMetadatumArtifactContentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetModelCustomMetadatumArtifactContentRequest, + GetModelCustomMetadatumArtifactContentResponse> + handler) { + LOG.trace("Called async getModelCustomMetadatumArtifactContent"); + final GetModelCustomMetadatumArtifactContentRequest interceptedRequest = + GetModelCustomMetadatumArtifactContentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetModelCustomMetadatumArtifactContentConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "GetModelCustomMetadatumArtifactContent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModelCustomMetadatumArtifactContent"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetModelCustomMetadatumArtifactContentResponse> + transformer = + GetModelCustomMetadatumArtifactContentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetModelCustomMetadatumArtifactContentRequest, + GetModelCustomMetadatumArtifactContentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetModelCustomMetadatumArtifactContentRequest, + GetModelCustomMetadatumArtifactContentResponse>, + 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< + GetModelCustomMetadatumArtifactContentRequest, + GetModelCustomMetadatumArtifactContentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getModelDefinedMetadatumArtifactContent( + GetModelDefinedMetadatumArtifactContentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetModelDefinedMetadatumArtifactContentRequest, + GetModelDefinedMetadatumArtifactContentResponse> + handler) { + LOG.trace("Called async getModelDefinedMetadatumArtifactContent"); + final GetModelDefinedMetadatumArtifactContentRequest interceptedRequest = + GetModelDefinedMetadatumArtifactContentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetModelDefinedMetadatumArtifactContentConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "GetModelDefinedMetadatumArtifactContent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModelDefinedMetadatumArtifactContent"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetModelDefinedMetadatumArtifactContentResponse> + transformer = + GetModelDefinedMetadatumArtifactContentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetModelDefinedMetadatumArtifactContentRequest, + GetModelDefinedMetadatumArtifactContentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetModelDefinedMetadatumArtifactContentRequest, + GetModelDefinedMetadatumArtifactContentResponse>, + java.util.concurrent.Future< + GetModelDefinedMetadatumArtifactContentResponse>> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetModelDefinedMetadatumArtifactContentRequest, + GetModelDefinedMetadatumArtifactContentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getModelDeployment( GetModelDeploymentRequest request, @@ -3796,6 +4161,112 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + headModelCustomMetadatumArtifact( + HeadModelCustomMetadatumArtifactRequest request, + final com.oracle.bmc.responses.AsyncHandler< + HeadModelCustomMetadatumArtifactRequest, + HeadModelCustomMetadatumArtifactResponse> + handler) { + LOG.trace("Called async headModelCustomMetadatumArtifact"); + final HeadModelCustomMetadatumArtifactRequest interceptedRequest = + HeadModelCustomMetadatumArtifactConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + HeadModelCustomMetadatumArtifactConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "HeadModelCustomMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/HeadModelCustomMetadatumArtifact"); + final java.util.function.Function< + javax.ws.rs.core.Response, HeadModelCustomMetadatumArtifactResponse> + transformer = + HeadModelCustomMetadatumArtifactConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + HeadModelCustomMetadatumArtifactRequest, + HeadModelCustomMetadatumArtifactResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + HeadModelCustomMetadatumArtifactRequest, + HeadModelCustomMetadatumArtifactResponse>, + java.util.concurrent.Future> + futureSupplier = client.headFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + HeadModelCustomMetadatumArtifactRequest, + HeadModelCustomMetadatumArtifactResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + headModelDefinedMetadatumArtifact( + HeadModelDefinedMetadatumArtifactRequest request, + final com.oracle.bmc.responses.AsyncHandler< + HeadModelDefinedMetadatumArtifactRequest, + HeadModelDefinedMetadatumArtifactResponse> + handler) { + LOG.trace("Called async headModelDefinedMetadatumArtifact"); + final HeadModelDefinedMetadatumArtifactRequest interceptedRequest = + HeadModelDefinedMetadatumArtifactConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + HeadModelDefinedMetadatumArtifactConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "HeadModelDefinedMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/HeadModelDefinedMetadatumArtifact"); + final java.util.function.Function< + javax.ws.rs.core.Response, HeadModelDefinedMetadatumArtifactResponse> + transformer = + HeadModelDefinedMetadatumArtifactConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + HeadModelDefinedMetadatumArtifactRequest, + HeadModelDefinedMetadatumArtifactResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + HeadModelDefinedMetadatumArtifactRequest, + HeadModelDefinedMetadatumArtifactResponse>, + java.util.concurrent.Future> + futureSupplier = client.headFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + HeadModelDefinedMetadatumArtifactRequest, + HeadModelDefinedMetadatumArtifactResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future headStepArtifact( HeadStepArtifactRequest request, @@ -4769,6 +5240,64 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + registerModelArtifactReference( + RegisterModelArtifactReferenceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RegisterModelArtifactReferenceRequest, + RegisterModelArtifactReferenceResponse> + handler) { + LOG.trace("Called async registerModelArtifactReference"); + final RegisterModelArtifactReferenceRequest interceptedRequest = + RegisterModelArtifactReferenceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RegisterModelArtifactReferenceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "RegisterModelArtifactReference", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/RegisterModelArtifactReferenceDetails/RegisterModelArtifactReference"); + final java.util.function.Function< + javax.ws.rs.core.Response, RegisterModelArtifactReferenceResponse> + transformer = + RegisterModelArtifactReferenceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RegisterModelArtifactReferenceRequest, + RegisterModelArtifactReferenceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RegisterModelArtifactReferenceRequest, + RegisterModelArtifactReferenceResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRegisterModelArtifactReferenceDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RegisterModelArtifactReferenceRequest, RegisterModelArtifactReferenceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future restoreArchivedModelArtifact( @@ -5024,6 +5553,155 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + updateModelCustomMetadatumArtifact( + UpdateModelCustomMetadatumArtifactRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateModelCustomMetadatumArtifactRequest, + UpdateModelCustomMetadatumArtifactResponse> + handler) { + LOG.trace("Called async updateModelCustomMetadatumArtifact"); + if (request.getRetryConfiguration() != null + || authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + request = + com.oracle.bmc.retrier.Retriers.wrapBodyInputStreamIfNecessary( + request, UpdateModelCustomMetadatumArtifactRequest.builder()); + } + final UpdateModelCustomMetadatumArtifactRequest interceptedRequest = + UpdateModelCustomMetadatumArtifactConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateModelCustomMetadatumArtifactConverter.fromRequest(client, interceptedRequest); + + ib.property( + com.oracle.bmc.http.internal.AuthnClientFilter.SIGNING_STRATEGY_PROPERTY_NAME, + com.oracle.bmc.http.signing.SigningStrategy.EXCLUDE_BODY); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "UpdateModelCustomMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/UpdateModelCustomMetadatumArtifact"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateModelCustomMetadatumArtifactResponse> + transformer = + UpdateModelCustomMetadatumArtifactConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateModelCustomMetadatumArtifactRequest, + UpdateModelCustomMetadatumArtifactResponse> + handlerToUse = + new com.oracle.bmc.responses.internal.StreamClosingAsyncHandler<>(handler); + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateModelCustomMetadatumArtifactRequest, + UpdateModelCustomMetadatumArtifactResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getModelCustomMetadatumArtifact(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateModelCustomMetadatumArtifactRequest, + UpdateModelCustomMetadatumArtifactResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() { + LOG.debug("Resetting stream"); + com.oracle.bmc.retrier.Retriers.tryResetStreamForRetry( + interceptedRequest.getModelCustomMetadatumArtifact(), true); + } + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + updateModelDefinedMetadatumArtifact( + UpdateModelDefinedMetadatumArtifactRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateModelDefinedMetadatumArtifactRequest, + UpdateModelDefinedMetadatumArtifactResponse> + handler) { + LOG.trace("Called async updateModelDefinedMetadatumArtifact"); + if (request.getRetryConfiguration() != null + || authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + request = + com.oracle.bmc.retrier.Retriers.wrapBodyInputStreamIfNecessary( + request, UpdateModelDefinedMetadatumArtifactRequest.builder()); + } + final UpdateModelDefinedMetadatumArtifactRequest interceptedRequest = + UpdateModelDefinedMetadatumArtifactConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateModelDefinedMetadatumArtifactConverter.fromRequest( + client, interceptedRequest); + + ib.property( + com.oracle.bmc.http.internal.AuthnClientFilter.SIGNING_STRATEGY_PROPERTY_NAME, + com.oracle.bmc.http.signing.SigningStrategy.EXCLUDE_BODY); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "UpdateModelDefinedMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/UpdateModelDefinedMetadatumArtifact"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateModelDefinedMetadatumArtifactResponse> + transformer = + UpdateModelDefinedMetadatumArtifactConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateModelDefinedMetadatumArtifactRequest, + UpdateModelDefinedMetadatumArtifactResponse> + handlerToUse = + new com.oracle.bmc.responses.internal.StreamClosingAsyncHandler<>(handler); + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateModelDefinedMetadatumArtifactRequest, + UpdateModelDefinedMetadatumArtifactResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getModelDefinedMetadatumArtifact(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateModelDefinedMetadatumArtifactRequest, + UpdateModelDefinedMetadatumArtifactResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() { + LOG.debug("Resetting stream"); + com.oracle.bmc.retrier.Retriers.tryResetStreamForRetry( + interceptedRequest.getModelDefinedMetadatumArtifact(), true); + } + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateModelDeployment( UpdateModelDeploymentRequest request, diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceClient.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceClient.java index 2bbb4c343c..07bb628699 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceClient.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceClient.java @@ -378,7 +378,7 @@ protected DataScienceClient( LOG.warn( com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( "DataScienceClient", - "getJobArtifactContent,getModelArtifactContent,getStepArtifactContent")); + "getJobArtifactContent,getModelArtifactContent,getModelCustomMetadatumArtifactContent,getModelDefinedMetadatumArtifactContent,getStepArtifactContent")); } } @@ -1615,6 +1615,168 @@ public CreateModelArtifactResponse createModelArtifact(CreateModelArtifactReques } } + @Override + public CreateModelCustomMetadatumArtifactResponse createModelCustomMetadatumArtifact( + CreateModelCustomMetadatumArtifactRequest request) { + LOG.trace("Called createModelCustomMetadatumArtifact"); + try { + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + request.getRetryConfiguration(), retryConfiguration, false); + if (request.getRetryConfiguration() != null + || retryConfiguration != null + || shouldRetryBecauseOfWaiterConfiguration(retrier) + || authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + request = + com.oracle.bmc.retrier.Retriers.wrapBodyInputStreamIfNecessary( + request, CreateModelCustomMetadatumArtifactRequest.builder()); + } + final CreateModelCustomMetadatumArtifactRequest interceptedRequest = + CreateModelCustomMetadatumArtifactConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateModelCustomMetadatumArtifactConverter.fromRequest( + client, interceptedRequest); + + ib.property( + com.oracle.bmc.http.internal.AuthnClientFilter.SIGNING_STRATEGY_PROPERTY_NAME, + com.oracle.bmc.http.signing.SigningStrategy.EXCLUDE_BODY); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "CreateModelCustomMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/CreateModelCustomMetadatumArtifact"); + java.util.function.Function< + javax.ws.rs.core.Response, CreateModelCustomMetadatumArtifactResponse> + transformer = + CreateModelCustomMetadatumArtifactConverter.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 + .getModelCustomMetadatumArtifact(), + 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 + .getModelCustomMetadatumArtifact(), + true); + } + throw e; // rethrow + } + }); + }); + } finally { + com.oracle.bmc.io.internal.KeepOpenInputStream.closeStream( + request.getModelCustomMetadatumArtifact()); + } + } + + @Override + public CreateModelDefinedMetadatumArtifactResponse createModelDefinedMetadatumArtifact( + CreateModelDefinedMetadatumArtifactRequest request) { + LOG.trace("Called createModelDefinedMetadatumArtifact"); + try { + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + request.getRetryConfiguration(), retryConfiguration, false); + if (request.getRetryConfiguration() != null + || retryConfiguration != null + || shouldRetryBecauseOfWaiterConfiguration(retrier) + || authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + request = + com.oracle.bmc.retrier.Retriers.wrapBodyInputStreamIfNecessary( + request, CreateModelDefinedMetadatumArtifactRequest.builder()); + } + final CreateModelDefinedMetadatumArtifactRequest interceptedRequest = + CreateModelDefinedMetadatumArtifactConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateModelDefinedMetadatumArtifactConverter.fromRequest( + client, interceptedRequest); + + ib.property( + com.oracle.bmc.http.internal.AuthnClientFilter.SIGNING_STRATEGY_PROPERTY_NAME, + com.oracle.bmc.http.signing.SigningStrategy.EXCLUDE_BODY); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "CreateModelDefinedMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/CreateModelDefinedMetadatumArtifact"); + java.util.function.Function< + javax.ws.rs.core.Response, CreateModelDefinedMetadatumArtifactResponse> + transformer = + CreateModelDefinedMetadatumArtifactConverter.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 + .getModelDefinedMetadatumArtifact(), + 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 + .getModelDefinedMetadatumArtifact(), + true); + } + throw e; // rethrow + } + }); + }); + } finally { + com.oracle.bmc.io.internal.KeepOpenInputStream.closeStream( + request.getModelDefinedMetadatumArtifact()); + } + } + @Override public CreateModelDeploymentResponse createModelDeployment( CreateModelDeploymentRequest request) { @@ -2326,6 +2488,87 @@ public DeleteModelResponse deleteModel(DeleteModelRequest request) { }); } + @Override + public DeleteModelCustomMetadatumArtifactResponse deleteModelCustomMetadatumArtifact( + DeleteModelCustomMetadatumArtifactRequest request) { + LOG.trace("Called deleteModelCustomMetadatumArtifact"); + final DeleteModelCustomMetadatumArtifactRequest interceptedRequest = + DeleteModelCustomMetadatumArtifactConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteModelCustomMetadatumArtifactConverter.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( + "DataScience", + "DeleteModelCustomMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/DeleteModelCustomMetadatumArtifact"); + java.util.function.Function< + javax.ws.rs.core.Response, DeleteModelCustomMetadatumArtifactResponse> + transformer = + DeleteModelCustomMetadatumArtifactConverter.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 DeleteModelDefinedMetadatumArtifactResponse deleteModelDefinedMetadatumArtifact( + DeleteModelDefinedMetadatumArtifactRequest request) { + LOG.trace("Called deleteModelDefinedMetadatumArtifact"); + final DeleteModelDefinedMetadatumArtifactRequest interceptedRequest = + DeleteModelDefinedMetadatumArtifactConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteModelDefinedMetadatumArtifactConverter.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( + "DataScience", + "DeleteModelDefinedMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/DeleteModelDefinedMetadatumArtifact"); + java.util.function.Function< + javax.ws.rs.core.Response, DeleteModelDefinedMetadatumArtifactResponse> + transformer = + DeleteModelDefinedMetadatumArtifactConverter.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 DeleteModelDeploymentResponse deleteModelDeployment( DeleteModelDeploymentRequest request) { @@ -2848,6 +3091,86 @@ public GetModelArtifactContentResponse getModelArtifactContent( }); } + @Override + public GetModelCustomMetadatumArtifactContentResponse getModelCustomMetadatumArtifactContent( + GetModelCustomMetadatumArtifactContentRequest request) { + LOG.trace("Called getModelCustomMetadatumArtifactContent"); + final GetModelCustomMetadatumArtifactContentRequest interceptedRequest = + GetModelCustomMetadatumArtifactContentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetModelCustomMetadatumArtifactContentConverter.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( + "DataScience", + "GetModelCustomMetadatumArtifactContent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModelCustomMetadatumArtifactContent"); + java.util.function.Function< + javax.ws.rs.core.Response, GetModelCustomMetadatumArtifactContentResponse> + transformer = + GetModelCustomMetadatumArtifactContentConverter.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 GetModelDefinedMetadatumArtifactContentResponse getModelDefinedMetadatumArtifactContent( + GetModelDefinedMetadatumArtifactContentRequest request) { + LOG.trace("Called getModelDefinedMetadatumArtifactContent"); + final GetModelDefinedMetadatumArtifactContentRequest interceptedRequest = + GetModelDefinedMetadatumArtifactContentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetModelDefinedMetadatumArtifactContentConverter.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( + "DataScience", + "GetModelDefinedMetadatumArtifactContent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModelDefinedMetadatumArtifactContent"); + java.util.function.Function< + javax.ws.rs.core.Response, GetModelDefinedMetadatumArtifactContentResponse> + transformer = + GetModelDefinedMetadatumArtifactContentConverter.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 GetModelDeploymentResponse getModelDeployment(GetModelDeploymentRequest request) { LOG.trace("Called getModelDeployment"); @@ -3288,6 +3611,86 @@ public HeadModelArtifactResponse headModelArtifact(HeadModelArtifactRequest requ }); } + @Override + public HeadModelCustomMetadatumArtifactResponse headModelCustomMetadatumArtifact( + HeadModelCustomMetadatumArtifactRequest request) { + LOG.trace("Called headModelCustomMetadatumArtifact"); + final HeadModelCustomMetadatumArtifactRequest interceptedRequest = + HeadModelCustomMetadatumArtifactConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + HeadModelCustomMetadatumArtifactConverter.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( + "DataScience", + "HeadModelCustomMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/HeadModelCustomMetadatumArtifact"); + java.util.function.Function< + javax.ws.rs.core.Response, HeadModelCustomMetadatumArtifactResponse> + transformer = + HeadModelCustomMetadatumArtifactConverter.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.head(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public HeadModelDefinedMetadatumArtifactResponse headModelDefinedMetadatumArtifact( + HeadModelDefinedMetadatumArtifactRequest request) { + LOG.trace("Called headModelDefinedMetadatumArtifact"); + final HeadModelDefinedMetadatumArtifactRequest interceptedRequest = + HeadModelDefinedMetadatumArtifactConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + HeadModelDefinedMetadatumArtifactConverter.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( + "DataScience", + "HeadModelDefinedMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/HeadModelDefinedMetadatumArtifact"); + java.util.function.Function< + javax.ws.rs.core.Response, HeadModelDefinedMetadatumArtifactResponse> + transformer = + HeadModelDefinedMetadatumArtifactConverter.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.head(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public HeadStepArtifactResponse headStepArtifact(HeadStepArtifactRequest request) { LOG.trace("Called headStepArtifact"); @@ -4058,6 +4461,51 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request }); } + @Override + public RegisterModelArtifactReferenceResponse registerModelArtifactReference( + RegisterModelArtifactReferenceRequest request) { + LOG.trace("Called registerModelArtifactReference"); + final RegisterModelArtifactReferenceRequest interceptedRequest = + RegisterModelArtifactReferenceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RegisterModelArtifactReferenceConverter.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( + "DataScience", + "RegisterModelArtifactReference", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/RegisterModelArtifactReferenceDetails/RegisterModelArtifactReference"); + java.util.function.Function< + javax.ws.rs.core.Response, RegisterModelArtifactReferenceResponse> + transformer = + RegisterModelArtifactReferenceConverter.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 + .getRegisterModelArtifactReferenceDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public RestoreArchivedModelArtifactResponse restoreArchivedModelArtifact( RestoreArchivedModelArtifactRequest request) { @@ -4258,6 +4706,168 @@ public UpdateModelResponse updateModel(UpdateModelRequest request) { }); } + @Override + public UpdateModelCustomMetadatumArtifactResponse updateModelCustomMetadatumArtifact( + UpdateModelCustomMetadatumArtifactRequest request) { + LOG.trace("Called updateModelCustomMetadatumArtifact"); + 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, UpdateModelCustomMetadatumArtifactRequest.builder()); + } + final UpdateModelCustomMetadatumArtifactRequest interceptedRequest = + UpdateModelCustomMetadatumArtifactConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateModelCustomMetadatumArtifactConverter.fromRequest( + client, interceptedRequest); + + ib.property( + com.oracle.bmc.http.internal.AuthnClientFilter.SIGNING_STRATEGY_PROPERTY_NAME, + com.oracle.bmc.http.signing.SigningStrategy.EXCLUDE_BODY); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "UpdateModelCustomMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/UpdateModelCustomMetadatumArtifact"); + java.util.function.Function< + javax.ws.rs.core.Response, UpdateModelCustomMetadatumArtifactResponse> + transformer = + UpdateModelCustomMetadatumArtifactConverter.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.put( + ib, + retriedRequest + .getModelCustomMetadatumArtifact(), + 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 + .getModelCustomMetadatumArtifact(), + true); + } + throw e; // rethrow + } + }); + }); + } finally { + com.oracle.bmc.io.internal.KeepOpenInputStream.closeStream( + request.getModelCustomMetadatumArtifact()); + } + } + + @Override + public UpdateModelDefinedMetadatumArtifactResponse updateModelDefinedMetadatumArtifact( + UpdateModelDefinedMetadatumArtifactRequest request) { + LOG.trace("Called updateModelDefinedMetadatumArtifact"); + 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, UpdateModelDefinedMetadatumArtifactRequest.builder()); + } + final UpdateModelDefinedMetadatumArtifactRequest interceptedRequest = + UpdateModelDefinedMetadatumArtifactConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateModelDefinedMetadatumArtifactConverter.fromRequest( + client, interceptedRequest); + + ib.property( + com.oracle.bmc.http.internal.AuthnClientFilter.SIGNING_STRATEGY_PROPERTY_NAME, + com.oracle.bmc.http.signing.SigningStrategy.EXCLUDE_BODY); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "UpdateModelDefinedMetadatumArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/UpdateModelDefinedMetadatumArtifact"); + java.util.function.Function< + javax.ws.rs.core.Response, UpdateModelDefinedMetadatumArtifactResponse> + transformer = + UpdateModelDefinedMetadatumArtifactConverter.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.put( + ib, + retriedRequest + .getModelDefinedMetadatumArtifact(), + 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 + .getModelDefinedMetadatumArtifact(), + true); + } + throw e; // rethrow + } + }); + }); + } finally { + com.oracle.bmc.io.internal.KeepOpenInputStream.closeStream( + request.getModelDefinedMetadatumArtifact()); + } + } + @Override public UpdateModelDeploymentResponse updateModelDeployment( UpdateModelDeploymentRequest request) { diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/CreateModelCustomMetadatumArtifactConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/CreateModelCustomMetadatumArtifactConverter.java new file mode 100644 index 0000000000..d297571d74 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/CreateModelCustomMetadatumArtifactConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datascience.model.*; +import com.oracle.bmc.datascience.requests.*; +import com.oracle.bmc.datascience.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class CreateModelCustomMetadatumArtifactConverter { + 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(CreateModelCustomMetadatumArtifactConverter.class); + + public static com.oracle.bmc.datascience.requests.CreateModelCustomMetadatumArtifactRequest + interceptRequest( + com.oracle.bmc.datascience.requests.CreateModelCustomMetadatumArtifactRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datascience.requests.CreateModelCustomMetadatumArtifactRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + Validate.notBlank(request.getMetadatumKeyName(), "metadatumKeyName must not be blank"); + Validate.notNull( + request.getModelCustomMetadatumArtifact(), + "modelCustomMetadatumArtifact is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190101") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("customMetadata") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMetadatumKeyName())) + .path("artifact"); + + 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.getContentLength() != null) { + ib.header("content-length", request.getContentLength()); + } + + if (request.getContentDisposition() != null) { + ib.header("content-disposition", request.getContentDisposition()); + } + + 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.datascience.responses.CreateModelCustomMetadatumArtifactResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses.CreateModelCustomMetadatumArtifactResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .CreateModelCustomMetadatumArtifactResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .CreateModelCustomMetadatumArtifactResponse>() { + @Override + public com.oracle.bmc.datascience.responses + .CreateModelCustomMetadatumArtifactResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datascience.responses.CreateModelCustomMetadatumArtifactResponse"); + 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.datascience.responses + .CreateModelCustomMetadatumArtifactResponse.Builder + builder = + com.oracle.bmc.datascience.responses + .CreateModelCustomMetadatumArtifactResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + 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.datascience.responses + .CreateModelCustomMetadatumArtifactResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/CreateModelDefinedMetadatumArtifactConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/CreateModelDefinedMetadatumArtifactConverter.java new file mode 100644 index 0000000000..010e98068f --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/CreateModelDefinedMetadatumArtifactConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datascience.model.*; +import com.oracle.bmc.datascience.requests.*; +import com.oracle.bmc.datascience.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class CreateModelDefinedMetadatumArtifactConverter { + 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(CreateModelDefinedMetadatumArtifactConverter.class); + + public static com.oracle.bmc.datascience.requests.CreateModelDefinedMetadatumArtifactRequest + interceptRequest( + com.oracle.bmc.datascience.requests.CreateModelDefinedMetadatumArtifactRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datascience.requests.CreateModelDefinedMetadatumArtifactRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + Validate.notBlank(request.getMetadatumKeyName(), "metadatumKeyName must not be blank"); + Validate.notNull( + request.getModelDefinedMetadatumArtifact(), + "modelDefinedMetadatumArtifact is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190101") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("definedMetadata") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMetadatumKeyName())) + .path("artifact"); + + 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.getContentLength() != null) { + ib.header("content-length", request.getContentLength()); + } + + if (request.getContentDisposition() != null) { + ib.header("content-disposition", request.getContentDisposition()); + } + + 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.datascience.responses + .CreateModelDefinedMetadatumArtifactResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .CreateModelDefinedMetadatumArtifactResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .CreateModelDefinedMetadatumArtifactResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .CreateModelDefinedMetadatumArtifactResponse>() { + @Override + public com.oracle.bmc.datascience.responses + .CreateModelDefinedMetadatumArtifactResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datascience.responses.CreateModelDefinedMetadatumArtifactResponse"); + 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.datascience.responses + .CreateModelDefinedMetadatumArtifactResponse.Builder + builder = + com.oracle.bmc.datascience.responses + .CreateModelDefinedMetadatumArtifactResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + 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.datascience.responses + .CreateModelDefinedMetadatumArtifactResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/DeleteModelCustomMetadatumArtifactConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/DeleteModelCustomMetadatumArtifactConverter.java new file mode 100644 index 0000000000..4ef65dfdf6 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/DeleteModelCustomMetadatumArtifactConverter.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datascience.model.*; +import com.oracle.bmc.datascience.requests.*; +import com.oracle.bmc.datascience.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class DeleteModelCustomMetadatumArtifactConverter { + 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(DeleteModelCustomMetadatumArtifactConverter.class); + + public static com.oracle.bmc.datascience.requests.DeleteModelCustomMetadatumArtifactRequest + interceptRequest( + com.oracle.bmc.datascience.requests.DeleteModelCustomMetadatumArtifactRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datascience.requests.DeleteModelCustomMetadatumArtifactRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + Validate.notBlank(request.getMetadatumKeyName(), "metadatumKeyName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190101") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("customMetadata") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMetadatumKeyName())) + .path("artifact"); + + 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.datascience.responses.DeleteModelCustomMetadatumArtifactResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses.DeleteModelCustomMetadatumArtifactResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .DeleteModelCustomMetadatumArtifactResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .DeleteModelCustomMetadatumArtifactResponse>() { + @Override + public com.oracle.bmc.datascience.responses + .DeleteModelCustomMetadatumArtifactResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datascience.responses.DeleteModelCustomMetadatumArtifactResponse"); + 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.datascience.responses + .DeleteModelCustomMetadatumArtifactResponse.Builder + builder = + com.oracle.bmc.datascience.responses + .DeleteModelCustomMetadatumArtifactResponse + .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.datascience.responses + .DeleteModelCustomMetadatumArtifactResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/DeleteModelDefinedMetadatumArtifactConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/DeleteModelDefinedMetadatumArtifactConverter.java new file mode 100644 index 0000000000..0103f955ed --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/DeleteModelDefinedMetadatumArtifactConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datascience.model.*; +import com.oracle.bmc.datascience.requests.*; +import com.oracle.bmc.datascience.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class DeleteModelDefinedMetadatumArtifactConverter { + 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(DeleteModelDefinedMetadatumArtifactConverter.class); + + public static com.oracle.bmc.datascience.requests.DeleteModelDefinedMetadatumArtifactRequest + interceptRequest( + com.oracle.bmc.datascience.requests.DeleteModelDefinedMetadatumArtifactRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datascience.requests.DeleteModelDefinedMetadatumArtifactRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + Validate.notBlank(request.getMetadatumKeyName(), "metadatumKeyName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190101") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("definedMetadata") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMetadatumKeyName())) + .path("artifact"); + + 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.datascience.responses + .DeleteModelDefinedMetadatumArtifactResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .DeleteModelDefinedMetadatumArtifactResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .DeleteModelDefinedMetadatumArtifactResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .DeleteModelDefinedMetadatumArtifactResponse>() { + @Override + public com.oracle.bmc.datascience.responses + .DeleteModelDefinedMetadatumArtifactResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datascience.responses.DeleteModelDefinedMetadatumArtifactResponse"); + 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.datascience.responses + .DeleteModelDefinedMetadatumArtifactResponse.Builder + builder = + com.oracle.bmc.datascience.responses + .DeleteModelDefinedMetadatumArtifactResponse + .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.datascience.responses + .DeleteModelDefinedMetadatumArtifactResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/GetModelCustomMetadatumArtifactContentConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/GetModelCustomMetadatumArtifactContentConverter.java new file mode 100644 index 0000000000..8600a0c7f6 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/GetModelCustomMetadatumArtifactContentConverter.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.internal.http; + +import com.oracle.bmc.datascience.model.*; +import com.oracle.bmc.datascience.requests.*; +import com.oracle.bmc.datascience.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class GetModelCustomMetadatumArtifactContentConverter { + 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( + GetModelCustomMetadatumArtifactContentConverter.class); + + public static com.oracle.bmc.datascience.requests.GetModelCustomMetadatumArtifactContentRequest + interceptRequest( + com.oracle.bmc.datascience.requests + .GetModelCustomMetadatumArtifactContentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datascience.requests.GetModelCustomMetadatumArtifactContentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + Validate.notBlank(request.getMetadatumKeyName(), "metadatumKeyName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190101") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("customMetadata") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMetadatumKeyName())) + .path("artifact") + .path("content"); + + 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.getRange() != null) { + ib.header("range", request.getRange()); + } + + 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.datascience.responses + .GetModelCustomMetadatumArtifactContentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .GetModelCustomMetadatumArtifactContentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .GetModelCustomMetadatumArtifactContentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .GetModelCustomMetadatumArtifactContentResponse>() { + @Override + public com.oracle.bmc.datascience.responses + .GetModelCustomMetadatumArtifactContentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datascience.responses.GetModelCustomMetadatumArtifactContentResponse"); + 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.datascience.responses + .GetModelCustomMetadatumArtifactContentResponse + .Builder + builder = + com.oracle.bmc.datascience.responses + .GetModelCustomMetadatumArtifactContentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inputStream(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> 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> + contentDispositionHeader = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "content-disposition"); + if (contentDispositionHeader.isPresent()) { + builder.contentDisposition( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-disposition", + contentDispositionHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentMd5Header = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-md5"); + if (contentMd5Header.isPresent()) { + builder.contentMd5( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-md5", + contentMd5Header.get().get(0), + String.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.datascience.responses + .GetModelCustomMetadatumArtifactContentResponse + responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/GetModelDefinedMetadatumArtifactContentConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/GetModelDefinedMetadatumArtifactContentConverter.java new file mode 100644 index 0000000000..ec61b6050b --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/GetModelDefinedMetadatumArtifactContentConverter.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.internal.http; + +import com.oracle.bmc.datascience.model.*; +import com.oracle.bmc.datascience.requests.*; +import com.oracle.bmc.datascience.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class GetModelDefinedMetadatumArtifactContentConverter { + 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( + GetModelDefinedMetadatumArtifactContentConverter.class); + + public static com.oracle.bmc.datascience.requests.GetModelDefinedMetadatumArtifactContentRequest + interceptRequest( + com.oracle.bmc.datascience.requests + .GetModelDefinedMetadatumArtifactContentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datascience.requests.GetModelDefinedMetadatumArtifactContentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + Validate.notBlank(request.getMetadatumKeyName(), "metadatumKeyName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190101") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("definedMetadata") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMetadatumKeyName())) + .path("artifact") + .path("content"); + + 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.getRange() != null) { + ib.header("range", request.getRange()); + } + + 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.datascience.responses + .GetModelDefinedMetadatumArtifactContentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .GetModelDefinedMetadatumArtifactContentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .GetModelDefinedMetadatumArtifactContentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .GetModelDefinedMetadatumArtifactContentResponse>() { + @Override + public com.oracle.bmc.datascience.responses + .GetModelDefinedMetadatumArtifactContentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datascience.responses.GetModelDefinedMetadatumArtifactContentResponse"); + 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.datascience.responses + .GetModelDefinedMetadatumArtifactContentResponse + .Builder + builder = + com.oracle.bmc.datascience.responses + .GetModelDefinedMetadatumArtifactContentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inputStream(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> 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> + contentDispositionHeader = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "content-disposition"); + if (contentDispositionHeader.isPresent()) { + builder.contentDisposition( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-disposition", + contentDispositionHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentMd5Header = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-md5"); + if (contentMd5Header.isPresent()) { + builder.contentMd5( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-md5", + contentMd5Header.get().get(0), + String.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.datascience.responses + .GetModelDefinedMetadatumArtifactContentResponse + responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/HeadModelCustomMetadatumArtifactConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/HeadModelCustomMetadatumArtifactConverter.java new file mode 100644 index 0000000000..6bee51f4b3 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/HeadModelCustomMetadatumArtifactConverter.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datascience.model.*; +import com.oracle.bmc.datascience.requests.*; +import com.oracle.bmc.datascience.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class HeadModelCustomMetadatumArtifactConverter { + 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(HeadModelCustomMetadatumArtifactConverter.class); + + public static com.oracle.bmc.datascience.requests.HeadModelCustomMetadatumArtifactRequest + interceptRequest( + com.oracle.bmc.datascience.requests.HeadModelCustomMetadatumArtifactRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datascience.requests.HeadModelCustomMetadatumArtifactRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + Validate.notBlank(request.getMetadatumKeyName(), "metadatumKeyName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190101") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("customMetadata") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMetadatumKeyName())) + .path("artifact") + .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.datascience.responses.HeadModelCustomMetadatumArtifactResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses.HeadModelCustomMetadatumArtifactResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .HeadModelCustomMetadatumArtifactResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .HeadModelCustomMetadatumArtifactResponse>() { + @Override + public com.oracle.bmc.datascience.responses + .HeadModelCustomMetadatumArtifactResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datascience.responses.HeadModelCustomMetadatumArtifactResponse"); + 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.datascience.responses + .HeadModelCustomMetadatumArtifactResponse.Builder + builder = + com.oracle.bmc.datascience.responses + .HeadModelCustomMetadatumArtifactResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + 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> 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> + contentDispositionHeader = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "content-disposition"); + if (contentDispositionHeader.isPresent()) { + builder.contentDisposition( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-disposition", + contentDispositionHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentMd5Header = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-md5"); + if (contentMd5Header.isPresent()) { + builder.contentMd5( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-md5", + contentMd5Header.get().get(0), + String.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.datascience.responses + .HeadModelCustomMetadatumArtifactResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/HeadModelDefinedMetadatumArtifactConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/HeadModelDefinedMetadatumArtifactConverter.java new file mode 100644 index 0000000000..ca93f8d710 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/HeadModelDefinedMetadatumArtifactConverter.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datascience.model.*; +import com.oracle.bmc.datascience.requests.*; +import com.oracle.bmc.datascience.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class HeadModelDefinedMetadatumArtifactConverter { + 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(HeadModelDefinedMetadatumArtifactConverter.class); + + public static com.oracle.bmc.datascience.requests.HeadModelDefinedMetadatumArtifactRequest + interceptRequest( + com.oracle.bmc.datascience.requests.HeadModelDefinedMetadatumArtifactRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datascience.requests.HeadModelDefinedMetadatumArtifactRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + Validate.notBlank(request.getMetadatumKeyName(), "metadatumKeyName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190101") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("definedMetadata") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMetadatumKeyName())) + .path("artifact") + .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.datascience.responses.HeadModelDefinedMetadatumArtifactResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses.HeadModelDefinedMetadatumArtifactResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .HeadModelDefinedMetadatumArtifactResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .HeadModelDefinedMetadatumArtifactResponse>() { + @Override + public com.oracle.bmc.datascience.responses + .HeadModelDefinedMetadatumArtifactResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datascience.responses.HeadModelDefinedMetadatumArtifactResponse"); + 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.datascience.responses + .HeadModelDefinedMetadatumArtifactResponse.Builder + builder = + com.oracle.bmc.datascience.responses + .HeadModelDefinedMetadatumArtifactResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + 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> 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> + contentDispositionHeader = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "content-disposition"); + if (contentDispositionHeader.isPresent()) { + builder.contentDisposition( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-disposition", + contentDispositionHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentMd5Header = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-md5"); + if (contentMd5Header.isPresent()) { + builder.contentMd5( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-md5", + contentMd5Header.get().get(0), + String.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.datascience.responses + .HeadModelDefinedMetadatumArtifactResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/ListModelVersionSetsConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/ListModelVersionSetsConverter.java index 5efcc56f6c..04e04263c3 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/ListModelVersionSetsConverter.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/ListModelVersionSetsConverter.java @@ -40,6 +40,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getCompartmentId())); + if (request.getCategory() != null) { + target = + target.queryParam( + "category", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCategory().getValue())); + } + if (request.getId() != null) { target = target.queryParam( diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/ListModelsConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/ListModelsConverter.java index 2d9fe0f541..ff60463c95 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/ListModelsConverter.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/ListModelsConverter.java @@ -56,6 +56,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getVersionLabel())); } + if (request.getCategory() != null) { + target = + target.queryParam( + "category", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCategory().getValue())); + } + if (request.getId() != null) { target = target.queryParam( diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/RegisterModelArtifactReferenceConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/RegisterModelArtifactReferenceConverter.java new file mode 100644 index 0000000000..449e4b2140 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/RegisterModelArtifactReferenceConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datascience.model.*; +import com.oracle.bmc.datascience.requests.*; +import com.oracle.bmc.datascience.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class RegisterModelArtifactReferenceConverter { + 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(RegisterModelArtifactReferenceConverter.class); + + public static com.oracle.bmc.datascience.requests.RegisterModelArtifactReferenceRequest + interceptRequest( + com.oracle.bmc.datascience.requests.RegisterModelArtifactReferenceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datascience.requests.RegisterModelArtifactReferenceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getRegisterModelArtifactReferenceDetails(), + "registerModelArtifactReferenceDetails is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190101") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("actions") + .path("registerArtifactReference"); + + 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.datascience.responses.RegisterModelArtifactReferenceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses.RegisterModelArtifactReferenceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses.RegisterModelArtifactReferenceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .RegisterModelArtifactReferenceResponse>() { + @Override + public com.oracle.bmc.datascience.responses + .RegisterModelArtifactReferenceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datascience.responses.RegisterModelArtifactReferenceResponse"); + 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.datascience.responses + .RegisterModelArtifactReferenceResponse.Builder + builder = + com.oracle.bmc.datascience.responses + .RegisterModelArtifactReferenceResponse + .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.datascience.responses + .RegisterModelArtifactReferenceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/UpdateModelCustomMetadatumArtifactConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/UpdateModelCustomMetadatumArtifactConverter.java new file mode 100644 index 0000000000..811ffb2701 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/UpdateModelCustomMetadatumArtifactConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datascience.model.*; +import com.oracle.bmc.datascience.requests.*; +import com.oracle.bmc.datascience.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class UpdateModelCustomMetadatumArtifactConverter { + 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(UpdateModelCustomMetadatumArtifactConverter.class); + + public static com.oracle.bmc.datascience.requests.UpdateModelCustomMetadatumArtifactRequest + interceptRequest( + com.oracle.bmc.datascience.requests.UpdateModelCustomMetadatumArtifactRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datascience.requests.UpdateModelCustomMetadatumArtifactRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + Validate.notBlank(request.getMetadatumKeyName(), "metadatumKeyName must not be blank"); + Validate.notNull( + request.getModelCustomMetadatumArtifact(), + "modelCustomMetadatumArtifact is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190101") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("customMetadata") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMetadatumKeyName())) + .path("artifact"); + + 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.getContentLength() != null) { + ib.header("content-length", request.getContentLength()); + } + + if (request.getContentDisposition() != null) { + ib.header("content-disposition", request.getContentDisposition()); + } + + 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.datascience.responses.UpdateModelCustomMetadatumArtifactResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses.UpdateModelCustomMetadatumArtifactResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .UpdateModelCustomMetadatumArtifactResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .UpdateModelCustomMetadatumArtifactResponse>() { + @Override + public com.oracle.bmc.datascience.responses + .UpdateModelCustomMetadatumArtifactResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datascience.responses.UpdateModelCustomMetadatumArtifactResponse"); + 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.datascience.responses + .UpdateModelCustomMetadatumArtifactResponse.Builder + builder = + com.oracle.bmc.datascience.responses + .UpdateModelCustomMetadatumArtifactResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + 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.datascience.responses + .UpdateModelCustomMetadatumArtifactResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/UpdateModelDefinedMetadatumArtifactConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/UpdateModelDefinedMetadatumArtifactConverter.java new file mode 100644 index 0000000000..3a73d8c18d --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/UpdateModelDefinedMetadatumArtifactConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datascience.model.*; +import com.oracle.bmc.datascience.requests.*; +import com.oracle.bmc.datascience.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class UpdateModelDefinedMetadatumArtifactConverter { + 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(UpdateModelDefinedMetadatumArtifactConverter.class); + + public static com.oracle.bmc.datascience.requests.UpdateModelDefinedMetadatumArtifactRequest + interceptRequest( + com.oracle.bmc.datascience.requests.UpdateModelDefinedMetadatumArtifactRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datascience.requests.UpdateModelDefinedMetadatumArtifactRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + Validate.notBlank(request.getMetadatumKeyName(), "metadatumKeyName must not be blank"); + Validate.notNull( + request.getModelDefinedMetadatumArtifact(), + "modelDefinedMetadatumArtifact is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190101") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("definedMetadata") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMetadatumKeyName())) + .path("artifact"); + + 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.getContentLength() != null) { + ib.header("content-length", request.getContentLength()); + } + + if (request.getContentDisposition() != null) { + ib.header("content-disposition", request.getContentDisposition()); + } + + 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.datascience.responses + .UpdateModelDefinedMetadatumArtifactResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .UpdateModelDefinedMetadatumArtifactResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .UpdateModelDefinedMetadatumArtifactResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .UpdateModelDefinedMetadatumArtifactResponse>() { + @Override + public com.oracle.bmc.datascience.responses + .UpdateModelDefinedMetadatumArtifactResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datascience.responses.UpdateModelDefinedMetadatumArtifactResponse"); + 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.datascience.responses + .UpdateModelDefinedMetadatumArtifactResponse.Builder + builder = + com.oracle.bmc.datascience.responses + .UpdateModelDefinedMetadatumArtifactResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + 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.datascience.responses + .UpdateModelDefinedMetadatumArtifactResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/Metadata.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/Metadata.java index 07a6529f45..43c9d5b8a3 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/Metadata.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/Metadata.java @@ -19,13 +19,28 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class Metadata extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"key", "value", "description", "category"}) - public Metadata(String key, String value, String description, String category) { + @java.beans.ConstructorProperties({ + "key", + "value", + "description", + "category", + "keywords", + "hasArtifact" + }) + public Metadata( + String key, + String value, + String description, + String category, + java.util.List keywords, + Boolean hasArtifact) { super(); this.key = key; this.value = value; this.description = description; this.category = category; + this.keywords = keywords; + this.hasArtifact = hasArtifact; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -39,6 +54,11 @@ public static class Builder { * * estimatorClass * * hyperParameters * * testArtifactresults + * * fineTuningConfiguration + * * deploymentConfiguration + * * readme + * * license + * * evaluationConfiguration * **/ @com.fasterxml.jackson.annotation.JsonProperty("key") @@ -53,6 +73,11 @@ public static class Builder { * * estimatorClass * * hyperParameters * * testArtifactresults + * * fineTuningConfiguration + * * deploymentConfiguration + * * readme + * * license + * * evaluationConfiguration * * @param key the value to set * @return this builder @@ -128,12 +153,51 @@ public Builder category(String category) { this.__explicitlySet__.add("category"); return this; } + /** + * list of keywords for searching + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keywords") + private java.util.List keywords; + + /** + * list of keywords for searching + * @param keywords the value to set + * @return this builder + **/ + public Builder keywords(java.util.List keywords) { + this.keywords = keywords; + this.__explicitlySet__.add("keywords"); + return this; + } + /** + * Is there any artifact present for the metadata. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hasArtifact") + private Boolean hasArtifact; + + /** + * Is there any artifact present for the metadata. + * @param hasArtifact the value to set + * @return this builder + **/ + public Builder hasArtifact(Boolean hasArtifact) { + this.hasArtifact = hasArtifact; + this.__explicitlySet__.add("hasArtifact"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public Metadata build() { - Metadata model = new Metadata(this.key, this.value, this.description, this.category); + Metadata model = + new Metadata( + this.key, + this.value, + this.description, + this.category, + this.keywords, + this.hasArtifact); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -154,6 +218,12 @@ public Builder copy(Metadata model) { if (model.wasPropertyExplicitlySet("category")) { this.category(model.getCategory()); } + if (model.wasPropertyExplicitlySet("keywords")) { + this.keywords(model.getKeywords()); + } + if (model.wasPropertyExplicitlySet("hasArtifact")) { + this.hasArtifact(model.getHasArtifact()); + } return this; } } @@ -178,6 +248,11 @@ public Builder toBuilder() { * * estimatorClass * * hyperParameters * * testArtifactresults + * * fineTuningConfiguration + * * deploymentConfiguration + * * readme + * * license + * * evaluationConfiguration * **/ @com.fasterxml.jackson.annotation.JsonProperty("key") @@ -192,6 +267,11 @@ public Builder toBuilder() { * * estimatorClass * * hyperParameters * * testArtifactresults + * * fineTuningConfiguration + * * deploymentConfiguration + * * readme + * * license + * * evaluationConfiguration * * @return the value **/ @@ -259,6 +339,34 @@ public String getCategory() { return category; } + /** + * list of keywords for searching + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keywords") + private final java.util.List keywords; + + /** + * list of keywords for searching + * @return the value + **/ + public java.util.List getKeywords() { + return keywords; + } + + /** + * Is there any artifact present for the metadata. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hasArtifact") + private final Boolean hasArtifact; + + /** + * Is there any artifact present for the metadata. + * @return the value + **/ + public Boolean getHasArtifact() { + return hasArtifact; + } + @Override public String toString() { return this.toString(true); @@ -277,6 +385,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", value=").append(String.valueOf(this.value)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", category=").append(String.valueOf(this.category)); + sb.append(", keywords=").append(String.valueOf(this.keywords)); + sb.append(", hasArtifact=").append(String.valueOf(this.hasArtifact)); sb.append(")"); return sb.toString(); } @@ -295,6 +405,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.value, other.value) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.category, other.category) + && java.util.Objects.equals(this.keywords, other.keywords) + && java.util.Objects.equals(this.hasArtifact, other.hasArtifact) && super.equals(other); } @@ -306,6 +418,8 @@ public int hashCode() { result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.category == null ? 43 : this.category.hashCode()); + result = (result * PRIME) + (this.keywords == null ? 43 : this.keywords.hashCode()); + result = (result * PRIME) + (this.hasArtifact == null ? 43 : this.hasArtifact.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/Model.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/Model.java index da2bacef8e..4e11b644cc 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/Model.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/Model.java @@ -39,6 +39,8 @@ public final class Model extends com.oracle.bmc.http.internal.ExplicitlySetBmcMo "modelVersionSetName", "versionId", "versionLabel", + "category", + "isModelByReference", "retentionSetting", "backupSetting", "retentionOperationDetails", @@ -64,6 +66,8 @@ public Model( String modelVersionSetName, Long versionId, String versionLabel, + ModelCategory category, + Boolean isModelByReference, RetentionSetting retentionSetting, BackupSetting backupSetting, RetentionOperationDetails retentionOperationDetails, @@ -88,6 +92,8 @@ public Model( this.modelVersionSetName = modelVersionSetName; this.versionId = versionId; this.versionLabel = versionLabel; + this.category = category; + this.isModelByReference = isModelByReference; this.retentionSetting = retentionSetting; this.backupSetting = backupSetting; this.retentionOperationDetails = retentionOperationDetails; @@ -413,6 +419,38 @@ public Builder versionLabel(String versionLabel) { this.__explicitlySet__.add("versionLabel"); return this; } + /** + * The category of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private ModelCategory category; + + /** + * The category of the model. + * @param category the value to set + * @return this builder + **/ + public Builder category(ModelCategory category) { + this.category = category; + this.__explicitlySet__.add("category"); + return this; + } + /** + * Identifier to indicate whether a model artifact resides in the Service Tenancy or Customer Tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isModelByReference") + private Boolean isModelByReference; + + /** + * Identifier to indicate whether a model artifact resides in the Service Tenancy or Customer Tenancy. + * @param isModelByReference the value to set + * @return this builder + **/ + public Builder isModelByReference(Boolean isModelByReference) { + this.isModelByReference = isModelByReference; + this.__explicitlySet__.add("isModelByReference"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("retentionSetting") private RetentionSetting retentionSetting; @@ -476,6 +514,8 @@ public Model build() { this.modelVersionSetName, this.versionId, this.versionLabel, + this.category, + this.isModelByReference, this.retentionSetting, this.backupSetting, this.retentionOperationDetails, @@ -545,6 +585,12 @@ public Builder copy(Model model) { if (model.wasPropertyExplicitlySet("versionLabel")) { this.versionLabel(model.getVersionLabel()); } + if (model.wasPropertyExplicitlySet("category")) { + this.category(model.getCategory()); + } + if (model.wasPropertyExplicitlySet("isModelByReference")) { + this.isModelByReference(model.getIsModelByReference()); + } if (model.wasPropertyExplicitlySet("retentionSetting")) { this.retentionSetting(model.getRetentionSetting()); } @@ -850,6 +896,34 @@ public String getVersionLabel() { return versionLabel; } + /** + * The category of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private final ModelCategory category; + + /** + * The category of the model. + * @return the value + **/ + public ModelCategory getCategory() { + return category; + } + + /** + * Identifier to indicate whether a model artifact resides in the Service Tenancy or Customer Tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isModelByReference") + private final Boolean isModelByReference; + + /** + * Identifier to indicate whether a model artifact resides in the Service Tenancy or Customer Tenancy. + * @return the value + **/ + public Boolean getIsModelByReference() { + return isModelByReference; + } + @com.fasterxml.jackson.annotation.JsonProperty("retentionSetting") private final RetentionSetting retentionSetting; @@ -911,6 +985,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", modelVersionSetName=").append(String.valueOf(this.modelVersionSetName)); sb.append(", versionId=").append(String.valueOf(this.versionId)); sb.append(", versionLabel=").append(String.valueOf(this.versionLabel)); + sb.append(", category=").append(String.valueOf(this.category)); + sb.append(", isModelByReference=").append(String.valueOf(this.isModelByReference)); sb.append(", retentionSetting=").append(String.valueOf(this.retentionSetting)); sb.append(", backupSetting=").append(String.valueOf(this.backupSetting)); sb.append(", retentionOperationDetails=") @@ -949,6 +1025,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.modelVersionSetName, other.modelVersionSetName) && java.util.Objects.equals(this.versionId, other.versionId) && java.util.Objects.equals(this.versionLabel, other.versionLabel) + && java.util.Objects.equals(this.category, other.category) + && java.util.Objects.equals(this.isModelByReference, other.isModelByReference) && java.util.Objects.equals(this.retentionSetting, other.retentionSetting) && java.util.Objects.equals(this.backupSetting, other.backupSetting) && java.util.Objects.equals( @@ -1001,6 +1079,12 @@ public int hashCode() { : this.modelVersionSetName.hashCode()); result = (result * PRIME) + (this.versionId == null ? 43 : this.versionId.hashCode()); result = (result * PRIME) + (this.versionLabel == null ? 43 : this.versionLabel.hashCode()); + result = (result * PRIME) + (this.category == null ? 43 : this.category.hashCode()); + result = + (result * PRIME) + + (this.isModelByReference == null + ? 43 + : this.isModelByReference.hashCode()); result = (result * PRIME) + (this.retentionSetting == null ? 43 : this.retentionSetting.hashCode()); diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelArtifactReferenceDetails.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelArtifactReferenceDetails.java new file mode 100644 index 0000000000..61ca62659e --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelArtifactReferenceDetails.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.model; + +/** + * Reference to the location where the model artifact is stored. + * + *
+ * 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: 20190101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "modelArtifactReferenceType", + defaultImpl = ModelArtifactReferenceDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OSSModelArtifactReferenceDetails.class, + name = "OSS" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ModelArtifactReferenceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected ModelArtifactReferenceDetails() { + 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("ModelArtifactReferenceDetails("); + 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 ModelArtifactReferenceDetails)) { + return false; + } + + ModelArtifactReferenceDetails other = (ModelArtifactReferenceDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The type of the model artifact reference. + **/ + public enum ModelArtifactReferenceType { + Oss("OSS"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ModelArtifactReferenceType v : ModelArtifactReferenceType.values()) { + map.put(v.getValue(), v); + } + } + + ModelArtifactReferenceType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ModelArtifactReferenceType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ModelArtifactReferenceType: " + key); + } + }; +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelCategory.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelCategory.java new file mode 100644 index 0000000000..4e7853bce4 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelCategory.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.model; + +/** + * The category of a model. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public enum ModelCategory { + User("USER"), + Service("SERVICE"), + + /** + * 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(ModelCategory.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ModelCategory v : ModelCategory.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ModelCategory(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ModelCategory create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ModelCategory', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSummary.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSummary.java index 83d1f6f326..48ac7dd500 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSummary.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSummary.java @@ -32,6 +32,8 @@ public final class ModelSummary extends com.oracle.bmc.http.internal.ExplicitlyS "modelVersionSetName", "versionId", "versionLabel", + "category", + "isModelByReference", "freeformTags", "definedTags" }) @@ -48,6 +50,8 @@ public ModelSummary( String modelVersionSetName, Long versionId, String versionLabel, + ModelCategory category, + Boolean isModelByReference, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -63,6 +67,8 @@ public ModelSummary( this.modelVersionSetName = modelVersionSetName; this.versionId = versionId; this.versionLabel = versionLabel; + this.category = category; + this.isModelByReference = isModelByReference; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -265,6 +271,38 @@ public Builder versionLabel(String versionLabel) { this.__explicitlySet__.add("versionLabel"); return this; } + /** + * The category of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private ModelCategory category; + + /** + * The category of the model. + * @param category the value to set + * @return this builder + **/ + public Builder category(ModelCategory category) { + this.category = category; + this.__explicitlySet__.add("category"); + return this; + } + /** + * Identifier to indicate whether a model artifact resides in the Service Tenancy or Customer Tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isModelByReference") + private Boolean isModelByReference; + + /** + * Identifier to indicate whether a model artifact resides in the Service Tenancy or Customer Tenancy. + * @param isModelByReference the value to set + * @return this builder + **/ + public Builder isModelByReference(Boolean isModelByReference) { + this.isModelByReference = isModelByReference; + this.__explicitlySet__.add("isModelByReference"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags](https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * Example: {@code {"Department": "Finance"}} @@ -325,6 +363,8 @@ public ModelSummary build() { this.modelVersionSetName, this.versionId, this.versionLabel, + this.category, + this.isModelByReference, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -371,6 +411,12 @@ public Builder copy(ModelSummary model) { if (model.wasPropertyExplicitlySet("versionLabel")) { this.versionLabel(model.getVersionLabel()); } + if (model.wasPropertyExplicitlySet("category")) { + this.category(model.getCategory()); + } + if (model.wasPropertyExplicitlySet("isModelByReference")) { + this.isModelByReference(model.getIsModelByReference()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -564,6 +610,34 @@ public String getVersionLabel() { return versionLabel; } + /** + * The category of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private final ModelCategory category; + + /** + * The category of the model. + * @return the value + **/ + public ModelCategory getCategory() { + return category; + } + + /** + * Identifier to indicate whether a model artifact resides in the Service Tenancy or Customer Tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isModelByReference") + private final Boolean isModelByReference; + + /** + * Identifier to indicate whether a model artifact resides in the Service Tenancy or Customer Tenancy. + * @return the value + **/ + public Boolean getIsModelByReference() { + return isModelByReference; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags](https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * Example: {@code {"Department": "Finance"}} @@ -626,6 +700,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", modelVersionSetName=").append(String.valueOf(this.modelVersionSetName)); sb.append(", versionId=").append(String.valueOf(this.versionId)); sb.append(", versionLabel=").append(String.valueOf(this.versionLabel)); + sb.append(", category=").append(String.valueOf(this.category)); + sb.append(", isModelByReference=").append(String.valueOf(this.isModelByReference)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -654,6 +730,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.modelVersionSetName, other.modelVersionSetName) && java.util.Objects.equals(this.versionId, other.versionId) && java.util.Objects.equals(this.versionLabel, other.versionLabel) + && java.util.Objects.equals(this.category, other.category) + && java.util.Objects.equals(this.isModelByReference, other.isModelByReference) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -687,6 +765,12 @@ public int hashCode() { : this.modelVersionSetName.hashCode()); result = (result * PRIME) + (this.versionId == null ? 43 : this.versionId.hashCode()); result = (result * PRIME) + (this.versionLabel == null ? 43 : this.versionLabel.hashCode()); + result = (result * PRIME) + (this.category == null ? 43 : this.category.hashCode()); + result = + (result * PRIME) + + (this.isModelByReference == null + ? 43 + : this.isModelByReference.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-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelVersionSet.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelVersionSet.java index 4a196dc1b8..07248ac7ab 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelVersionSet.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelVersionSet.java @@ -29,6 +29,7 @@ public final class ModelVersionSet extends com.oracle.bmc.http.internal.Explicit "timeCreated", "timeUpdated", "createdBy", + "category", "freeformTags", "definedTags", "systemTags" @@ -43,6 +44,7 @@ public ModelVersionSet( java.util.Date timeCreated, java.util.Date timeUpdated, String createdBy, + ModelVersionSetCategory category, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -56,6 +58,7 @@ public ModelVersionSet( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.createdBy = createdBy; + this.category = category; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -215,6 +218,22 @@ public Builder createdBy(String createdBy) { this.__explicitlySet__.add("createdBy"); return this; } + /** + * The category of the model version set. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private ModelVersionSetCategory category; + + /** + * The category of the model version set. + * @param category the value to set + * @return this builder + **/ + public Builder category(ModelVersionSetCategory category) { + this.category = category; + this.__explicitlySet__.add("category"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags](https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * Example: {@code {"Department": "Finance"}} @@ -292,6 +311,7 @@ public ModelVersionSet build() { this.timeCreated, this.timeUpdated, this.createdBy, + this.category, this.freeformTags, this.definedTags, this.systemTags); @@ -330,6 +350,9 @@ public Builder copy(ModelVersionSet model) { if (model.wasPropertyExplicitlySet("createdBy")) { this.createdBy(model.getCreatedBy()); } + if (model.wasPropertyExplicitlySet("category")) { + this.category(model.getCategory()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -488,6 +511,20 @@ public String getCreatedBy() { return createdBy; } + /** + * The category of the model version set. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private final ModelVersionSetCategory category; + + /** + * The category of the model version set. + * @return the value + **/ + public ModelVersionSetCategory getCategory() { + return category; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags](https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * Example: {@code {"Department": "Finance"}} @@ -565,6 +602,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", category=").append(String.valueOf(this.category)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -591,6 +629,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.category, other.category) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -614,6 +653,7 @@ public int 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.createdBy == null ? 43 : this.createdBy.hashCode()); + result = (result * PRIME) + (this.category == null ? 43 : this.category.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()); diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelVersionSetCategory.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelVersionSetCategory.java new file mode 100644 index 0000000000..f0f6284b06 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelVersionSetCategory.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.model; + +/** + * The lifecycle state of a model. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public enum ModelVersionSetCategory { + User("USER"), + Service("SERVICE"), + + /** + * 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(ModelVersionSetCategory.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ModelVersionSetCategory v : ModelVersionSetCategory.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ModelVersionSetCategory(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ModelVersionSetCategory create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ModelVersionSetCategory', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelVersionSetSummary.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelVersionSetSummary.java index 42b34281b6..6d2edda6a9 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelVersionSetSummary.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelVersionSetSummary.java @@ -31,6 +31,7 @@ public final class ModelVersionSetSummary "timeCreated", "timeUpdated", "createdBy", + "category", "freeformTags", "definedTags", "systemTags" @@ -44,6 +45,7 @@ public ModelVersionSetSummary( java.util.Date timeCreated, java.util.Date timeUpdated, String createdBy, + ModelVersionSetCategory category, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -56,6 +58,7 @@ public ModelVersionSetSummary( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.createdBy = createdBy; + this.category = category; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -199,6 +202,22 @@ public Builder createdBy(String createdBy) { this.__explicitlySet__.add("createdBy"); return this; } + /** + * The category of the model version set. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private ModelVersionSetCategory category; + + /** + * The category of the model version set. + * @param category the value to set + * @return this builder + **/ + public Builder category(ModelVersionSetCategory category) { + this.category = category; + this.__explicitlySet__.add("category"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags](https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * Example: {@code {"Department": "Finance"}} @@ -275,6 +294,7 @@ public ModelVersionSetSummary build() { this.timeCreated, this.timeUpdated, this.createdBy, + this.category, this.freeformTags, this.definedTags, this.systemTags); @@ -310,6 +330,9 @@ public Builder copy(ModelVersionSetSummary model) { if (model.wasPropertyExplicitlySet("createdBy")) { this.createdBy(model.getCreatedBy()); } + if (model.wasPropertyExplicitlySet("category")) { + this.category(model.getCategory()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -454,6 +477,20 @@ public String getCreatedBy() { return createdBy; } + /** + * The category of the model version set. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private final ModelVersionSetCategory category; + + /** + * The category of the model version set. + * @return the value + **/ + public ModelVersionSetCategory getCategory() { + return category; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags](https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * Example: {@code {"Department": "Finance"}} @@ -530,6 +567,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", category=").append(String.valueOf(this.category)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -555,6 +593,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.category, other.category) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -577,6 +616,7 @@ public int 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.createdBy == null ? 43 : this.createdBy.hashCode()); + result = (result * PRIME) + (this.category == null ? 43 : this.category.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()); diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/OSSModelArtifactReferenceDetails.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/OSSModelArtifactReferenceDetails.java new file mode 100644 index 0000000000..2b0ce41075 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/OSSModelArtifactReferenceDetails.java @@ -0,0 +1,214 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.model; + +/** + * Reference to the OSS where model artifact is stored + *
+ * 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: 20190101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OSSModelArtifactReferenceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "modelArtifactReferenceType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OSSModelArtifactReferenceDetails extends ModelArtifactReferenceDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The namespace of the model artifact reference in OSS. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private String namespace; + + /** + * The namespace of the model artifact reference in OSS. + * @param namespace the value to set + * @return this builder + **/ + public Builder namespace(String namespace) { + this.namespace = namespace; + this.__explicitlySet__.add("namespace"); + return this; + } + /** + * The bucket name of the model artifact reference in OSS. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * The bucket name of the model artifact reference in OSS. + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + /** + * The prefix of the model artifact reference in OSS. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * The prefix of the model artifact reference in OSS. + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OSSModelArtifactReferenceDetails build() { + OSSModelArtifactReferenceDetails model = + new OSSModelArtifactReferenceDetails( + this.namespace, this.bucketName, this.prefix); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OSSModelArtifactReferenceDetails model) { + if (model.wasPropertyExplicitlySet("namespace")) { + this.namespace(model.getNamespace()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OSSModelArtifactReferenceDetails(String namespace, String bucketName, String prefix) { + super(); + this.namespace = namespace; + this.bucketName = bucketName; + this.prefix = prefix; + } + + /** + * The namespace of the model artifact reference in OSS. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private final String namespace; + + /** + * The namespace of the model artifact reference in OSS. + * @return the value + **/ + public String getNamespace() { + return namespace; + } + + /** + * The bucket name of the model artifact reference in OSS. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * The bucket name of the model artifact reference in OSS. + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + /** + * The prefix of the model artifact reference in OSS. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * The prefix of the model artifact reference in OSS. + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + @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("OSSModelArtifactReferenceDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", namespace=").append(String.valueOf(this.namespace)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OSSModelArtifactReferenceDetails)) { + return false; + } + + OSSModelArtifactReferenceDetails other = (OSSModelArtifactReferenceDetails) o; + return java.util.Objects.equals(this.namespace, other.namespace) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && java.util.Objects.equals(this.prefix, other.prefix) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + result = (result * PRIME) + (this.prefix == null ? 43 : this.prefix.hashCode()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/RegisterModelArtifactReferenceDetails.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/RegisterModelArtifactReferenceDetails.java new file mode 100644 index 0000000000..573370ebc8 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/RegisterModelArtifactReferenceDetails.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.model; + +/** + * Parameters that are required to register a model artifact reference collection. + *
+ * 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: 20190101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RegisterModelArtifactReferenceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RegisterModelArtifactReferenceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"modelArtifactReferences"}) + public RegisterModelArtifactReferenceDetails( + java.util.List modelArtifactReferences) { + super(); + this.modelArtifactReferences = modelArtifactReferences; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A list of model artifact references to register. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("modelArtifactReferences") + private java.util.List modelArtifactReferences; + + /** + * A list of model artifact references to register. + * @param modelArtifactReferences the value to set + * @return this builder + **/ + public Builder modelArtifactReferences( + java.util.List modelArtifactReferences) { + this.modelArtifactReferences = modelArtifactReferences; + this.__explicitlySet__.add("modelArtifactReferences"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RegisterModelArtifactReferenceDetails build() { + RegisterModelArtifactReferenceDetails model = + new RegisterModelArtifactReferenceDetails(this.modelArtifactReferences); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RegisterModelArtifactReferenceDetails model) { + if (model.wasPropertyExplicitlySet("modelArtifactReferences")) { + this.modelArtifactReferences(model.getModelArtifactReferences()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A list of model artifact references to register. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("modelArtifactReferences") + private final java.util.List modelArtifactReferences; + + /** + * A list of model artifact references to register. + * @return the value + **/ + public java.util.List getModelArtifactReferences() { + return modelArtifactReferences; + } + + @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("RegisterModelArtifactReferenceDetails("); + sb.append("super=").append(super.toString()); + sb.append("modelArtifactReferences=").append(String.valueOf(this.modelArtifactReferences)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RegisterModelArtifactReferenceDetails)) { + return false; + } + + RegisterModelArtifactReferenceDetails other = (RegisterModelArtifactReferenceDetails) o; + return java.util.Objects.equals(this.modelArtifactReferences, other.modelArtifactReferences) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.modelArtifactReferences == null + ? 43 + : this.modelArtifactReferences.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/WorkRequestOperationType.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/WorkRequestOperationType.java index 50b1ce0f76..1c26edfa1c 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/WorkRequestOperationType.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/WorkRequestOperationType.java @@ -39,6 +39,7 @@ public enum WorkRequestOperationType { ScheduleMove("SCHEDULE_MOVE"), ScheduleActivate("SCHEDULE_ACTIVATE"), ScheduleDeactivate("SCHEDULE_DEACTIVATE"), + RegisterModelArtifact("REGISTER_MODEL_ARTIFACT"), RestoreArchivedModel("RESTORE_ARCHIVED_MODEL"), /** diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/CreateModelCustomMetadatumArtifactRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/CreateModelCustomMetadatumArtifactRequest.java new file mode 100644 index 0000000000..8838c60e42 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/CreateModelCustomMetadatumArtifactRequest.java @@ -0,0 +1,447 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.requests; + +import com.oracle.bmc.datascience.model.*; +/** + * Example: Click here to see how to use CreateModelCustomMetadatumArtifactRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class CreateModelCustomMetadatumArtifactRequest + extends com.oracle.bmc.requests.BmcRequest + implements com.oracle.bmc.requests.HasContentLength { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + public String getModelId() { + return modelId; + } + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName; + + /** + * The name of the model metadatum in the metadata. + */ + public String getMetadatumKeyName() { + return metadatumKeyName; + } + /** + * The content length of the body. + */ + private Long contentLength; + + /** + * The content length of the body. + */ + public Long getContentLength() { + return contentLength; + } + /** + * The model custom metadata artifact to upload. + */ + private java.io.InputStream modelCustomMetadatumArtifact; + + /** + * The model custom metadata artifact to upload. + */ + public java.io.InputStream getModelCustomMetadatumArtifact() { + return modelCustomMetadatumArtifact; + } + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + */ + private String contentDisposition; + + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + */ + public String getContentDisposition() { + return contentDisposition; + } + /** + * 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code etag} value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public java.io.InputStream getBody$() { + return modelCustomMetadatumArtifact; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateModelCustomMetadatumArtifactRequest, 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 model. + */ + private String modelId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName = null; + + /** + * The name of the model metadatum in the metadata. + * @param metadatumKeyName the value to set + * @return this builder instance + */ + public Builder metadatumKeyName(String metadatumKeyName) { + this.metadatumKeyName = metadatumKeyName; + return this; + } + + /** + * The content length of the body. + */ + private Long contentLength = null; + + /** + * The content length of the body. + * @param contentLength the value to set + * @return this builder instance + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The model custom metadata artifact to upload. + */ + private java.io.InputStream modelCustomMetadatumArtifact = null; + + /** + * The model custom metadata artifact to upload. + * @param modelCustomMetadatumArtifact the value to set + * @return this builder instance + */ + public Builder modelCustomMetadatumArtifact( + java.io.InputStream modelCustomMetadatumArtifact) { + this.modelCustomMetadatumArtifact = modelCustomMetadatumArtifact; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + */ + private String contentDisposition = null; + + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + * @param contentDisposition the value to set + * @return this builder instance + */ + public Builder contentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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(CreateModelCustomMetadatumArtifactRequest o) { + modelId(o.getModelId()); + metadatumKeyName(o.getMetadatumKeyName()); + contentLength(o.getContentLength()); + modelCustomMetadatumArtifact(o.getModelCustomMetadatumArtifact()); + opcRequestId(o.getOpcRequestId()); + contentDisposition(o.getContentDisposition()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateModelCustomMetadatumArtifactRequest 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 CreateModelCustomMetadatumArtifactRequest + */ + public CreateModelCustomMetadatumArtifactRequest build() { + CreateModelCustomMetadatumArtifactRequest 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) { + modelCustomMetadatumArtifact(body); + return this; + } + + /** + * Build the instance of CreateModelCustomMetadatumArtifactRequest 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 CreateModelCustomMetadatumArtifactRequest + */ + public CreateModelCustomMetadatumArtifactRequest buildWithoutInvocationCallback() { + CreateModelCustomMetadatumArtifactRequest request = + new CreateModelCustomMetadatumArtifactRequest(); + request.modelId = modelId; + request.metadatumKeyName = metadatumKeyName; + request.contentLength = contentLength; + request.modelCustomMetadatumArtifact = modelCustomMetadatumArtifact; + request.opcRequestId = opcRequestId; + request.contentDisposition = contentDisposition; + request.ifMatch = ifMatch; + return request; + // new CreateModelCustomMetadatumArtifactRequest(modelId, metadatumKeyName, contentLength, modelCustomMetadatumArtifact, opcRequestId, contentDisposition, 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() + .modelId(modelId) + .metadatumKeyName(metadatumKeyName) + .contentLength(contentLength) + .modelCustomMetadatumArtifact(modelCustomMetadatumArtifact) + .opcRequestId(opcRequestId) + .contentDisposition(contentDisposition) + .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(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",metadatumKeyName=").append(String.valueOf(this.metadatumKeyName)); + sb.append(",contentLength=").append(String.valueOf(this.contentLength)); + sb.append(",modelCustomMetadatumArtifact=") + .append(String.valueOf(this.modelCustomMetadatumArtifact)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",contentDisposition=").append(String.valueOf(this.contentDisposition)); + 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 CreateModelCustomMetadatumArtifactRequest)) { + return false; + } + + CreateModelCustomMetadatumArtifactRequest other = + (CreateModelCustomMetadatumArtifactRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals(this.metadatumKeyName, other.metadatumKeyName) + && java.util.Objects.equals(this.contentLength, other.contentLength) + && java.util.Objects.equals( + this.modelCustomMetadatumArtifact, other.modelCustomMetadatumArtifact) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.contentDisposition, other.contentDisposition) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.metadatumKeyName == null ? 43 : this.metadatumKeyName.hashCode()); + result = + (result * PRIME) + + (this.contentLength == null ? 43 : this.contentLength.hashCode()); + result = + (result * PRIME) + + (this.modelCustomMetadatumArtifact == null + ? 43 + : this.modelCustomMetadatumArtifact.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.contentDisposition == null + ? 43 + : this.contentDisposition.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/CreateModelDefinedMetadatumArtifactRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/CreateModelDefinedMetadatumArtifactRequest.java new file mode 100644 index 0000000000..518bdddf43 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/CreateModelDefinedMetadatumArtifactRequest.java @@ -0,0 +1,447 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.requests; + +import com.oracle.bmc.datascience.model.*; +/** + * Example: Click here to see how to use CreateModelDefinedMetadatumArtifactRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class CreateModelDefinedMetadatumArtifactRequest + extends com.oracle.bmc.requests.BmcRequest + implements com.oracle.bmc.requests.HasContentLength { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + public String getModelId() { + return modelId; + } + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName; + + /** + * The name of the model metadatum in the metadata. + */ + public String getMetadatumKeyName() { + return metadatumKeyName; + } + /** + * The content length of the body. + */ + private Long contentLength; + + /** + * The content length of the body. + */ + public Long getContentLength() { + return contentLength; + } + /** + * The model defined metadata artifact to upload. + */ + private java.io.InputStream modelDefinedMetadatumArtifact; + + /** + * The model defined metadata artifact to upload. + */ + public java.io.InputStream getModelDefinedMetadatumArtifact() { + return modelDefinedMetadatumArtifact; + } + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + */ + private String contentDisposition; + + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + */ + public String getContentDisposition() { + return contentDisposition; + } + /** + * 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code etag} value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public java.io.InputStream getBody$() { + return modelDefinedMetadatumArtifact; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateModelDefinedMetadatumArtifactRequest, 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 model. + */ + private String modelId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName = null; + + /** + * The name of the model metadatum in the metadata. + * @param metadatumKeyName the value to set + * @return this builder instance + */ + public Builder metadatumKeyName(String metadatumKeyName) { + this.metadatumKeyName = metadatumKeyName; + return this; + } + + /** + * The content length of the body. + */ + private Long contentLength = null; + + /** + * The content length of the body. + * @param contentLength the value to set + * @return this builder instance + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The model defined metadata artifact to upload. + */ + private java.io.InputStream modelDefinedMetadatumArtifact = null; + + /** + * The model defined metadata artifact to upload. + * @param modelDefinedMetadatumArtifact the value to set + * @return this builder instance + */ + public Builder modelDefinedMetadatumArtifact( + java.io.InputStream modelDefinedMetadatumArtifact) { + this.modelDefinedMetadatumArtifact = modelDefinedMetadatumArtifact; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + */ + private String contentDisposition = null; + + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + * @param contentDisposition the value to set + * @return this builder instance + */ + public Builder contentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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(CreateModelDefinedMetadatumArtifactRequest o) { + modelId(o.getModelId()); + metadatumKeyName(o.getMetadatumKeyName()); + contentLength(o.getContentLength()); + modelDefinedMetadatumArtifact(o.getModelDefinedMetadatumArtifact()); + opcRequestId(o.getOpcRequestId()); + contentDisposition(o.getContentDisposition()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateModelDefinedMetadatumArtifactRequest 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 CreateModelDefinedMetadatumArtifactRequest + */ + public CreateModelDefinedMetadatumArtifactRequest build() { + CreateModelDefinedMetadatumArtifactRequest 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) { + modelDefinedMetadatumArtifact(body); + return this; + } + + /** + * Build the instance of CreateModelDefinedMetadatumArtifactRequest 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 CreateModelDefinedMetadatumArtifactRequest + */ + public CreateModelDefinedMetadatumArtifactRequest buildWithoutInvocationCallback() { + CreateModelDefinedMetadatumArtifactRequest request = + new CreateModelDefinedMetadatumArtifactRequest(); + request.modelId = modelId; + request.metadatumKeyName = metadatumKeyName; + request.contentLength = contentLength; + request.modelDefinedMetadatumArtifact = modelDefinedMetadatumArtifact; + request.opcRequestId = opcRequestId; + request.contentDisposition = contentDisposition; + request.ifMatch = ifMatch; + return request; + // new CreateModelDefinedMetadatumArtifactRequest(modelId, metadatumKeyName, contentLength, modelDefinedMetadatumArtifact, opcRequestId, contentDisposition, 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() + .modelId(modelId) + .metadatumKeyName(metadatumKeyName) + .contentLength(contentLength) + .modelDefinedMetadatumArtifact(modelDefinedMetadatumArtifact) + .opcRequestId(opcRequestId) + .contentDisposition(contentDisposition) + .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(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",metadatumKeyName=").append(String.valueOf(this.metadatumKeyName)); + sb.append(",contentLength=").append(String.valueOf(this.contentLength)); + sb.append(",modelDefinedMetadatumArtifact=") + .append(String.valueOf(this.modelDefinedMetadatumArtifact)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",contentDisposition=").append(String.valueOf(this.contentDisposition)); + 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 CreateModelDefinedMetadatumArtifactRequest)) { + return false; + } + + CreateModelDefinedMetadatumArtifactRequest other = + (CreateModelDefinedMetadatumArtifactRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals(this.metadatumKeyName, other.metadatumKeyName) + && java.util.Objects.equals(this.contentLength, other.contentLength) + && java.util.Objects.equals( + this.modelDefinedMetadatumArtifact, other.modelDefinedMetadatumArtifact) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.contentDisposition, other.contentDisposition) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.metadatumKeyName == null ? 43 : this.metadatumKeyName.hashCode()); + result = + (result * PRIME) + + (this.contentLength == null ? 43 : this.contentLength.hashCode()); + result = + (result * PRIME) + + (this.modelDefinedMetadatumArtifact == null + ? 43 + : this.modelDefinedMetadatumArtifact.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.contentDisposition == null + ? 43 + : this.contentDisposition.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/DeleteModelCustomMetadatumArtifactRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/DeleteModelCustomMetadatumArtifactRequest.java new file mode 100644 index 0000000000..12331fa448 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/DeleteModelCustomMetadatumArtifactRequest.java @@ -0,0 +1,288 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.requests; + +import com.oracle.bmc.datascience.model.*; +/** + * Example: Click here to see how to use DeleteModelCustomMetadatumArtifactRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class DeleteModelCustomMetadatumArtifactRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + public String getModelId() { + return modelId; + } + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName; + + /** + * The name of the model metadatum in the metadata. + */ + public String getMetadatumKeyName() { + return metadatumKeyName; + } + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code etag} value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteModelCustomMetadatumArtifactRequest, 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 model. + */ + private String modelId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName = null; + + /** + * The name of the model metadatum in the metadata. + * @param metadatumKeyName the value to set + * @return this builder instance + */ + public Builder metadatumKeyName(String metadatumKeyName) { + this.metadatumKeyName = metadatumKeyName; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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, then provide the request ID. + * + * @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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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(DeleteModelCustomMetadatumArtifactRequest o) { + modelId(o.getModelId()); + metadatumKeyName(o.getMetadatumKeyName()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteModelCustomMetadatumArtifactRequest 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 DeleteModelCustomMetadatumArtifactRequest + */ + public DeleteModelCustomMetadatumArtifactRequest build() { + DeleteModelCustomMetadatumArtifactRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteModelCustomMetadatumArtifactRequest 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 DeleteModelCustomMetadatumArtifactRequest + */ + public DeleteModelCustomMetadatumArtifactRequest buildWithoutInvocationCallback() { + DeleteModelCustomMetadatumArtifactRequest request = + new DeleteModelCustomMetadatumArtifactRequest(); + request.modelId = modelId; + request.metadatumKeyName = metadatumKeyName; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new DeleteModelCustomMetadatumArtifactRequest(modelId, metadatumKeyName, 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() + .modelId(modelId) + .metadatumKeyName(metadatumKeyName) + .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(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",metadatumKeyName=").append(String.valueOf(this.metadatumKeyName)); + 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 DeleteModelCustomMetadatumArtifactRequest)) { + return false; + } + + DeleteModelCustomMetadatumArtifactRequest other = + (DeleteModelCustomMetadatumArtifactRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals(this.metadatumKeyName, other.metadatumKeyName) + && 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.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.metadatumKeyName == null ? 43 : this.metadatumKeyName.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-datascience/src/main/java/com/oracle/bmc/datascience/requests/DeleteModelDefinedMetadatumArtifactRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/DeleteModelDefinedMetadatumArtifactRequest.java new file mode 100644 index 0000000000..4955a3ef2a --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/DeleteModelDefinedMetadatumArtifactRequest.java @@ -0,0 +1,288 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.requests; + +import com.oracle.bmc.datascience.model.*; +/** + * Example: Click here to see how to use DeleteModelDefinedMetadatumArtifactRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class DeleteModelDefinedMetadatumArtifactRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + public String getModelId() { + return modelId; + } + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName; + + /** + * The name of the model metadatum in the metadata. + */ + public String getMetadatumKeyName() { + return metadatumKeyName; + } + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code etag} value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteModelDefinedMetadatumArtifactRequest, 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 model. + */ + private String modelId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName = null; + + /** + * The name of the model metadatum in the metadata. + * @param metadatumKeyName the value to set + * @return this builder instance + */ + public Builder metadatumKeyName(String metadatumKeyName) { + this.metadatumKeyName = metadatumKeyName; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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, then provide the request ID. + * + * @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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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(DeleteModelDefinedMetadatumArtifactRequest o) { + modelId(o.getModelId()); + metadatumKeyName(o.getMetadatumKeyName()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteModelDefinedMetadatumArtifactRequest 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 DeleteModelDefinedMetadatumArtifactRequest + */ + public DeleteModelDefinedMetadatumArtifactRequest build() { + DeleteModelDefinedMetadatumArtifactRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteModelDefinedMetadatumArtifactRequest 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 DeleteModelDefinedMetadatumArtifactRequest + */ + public DeleteModelDefinedMetadatumArtifactRequest buildWithoutInvocationCallback() { + DeleteModelDefinedMetadatumArtifactRequest request = + new DeleteModelDefinedMetadatumArtifactRequest(); + request.modelId = modelId; + request.metadatumKeyName = metadatumKeyName; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new DeleteModelDefinedMetadatumArtifactRequest(modelId, metadatumKeyName, 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() + .modelId(modelId) + .metadatumKeyName(metadatumKeyName) + .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(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",metadatumKeyName=").append(String.valueOf(this.metadatumKeyName)); + 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 DeleteModelDefinedMetadatumArtifactRequest)) { + return false; + } + + DeleteModelDefinedMetadatumArtifactRequest other = + (DeleteModelDefinedMetadatumArtifactRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals(this.metadatumKeyName, other.metadatumKeyName) + && 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.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.metadatumKeyName == null ? 43 : this.metadatumKeyName.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-datascience/src/main/java/com/oracle/bmc/datascience/requests/GetModelCustomMetadatumArtifactContentRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/GetModelCustomMetadatumArtifactContentRequest.java new file mode 100644 index 0000000000..e1c5fd6db6 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/GetModelCustomMetadatumArtifactContentRequest.java @@ -0,0 +1,277 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.requests; + +import com.oracle.bmc.datascience.model.*; +/** + * Example: Click here to see how to use GetModelCustomMetadatumArtifactContentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class GetModelCustomMetadatumArtifactContentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + public String getModelId() { + return modelId; + } + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName; + + /** + * The name of the model metadatum in the metadata. + */ + public String getMetadatumKeyName() { + return metadatumKeyName; + } + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Optional byte range to fetch, as described in [RFC 7233](https://tools.ietf.org/html/rfc7232#section-2.1), section 2.1. + * Note that only a single range of bytes is supported. + * + */ + private com.oracle.bmc.model.Range range; + + /** + * Optional byte range to fetch, as described in [RFC 7233](https://tools.ietf.org/html/rfc7232#section-2.1), section 2.1. + * Note that only a single range of bytes is supported. + * + */ + public com.oracle.bmc.model.Range getRange() { + return range; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetModelCustomMetadatumArtifactContentRequest, 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 model. + */ + private String modelId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName = null; + + /** + * The name of the model metadatum in the metadata. + * @param metadatumKeyName the value to set + * @return this builder instance + */ + public Builder metadatumKeyName(String metadatumKeyName) { + this.metadatumKeyName = metadatumKeyName; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Optional byte range to fetch, as described in [RFC 7233](https://tools.ietf.org/html/rfc7232#section-2.1), section 2.1. + * Note that only a single range of bytes is supported. + * + */ + private com.oracle.bmc.model.Range range = null; + + /** + * Optional byte range to fetch, as described in [RFC 7233](https://tools.ietf.org/html/rfc7232#section-2.1), section 2.1. + * Note that only a single range of bytes is supported. + * + * @param range the value to set + * @return this builder instance + */ + public Builder range(com.oracle.bmc.model.Range range) { + this.range = range; + 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(GetModelCustomMetadatumArtifactContentRequest o) { + modelId(o.getModelId()); + metadatumKeyName(o.getMetadatumKeyName()); + opcRequestId(o.getOpcRequestId()); + range(o.getRange()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetModelCustomMetadatumArtifactContentRequest 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 GetModelCustomMetadatumArtifactContentRequest + */ + public GetModelCustomMetadatumArtifactContentRequest build() { + GetModelCustomMetadatumArtifactContentRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetModelCustomMetadatumArtifactContentRequest 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 GetModelCustomMetadatumArtifactContentRequest + */ + public GetModelCustomMetadatumArtifactContentRequest buildWithoutInvocationCallback() { + GetModelCustomMetadatumArtifactContentRequest request = + new GetModelCustomMetadatumArtifactContentRequest(); + request.modelId = modelId; + request.metadatumKeyName = metadatumKeyName; + request.opcRequestId = opcRequestId; + request.range = range; + return request; + // new GetModelCustomMetadatumArtifactContentRequest(modelId, metadatumKeyName, opcRequestId, range); + } + } + + /** + * 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() + .modelId(modelId) + .metadatumKeyName(metadatumKeyName) + .opcRequestId(opcRequestId) + .range(range); + } + + /** + * 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(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",metadatumKeyName=").append(String.valueOf(this.metadatumKeyName)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",range=").append(String.valueOf(this.range)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetModelCustomMetadatumArtifactContentRequest)) { + return false; + } + + GetModelCustomMetadatumArtifactContentRequest other = + (GetModelCustomMetadatumArtifactContentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals(this.metadatumKeyName, other.metadatumKeyName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.range, other.range); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.metadatumKeyName == null ? 43 : this.metadatumKeyName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.range == null ? 43 : this.range.hashCode()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/GetModelDefinedMetadatumArtifactContentRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/GetModelDefinedMetadatumArtifactContentRequest.java new file mode 100644 index 0000000000..82e3e4cca2 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/GetModelDefinedMetadatumArtifactContentRequest.java @@ -0,0 +1,277 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.requests; + +import com.oracle.bmc.datascience.model.*; +/** + * Example: Click here to see how to use GetModelDefinedMetadatumArtifactContentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class GetModelDefinedMetadatumArtifactContentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + public String getModelId() { + return modelId; + } + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName; + + /** + * The name of the model metadatum in the metadata. + */ + public String getMetadatumKeyName() { + return metadatumKeyName; + } + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Optional byte range to fetch, as described in [RFC 7233](https://tools.ietf.org/html/rfc7232#section-2.1), section 2.1. + * Note that only a single range of bytes is supported. + * + */ + private com.oracle.bmc.model.Range range; + + /** + * Optional byte range to fetch, as described in [RFC 7233](https://tools.ietf.org/html/rfc7232#section-2.1), section 2.1. + * Note that only a single range of bytes is supported. + * + */ + public com.oracle.bmc.model.Range getRange() { + return range; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetModelDefinedMetadatumArtifactContentRequest, 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 model. + */ + private String modelId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName = null; + + /** + * The name of the model metadatum in the metadata. + * @param metadatumKeyName the value to set + * @return this builder instance + */ + public Builder metadatumKeyName(String metadatumKeyName) { + this.metadatumKeyName = metadatumKeyName; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Optional byte range to fetch, as described in [RFC 7233](https://tools.ietf.org/html/rfc7232#section-2.1), section 2.1. + * Note that only a single range of bytes is supported. + * + */ + private com.oracle.bmc.model.Range range = null; + + /** + * Optional byte range to fetch, as described in [RFC 7233](https://tools.ietf.org/html/rfc7232#section-2.1), section 2.1. + * Note that only a single range of bytes is supported. + * + * @param range the value to set + * @return this builder instance + */ + public Builder range(com.oracle.bmc.model.Range range) { + this.range = range; + 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(GetModelDefinedMetadatumArtifactContentRequest o) { + modelId(o.getModelId()); + metadatumKeyName(o.getMetadatumKeyName()); + opcRequestId(o.getOpcRequestId()); + range(o.getRange()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetModelDefinedMetadatumArtifactContentRequest 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 GetModelDefinedMetadatumArtifactContentRequest + */ + public GetModelDefinedMetadatumArtifactContentRequest build() { + GetModelDefinedMetadatumArtifactContentRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetModelDefinedMetadatumArtifactContentRequest 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 GetModelDefinedMetadatumArtifactContentRequest + */ + public GetModelDefinedMetadatumArtifactContentRequest buildWithoutInvocationCallback() { + GetModelDefinedMetadatumArtifactContentRequest request = + new GetModelDefinedMetadatumArtifactContentRequest(); + request.modelId = modelId; + request.metadatumKeyName = metadatumKeyName; + request.opcRequestId = opcRequestId; + request.range = range; + return request; + // new GetModelDefinedMetadatumArtifactContentRequest(modelId, metadatumKeyName, opcRequestId, range); + } + } + + /** + * 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() + .modelId(modelId) + .metadatumKeyName(metadatumKeyName) + .opcRequestId(opcRequestId) + .range(range); + } + + /** + * 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(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",metadatumKeyName=").append(String.valueOf(this.metadatumKeyName)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",range=").append(String.valueOf(this.range)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetModelDefinedMetadatumArtifactContentRequest)) { + return false; + } + + GetModelDefinedMetadatumArtifactContentRequest other = + (GetModelDefinedMetadatumArtifactContentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals(this.metadatumKeyName, other.metadatumKeyName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.range, other.range); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.metadatumKeyName == null ? 43 : this.metadatumKeyName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.range == null ? 43 : this.range.hashCode()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/HeadModelCustomMetadatumArtifactRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/HeadModelCustomMetadatumArtifactRequest.java new file mode 100644 index 0000000000..4e6f59271e --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/HeadModelCustomMetadatumArtifactRequest.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.requests; + +import com.oracle.bmc.datascience.model.*; +/** + * Example: Click here to see how to use HeadModelCustomMetadatumArtifactRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class HeadModelCustomMetadatumArtifactRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + public String getModelId() { + return modelId; + } + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName; + + /** + * The name of the model metadatum in the metadata. + */ + public String getMetadatumKeyName() { + return metadatumKeyName; + } + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + HeadModelCustomMetadatumArtifactRequest, 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 model. + */ + private String modelId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName = null; + + /** + * The name of the model metadatum in the metadata. + * @param metadatumKeyName the value to set + * @return this builder instance + */ + public Builder metadatumKeyName(String metadatumKeyName) { + this.metadatumKeyName = metadatumKeyName; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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, then 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(HeadModelCustomMetadatumArtifactRequest o) { + modelId(o.getModelId()); + metadatumKeyName(o.getMetadatumKeyName()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of HeadModelCustomMetadatumArtifactRequest 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 HeadModelCustomMetadatumArtifactRequest + */ + public HeadModelCustomMetadatumArtifactRequest build() { + HeadModelCustomMetadatumArtifactRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of HeadModelCustomMetadatumArtifactRequest 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 HeadModelCustomMetadatumArtifactRequest + */ + public HeadModelCustomMetadatumArtifactRequest buildWithoutInvocationCallback() { + HeadModelCustomMetadatumArtifactRequest request = + new HeadModelCustomMetadatumArtifactRequest(); + request.modelId = modelId; + request.metadatumKeyName = metadatumKeyName; + request.opcRequestId = opcRequestId; + return request; + // new HeadModelCustomMetadatumArtifactRequest(modelId, metadatumKeyName, 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() + .modelId(modelId) + .metadatumKeyName(metadatumKeyName) + .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(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",metadatumKeyName=").append(String.valueOf(this.metadatumKeyName)); + 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 HeadModelCustomMetadatumArtifactRequest)) { + return false; + } + + HeadModelCustomMetadatumArtifactRequest other = (HeadModelCustomMetadatumArtifactRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals(this.metadatumKeyName, other.metadatumKeyName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.metadatumKeyName == null ? 43 : this.metadatumKeyName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/HeadModelDefinedMetadatumArtifactRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/HeadModelDefinedMetadatumArtifactRequest.java new file mode 100644 index 0000000000..08467228cc --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/HeadModelDefinedMetadatumArtifactRequest.java @@ -0,0 +1,236 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.requests; + +import com.oracle.bmc.datascience.model.*; +/** + * Example: Click here to see how to use HeadModelDefinedMetadatumArtifactRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class HeadModelDefinedMetadatumArtifactRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + public String getModelId() { + return modelId; + } + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName; + + /** + * The name of the model metadatum in the metadata. + */ + public String getMetadatumKeyName() { + return metadatumKeyName; + } + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + HeadModelDefinedMetadatumArtifactRequest, 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 model. + */ + private String modelId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName = null; + + /** + * The name of the model metadatum in the metadata. + * @param metadatumKeyName the value to set + * @return this builder instance + */ + public Builder metadatumKeyName(String metadatumKeyName) { + this.metadatumKeyName = metadatumKeyName; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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, then 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(HeadModelDefinedMetadatumArtifactRequest o) { + modelId(o.getModelId()); + metadatumKeyName(o.getMetadatumKeyName()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of HeadModelDefinedMetadatumArtifactRequest 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 HeadModelDefinedMetadatumArtifactRequest + */ + public HeadModelDefinedMetadatumArtifactRequest build() { + HeadModelDefinedMetadatumArtifactRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of HeadModelDefinedMetadatumArtifactRequest 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 HeadModelDefinedMetadatumArtifactRequest + */ + public HeadModelDefinedMetadatumArtifactRequest buildWithoutInvocationCallback() { + HeadModelDefinedMetadatumArtifactRequest request = + new HeadModelDefinedMetadatumArtifactRequest(); + request.modelId = modelId; + request.metadatumKeyName = metadatumKeyName; + request.opcRequestId = opcRequestId; + return request; + // new HeadModelDefinedMetadatumArtifactRequest(modelId, metadatumKeyName, 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() + .modelId(modelId) + .metadatumKeyName(metadatumKeyName) + .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(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",metadatumKeyName=").append(String.valueOf(this.metadatumKeyName)); + 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 HeadModelDefinedMetadatumArtifactRequest)) { + return false; + } + + HeadModelDefinedMetadatumArtifactRequest other = + (HeadModelDefinedMetadatumArtifactRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals(this.metadatumKeyName, other.metadatumKeyName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.metadatumKeyName == null ? 43 : this.metadatumKeyName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListModelVersionSetsRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListModelVersionSetsRequest.java index 14786e4c02..e5286a41ff 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListModelVersionSetsRequest.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListModelVersionSetsRequest.java @@ -23,6 +23,56 @@ public class ListModelVersionSetsRequest public String getCompartmentId() { return compartmentId; } + /** + * Specifies the type of model version sets to list. By default, user model version sets are listed. + * + */ + private Category category; + + /** + * Specifies the type of model version sets to list. By default, user model version sets are listed. + * + **/ + public enum Category { + User("USER"), + Service("SERVICE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Category v : Category.values()) { + map.put(v.getValue(), v); + } + } + + Category(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Category create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Category: " + key); + } + }; + + /** + * Specifies the type of model version sets to list. By default, user model version sets are listed. + * + */ + public Category getCategory() { + return category; + } /** * Filter results by [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). Must be an OCID of the correct type for the resource type. * @@ -266,6 +316,23 @@ public Builder compartmentId(String compartmentId) { return this; } + /** + * Specifies the type of model version sets to list. By default, user model version sets are listed. + * + */ + private Category category = null; + + /** + * Specifies the type of model version sets to list. By default, user model version sets are listed. + * + * @param category the value to set + * @return this builder instance + */ + public Builder category(Category category) { + this.category = category; + return this; + } + /** * Filter results by [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). Must be an OCID of the correct type for the resource type. * @@ -481,6 +548,7 @@ public Builder retryConfiguration( */ public Builder copy(ListModelVersionSetsRequest o) { compartmentId(o.getCompartmentId()); + category(o.getCategory()); id(o.getId()); projectId(o.getProjectId()); name(o.getName()); @@ -524,6 +592,7 @@ public ListModelVersionSetsRequest build() { public ListModelVersionSetsRequest buildWithoutInvocationCallback() { ListModelVersionSetsRequest request = new ListModelVersionSetsRequest(); request.compartmentId = compartmentId; + request.category = category; request.id = id; request.projectId = projectId; request.name = name; @@ -535,7 +604,7 @@ public ListModelVersionSetsRequest buildWithoutInvocationCallback() { request.sortBy = sortBy; request.opcRequestId = opcRequestId; return request; - // new ListModelVersionSetsRequest(compartmentId, id, projectId, name, lifecycleState, createdBy, limit, page, sortOrder, sortBy, opcRequestId); + // new ListModelVersionSetsRequest(compartmentId, category, id, projectId, name, lifecycleState, createdBy, limit, page, sortOrder, sortBy, opcRequestId); } } @@ -546,6 +615,7 @@ public ListModelVersionSetsRequest buildWithoutInvocationCallback() { public Builder toBuilder() { return new Builder() .compartmentId(compartmentId) + .category(category) .id(id) .projectId(projectId) .name(name) @@ -572,6 +642,7 @@ public String toString() { sb.append("("); sb.append("super=").append(super.toString()); sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",category=").append(String.valueOf(this.category)); sb.append(",id=").append(String.valueOf(this.id)); sb.append(",projectId=").append(String.valueOf(this.projectId)); sb.append(",name=").append(String.valueOf(this.name)); @@ -598,6 +669,7 @@ public boolean equals(Object o) { ListModelVersionSetsRequest other = (ListModelVersionSetsRequest) o; return super.equals(o) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.category, other.category) && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.projectId, other.projectId) && java.util.Objects.equals(this.name, other.name) @@ -617,6 +689,7 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.category == null ? 43 : this.category.hashCode()); result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListModelsRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListModelsRequest.java index 2889be2467..3dbb71a28f 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListModelsRequest.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListModelsRequest.java @@ -44,6 +44,56 @@ public String getModelVersionSetName() { public String getVersionLabel() { return versionLabel; } + /** + * Specifies the type of models to list. By default, user models are listed. + * + */ + private Category category; + + /** + * Specifies the type of models to list. By default, user models are listed. + * + **/ + public enum Category { + User("USER"), + Service("SERVICE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Category v : Category.values()) { + map.put(v.getValue(), v); + } + } + + Category(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Category create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Category: " + key); + } + }; + + /** + * Specifies the type of models to list. By default, user models are listed. + * + */ + public Category getCategory() { + return category; + } /** * Filter results by [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). Must be an OCID of the correct type for the resource type. * @@ -320,6 +370,23 @@ public Builder versionLabel(String versionLabel) { return this; } + /** + * Specifies the type of models to list. By default, user models are listed. + * + */ + private Category category = null; + + /** + * Specifies the type of models to list. By default, user models are listed. + * + * @param category the value to set + * @return this builder instance + */ + public Builder category(Category category) { + this.category = category; + return this; + } + /** * Filter results by [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). Must be an OCID of the correct type for the resource type. * @@ -538,6 +605,7 @@ public Builder copy(ListModelsRequest o) { compartmentId(o.getCompartmentId()); modelVersionSetName(o.getModelVersionSetName()); versionLabel(o.getVersionLabel()); + category(o.getCategory()); id(o.getId()); projectId(o.getProjectId()); displayName(o.getDisplayName()); @@ -583,6 +651,7 @@ public ListModelsRequest buildWithoutInvocationCallback() { request.compartmentId = compartmentId; request.modelVersionSetName = modelVersionSetName; request.versionLabel = versionLabel; + request.category = category; request.id = id; request.projectId = projectId; request.displayName = displayName; @@ -594,7 +663,7 @@ public ListModelsRequest buildWithoutInvocationCallback() { request.sortBy = sortBy; request.opcRequestId = opcRequestId; return request; - // new ListModelsRequest(compartmentId, modelVersionSetName, versionLabel, id, projectId, displayName, lifecycleState, createdBy, limit, page, sortOrder, sortBy, opcRequestId); + // new ListModelsRequest(compartmentId, modelVersionSetName, versionLabel, category, id, projectId, displayName, lifecycleState, createdBy, limit, page, sortOrder, sortBy, opcRequestId); } } @@ -607,6 +676,7 @@ public Builder toBuilder() { .compartmentId(compartmentId) .modelVersionSetName(modelVersionSetName) .versionLabel(versionLabel) + .category(category) .id(id) .projectId(projectId) .displayName(displayName) @@ -635,6 +705,7 @@ public String toString() { sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(",modelVersionSetName=").append(String.valueOf(this.modelVersionSetName)); sb.append(",versionLabel=").append(String.valueOf(this.versionLabel)); + sb.append(",category=").append(String.valueOf(this.category)); sb.append(",id=").append(String.valueOf(this.id)); sb.append(",projectId=").append(String.valueOf(this.projectId)); sb.append(",displayName=").append(String.valueOf(this.displayName)); @@ -663,6 +734,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.modelVersionSetName, other.modelVersionSetName) && java.util.Objects.equals(this.versionLabel, other.versionLabel) + && java.util.Objects.equals(this.category, other.category) && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.projectId, other.projectId) && java.util.Objects.equals(this.displayName, other.displayName) @@ -688,6 +760,7 @@ public int hashCode() { ? 43 : this.modelVersionSetName.hashCode()); result = (result * PRIME) + (this.versionLabel == null ? 43 : this.versionLabel.hashCode()); + result = (result * PRIME) + (this.category == null ? 43 : this.category.hashCode()); result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListWorkRequestsRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListWorkRequestsRequest.java index e456560f0a..ebf44f32be 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListWorkRequestsRequest.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListWorkRequestsRequest.java @@ -74,6 +74,7 @@ public enum OperationType { ScheduleMove("SCHEDULE_MOVE"), ScheduleActivate("SCHEDULE_ACTIVATE"), ScheduleDeactivate("SCHEDULE_DEACTIVATE"), + RegisterModelArtifact("REGISTER_MODEL_ARTIFACT"), RestoreArchivedModel("RESTORE_ARCHIVED_MODEL"), ; diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/RegisterModelArtifactReferenceRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/RegisterModelArtifactReferenceRequest.java new file mode 100644 index 0000000000..bff953b9e1 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/RegisterModelArtifactReferenceRequest.java @@ -0,0 +1,359 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.requests; + +import com.oracle.bmc.datascience.model.*; +/** + * Example: Click here to see how to use RegisterModelArtifactReferenceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class RegisterModelArtifactReferenceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datascience.model.RegisterModelArtifactReferenceDetails> { + + /** + * register model artifact reference metadata + */ + private com.oracle.bmc.datascience.model.RegisterModelArtifactReferenceDetails + registerModelArtifactReferenceDetails; + + /** + * register model artifact reference metadata + */ + public com.oracle.bmc.datascience.model.RegisterModelArtifactReferenceDetails + getRegisterModelArtifactReferenceDetails() { + return registerModelArtifactReferenceDetails; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + public String getModelId() { + return modelId; + } + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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.datascience.model.RegisterModelArtifactReferenceDetails getBody$() { + return registerModelArtifactReferenceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RegisterModelArtifactReferenceRequest, + com.oracle.bmc.datascience.model.RegisterModelArtifactReferenceDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * register model artifact reference metadata + */ + private com.oracle.bmc.datascience.model.RegisterModelArtifactReferenceDetails + registerModelArtifactReferenceDetails = null; + + /** + * register model artifact reference metadata + * @param registerModelArtifactReferenceDetails the value to set + * @return this builder instance + */ + public Builder registerModelArtifactReferenceDetails( + com.oracle.bmc.datascience.model.RegisterModelArtifactReferenceDetails + registerModelArtifactReferenceDetails) { + this.registerModelArtifactReferenceDetails = registerModelArtifactReferenceDetails; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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, then 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 token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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(RegisterModelArtifactReferenceRequest o) { + registerModelArtifactReferenceDetails(o.getRegisterModelArtifactReferenceDetails()); + modelId(o.getModelId()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RegisterModelArtifactReferenceRequest 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 RegisterModelArtifactReferenceRequest + */ + public RegisterModelArtifactReferenceRequest build() { + RegisterModelArtifactReferenceRequest 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.datascience.model.RegisterModelArtifactReferenceDetails body) { + registerModelArtifactReferenceDetails(body); + return this; + } + + /** + * Build the instance of RegisterModelArtifactReferenceRequest 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 RegisterModelArtifactReferenceRequest + */ + public RegisterModelArtifactReferenceRequest buildWithoutInvocationCallback() { + RegisterModelArtifactReferenceRequest request = + new RegisterModelArtifactReferenceRequest(); + request.registerModelArtifactReferenceDetails = registerModelArtifactReferenceDetails; + request.modelId = modelId; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + return request; + // new RegisterModelArtifactReferenceRequest(registerModelArtifactReferenceDetails, modelId, 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() + .registerModelArtifactReferenceDetails(registerModelArtifactReferenceDetails) + .modelId(modelId) + .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(",registerModelArtifactReferenceDetails=") + .append(String.valueOf(this.registerModelArtifactReferenceDetails)); + sb.append(",modelId=").append(String.valueOf(this.modelId)); + 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 RegisterModelArtifactReferenceRequest)) { + return false; + } + + RegisterModelArtifactReferenceRequest other = (RegisterModelArtifactReferenceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.registerModelArtifactReferenceDetails, + other.registerModelArtifactReferenceDetails) + && java.util.Objects.equals(this.modelId, other.modelId) + && 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.registerModelArtifactReferenceDetails == null + ? 43 + : this.registerModelArtifactReferenceDetails.hashCode()); + result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.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-datascience/src/main/java/com/oracle/bmc/datascience/requests/UpdateModelCustomMetadatumArtifactRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/UpdateModelCustomMetadatumArtifactRequest.java new file mode 100644 index 0000000000..00fe99c1c6 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/UpdateModelCustomMetadatumArtifactRequest.java @@ -0,0 +1,447 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.requests; + +import com.oracle.bmc.datascience.model.*; +/** + * Example: Click here to see how to use UpdateModelCustomMetadatumArtifactRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class UpdateModelCustomMetadatumArtifactRequest + extends com.oracle.bmc.requests.BmcRequest + implements com.oracle.bmc.requests.HasContentLength { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + public String getModelId() { + return modelId; + } + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName; + + /** + * The name of the model metadatum in the metadata. + */ + public String getMetadatumKeyName() { + return metadatumKeyName; + } + /** + * The content length of the body. + */ + private Long contentLength; + + /** + * The content length of the body. + */ + public Long getContentLength() { + return contentLength; + } + /** + * The model custom metadata artifact to upload. + */ + private java.io.InputStream modelCustomMetadatumArtifact; + + /** + * The model custom metadata artifact to upload. + */ + public java.io.InputStream getModelCustomMetadatumArtifact() { + return modelCustomMetadatumArtifact; + } + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + */ + private String contentDisposition; + + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + */ + public String getContentDisposition() { + return contentDisposition; + } + /** + * 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code etag} value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public java.io.InputStream getBody$() { + return modelCustomMetadatumArtifact; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateModelCustomMetadatumArtifactRequest, 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 model. + */ + private String modelId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName = null; + + /** + * The name of the model metadatum in the metadata. + * @param metadatumKeyName the value to set + * @return this builder instance + */ + public Builder metadatumKeyName(String metadatumKeyName) { + this.metadatumKeyName = metadatumKeyName; + return this; + } + + /** + * The content length of the body. + */ + private Long contentLength = null; + + /** + * The content length of the body. + * @param contentLength the value to set + * @return this builder instance + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The model custom metadata artifact to upload. + */ + private java.io.InputStream modelCustomMetadatumArtifact = null; + + /** + * The model custom metadata artifact to upload. + * @param modelCustomMetadatumArtifact the value to set + * @return this builder instance + */ + public Builder modelCustomMetadatumArtifact( + java.io.InputStream modelCustomMetadatumArtifact) { + this.modelCustomMetadatumArtifact = modelCustomMetadatumArtifact; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + */ + private String contentDisposition = null; + + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + * @param contentDisposition the value to set + * @return this builder instance + */ + public Builder contentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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(UpdateModelCustomMetadatumArtifactRequest o) { + modelId(o.getModelId()); + metadatumKeyName(o.getMetadatumKeyName()); + contentLength(o.getContentLength()); + modelCustomMetadatumArtifact(o.getModelCustomMetadatumArtifact()); + opcRequestId(o.getOpcRequestId()); + contentDisposition(o.getContentDisposition()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateModelCustomMetadatumArtifactRequest 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 UpdateModelCustomMetadatumArtifactRequest + */ + public UpdateModelCustomMetadatumArtifactRequest build() { + UpdateModelCustomMetadatumArtifactRequest 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) { + modelCustomMetadatumArtifact(body); + return this; + } + + /** + * Build the instance of UpdateModelCustomMetadatumArtifactRequest 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 UpdateModelCustomMetadatumArtifactRequest + */ + public UpdateModelCustomMetadatumArtifactRequest buildWithoutInvocationCallback() { + UpdateModelCustomMetadatumArtifactRequest request = + new UpdateModelCustomMetadatumArtifactRequest(); + request.modelId = modelId; + request.metadatumKeyName = metadatumKeyName; + request.contentLength = contentLength; + request.modelCustomMetadatumArtifact = modelCustomMetadatumArtifact; + request.opcRequestId = opcRequestId; + request.contentDisposition = contentDisposition; + request.ifMatch = ifMatch; + return request; + // new UpdateModelCustomMetadatumArtifactRequest(modelId, metadatumKeyName, contentLength, modelCustomMetadatumArtifact, opcRequestId, contentDisposition, 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() + .modelId(modelId) + .metadatumKeyName(metadatumKeyName) + .contentLength(contentLength) + .modelCustomMetadatumArtifact(modelCustomMetadatumArtifact) + .opcRequestId(opcRequestId) + .contentDisposition(contentDisposition) + .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(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",metadatumKeyName=").append(String.valueOf(this.metadatumKeyName)); + sb.append(",contentLength=").append(String.valueOf(this.contentLength)); + sb.append(",modelCustomMetadatumArtifact=") + .append(String.valueOf(this.modelCustomMetadatumArtifact)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",contentDisposition=").append(String.valueOf(this.contentDisposition)); + 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 UpdateModelCustomMetadatumArtifactRequest)) { + return false; + } + + UpdateModelCustomMetadatumArtifactRequest other = + (UpdateModelCustomMetadatumArtifactRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals(this.metadatumKeyName, other.metadatumKeyName) + && java.util.Objects.equals(this.contentLength, other.contentLength) + && java.util.Objects.equals( + this.modelCustomMetadatumArtifact, other.modelCustomMetadatumArtifact) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.contentDisposition, other.contentDisposition) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.metadatumKeyName == null ? 43 : this.metadatumKeyName.hashCode()); + result = + (result * PRIME) + + (this.contentLength == null ? 43 : this.contentLength.hashCode()); + result = + (result * PRIME) + + (this.modelCustomMetadatumArtifact == null + ? 43 + : this.modelCustomMetadatumArtifact.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.contentDisposition == null + ? 43 + : this.contentDisposition.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/UpdateModelDefinedMetadatumArtifactRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/UpdateModelDefinedMetadatumArtifactRequest.java new file mode 100644 index 0000000000..e10f7d0807 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/UpdateModelDefinedMetadatumArtifactRequest.java @@ -0,0 +1,447 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.requests; + +import com.oracle.bmc.datascience.model.*; +/** + * Example: Click here to see how to use UpdateModelDefinedMetadatumArtifactRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class UpdateModelDefinedMetadatumArtifactRequest + extends com.oracle.bmc.requests.BmcRequest + implements com.oracle.bmc.requests.HasContentLength { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + public String getModelId() { + return modelId; + } + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName; + + /** + * The name of the model metadatum in the metadata. + */ + public String getMetadatumKeyName() { + return metadatumKeyName; + } + /** + * The content length of the body. + */ + private Long contentLength; + + /** + * The content length of the body. + */ + public Long getContentLength() { + return contentLength; + } + /** + * The model defined metadata artifact to upload. + */ + private java.io.InputStream modelDefinedMetadatumArtifact; + + /** + * The model defined metadata artifact to upload. + */ + public java.io.InputStream getModelDefinedMetadatumArtifact() { + return modelDefinedMetadatumArtifact; + } + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + */ + private String contentDisposition; + + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + */ + public String getContentDisposition() { + return contentDisposition; + } + /** + * 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code etag} value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public java.io.InputStream getBody$() { + return modelDefinedMetadatumArtifact; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateModelDefinedMetadatumArtifactRequest, 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 model. + */ + private String modelId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * The name of the model metadatum in the metadata. + */ + private String metadatumKeyName = null; + + /** + * The name of the model metadatum in the metadata. + * @param metadatumKeyName the value to set + * @return this builder instance + */ + public Builder metadatumKeyName(String metadatumKeyName) { + this.metadatumKeyName = metadatumKeyName; + return this; + } + + /** + * The content length of the body. + */ + private Long contentLength = null; + + /** + * The content length of the body. + * @param contentLength the value to set + * @return this builder instance + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The model defined metadata artifact to upload. + */ + private java.io.InputStream modelDefinedMetadatumArtifact = null; + + /** + * The model defined metadata artifact to upload. + * @param modelDefinedMetadatumArtifact the value to set + * @return this builder instance + */ + public Builder modelDefinedMetadatumArtifact( + java.io.InputStream modelDefinedMetadatumArtifact) { + this.modelDefinedMetadatumArtifact = modelDefinedMetadatumArtifact; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + */ + private String contentDisposition = null; + + /** + * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + * while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + * name when downloading. + * Example: {@code {"Content-Disposition": "attachment" + * "filename"="model.tar.gz" + * "Content-Length": "2347" + * "Content-Type": "application/gzip"}} + * + * @param contentDisposition the value to set + * @return this builder instance + */ + public Builder contentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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 is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code 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(UpdateModelDefinedMetadatumArtifactRequest o) { + modelId(o.getModelId()); + metadatumKeyName(o.getMetadatumKeyName()); + contentLength(o.getContentLength()); + modelDefinedMetadatumArtifact(o.getModelDefinedMetadatumArtifact()); + opcRequestId(o.getOpcRequestId()); + contentDisposition(o.getContentDisposition()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateModelDefinedMetadatumArtifactRequest 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 UpdateModelDefinedMetadatumArtifactRequest + */ + public UpdateModelDefinedMetadatumArtifactRequest build() { + UpdateModelDefinedMetadatumArtifactRequest 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) { + modelDefinedMetadatumArtifact(body); + return this; + } + + /** + * Build the instance of UpdateModelDefinedMetadatumArtifactRequest 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 UpdateModelDefinedMetadatumArtifactRequest + */ + public UpdateModelDefinedMetadatumArtifactRequest buildWithoutInvocationCallback() { + UpdateModelDefinedMetadatumArtifactRequest request = + new UpdateModelDefinedMetadatumArtifactRequest(); + request.modelId = modelId; + request.metadatumKeyName = metadatumKeyName; + request.contentLength = contentLength; + request.modelDefinedMetadatumArtifact = modelDefinedMetadatumArtifact; + request.opcRequestId = opcRequestId; + request.contentDisposition = contentDisposition; + request.ifMatch = ifMatch; + return request; + // new UpdateModelDefinedMetadatumArtifactRequest(modelId, metadatumKeyName, contentLength, modelDefinedMetadatumArtifact, opcRequestId, contentDisposition, 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() + .modelId(modelId) + .metadatumKeyName(metadatumKeyName) + .contentLength(contentLength) + .modelDefinedMetadatumArtifact(modelDefinedMetadatumArtifact) + .opcRequestId(opcRequestId) + .contentDisposition(contentDisposition) + .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(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",metadatumKeyName=").append(String.valueOf(this.metadatumKeyName)); + sb.append(",contentLength=").append(String.valueOf(this.contentLength)); + sb.append(",modelDefinedMetadatumArtifact=") + .append(String.valueOf(this.modelDefinedMetadatumArtifact)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",contentDisposition=").append(String.valueOf(this.contentDisposition)); + 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 UpdateModelDefinedMetadatumArtifactRequest)) { + return false; + } + + UpdateModelDefinedMetadatumArtifactRequest other = + (UpdateModelDefinedMetadatumArtifactRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals(this.metadatumKeyName, other.metadatumKeyName) + && java.util.Objects.equals(this.contentLength, other.contentLength) + && java.util.Objects.equals( + this.modelDefinedMetadatumArtifact, other.modelDefinedMetadatumArtifact) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.contentDisposition, other.contentDisposition) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.metadatumKeyName == null ? 43 : this.metadatumKeyName.hashCode()); + result = + (result * PRIME) + + (this.contentLength == null ? 43 : this.contentLength.hashCode()); + result = + (result * PRIME) + + (this.modelDefinedMetadatumArtifact == null + ? 43 + : this.modelDefinedMetadatumArtifact.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.contentDisposition == null + ? 43 + : this.contentDisposition.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/CreateModelCustomMetadatumArtifactResponse.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/CreateModelCustomMetadatumArtifactResponse.java new file mode 100644 index 0000000000..48b2baf1e2 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/CreateModelCustomMetadatumArtifactResponse.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.responses; + +import com.oracle.bmc.datascience.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class CreateModelCustomMetadatumArtifactResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "etag", "opcRequestId"}) + private CreateModelCustomMetadatumArtifactResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.etag = etag; + 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; + } + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then 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(CreateModelCustomMetadatumArtifactResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateModelCustomMetadatumArtifactResponse build() { + return new CreateModelCustomMetadatumArtifactResponse( + __httpStatusCode__, headers, etag, 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(",etag=").append(String.valueOf(etag)); + 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 CreateModelCustomMetadatumArtifactResponse)) { + return false; + } + + CreateModelCustomMetadatumArtifactResponse other = + (CreateModelCustomMetadatumArtifactResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @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()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/CreateModelDefinedMetadatumArtifactResponse.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/CreateModelDefinedMetadatumArtifactResponse.java new file mode 100644 index 0000000000..0576028b3a --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/CreateModelDefinedMetadatumArtifactResponse.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.responses; + +import com.oracle.bmc.datascience.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class CreateModelDefinedMetadatumArtifactResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "etag", "opcRequestId"}) + private CreateModelDefinedMetadatumArtifactResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.etag = etag; + 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; + } + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then 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(CreateModelDefinedMetadatumArtifactResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateModelDefinedMetadatumArtifactResponse build() { + return new CreateModelDefinedMetadatumArtifactResponse( + __httpStatusCode__, headers, etag, 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(",etag=").append(String.valueOf(etag)); + 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 CreateModelDefinedMetadatumArtifactResponse)) { + return false; + } + + CreateModelDefinedMetadatumArtifactResponse other = + (CreateModelDefinedMetadatumArtifactResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @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()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/DeleteModelCustomMetadatumArtifactResponse.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/DeleteModelCustomMetadatumArtifactResponse.java new file mode 100644 index 0000000000..c810188a9f --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/DeleteModelCustomMetadatumArtifactResponse.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.responses; + +import com.oracle.bmc.datascience.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class DeleteModelCustomMetadatumArtifactResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteModelCustomMetadatumArtifactResponse( + 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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then 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(DeleteModelCustomMetadatumArtifactResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteModelCustomMetadatumArtifactResponse build() { + return new DeleteModelCustomMetadatumArtifactResponse( + __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 DeleteModelCustomMetadatumArtifactResponse)) { + return false; + } + + DeleteModelCustomMetadatumArtifactResponse other = + (DeleteModelCustomMetadatumArtifactResponse) 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-datascience/src/main/java/com/oracle/bmc/datascience/responses/DeleteModelDefinedMetadatumArtifactResponse.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/DeleteModelDefinedMetadatumArtifactResponse.java new file mode 100644 index 0000000000..12ea991456 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/DeleteModelDefinedMetadatumArtifactResponse.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.responses; + +import com.oracle.bmc.datascience.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class DeleteModelDefinedMetadatumArtifactResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteModelDefinedMetadatumArtifactResponse( + 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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then 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(DeleteModelDefinedMetadatumArtifactResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteModelDefinedMetadatumArtifactResponse build() { + return new DeleteModelDefinedMetadatumArtifactResponse( + __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 DeleteModelDefinedMetadatumArtifactResponse)) { + return false; + } + + DeleteModelDefinedMetadatumArtifactResponse other = + (DeleteModelDefinedMetadatumArtifactResponse) 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-datascience/src/main/java/com/oracle/bmc/datascience/responses/GetModelCustomMetadatumArtifactContentResponse.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/GetModelCustomMetadatumArtifactContentResponse.java new file mode 100644 index 0000000000..78148e0309 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/GetModelCustomMetadatumArtifactContentResponse.java @@ -0,0 +1,386 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.responses; + +import com.oracle.bmc.datascience.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class GetModelCustomMetadatumArtifactContentResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @return the value + */ + public Long getContentLength() { + return contentLength; + } + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + */ + private String contentDisposition; + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + * @return the value + */ + public String getContentDisposition() { + return contentDisposition; + } + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + */ + private String contentMd5; + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + * @return the value + */ + public String getContentMd5() { + return contentMd5; + } + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + */ + private java.util.Date lastModified; + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + * @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", + "etag", + "opcRequestId", + "contentLength", + "contentDisposition", + "contentMd5", + "lastModified", + "inputStream" + }) + private GetModelCustomMetadatumArtifactContentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Long contentLength, + String contentDisposition, + String contentMd5, + java.util.Date lastModified, + java.io.InputStream inputStream) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.contentLength = contentLength; + this.contentDisposition = contentDisposition; + this.contentMd5 = contentMd5; + 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; + } + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @param contentLength the value to set + * @return this builder + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + */ + private String contentDisposition; + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + * @param contentDisposition the value to set + * @return this builder + */ + public Builder contentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + */ + private String contentMd5; + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + * @param contentMd5 the value to set + * @return this builder + */ + public Builder contentMd5(String contentMd5) { + this.contentMd5 = contentMd5; + return this; + } + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + */ + private java.util.Date lastModified; + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + * @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(GetModelCustomMetadatumArtifactContentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + contentLength(o.getContentLength()); + contentDisposition(o.getContentDisposition()); + contentMd5(o.getContentMd5()); + lastModified(o.getLastModified()); + inputStream(o.getInputStream()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetModelCustomMetadatumArtifactContentResponse build() { + return new GetModelCustomMetadatumArtifactContentResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + contentLength, + contentDisposition, + contentMd5, + 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(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",contentLength=").append(String.valueOf(contentLength)); + sb.append(",contentDisposition=").append(String.valueOf(contentDisposition)); + sb.append(",contentMd5=").append(String.valueOf(contentMd5)); + 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 GetModelCustomMetadatumArtifactContentResponse)) { + return false; + } + + GetModelCustomMetadatumArtifactContentResponse other = + (GetModelCustomMetadatumArtifactContentResponse) 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.contentLength, other.contentLength) + && java.util.Objects.equals(this.contentDisposition, other.contentDisposition) + && java.util.Objects.equals(this.contentMd5, other.contentMd5) + && 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.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.contentLength == null ? 43 : this.contentLength.hashCode()); + result = + (result * PRIME) + + (this.contentDisposition == null + ? 43 + : this.contentDisposition.hashCode()); + result = (result * PRIME) + (this.contentMd5 == null ? 43 : this.contentMd5.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-datascience/src/main/java/com/oracle/bmc/datascience/responses/GetModelDefinedMetadatumArtifactContentResponse.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/GetModelDefinedMetadatumArtifactContentResponse.java new file mode 100644 index 0000000000..dd487a2696 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/GetModelDefinedMetadatumArtifactContentResponse.java @@ -0,0 +1,386 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.responses; + +import com.oracle.bmc.datascience.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class GetModelDefinedMetadatumArtifactContentResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @return the value + */ + public Long getContentLength() { + return contentLength; + } + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + */ + private String contentDisposition; + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + * @return the value + */ + public String getContentDisposition() { + return contentDisposition; + } + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + */ + private String contentMd5; + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + * @return the value + */ + public String getContentMd5() { + return contentMd5; + } + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + */ + private java.util.Date lastModified; + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + * @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", + "etag", + "opcRequestId", + "contentLength", + "contentDisposition", + "contentMd5", + "lastModified", + "inputStream" + }) + private GetModelDefinedMetadatumArtifactContentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Long contentLength, + String contentDisposition, + String contentMd5, + java.util.Date lastModified, + java.io.InputStream inputStream) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.contentLength = contentLength; + this.contentDisposition = contentDisposition; + this.contentMd5 = contentMd5; + 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; + } + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @param contentLength the value to set + * @return this builder + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + */ + private String contentDisposition; + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + * @param contentDisposition the value to set + * @return this builder + */ + public Builder contentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + */ + private String contentMd5; + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + * @param contentMd5 the value to set + * @return this builder + */ + public Builder contentMd5(String contentMd5) { + this.contentMd5 = contentMd5; + return this; + } + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + */ + private java.util.Date lastModified; + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + * @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(GetModelDefinedMetadatumArtifactContentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + contentLength(o.getContentLength()); + contentDisposition(o.getContentDisposition()); + contentMd5(o.getContentMd5()); + lastModified(o.getLastModified()); + inputStream(o.getInputStream()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetModelDefinedMetadatumArtifactContentResponse build() { + return new GetModelDefinedMetadatumArtifactContentResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + contentLength, + contentDisposition, + contentMd5, + 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(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",contentLength=").append(String.valueOf(contentLength)); + sb.append(",contentDisposition=").append(String.valueOf(contentDisposition)); + sb.append(",contentMd5=").append(String.valueOf(contentMd5)); + 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 GetModelDefinedMetadatumArtifactContentResponse)) { + return false; + } + + GetModelDefinedMetadatumArtifactContentResponse other = + (GetModelDefinedMetadatumArtifactContentResponse) 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.contentLength, other.contentLength) + && java.util.Objects.equals(this.contentDisposition, other.contentDisposition) + && java.util.Objects.equals(this.contentMd5, other.contentMd5) + && 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.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.contentLength == null ? 43 : this.contentLength.hashCode()); + result = + (result * PRIME) + + (this.contentDisposition == null + ? 43 + : this.contentDisposition.hashCode()); + result = (result * PRIME) + (this.contentMd5 == null ? 43 : this.contentMd5.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-datascience/src/main/java/com/oracle/bmc/datascience/responses/HeadModelCustomMetadatumArtifactResponse.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/HeadModelCustomMetadatumArtifactResponse.java new file mode 100644 index 0000000000..ff54161d71 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/HeadModelCustomMetadatumArtifactResponse.java @@ -0,0 +1,349 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.responses; + +import com.oracle.bmc.datascience.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class HeadModelCustomMetadatumArtifactResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @return the value + */ + public Long getContentLength() { + return contentLength; + } + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + */ + private String contentDisposition; + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + * @return the value + */ + public String getContentDisposition() { + return contentDisposition; + } + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + */ + private String contentMd5; + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + * @return the value + */ + public String getContentMd5() { + return contentMd5; + } + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + */ + private java.util.Date lastModified; + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + * @return the value + */ + public java.util.Date getLastModified() { + return lastModified; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "contentLength", + "contentDisposition", + "contentMd5", + "lastModified" + }) + private HeadModelCustomMetadatumArtifactResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Long contentLength, + String contentDisposition, + String contentMd5, + java.util.Date lastModified) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.contentLength = contentLength; + this.contentDisposition = contentDisposition; + this.contentMd5 = contentMd5; + this.lastModified = lastModified; + } + + 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 [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @param contentLength the value to set + * @return this builder + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + */ + private String contentDisposition; + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + * @param contentDisposition the value to set + * @return this builder + */ + public Builder contentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + */ + private String contentMd5; + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + * @param contentMd5 the value to set + * @return this builder + */ + public Builder contentMd5(String contentMd5) { + this.contentMd5 = contentMd5; + return this; + } + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + */ + private java.util.Date lastModified; + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + * @param lastModified the value to set + * @return this builder + */ + public Builder lastModified(java.util.Date lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(HeadModelCustomMetadatumArtifactResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + contentLength(o.getContentLength()); + contentDisposition(o.getContentDisposition()); + contentMd5(o.getContentMd5()); + lastModified(o.getLastModified()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public HeadModelCustomMetadatumArtifactResponse build() { + return new HeadModelCustomMetadatumArtifactResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + contentLength, + contentDisposition, + contentMd5, + lastModified); + } + } + + /** + * 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(",contentLength=").append(String.valueOf(contentLength)); + sb.append(",contentDisposition=").append(String.valueOf(contentDisposition)); + sb.append(",contentMd5=").append(String.valueOf(contentMd5)); + sb.append(",lastModified=").append(String.valueOf(lastModified)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HeadModelCustomMetadatumArtifactResponse)) { + return false; + } + + HeadModelCustomMetadatumArtifactResponse other = + (HeadModelCustomMetadatumArtifactResponse) 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.contentLength, other.contentLength) + && java.util.Objects.equals(this.contentDisposition, other.contentDisposition) + && java.util.Objects.equals(this.contentMd5, other.contentMd5) + && java.util.Objects.equals(this.lastModified, other.lastModified); + } + + @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.contentLength == null ? 43 : this.contentLength.hashCode()); + result = + (result * PRIME) + + (this.contentDisposition == null + ? 43 + : this.contentDisposition.hashCode()); + result = (result * PRIME) + (this.contentMd5 == null ? 43 : this.contentMd5.hashCode()); + result = (result * PRIME) + (this.lastModified == null ? 43 : this.lastModified.hashCode()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/HeadModelDefinedMetadatumArtifactResponse.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/HeadModelDefinedMetadatumArtifactResponse.java new file mode 100644 index 0000000000..5cf6eef53a --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/HeadModelDefinedMetadatumArtifactResponse.java @@ -0,0 +1,350 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.responses; + +import com.oracle.bmc.datascience.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class HeadModelDefinedMetadatumArtifactResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @return the value + */ + public Long getContentLength() { + return contentLength; + } + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + */ + private String contentDisposition; + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + * @return the value + */ + public String getContentDisposition() { + return contentDisposition; + } + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + */ + private String contentMd5; + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + * @return the value + */ + public String getContentMd5() { + return contentMd5; + } + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + */ + private java.util.Date lastModified; + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + * @return the value + */ + public java.util.Date getLastModified() { + return lastModified; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "contentLength", + "contentDisposition", + "contentMd5", + "lastModified" + }) + private HeadModelDefinedMetadatumArtifactResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Long contentLength, + String contentDisposition, + String contentMd5, + java.util.Date lastModified) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.contentLength = contentLength; + this.contentDisposition = contentDisposition; + this.contentMd5 = contentMd5; + this.lastModified = lastModified; + } + + 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 [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @param contentLength the value to set + * @return this builder + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + */ + private String contentDisposition; + + /** + * The content disposition of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1. + * @param contentDisposition the value to set + * @return this builder + */ + public Builder contentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + */ + private String contentMd5; + + /** + * The base-64 encoded MD5 hash of the body, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.15. + * Unavailable for objects uploaded using multipart upload. + * If the {@code content-md5} header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. + * If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + * "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + * + * @param contentMd5 the value to set + * @return this builder + */ + public Builder contentMd5(String contentMd5) { + this.contentMd5 = contentMd5; + return this; + } + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + */ + private java.util.Date lastModified; + + /** + * The artifact modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + * @param lastModified the value to set + * @return this builder + */ + public Builder lastModified(java.util.Date lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(HeadModelDefinedMetadatumArtifactResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + contentLength(o.getContentLength()); + contentDisposition(o.getContentDisposition()); + contentMd5(o.getContentMd5()); + lastModified(o.getLastModified()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public HeadModelDefinedMetadatumArtifactResponse build() { + return new HeadModelDefinedMetadatumArtifactResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + contentLength, + contentDisposition, + contentMd5, + lastModified); + } + } + + /** + * 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(",contentLength=").append(String.valueOf(contentLength)); + sb.append(",contentDisposition=").append(String.valueOf(contentDisposition)); + sb.append(",contentMd5=").append(String.valueOf(contentMd5)); + sb.append(",lastModified=").append(String.valueOf(lastModified)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HeadModelDefinedMetadatumArtifactResponse)) { + return false; + } + + HeadModelDefinedMetadatumArtifactResponse other = + (HeadModelDefinedMetadatumArtifactResponse) 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.contentLength, other.contentLength) + && java.util.Objects.equals(this.contentDisposition, other.contentDisposition) + && java.util.Objects.equals(this.contentMd5, other.contentMd5) + && java.util.Objects.equals(this.lastModified, other.lastModified); + } + + @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.contentLength == null ? 43 : this.contentLength.hashCode()); + result = + (result * PRIME) + + (this.contentDisposition == null + ? 43 + : this.contentDisposition.hashCode()); + result = (result * PRIME) + (this.contentMd5 == null ? 43 : this.contentMd5.hashCode()); + result = (result * PRIME) + (this.lastModified == null ? 43 : this.lastModified.hashCode()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/RegisterModelArtifactReferenceResponse.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/RegisterModelArtifactReferenceResponse.java new file mode 100644 index 0000000000..27ff76c5b4 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/RegisterModelArtifactReferenceResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.responses; + +import com.oracle.bmc.datascience.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class RegisterModelArtifactReferenceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/API/Concepts/identifiers.htm) of the work request. Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/20160918/WorkRequest/GetWorkRequest) + * with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/API/Concepts/identifiers.htm) of the work request. Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/20160918/WorkRequest/GetWorkRequest) + * with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private RegisterModelArtifactReferenceResponse( + 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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/API/Concepts/identifiers.htm) of the work request. Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/20160918/WorkRequest/GetWorkRequest) + * with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/API/Concepts/identifiers.htm) of the work request. Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/20160918/WorkRequest/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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RegisterModelArtifactReferenceResponse 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 RegisterModelArtifactReferenceResponse build() { + return new RegisterModelArtifactReferenceResponse( + __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 RegisterModelArtifactReferenceResponse)) { + return false; + } + + RegisterModelArtifactReferenceResponse other = (RegisterModelArtifactReferenceResponse) 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-datascience/src/main/java/com/oracle/bmc/datascience/responses/UpdateModelCustomMetadatumArtifactResponse.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/UpdateModelCustomMetadatumArtifactResponse.java new file mode 100644 index 0000000000..fa1d4af332 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/UpdateModelCustomMetadatumArtifactResponse.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.responses; + +import com.oracle.bmc.datascience.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class UpdateModelCustomMetadatumArtifactResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "etag", "opcRequestId"}) + private UpdateModelCustomMetadatumArtifactResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.etag = etag; + 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; + } + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then 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(UpdateModelCustomMetadatumArtifactResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateModelCustomMetadatumArtifactResponse build() { + return new UpdateModelCustomMetadatumArtifactResponse( + __httpStatusCode__, headers, etag, 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(",etag=").append(String.valueOf(etag)); + 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 UpdateModelCustomMetadatumArtifactResponse)) { + return false; + } + + UpdateModelCustomMetadatumArtifactResponse other = + (UpdateModelCustomMetadatumArtifactResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @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()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/UpdateModelDefinedMetadatumArtifactResponse.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/UpdateModelDefinedMetadatumArtifactResponse.java new file mode 100644 index 0000000000..b36d960060 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/UpdateModelDefinedMetadatumArtifactResponse.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.responses; + +import com.oracle.bmc.datascience.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class UpdateModelDefinedMetadatumArtifactResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "etag", "opcRequestId"}) + private UpdateModelDefinedMetadatumArtifactResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.etag = etag; + 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; + } + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + */ + private String etag; + + /** + * For optimistic concurrency control. See [ETags for Optimistic Concurrency Control](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + * + * @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, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then 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(UpdateModelDefinedMetadatumArtifactResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateModelDefinedMetadatumArtifactResponse build() { + return new UpdateModelDefinedMetadatumArtifactResponse( + __httpStatusCode__, headers, etag, 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(",etag=").append(String.valueOf(etag)); + 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 UpdateModelDefinedMetadatumArtifactResponse)) { + return false; + } + + UpdateModelDefinedMetadatumArtifactResponse other = + (UpdateModelDefinedMetadatumArtifactResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @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()); + return result; + } +} diff --git a/bmc-dblm/pom.xml b/bmc-dblm/pom.xml index 7933872a87..689a5e1be9 100644 --- a/bmc-dblm/pom.xml +++ b/bmc-dblm/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-dblm @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-delegateaccesscontrol/pom.xml b/bmc-delegateaccesscontrol/pom.xml index ad1fc21b12..4670bbe277 100644 --- a/bmc-delegateaccesscontrol/pom.xml +++ b/bmc-delegateaccesscontrol/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-delegateaccesscontrol @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-demandsignal/pom.xml b/bmc-demandsignal/pom.xml index 004d7bc60b..61511da88b 100644 --- a/bmc-demandsignal/pom.xml +++ b/bmc-demandsignal/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-demandsignal @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-desktops/pom.xml b/bmc-desktops/pom.xml index b7126f3d2b..08faaa63d2 100644 --- a/bmc-desktops/pom.xml +++ b/bmc-desktops/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-desktops @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-devops/pom.xml b/bmc-devops/pom.xml index 340c026494..1a7fd2e483 100644 --- a/bmc-devops/pom.xml +++ b/bmc-devops/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-devops @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-disasterrecovery/pom.xml b/bmc-disasterrecovery/pom.xml index 93eef72a83..1e5b22f058 100644 --- a/bmc-disasterrecovery/pom.xml +++ b/bmc-disasterrecovery/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-disasterrecovery @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-dns/pom.xml b/bmc-dns/pom.xml index 948e31ce81..7614cae8de 100644 --- a/bmc-dns/pom.xml +++ b/bmc-dns/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 2.81.0 + 2.82.0 diff --git a/bmc-dts/pom.xml b/bmc-dts/pom.xml index f6cb03b575..86d47aaaaf 100644 --- a/bmc-dts/pom.xml +++ b/bmc-dts/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-dts @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-email/pom.xml b/bmc-email/pom.xml index b80d7e1a70..6d2dd7eb71 100644 --- a/bmc-email/pom.xml +++ b/bmc-email/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-emaildataplane/pom.xml b/bmc-emaildataplane/pom.xml index 7a633e2f41..e99c2c5f8f 100644 --- a/bmc-emaildataplane/pom.xml +++ b/bmc-emaildataplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-emaildataplane @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-emwarehouse/pom.xml b/bmc-emwarehouse/pom.xml index a81070c3c3..49e4fabe48 100644 --- a/bmc-emwarehouse/pom.xml +++ b/bmc-emwarehouse/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-emwarehouse @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-encryption/pom.xml b/bmc-encryption/pom.xml index 5536a70e14..3791dd6251 100644 --- a/bmc-encryption/pom.xml +++ b/bmc-encryption/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml @@ -19,18 +19,18 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 com.oracle.oci.sdk oci-java-sdk-circuitbreaker - 2.81.0 + 2.82.0 test com.oracle.oci.sdk oci-java-sdk-keymanagement - 2.81.0 + 2.82.0 com.fasterxml.jackson.core diff --git a/bmc-enforcer-rules/pom.xml b/bmc-enforcer-rules/pom.xml index 42783ae101..a6ca4d1633 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.81.0 + 2.82.0 oci-java-sdk-enforcer-rules diff --git a/bmc-events/pom.xml b/bmc-events/pom.xml index e4cc9033cf..f462088412 100644 --- a/bmc-events/pom.xml +++ b/bmc-events/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-events @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-examples/pom.xml b/bmc-examples/pom.xml index fc41dbea92..b0241ea2c4 100644 --- a/bmc-examples/pom.xml +++ b/bmc-examples/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-examples @@ -28,7 +28,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 2.81.0 + 2.82.0 pom import @@ -677,5 +677,9 @@ com.oracle.oci.sdk oci-java-sdk-dblm + + com.oracle.oci.sdk + oci-java-sdk-mngdmac + \ No newline at end of file diff --git a/bmc-filestorage/pom.xml b/bmc-filestorage/pom.xml index c0d1608796..e4b3720d8c 100644 --- a/bmc-filestorage/pom.xml +++ b/bmc-filestorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorage.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorage.java index 430b8d2200..92fa6a82a6 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorage.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorage.java @@ -383,6 +383,20 @@ CreateFilesystemSnapshotPolicyResponse createFilesystemSnapshotPolicy( */ CreateOutboundConnectorResponse createOutboundConnector(CreateOutboundConnectorRequest request); + /** + * Create a file system, user, or group quota rule given the `fileSystemId`, `principalId`, `principalType` and + * `isHardQuota` parameters. + * + * @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 CreateQuotaRule API. + */ + CreateQuotaRuleResponse createQuotaRule(CreateQuotaRuleRequest request); + /** * Creates a new replication in the specified compartment. * Replications are the primary resource that governs the policy of cross-region replication between source @@ -505,6 +519,19 @@ DeleteFilesystemSnapshotPolicyResponse deleteFilesystemSnapshotPolicy( */ DeleteOutboundConnectorResponse deleteOutboundConnector(DeleteOutboundConnectorRequest request); + /** + * Remove a file system, user, or group quota rule given the `fileSystemId` and `quotaRuleId` parameters. + * + * @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 DeleteQuotaRule API. + */ + DeleteQuotaRuleResponse deleteQuotaRule(DeleteQuotaRuleRequest request); + /** * Deletes the specified replication and the the associated replication target. * @@ -646,6 +673,19 @@ GetFilesystemSnapshotPolicyResponse getFilesystemSnapshotPolicy( */ GetOutboundConnectorResponse getOutboundConnector(GetOutboundConnectorRequest request); + /** + * Get a file system, user, or group quota rule given the `fileSystemId` and `quotaRuleId` parameters. + * + * @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 GetQuotaRule API. + */ + GetQuotaRuleResponse getQuotaRule(GetQuotaRuleRequest request); + /** * Gets the specified replication's information. * @param request The request object containing the details to send @@ -764,6 +804,19 @@ ListFilesystemSnapshotPoliciesResponse listFilesystemSnapshotPolicies( */ ListOutboundConnectorsResponse listOutboundConnectors(ListOutboundConnectorsRequest request); + /** + * List user or group usages and their quota rules by certain principal type. + * + * @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 ListQuotaRules API. + */ + ListQuotaRulesResponse listQuotaRules(ListQuotaRulesRequest request); + /** * Lists the replication target resources in the specified compartment. * @@ -928,6 +981,21 @@ RemoveOutboundConnectorLockResponse removeOutboundConnectorLock( ScheduleDowngradeShapeMountTargetResponse scheduleDowngradeShapeMountTarget( ScheduleDowngradeShapeMountTargetRequest request); + /** + * Enable or disable quota enforcement for the file system. + * If `areQuotaRulesEnabled` = `true`, then the quota enforcement will be enabled. + * If `areQuotaRulesEnabled` = `false`, then the quota enforcement will be disabled. + * + * @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 ToggleQuotaRules API. + */ + ToggleQuotaRulesResponse toggleQuotaRules(ToggleQuotaRulesRequest request); + /** * This operation unpauses a paused file system snapshot policy and updates the lifecycle state of the file system snapshot policy from * INACTIVE to ACTIVE. By default, file system snapshot policies are in the ACTIVE state. When a file system snapshot policy is not paused, or in the ACTIVE state, file systems that are associated with the @@ -1021,6 +1089,19 @@ UpdateFilesystemSnapshotPolicyResponse updateFilesystemSnapshotPolicy( */ UpdateOutboundConnectorResponse updateOutboundConnector(UpdateOutboundConnectorRequest request); + /** + * Edit a file system, user, or group quota rule given the `fileSystemId` and `quotaRuleId` parameters. + * + * @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 UpdateQuotaRule API. + */ + UpdateQuotaRuleResponse updateQuotaRule(UpdateQuotaRuleRequest request); + /** * Updates the information for the specified replication and its associated replication target. * diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsync.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsync.java index f6902df95f..04859ff841 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsync.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsync.java @@ -453,6 +453,23 @@ java.util.concurrent.Future createOutboundConne CreateOutboundConnectorRequest, CreateOutboundConnectorResponse> handler); + /** + * Create a file system, user, or group quota rule given the `fileSystemId`, `principalId`, `principalType` and + * `isHardQuota` parameters. + * + * + * @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 createQuotaRule( + CreateQuotaRuleRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Creates a new replication in the specified compartment. * Replications are the primary resource that governs the policy of cross-region replication between source @@ -601,6 +618,22 @@ java.util.concurrent.Future deleteOutboundConne DeleteOutboundConnectorRequest, DeleteOutboundConnectorResponse> handler); + /** + * Remove a file system, user, or group quota rule given the `fileSystemId` and `quotaRuleId` parameters. + * + * + * @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 deleteQuotaRule( + DeleteQuotaRuleRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Deletes the specified replication and the the associated replication target. * @@ -777,6 +810,22 @@ java.util.concurrent.Future getOutboundConnector( GetOutboundConnectorRequest, GetOutboundConnectorResponse> handler); + /** + * Get a file system, user, or group quota rule given the `fileSystemId` and `quotaRuleId` parameters. + * + * + * @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 getQuotaRule( + GetQuotaRuleRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Gets the specified replication's information. * @@ -924,6 +973,22 @@ java.util.concurrent.Future listOutboundConnecto ListOutboundConnectorsRequest, ListOutboundConnectorsResponse> handler); + /** + * List user or group usages and their quota rules by certain principal type. + * + * + * @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 listQuotaRules( + ListQuotaRulesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Lists the replication target resources in the specified compartment. * @@ -1135,6 +1200,24 @@ java.util.concurrent.Future removeSnapshotLock( ScheduleDowngradeShapeMountTargetResponse> handler); + /** + * Enable or disable quota enforcement for the file system. + * If `areQuotaRulesEnabled` = `true`, then the quota enforcement will be enabled. + * If `areQuotaRulesEnabled` = `false`, then the quota enforcement will be disabled. + * + * + * @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 toggleQuotaRules( + ToggleQuotaRulesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * This operation unpauses a paused file system snapshot policy and updates the lifecycle state of the file system snapshot policy from * INACTIVE to ACTIVE. By default, file system snapshot policies are in the ACTIVE state. When a file system snapshot policy is not paused, or in the ACTIVE state, file systems that are associated with the @@ -1255,6 +1338,22 @@ java.util.concurrent.Future updateOutboundConne UpdateOutboundConnectorRequest, UpdateOutboundConnectorResponse> handler); + /** + * Edit a file system, user, or group quota rule given the `fileSystemId` and `quotaRuleId` parameters. + * + * + * @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 updateQuotaRule( + UpdateQuotaRuleRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Updates the information for the specified replication and its associated replication target. * diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsyncClient.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsyncClient.java index 801c9abf9c..5e2a0289e3 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsyncClient.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsyncClient.java @@ -1428,6 +1428,58 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future createQuotaRule( + CreateQuotaRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateQuotaRuleRequest, CreateQuotaRuleResponse> + handler) { + LOG.trace("Called async createQuotaRule"); + final CreateQuotaRuleRequest interceptedRequest = + CreateQuotaRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateQuotaRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "CreateQuotaRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/CreateQuotaRule"); + final java.util.function.Function + transformer = + CreateQuotaRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateQuotaRuleRequest, CreateQuotaRuleResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateQuotaRuleDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateQuotaRuleRequest, CreateQuotaRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createReplication( CreateReplicationRequest request, @@ -1767,6 +1819,52 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deleteQuotaRule( + DeleteQuotaRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteQuotaRuleRequest, DeleteQuotaRuleResponse> + handler) { + LOG.trace("Called async deleteQuotaRule"); + final DeleteQuotaRuleRequest interceptedRequest = + DeleteQuotaRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteQuotaRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "DeleteQuotaRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/DeleteQuotaRule"); + final java.util.function.Function + transformer = + DeleteQuotaRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteQuotaRuleRequest, DeleteQuotaRuleResponse>, + 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< + DeleteQuotaRuleRequest, DeleteQuotaRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteReplication( DeleteReplicationRequest request, @@ -2270,6 +2368,50 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getQuotaRule( + GetQuotaRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getQuotaRule"); + final GetQuotaRuleRequest interceptedRequest = + GetQuotaRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetQuotaRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "GetQuotaRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/GetQuotaRule"); + final java.util.function.Function + transformer = + GetQuotaRuleConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetQuotaRuleRequest, GetQuotaRuleResponse>, + 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< + GetQuotaRuleRequest, GetQuotaRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getReplication( GetReplicationRequest request, @@ -2686,6 +2828,51 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listQuotaRules( + ListQuotaRulesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListQuotaRulesRequest, ListQuotaRulesResponse> + handler) { + LOG.trace("Called async listQuotaRules"); + final ListQuotaRulesRequest interceptedRequest = + ListQuotaRulesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListQuotaRulesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "ListQuotaRules", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/ListQuotaRules"); + final java.util.function.Function + transformer = + ListQuotaRulesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListQuotaRulesRequest, ListQuotaRulesResponse>, + 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< + ListQuotaRulesRequest, ListQuotaRulesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listReplicationTargets( ListReplicationTargetsRequest request, @@ -3304,6 +3491,58 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future toggleQuotaRules( + ToggleQuotaRulesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ToggleQuotaRulesRequest, ToggleQuotaRulesResponse> + handler) { + LOG.trace("Called async toggleQuotaRules"); + final ToggleQuotaRulesRequest interceptedRequest = + ToggleQuotaRulesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ToggleQuotaRulesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "ToggleQuotaRules", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/ToggleQuotaRules"); + final java.util.function.Function + transformer = + ToggleQuotaRulesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ToggleQuotaRulesRequest, ToggleQuotaRulesResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getToggleQuotaRulesDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ToggleQuotaRulesRequest, ToggleQuotaRulesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future unpauseFilesystemSnapshotPolicy( @@ -3669,6 +3908,57 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future updateQuotaRule( + UpdateQuotaRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateQuotaRuleRequest, UpdateQuotaRuleResponse> + handler) { + LOG.trace("Called async updateQuotaRule"); + final UpdateQuotaRuleRequest interceptedRequest = + UpdateQuotaRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateQuotaRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "UpdateQuotaRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/UpdateQuotaRule"); + final java.util.function.Function + transformer = + UpdateQuotaRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateQuotaRuleRequest, UpdateQuotaRuleResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateQuotaRuleDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateQuotaRuleRequest, UpdateQuotaRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateReplication( UpdateReplicationRequest request, diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageClient.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageClient.java index 1a7175d65e..1ea382486a 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageClient.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageClient.java @@ -1308,6 +1308,48 @@ public CreateOutboundConnectorResponse createOutboundConnector( }); } + @Override + public CreateQuotaRuleResponse createQuotaRule(CreateQuotaRuleRequest request) { + LOG.trace("Called createQuotaRule"); + final CreateQuotaRuleRequest interceptedRequest = + CreateQuotaRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateQuotaRuleConverter.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.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "CreateQuotaRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/CreateQuotaRule"); + java.util.function.Function + transformer = + CreateQuotaRuleConverter.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.getCreateQuotaRuleDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateReplicationResponse createReplication(CreateReplicationRequest request) { LOG.trace("Called createReplication"); @@ -1581,6 +1623,44 @@ public DeleteOutboundConnectorResponse deleteOutboundConnector( }); } + @Override + public DeleteQuotaRuleResponse deleteQuotaRule(DeleteQuotaRuleRequest request) { + LOG.trace("Called deleteQuotaRule"); + final DeleteQuotaRuleRequest interceptedRequest = + DeleteQuotaRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteQuotaRuleConverter.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( + "FileStorage", + "DeleteQuotaRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/DeleteQuotaRule"); + java.util.function.Function + transformer = + DeleteQuotaRuleConverter.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 DeleteReplicationResponse deleteReplication(DeleteReplicationRequest request) { LOG.trace("Called deleteReplication"); @@ -1982,6 +2062,41 @@ public GetOutboundConnectorResponse getOutboundConnector(GetOutboundConnectorReq }); } + @Override + public GetQuotaRuleResponse getQuotaRule(GetQuotaRuleRequest request) { + LOG.trace("Called getQuotaRule"); + final GetQuotaRuleRequest interceptedRequest = + GetQuotaRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetQuotaRuleConverter.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( + "FileStorage", + "GetQuotaRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/GetQuotaRule"); + java.util.function.Function transformer = + GetQuotaRuleConverter.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 GetReplicationResponse getReplication(GetReplicationRequest request) { LOG.trace("Called getReplication"); @@ -2310,6 +2425,41 @@ public ListOutboundConnectorsResponse listOutboundConnectors( }); } + @Override + public ListQuotaRulesResponse listQuotaRules(ListQuotaRulesRequest request) { + LOG.trace("Called listQuotaRules"); + final ListQuotaRulesRequest interceptedRequest = + ListQuotaRulesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListQuotaRulesConverter.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( + "FileStorage", + "ListQuotaRules", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/ListQuotaRules"); + java.util.function.Function transformer = + ListQuotaRulesConverter.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 ListReplicationTargetsResponse listReplicationTargets( ListReplicationTargetsRequest request) { @@ -2798,6 +2948,48 @@ public ScheduleDowngradeShapeMountTargetResponse scheduleDowngradeShapeMountTarg }); } + @Override + public ToggleQuotaRulesResponse toggleQuotaRules(ToggleQuotaRulesRequest request) { + LOG.trace("Called toggleQuotaRules"); + final ToggleQuotaRulesRequest interceptedRequest = + ToggleQuotaRulesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ToggleQuotaRulesConverter.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.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "ToggleQuotaRules", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/ToggleQuotaRules"); + java.util.function.Function + transformer = + ToggleQuotaRulesConverter.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.getToggleQuotaRulesDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UnpauseFilesystemSnapshotPolicyResponse unpauseFilesystemSnapshotPolicy( UnpauseFilesystemSnapshotPolicyRequest request) { @@ -3086,6 +3278,47 @@ public UpdateOutboundConnectorResponse updateOutboundConnector( }); } + @Override + public UpdateQuotaRuleResponse updateQuotaRule(UpdateQuotaRuleRequest request) { + LOG.trace("Called updateQuotaRule"); + final UpdateQuotaRuleRequest interceptedRequest = + UpdateQuotaRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateQuotaRuleConverter.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( + "FileStorage", + "UpdateQuotaRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/UpdateQuotaRule"); + java.util.function.Function + transformer = + UpdateQuotaRuleConverter.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.getUpdateQuotaRuleDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateReplicationResponse updateReplication(UpdateReplicationRequest request) { LOG.trace("Called updateReplication"); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStoragePaginators.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStoragePaginators.java index aba8a7ca74..62d4e92bb7 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStoragePaginators.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStoragePaginators.java @@ -716,6 +716,116 @@ public ListOutboundConnectorsResponse apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listQuotaRules 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 listQuotaRulesResponseIterator( + final ListQuotaRulesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListQuotaRulesRequest.Builder, ListQuotaRulesRequest, ListQuotaRulesResponse>( + new java.util.function.Supplier() { + @Override + public ListQuotaRulesRequest.Builder get() { + return ListQuotaRulesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListQuotaRulesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListQuotaRulesRequest.Builder>, + ListQuotaRulesRequest>() { + @Override + public ListQuotaRulesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListQuotaRulesRequest.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 ListQuotaRulesResponse apply(ListQuotaRulesRequest request) { + return client.listQuotaRules(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.filestorage.model.QuotaRuleSummary} objects + * contained in responses from the listQuotaRules 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.filestorage.model.QuotaRuleSummary} objects + * contained in responses received from the service. + */ + public Iterable listQuotaRulesRecordIterator( + final ListQuotaRulesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListQuotaRulesRequest.Builder, ListQuotaRulesRequest, ListQuotaRulesResponse, + com.oracle.bmc.filestorage.model.QuotaRuleSummary>( + new java.util.function.Supplier() { + @Override + public ListQuotaRulesRequest.Builder get() { + return ListQuotaRulesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListQuotaRulesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListQuotaRulesRequest.Builder>, + ListQuotaRulesRequest>() { + @Override + public ListQuotaRulesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListQuotaRulesRequest.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 ListQuotaRulesResponse apply(ListQuotaRulesRequest request) { + return client.listQuotaRules(request); + } + }, + new java.util.function.Function< + ListQuotaRulesResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListQuotaRulesResponse response) { + return response.getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listReplicationTargets operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/CreateQuotaRuleConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/CreateQuotaRuleConverter.java new file mode 100644 index 0000000000..fdf41300e0 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/CreateQuotaRuleConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class CreateQuotaRuleConverter { + 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(CreateQuotaRuleConverter.class); + + public static com.oracle.bmc.filestorage.requests.CreateQuotaRuleRequest interceptRequest( + com.oracle.bmc.filestorage.requests.CreateQuotaRuleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.CreateQuotaRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCreateQuotaRuleDetails(), "createQuotaRuleDetails is required"); + Validate.notBlank(request.getFileSystemId(), "fileSystemId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("fileSystems") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFileSystemId())) + .path("quotaRules"); + + 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.filestorage.responses.CreateQuotaRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.CreateQuotaRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.CreateQuotaRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.CreateQuotaRuleResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.CreateQuotaRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.CreateQuotaRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.QuotaRule>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.QuotaRule + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.QuotaRule + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.QuotaRule> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.CreateQuotaRuleResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .CreateQuotaRuleResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.quotaRule(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.filestorage.responses.CreateQuotaRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteQuotaRuleConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteQuotaRuleConverter.java new file mode 100644 index 0000000000..e97677f93d --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteQuotaRuleConverter.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class DeleteQuotaRuleConverter { + 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(DeleteQuotaRuleConverter.class); + + public static com.oracle.bmc.filestorage.requests.DeleteQuotaRuleRequest interceptRequest( + com.oracle.bmc.filestorage.requests.DeleteQuotaRuleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.DeleteQuotaRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFileSystemId(), "fileSystemId must not be blank"); + Validate.notBlank(request.getQuotaRuleId(), "quotaRuleId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("fileSystems") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFileSystemId())) + .path("quotaRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getQuotaRuleId())); + + 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.filestorage.responses.DeleteQuotaRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.DeleteQuotaRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.DeleteQuotaRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.DeleteQuotaRuleResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.DeleteQuotaRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.DeleteQuotaRuleResponse"); + 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.filestorage.responses.DeleteQuotaRuleResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .DeleteQuotaRuleResponse.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.filestorage.responses.DeleteQuotaRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/GetQuotaRuleConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/GetQuotaRuleConverter.java new file mode 100644 index 0000000000..c68e525e6b --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/GetQuotaRuleConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class GetQuotaRuleConverter { + 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(GetQuotaRuleConverter.class); + + public static com.oracle.bmc.filestorage.requests.GetQuotaRuleRequest interceptRequest( + com.oracle.bmc.filestorage.requests.GetQuotaRuleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.GetQuotaRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFileSystemId(), "fileSystemId must not be blank"); + Validate.notBlank(request.getQuotaRuleId(), "quotaRuleId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("fileSystems") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFileSystemId())) + .path("quotaRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getQuotaRuleId())); + + 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.filestorage.responses.GetQuotaRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.GetQuotaRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.GetQuotaRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.GetQuotaRuleResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.GetQuotaRuleResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.GetQuotaRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.QuotaRule>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.QuotaRule + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.QuotaRule + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.QuotaRule> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.GetQuotaRuleResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .GetQuotaRuleResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.quotaRule(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.filestorage.responses.GetQuotaRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ListQuotaRulesConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ListQuotaRulesConverter.java new file mode 100644 index 0000000000..c0d05d08ea --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ListQuotaRulesConverter.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class ListQuotaRulesConverter { + 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(ListQuotaRulesConverter.class); + + public static com.oracle.bmc.filestorage.requests.ListQuotaRulesRequest interceptRequest( + com.oracle.bmc.filestorage.requests.ListQuotaRulesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.ListQuotaRulesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFileSystemId(), "fileSystemId must not be blank"); + Validate.notNull(request.getPrincipalType(), "principalType is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("fileSystems") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFileSystemId())) + .path("quotaRules"); + + 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())); + } + + target = + target.queryParam( + "principalType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPrincipalType().getValue())); + + if (request.getPrincipalId() != null) { + target = + target.queryParam( + "principalId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPrincipalId())); + } + + if (request.getAreViolatorsOnly() != null) { + target = + target.queryParam( + "areViolatorsOnly", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAreViolatorsOnly())); + } + + 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.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.filestorage.responses.ListQuotaRulesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.ListQuotaRulesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.ListQuotaRulesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.ListQuotaRulesResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.ListQuotaRulesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.ListQuotaRulesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.filestorage.model + .QuotaRuleSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.filestorage.model + .QuotaRuleSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.filestorage.model + .QuotaRuleSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.filestorage.model + .QuotaRuleSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.ListQuotaRulesResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .ListQuotaRulesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(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.filestorage.responses.ListQuotaRulesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ToggleQuotaRulesConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ToggleQuotaRulesConverter.java new file mode 100644 index 0000000000..bdbf926a1a --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ToggleQuotaRulesConverter.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class ToggleQuotaRulesConverter { + 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(ToggleQuotaRulesConverter.class); + + public static com.oracle.bmc.filestorage.requests.ToggleQuotaRulesRequest interceptRequest( + com.oracle.bmc.filestorage.requests.ToggleQuotaRulesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.ToggleQuotaRulesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFileSystemId(), "fileSystemId must not be blank"); + Validate.notNull( + request.getToggleQuotaRulesDetails(), "toggleQuotaRulesDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("fileSystems") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFileSystemId())) + .path("actions") + .path("toggleQuotaRules"); + + 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.filestorage.responses.ToggleQuotaRulesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.ToggleQuotaRulesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.ToggleQuotaRulesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.ToggleQuotaRulesResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.ToggleQuotaRulesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.ToggleQuotaRulesResponse"); + 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.filestorage.responses.ToggleQuotaRulesResponse + .Builder + builder = + com.oracle.bmc.filestorage.responses + .ToggleQuotaRulesResponse.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.filestorage.responses.ToggleQuotaRulesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateQuotaRuleConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateQuotaRuleConverter.java new file mode 100644 index 0000000000..1dab587b21 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateQuotaRuleConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class UpdateQuotaRuleConverter { + 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(UpdateQuotaRuleConverter.class); + + public static com.oracle.bmc.filestorage.requests.UpdateQuotaRuleRequest interceptRequest( + com.oracle.bmc.filestorage.requests.UpdateQuotaRuleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.UpdateQuotaRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getUpdateQuotaRuleDetails(), "updateQuotaRuleDetails is required"); + Validate.notBlank(request.getFileSystemId(), "fileSystemId must not be blank"); + Validate.notBlank(request.getQuotaRuleId(), "quotaRuleId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("fileSystems") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFileSystemId())) + .path("quotaRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getQuotaRuleId())); + + 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.filestorage.responses.UpdateQuotaRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.UpdateQuotaRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.UpdateQuotaRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.UpdateQuotaRuleResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.UpdateQuotaRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.UpdateQuotaRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.QuotaRule>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.QuotaRule + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.QuotaRule + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.QuotaRule> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.UpdateQuotaRuleResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .UpdateQuotaRuleResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.quotaRule(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.filestorage.responses.UpdateQuotaRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFileSystemDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFileSystemDetails.java index 60faa8cf48..9590d80596 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFileSystemDetails.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFileSystemDetails.java @@ -32,7 +32,8 @@ public final class CreateFileSystemDetails "kmsKeyId", "sourceSnapshotId", "cloneAttachStatus", - "filesystemSnapshotPolicyId" + "filesystemSnapshotPolicyId", + "areQuotaRulesEnabled" }) public CreateFileSystemDetails( String availabilityDomain, @@ -44,7 +45,8 @@ public CreateFileSystemDetails( String kmsKeyId, String sourceSnapshotId, CloneAttachStatus cloneAttachStatus, - String filesystemSnapshotPolicyId) { + String filesystemSnapshotPolicyId, + Boolean areQuotaRulesEnabled) { super(); this.availabilityDomain = availabilityDomain; this.compartmentId = compartmentId; @@ -56,6 +58,7 @@ public CreateFileSystemDetails( this.sourceSnapshotId = sourceSnapshotId; this.cloneAttachStatus = cloneAttachStatus; this.filesystemSnapshotPolicyId = filesystemSnapshotPolicyId; + this.areQuotaRulesEnabled = areQuotaRulesEnabled; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -269,6 +272,22 @@ public Builder filesystemSnapshotPolicyId(String filesystemSnapshotPolicyId) { this.__explicitlySet__.add("filesystemSnapshotPolicyId"); return this; } + /** + * Specifies the enforcement of quota rules on the file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areQuotaRulesEnabled") + private Boolean areQuotaRulesEnabled; + + /** + * Specifies the enforcement of quota rules on the file system. + * @param areQuotaRulesEnabled the value to set + * @return this builder + **/ + public Builder areQuotaRulesEnabled(Boolean areQuotaRulesEnabled) { + this.areQuotaRulesEnabled = areQuotaRulesEnabled; + this.__explicitlySet__.add("areQuotaRulesEnabled"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -285,7 +304,8 @@ public CreateFileSystemDetails build() { this.kmsKeyId, this.sourceSnapshotId, this.cloneAttachStatus, - this.filesystemSnapshotPolicyId); + this.filesystemSnapshotPolicyId, + this.areQuotaRulesEnabled); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -324,6 +344,9 @@ public Builder copy(CreateFileSystemDetails model) { if (model.wasPropertyExplicitlySet("filesystemSnapshotPolicyId")) { this.filesystemSnapshotPolicyId(model.getFilesystemSnapshotPolicyId()); } + if (model.wasPropertyExplicitlySet("areQuotaRulesEnabled")) { + this.areQuotaRulesEnabled(model.getAreQuotaRulesEnabled()); + } return this; } } @@ -565,6 +588,20 @@ public String getFilesystemSnapshotPolicyId() { return filesystemSnapshotPolicyId; } + /** + * Specifies the enforcement of quota rules on the file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areQuotaRulesEnabled") + private final Boolean areQuotaRulesEnabled; + + /** + * Specifies the enforcement of quota rules on the file system. + * @return the value + **/ + public Boolean getAreQuotaRulesEnabled() { + return areQuotaRulesEnabled; + } + @Override public String toString() { return this.toString(true); @@ -590,6 +627,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", cloneAttachStatus=").append(String.valueOf(this.cloneAttachStatus)); sb.append(", filesystemSnapshotPolicyId=") .append(String.valueOf(this.filesystemSnapshotPolicyId)); + sb.append(", areQuotaRulesEnabled=").append(String.valueOf(this.areQuotaRulesEnabled)); sb.append(")"); return sb.toString(); } @@ -615,6 +653,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.cloneAttachStatus, other.cloneAttachStatus) && java.util.Objects.equals( this.filesystemSnapshotPolicyId, other.filesystemSnapshotPolicyId) + && java.util.Objects.equals(this.areQuotaRulesEnabled, other.areQuotaRulesEnabled) && super.equals(other); } @@ -646,6 +685,11 @@ public int hashCode() { + (this.filesystemSnapshotPolicyId == null ? 43 : this.filesystemSnapshotPolicyId.hashCode()); + result = + (result * PRIME) + + (this.areQuotaRulesEnabled == null + ? 43 + : this.areQuotaRulesEnabled.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateQuotaRuleDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateQuotaRuleDetails.java new file mode 100644 index 0000000000..0b9acad54d --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateQuotaRuleDetails.java @@ -0,0 +1,390 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.model; + +/** + * Details for creating a quota rule in the file system. + *
+ * 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: 20171215") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateQuotaRuleDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateQuotaRuleDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "principalType", + "principalId", + "isHardQuota", + "displayName", + "quotaLimitInGigabytes" + }) + public CreateQuotaRuleDetails( + PrincipalType principalType, + Integer principalId, + Boolean isHardQuota, + String displayName, + Integer quotaLimitInGigabytes) { + super(); + this.principalType = principalType; + this.principalId = principalId; + this.isHardQuota = isHardQuota; + this.displayName = displayName; + this.quotaLimitInGigabytes = quotaLimitInGigabytes; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The type of the owner of this quota rule and usage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalType") + private PrincipalType principalType; + + /** + * The type of the owner of this quota rule and usage. + * + * @param principalType the value to set + * @return this builder + **/ + public Builder principalType(PrincipalType principalType) { + this.principalType = principalType; + this.__explicitlySet__.add("principalType"); + return this; + } + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private Integer principalId; + + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + * @param principalId the value to set + * @return this builder + **/ + public Builder principalId(Integer principalId) { + this.principalId = principalId; + this.__explicitlySet__.add("principalId"); + return this; + } + /** + * Whether the quota rule will be enforced. + * If {@code isHardQuota} is true, the quota rule is enforced so that the write is blocked if usage + * exceeds the hard quota limit. + * If {@code isHardQuota} is false, writes succeed even if usage exceeds the soft quota limit, but the quota rule is violated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHardQuota") + private Boolean isHardQuota; + + /** + * Whether the quota rule will be enforced. + * If {@code isHardQuota} is true, the quota rule is enforced so that the write is blocked if usage + * exceeds the hard quota limit. + * If {@code isHardQuota} is false, writes succeed even if usage exceeds the soft quota limit, but the quota rule is violated. + * + * @param isHardQuota the value to set + * @return this builder + **/ + public Builder isHardQuota(Boolean isHardQuota) { + this.isHardQuota = isHardQuota; + this.__explicitlySet__.add("isHardQuota"); + return this; + } + /** + * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The value of the quota rule in gigabytes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("quotaLimitInGigabytes") + private Integer quotaLimitInGigabytes; + + /** + * The value of the quota rule in gigabytes. + * + * @param quotaLimitInGigabytes the value to set + * @return this builder + **/ + public Builder quotaLimitInGigabytes(Integer quotaLimitInGigabytes) { + this.quotaLimitInGigabytes = quotaLimitInGigabytes; + this.__explicitlySet__.add("quotaLimitInGigabytes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateQuotaRuleDetails build() { + CreateQuotaRuleDetails model = + new CreateQuotaRuleDetails( + this.principalType, + this.principalId, + this.isHardQuota, + this.displayName, + this.quotaLimitInGigabytes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateQuotaRuleDetails model) { + if (model.wasPropertyExplicitlySet("principalType")) { + this.principalType(model.getPrincipalType()); + } + if (model.wasPropertyExplicitlySet("principalId")) { + this.principalId(model.getPrincipalId()); + } + if (model.wasPropertyExplicitlySet("isHardQuota")) { + this.isHardQuota(model.getIsHardQuota()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("quotaLimitInGigabytes")) { + this.quotaLimitInGigabytes(model.getQuotaLimitInGigabytes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The type of the owner of this quota rule and usage. + * + **/ + public enum PrincipalType { + FileSystemLevel("FILE_SYSTEM_LEVEL"), + DefaultGroup("DEFAULT_GROUP"), + DefaultUser("DEFAULT_USER"), + IndividualGroup("INDIVIDUAL_GROUP"), + IndividualUser("INDIVIDUAL_USER"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PrincipalType v : PrincipalType.values()) { + map.put(v.getValue(), v); + } + } + + PrincipalType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PrincipalType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid PrincipalType: " + key); + } + }; + /** + * The type of the owner of this quota rule and usage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalType") + private final PrincipalType principalType; + + /** + * The type of the owner of this quota rule and usage. + * + * @return the value + **/ + public PrincipalType getPrincipalType() { + return principalType; + } + + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private final Integer principalId; + + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + * @return the value + **/ + public Integer getPrincipalId() { + return principalId; + } + + /** + * Whether the quota rule will be enforced. + * If {@code isHardQuota} is true, the quota rule is enforced so that the write is blocked if usage + * exceeds the hard quota limit. + * If {@code isHardQuota} is false, writes succeed even if usage exceeds the soft quota limit, but the quota rule is violated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHardQuota") + private final Boolean isHardQuota; + + /** + * Whether the quota rule will be enforced. + * If {@code isHardQuota} is true, the quota rule is enforced so that the write is blocked if usage + * exceeds the hard quota limit. + * If {@code isHardQuota} is false, writes succeed even if usage exceeds the soft quota limit, but the quota rule is violated. + * + * @return the value + **/ + public Boolean getIsHardQuota() { + return isHardQuota; + } + + /** + * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The value of the quota rule in gigabytes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("quotaLimitInGigabytes") + private final Integer quotaLimitInGigabytes; + + /** + * The value of the quota rule in gigabytes. + * + * @return the value + **/ + public Integer getQuotaLimitInGigabytes() { + return quotaLimitInGigabytes; + } + + @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("CreateQuotaRuleDetails("); + sb.append("super=").append(super.toString()); + sb.append("principalType=").append(String.valueOf(this.principalType)); + sb.append(", principalId=").append(String.valueOf(this.principalId)); + sb.append(", isHardQuota=").append(String.valueOf(this.isHardQuota)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", quotaLimitInGigabytes=").append(String.valueOf(this.quotaLimitInGigabytes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateQuotaRuleDetails)) { + return false; + } + + CreateQuotaRuleDetails other = (CreateQuotaRuleDetails) o; + return java.util.Objects.equals(this.principalType, other.principalType) + && java.util.Objects.equals(this.principalId, other.principalId) + && java.util.Objects.equals(this.isHardQuota, other.isHardQuota) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.quotaLimitInGigabytes, other.quotaLimitInGigabytes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.principalType == null ? 43 : this.principalType.hashCode()); + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = (result * PRIME) + (this.isHardQuota == null ? 43 : this.isHardQuota.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.quotaLimitInGigabytes == null + ? 43 + : this.quotaLimitInGigabytes.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystem.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystem.java index fcfd5e7722..407432f08b 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystem.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystem.java @@ -50,7 +50,10 @@ public final class FileSystem extends com.oracle.bmc.http.internal.ExplicitlySet "lifecycleDetails", "isTargetable", "replicationTargetId", - "filesystemSnapshotPolicyId" + "filesystemSnapshotPolicyId", + "areQuotaRulesEnabled", + "quotaEnforcementState", + "replicationSourceCount" }) public FileSystem( String availabilityDomain, @@ -73,7 +76,10 @@ public FileSystem( String lifecycleDetails, Boolean isTargetable, String replicationTargetId, - String filesystemSnapshotPolicyId) { + String filesystemSnapshotPolicyId, + Boolean areQuotaRulesEnabled, + QuotaEnforcementState quotaEnforcementState, + Integer replicationSourceCount) { super(); this.availabilityDomain = availabilityDomain; this.meteredBytes = meteredBytes; @@ -96,6 +102,9 @@ public FileSystem( this.isTargetable = isTargetable; this.replicationTargetId = replicationTargetId; this.filesystemSnapshotPolicyId = filesystemSnapshotPolicyId; + this.areQuotaRulesEnabled = areQuotaRulesEnabled; + this.quotaEnforcementState = quotaEnforcementState; + this.replicationSourceCount = replicationSourceCount; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -508,6 +517,54 @@ public Builder filesystemSnapshotPolicyId(String filesystemSnapshotPolicyId) { this.__explicitlySet__.add("filesystemSnapshotPolicyId"); return this; } + /** + * Specifies the enforcement of quota rules on the file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areQuotaRulesEnabled") + private Boolean areQuotaRulesEnabled; + + /** + * Specifies the enforcement of quota rules on the file system. + * @param areQuotaRulesEnabled the value to set + * @return this builder + **/ + public Builder areQuotaRulesEnabled(Boolean areQuotaRulesEnabled) { + this.areQuotaRulesEnabled = areQuotaRulesEnabled; + this.__explicitlySet__.add("areQuotaRulesEnabled"); + return this; + } + /** + * Displays the state of enforcement of quota rules on the file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("quotaEnforcementState") + private QuotaEnforcementState quotaEnforcementState; + + /** + * Displays the state of enforcement of quota rules on the file system. + * @param quotaEnforcementState the value to set + * @return this builder + **/ + public Builder quotaEnforcementState(QuotaEnforcementState quotaEnforcementState) { + this.quotaEnforcementState = quotaEnforcementState; + this.__explicitlySet__.add("quotaEnforcementState"); + return this; + } + /** + * Specifies the total number of replications for which this file system is a source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationSourceCount") + private Integer replicationSourceCount; + + /** + * Specifies the total number of replications for which this file system is a source. + * @param replicationSourceCount the value to set + * @return this builder + **/ + public Builder replicationSourceCount(Integer replicationSourceCount) { + this.replicationSourceCount = replicationSourceCount; + this.__explicitlySet__.add("replicationSourceCount"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -535,7 +592,10 @@ public FileSystem build() { this.lifecycleDetails, this.isTargetable, this.replicationTargetId, - this.filesystemSnapshotPolicyId); + this.filesystemSnapshotPolicyId, + this.areQuotaRulesEnabled, + this.quotaEnforcementState, + this.replicationSourceCount); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -607,6 +667,15 @@ public Builder copy(FileSystem model) { if (model.wasPropertyExplicitlySet("filesystemSnapshotPolicyId")) { this.filesystemSnapshotPolicyId(model.getFilesystemSnapshotPolicyId()); } + if (model.wasPropertyExplicitlySet("areQuotaRulesEnabled")) { + this.areQuotaRulesEnabled(model.getAreQuotaRulesEnabled()); + } + if (model.wasPropertyExplicitlySet("quotaEnforcementState")) { + this.quotaEnforcementState(model.getQuotaEnforcementState()); + } + if (model.wasPropertyExplicitlySet("replicationSourceCount")) { + this.replicationSourceCount(model.getReplicationSourceCount()); + } return this; } } @@ -1088,6 +1157,100 @@ public String getFilesystemSnapshotPolicyId() { return filesystemSnapshotPolicyId; } + /** + * Specifies the enforcement of quota rules on the file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areQuotaRulesEnabled") + private final Boolean areQuotaRulesEnabled; + + /** + * Specifies the enforcement of quota rules on the file system. + * @return the value + **/ + public Boolean getAreQuotaRulesEnabled() { + return areQuotaRulesEnabled; + } + + /** + * Displays the state of enforcement of quota rules on the file system. + **/ + public enum QuotaEnforcementState { + Enabling("ENABLING"), + Enabled("ENABLED"), + Disabling("DISABLING"), + Disabled("DISABLED"), + Syncing("SYNCING"), + 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(QuotaEnforcementState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (QuotaEnforcementState v : QuotaEnforcementState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + QuotaEnforcementState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static QuotaEnforcementState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'QuotaEnforcementState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Displays the state of enforcement of quota rules on the file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("quotaEnforcementState") + private final QuotaEnforcementState quotaEnforcementState; + + /** + * Displays the state of enforcement of quota rules on the file system. + * @return the value + **/ + public QuotaEnforcementState getQuotaEnforcementState() { + return quotaEnforcementState; + } + + /** + * Specifies the total number of replications for which this file system is a source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationSourceCount") + private final Integer replicationSourceCount; + + /** + * Specifies the total number of replications for which this file system is a source. + * @return the value + **/ + public Integer getReplicationSourceCount() { + return replicationSourceCount; + } + @Override public String toString() { return this.toString(true); @@ -1124,6 +1287,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", replicationTargetId=").append(String.valueOf(this.replicationTargetId)); sb.append(", filesystemSnapshotPolicyId=") .append(String.valueOf(this.filesystemSnapshotPolicyId)); + sb.append(", areQuotaRulesEnabled=").append(String.valueOf(this.areQuotaRulesEnabled)); + sb.append(", quotaEnforcementState=").append(String.valueOf(this.quotaEnforcementState)); + sb.append(", replicationSourceCount=").append(String.valueOf(this.replicationSourceCount)); sb.append(")"); return sb.toString(); } @@ -1160,6 +1326,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.replicationTargetId, other.replicationTargetId) && java.util.Objects.equals( this.filesystemSnapshotPolicyId, other.filesystemSnapshotPolicyId) + && java.util.Objects.equals(this.areQuotaRulesEnabled, other.areQuotaRulesEnabled) + && java.util.Objects.equals(this.quotaEnforcementState, other.quotaEnforcementState) + && java.util.Objects.equals( + this.replicationSourceCount, other.replicationSourceCount) && super.equals(other); } @@ -1212,6 +1382,21 @@ public int hashCode() { + (this.filesystemSnapshotPolicyId == null ? 43 : this.filesystemSnapshotPolicyId.hashCode()); + result = + (result * PRIME) + + (this.areQuotaRulesEnabled == null + ? 43 + : this.areQuotaRulesEnabled.hashCode()); + result = + (result * PRIME) + + (this.quotaEnforcementState == null + ? 43 + : this.quotaEnforcementState.hashCode()); + result = + (result * PRIME) + + (this.replicationSourceCount == null + ? 43 + : this.replicationSourceCount.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystemSummary.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystemSummary.java index 507a4e5ffa..e3ae0ef8c4 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystemSummary.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystemSummary.java @@ -34,12 +34,14 @@ public final class FileSystemSummary extends com.oracle.bmc.http.internal.Explic "freeformTags", "definedTags", "systemTags", + "replicationSourceCount", "kmsKeyId", "sourceDetails", "isCloneParent", "isHydrated", "lifecycleDetails", - "cloneAttachStatus" + "cloneAttachStatus", + "quotaEnforcementState" }) public FileSystemSummary( String availabilityDomain, @@ -53,12 +55,14 @@ public FileSystemSummary( java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags, + Integer replicationSourceCount, String kmsKeyId, SourceDetails sourceDetails, Boolean isCloneParent, Boolean isHydrated, String lifecycleDetails, - CloneAttachStatus cloneAttachStatus) { + CloneAttachStatus cloneAttachStatus, + QuotaEnforcementState quotaEnforcementState) { super(); this.availabilityDomain = availabilityDomain; this.meteredBytes = meteredBytes; @@ -71,12 +75,14 @@ public FileSystemSummary( this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; + this.replicationSourceCount = replicationSourceCount; this.kmsKeyId = kmsKeyId; this.sourceDetails = sourceDetails; this.isCloneParent = isCloneParent; this.isHydrated = isHydrated; this.lifecycleDetails = lifecycleDetails; this.cloneAttachStatus = cloneAttachStatus; + this.quotaEnforcementState = quotaEnforcementState; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -308,6 +314,22 @@ public Builder systemTags(java.util.Map> s this.__explicitlySet__.add("systemTags"); return this; } + /** + * Specifies the total number of replications for which this file system is a source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationSourceCount") + private Integer replicationSourceCount; + + /** + * Specifies the total number of replications for which this file system is a source. + * @param replicationSourceCount the value to set + * @return this builder + **/ + public Builder replicationSourceCount(Integer replicationSourceCount) { + this.replicationSourceCount = replicationSourceCount; + this.__explicitlySet__.add("replicationSourceCount"); + return this; + } /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key used to encrypt the encryption keys associated with this file system. * @@ -411,6 +433,22 @@ public Builder cloneAttachStatus(CloneAttachStatus cloneAttachStatus) { this.__explicitlySet__.add("cloneAttachStatus"); return this; } + /** + * Displays the state of enforcement of quota rules on the file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("quotaEnforcementState") + private QuotaEnforcementState quotaEnforcementState; + + /** + * Displays the state of enforcement of quota rules on the file system. + * @param quotaEnforcementState the value to set + * @return this builder + **/ + public Builder quotaEnforcementState(QuotaEnforcementState quotaEnforcementState) { + this.quotaEnforcementState = quotaEnforcementState; + this.__explicitlySet__.add("quotaEnforcementState"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -429,12 +467,14 @@ public FileSystemSummary build() { this.freeformTags, this.definedTags, this.systemTags, + this.replicationSourceCount, this.kmsKeyId, this.sourceDetails, this.isCloneParent, this.isHydrated, this.lifecycleDetails, - this.cloneAttachStatus); + this.cloneAttachStatus, + this.quotaEnforcementState); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -476,6 +516,9 @@ public Builder copy(FileSystemSummary model) { if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } + if (model.wasPropertyExplicitlySet("replicationSourceCount")) { + this.replicationSourceCount(model.getReplicationSourceCount()); + } if (model.wasPropertyExplicitlySet("kmsKeyId")) { this.kmsKeyId(model.getKmsKeyId()); } @@ -494,6 +537,9 @@ public Builder copy(FileSystemSummary model) { if (model.wasPropertyExplicitlySet("cloneAttachStatus")) { this.cloneAttachStatus(model.getCloneAttachStatus()); } + if (model.wasPropertyExplicitlySet("quotaEnforcementState")) { + this.quotaEnforcementState(model.getQuotaEnforcementState()); + } return this; } } @@ -765,6 +811,20 @@ public java.util.Map> getSystemTags() { return systemTags; } + /** + * Specifies the total number of replications for which this file system is a source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("replicationSourceCount") + private final Integer replicationSourceCount; + + /** + * Specifies the total number of replications for which this file system is a source. + * @return the value + **/ + public Integer getReplicationSourceCount() { + return replicationSourceCount; + } + /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key used to encrypt the encryption keys associated with this file system. * @@ -905,6 +965,72 @@ public CloneAttachStatus getCloneAttachStatus() { return cloneAttachStatus; } + /** + * Displays the state of enforcement of quota rules on the file system. + **/ + public enum QuotaEnforcementState { + Enabling("ENABLING"), + Enabled("ENABLED"), + Disabling("DISABLING"), + Disabled("DISABLED"), + Syncing("SYNCING"), + 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(QuotaEnforcementState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (QuotaEnforcementState v : QuotaEnforcementState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + QuotaEnforcementState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static QuotaEnforcementState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'QuotaEnforcementState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Displays the state of enforcement of quota rules on the file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("quotaEnforcementState") + private final QuotaEnforcementState quotaEnforcementState; + + /** + * Displays the state of enforcement of quota rules on the file system. + * @return the value + **/ + public QuotaEnforcementState getQuotaEnforcementState() { + return quotaEnforcementState; + } + @Override public String toString() { return this.toString(true); @@ -930,12 +1056,14 @@ public String toString(boolean includeByteArrayContents) { 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(", replicationSourceCount=").append(String.valueOf(this.replicationSourceCount)); sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); sb.append(", sourceDetails=").append(String.valueOf(this.sourceDetails)); sb.append(", isCloneParent=").append(String.valueOf(this.isCloneParent)); sb.append(", isHydrated=").append(String.valueOf(this.isHydrated)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", cloneAttachStatus=").append(String.valueOf(this.cloneAttachStatus)); + sb.append(", quotaEnforcementState=").append(String.valueOf(this.quotaEnforcementState)); sb.append(")"); return sb.toString(); } @@ -961,12 +1089,15 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals( + this.replicationSourceCount, other.replicationSourceCount) && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) && java.util.Objects.equals(this.sourceDetails, other.sourceDetails) && java.util.Objects.equals(this.isCloneParent, other.isCloneParent) && java.util.Objects.equals(this.isHydrated, other.isHydrated) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.cloneAttachStatus, other.cloneAttachStatus) + && java.util.Objects.equals(this.quotaEnforcementState, other.quotaEnforcementState) && super.equals(other); } @@ -993,6 +1124,11 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.replicationSourceCount == null + ? 43 + : this.replicationSourceCount.hashCode()); result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); result = (result * PRIME) @@ -1007,6 +1143,11 @@ public int hashCode() { result = (result * PRIME) + (this.cloneAttachStatus == null ? 43 : this.cloneAttachStatus.hashCode()); + result = + (result * PRIME) + + (this.quotaEnforcementState == null + ? 43 + : this.quotaEnforcementState.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/QuotaRule.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/QuotaRule.java new file mode 100644 index 0000000000..ca7bf4e60f --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/QuotaRule.java @@ -0,0 +1,593 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.model; + +/** + * A rule that can restrict the logical space that a user or group can consume in a file system. + * + *
+ * 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: 20171215") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = QuotaRule.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class QuotaRule extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "fileSystemId", + "principalType", + "principalId", + "isHardQuota", + "displayName", + "quotaLimitInGigabytes", + "timeCreated", + "timeUpdated" + }) + public QuotaRule( + String id, + String fileSystemId, + PrincipalType principalType, + Integer principalId, + Boolean isHardQuota, + String displayName, + Integer quotaLimitInGigabytes, + java.util.Date timeCreated, + java.util.Date timeUpdated) { + super(); + this.id = id; + this.fileSystemId = fileSystemId; + this.principalType = principalType; + this.principalId = principalId; + this.isHardQuota = isHardQuota; + this.displayName = displayName; + this.quotaLimitInGigabytes = quotaLimitInGigabytes; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + * @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 file System. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileSystemId") + private String fileSystemId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file System. + * @param fileSystemId the value to set + * @return this builder + **/ + public Builder fileSystemId(String fileSystemId) { + this.fileSystemId = fileSystemId; + this.__explicitlySet__.add("fileSystemId"); + return this; + } + /** + * The type of the owner of this quota rule and usage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalType") + private PrincipalType principalType; + + /** + * The type of the owner of this quota rule and usage. + * + * @param principalType the value to set + * @return this builder + **/ + public Builder principalType(PrincipalType principalType) { + this.principalType = principalType; + this.__explicitlySet__.add("principalType"); + return this; + } + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private Integer principalId; + + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + * @param principalId the value to set + * @return this builder + **/ + public Builder principalId(Integer principalId) { + this.principalId = principalId; + this.__explicitlySet__.add("principalId"); + return this; + } + /** + * Whether the quota rule will be enforced. + * If {@code isHardQuota} is true, the quota rule is enforced so that the write is blocked if usage + * exceeds the hard quota limit. + * If {@code isHardQuota} is false, writes succeed even if usage exceeds the soft quota limit, but the quota rule is violated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHardQuota") + private Boolean isHardQuota; + + /** + * Whether the quota rule will be enforced. + * If {@code isHardQuota} is true, the quota rule is enforced so that the write is blocked if usage + * exceeds the hard quota limit. + * If {@code isHardQuota} is false, writes succeed even if usage exceeds the soft quota limit, but the quota rule is violated. + * + * @param isHardQuota the value to set + * @return this builder + **/ + public Builder isHardQuota(Boolean isHardQuota) { + this.isHardQuota = isHardQuota; + this.__explicitlySet__.add("isHardQuota"); + return this; + } + /** + * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The value of the quota rule in gigabytes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("quotaLimitInGigabytes") + private Integer quotaLimitInGigabytes; + + /** + * The value of the quota rule in gigabytes. + * + * @param quotaLimitInGigabytes the value to set + * @return this builder + **/ + public Builder quotaLimitInGigabytes(Integer quotaLimitInGigabytes) { + this.quotaLimitInGigabytes = quotaLimitInGigabytes; + this.__explicitlySet__.add("quotaLimitInGigabytes"); + return this; + } + /** + * The date and time the quota rule was created, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

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

+ * 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 quota rule was last updated, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

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

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public QuotaRule build() { + QuotaRule model = + new QuotaRule( + this.id, + this.fileSystemId, + this.principalType, + this.principalId, + this.isHardQuota, + this.displayName, + this.quotaLimitInGigabytes, + this.timeCreated, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(QuotaRule model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("fileSystemId")) { + this.fileSystemId(model.getFileSystemId()); + } + if (model.wasPropertyExplicitlySet("principalType")) { + this.principalType(model.getPrincipalType()); + } + if (model.wasPropertyExplicitlySet("principalId")) { + this.principalId(model.getPrincipalId()); + } + if (model.wasPropertyExplicitlySet("isHardQuota")) { + this.isHardQuota(model.getIsHardQuota()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("quotaLimitInGigabytes")) { + this.quotaLimitInGigabytes(model.getQuotaLimitInGigabytes()); + } + 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); + } + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file System. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileSystemId") + private final String fileSystemId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file System. + * @return the value + **/ + public String getFileSystemId() { + return fileSystemId; + } + + /** + * The type of the owner of this quota rule and usage. + * + **/ + public enum PrincipalType { + FileSystemLevel("FILE_SYSTEM_LEVEL"), + DefaultGroup("DEFAULT_GROUP"), + DefaultUser("DEFAULT_USER"), + IndividualGroup("INDIVIDUAL_GROUP"), + IndividualUser("INDIVIDUAL_USER"), + + /** + * 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(PrincipalType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PrincipalType v : PrincipalType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PrincipalType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PrincipalType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PrincipalType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of the owner of this quota rule and usage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalType") + private final PrincipalType principalType; + + /** + * The type of the owner of this quota rule and usage. + * + * @return the value + **/ + public PrincipalType getPrincipalType() { + return principalType; + } + + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private final Integer principalId; + + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + * @return the value + **/ + public Integer getPrincipalId() { + return principalId; + } + + /** + * Whether the quota rule will be enforced. + * If {@code isHardQuota} is true, the quota rule is enforced so that the write is blocked if usage + * exceeds the hard quota limit. + * If {@code isHardQuota} is false, writes succeed even if usage exceeds the soft quota limit, but the quota rule is violated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHardQuota") + private final Boolean isHardQuota; + + /** + * Whether the quota rule will be enforced. + * If {@code isHardQuota} is true, the quota rule is enforced so that the write is blocked if usage + * exceeds the hard quota limit. + * If {@code isHardQuota} is false, writes succeed even if usage exceeds the soft quota limit, but the quota rule is violated. + * + * @return the value + **/ + public Boolean getIsHardQuota() { + return isHardQuota; + } + + /** + * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The value of the quota rule in gigabytes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("quotaLimitInGigabytes") + private final Integer quotaLimitInGigabytes; + + /** + * The value of the quota rule in gigabytes. + * + * @return the value + **/ + public Integer getQuotaLimitInGigabytes() { + return quotaLimitInGigabytes; + } + + /** + * The date and time the quota rule was created, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * 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 quota rule was created, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

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

+ * 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 quota rule was last updated, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("QuotaRule("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", fileSystemId=").append(String.valueOf(this.fileSystemId)); + sb.append(", principalType=").append(String.valueOf(this.principalType)); + sb.append(", principalId=").append(String.valueOf(this.principalId)); + sb.append(", isHardQuota=").append(String.valueOf(this.isHardQuota)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", quotaLimitInGigabytes=").append(String.valueOf(this.quotaLimitInGigabytes)); + 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 QuotaRule)) { + return false; + } + + QuotaRule other = (QuotaRule) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) + && java.util.Objects.equals(this.principalType, other.principalType) + && java.util.Objects.equals(this.principalId, other.principalId) + && java.util.Objects.equals(this.isHardQuota, other.isHardQuota) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.quotaLimitInGigabytes, other.quotaLimitInGigabytes) + && 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.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.fileSystemId == null ? 43 : this.fileSystemId.hashCode()); + result = + (result * PRIME) + + (this.principalType == null ? 43 : this.principalType.hashCode()); + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = (result * PRIME) + (this.isHardQuota == null ? 43 : this.isHardQuota.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.quotaLimitInGigabytes == null + ? 43 + : this.quotaLimitInGigabytes.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-filestorage/src/main/java/com/oracle/bmc/filestorage/model/QuotaRuleSummary.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/QuotaRuleSummary.java new file mode 100644 index 0000000000..2d29d25232 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/QuotaRuleSummary.java @@ -0,0 +1,695 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.model; + +/** + * Summary information for a principal's usage and quota rule. + * + *
+ * 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: 20171215") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = QuotaRuleSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class QuotaRuleSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "fileSystemId", + "principalType", + "principalId", + "isHardQuota", + "displayName", + "usageInBytes", + "quotaLimitInGigabytes", + "timeCreated", + "timeUpdated", + "areViolatorsOnly" + }) + public QuotaRuleSummary( + String id, + String fileSystemId, + PrincipalType principalType, + Integer principalId, + Boolean isHardQuota, + String displayName, + Long usageInBytes, + Integer quotaLimitInGigabytes, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Boolean areViolatorsOnly) { + super(); + this.id = id; + this.fileSystemId = fileSystemId; + this.principalType = principalType; + this.principalId = principalId; + this.isHardQuota = isHardQuota; + this.displayName = displayName; + this.usageInBytes = usageInBytes; + this.quotaLimitInGigabytes = quotaLimitInGigabytes; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.areViolatorsOnly = areViolatorsOnly; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + * @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 file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileSystemId") + private String fileSystemId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + * @param fileSystemId the value to set + * @return this builder + **/ + public Builder fileSystemId(String fileSystemId) { + this.fileSystemId = fileSystemId; + this.__explicitlySet__.add("fileSystemId"); + return this; + } + /** + * The type of the owner of this quota rule and usage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalType") + private PrincipalType principalType; + + /** + * The type of the owner of this quota rule and usage. + * + * @param principalType the value to set + * @return this builder + **/ + public Builder principalType(PrincipalType principalType) { + this.principalType = principalType; + this.__explicitlySet__.add("principalType"); + return this; + } + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private Integer principalId; + + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + * @param principalId the value to set + * @return this builder + **/ + public Builder principalId(Integer principalId) { + this.principalId = principalId; + this.__explicitlySet__.add("principalId"); + return this; + } + /** + * Whether the quota rule will be enforced. + * If {@code isHardQuota} is true, the quota rule is enforced so that the write is blocked if usage + * exceeds the hard quota limit. + * If {@code isHardQuota} is false, writes succeed even if usage exceeds the soft quota limit, but the quota rule is violated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHardQuota") + private Boolean isHardQuota; + + /** + * Whether the quota rule will be enforced. + * If {@code isHardQuota} is true, the quota rule is enforced so that the write is blocked if usage + * exceeds the hard quota limit. + * If {@code isHardQuota} is false, writes succeed even if usage exceeds the soft quota limit, but the quota rule is violated. + * + * @param isHardQuota the value to set + * @return this builder + **/ + public Builder isHardQuota(Boolean isHardQuota) { + this.isHardQuota = isHardQuota; + this.__explicitlySet__.add("isHardQuota"); + return this; + } + /** + * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The usage value corresponding to this principal in bytes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("usageInBytes") + private Long usageInBytes; + + /** + * The usage value corresponding to this principal in bytes. + * + * @param usageInBytes the value to set + * @return this builder + **/ + public Builder usageInBytes(Long usageInBytes) { + this.usageInBytes = usageInBytes; + this.__explicitlySet__.add("usageInBytes"); + return this; + } + /** + * The value of the quota rule in gigabytes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("quotaLimitInGigabytes") + private Integer quotaLimitInGigabytes; + + /** + * The value of the quota rule in gigabytes. + * + * @param quotaLimitInGigabytes the value to set + * @return this builder + **/ + public Builder quotaLimitInGigabytes(Integer quotaLimitInGigabytes) { + this.quotaLimitInGigabytes = quotaLimitInGigabytes; + this.__explicitlySet__.add("quotaLimitInGigabytes"); + return this; + } + /** + * The date and time the quota rule was created, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

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

+ * 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 quota rule was last updated, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

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

+ * 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; + } + /** + * An option to display only the users or groups that violate their quota rules. + * If {@code areViolatorsOnly} is false, results report all the quota and usage. + * If {@code areViolatorsOnly} is true, results only report the quota and usage for + * the users or groups that violate their quota rules. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areViolatorsOnly") + private Boolean areViolatorsOnly; + + /** + * An option to display only the users or groups that violate their quota rules. + * If {@code areViolatorsOnly} is false, results report all the quota and usage. + * If {@code areViolatorsOnly} is true, results only report the quota and usage for + * the users or groups that violate their quota rules. + * + * @param areViolatorsOnly the value to set + * @return this builder + **/ + public Builder areViolatorsOnly(Boolean areViolatorsOnly) { + this.areViolatorsOnly = areViolatorsOnly; + this.__explicitlySet__.add("areViolatorsOnly"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public QuotaRuleSummary build() { + QuotaRuleSummary model = + new QuotaRuleSummary( + this.id, + this.fileSystemId, + this.principalType, + this.principalId, + this.isHardQuota, + this.displayName, + this.usageInBytes, + this.quotaLimitInGigabytes, + this.timeCreated, + this.timeUpdated, + this.areViolatorsOnly); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(QuotaRuleSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("fileSystemId")) { + this.fileSystemId(model.getFileSystemId()); + } + if (model.wasPropertyExplicitlySet("principalType")) { + this.principalType(model.getPrincipalType()); + } + if (model.wasPropertyExplicitlySet("principalId")) { + this.principalId(model.getPrincipalId()); + } + if (model.wasPropertyExplicitlySet("isHardQuota")) { + this.isHardQuota(model.getIsHardQuota()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("usageInBytes")) { + this.usageInBytes(model.getUsageInBytes()); + } + if (model.wasPropertyExplicitlySet("quotaLimitInGigabytes")) { + this.quotaLimitInGigabytes(model.getQuotaLimitInGigabytes()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("areViolatorsOnly")) { + this.areViolatorsOnly(model.getAreViolatorsOnly()); + } + 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 quota rule. It is the base64 encoded string of the tuple . + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileSystemId") + private final String fileSystemId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + * @return the value + **/ + public String getFileSystemId() { + return fileSystemId; + } + + /** + * The type of the owner of this quota rule and usage. + * + **/ + public enum PrincipalType { + FileSystemLevel("FILE_SYSTEM_LEVEL"), + DefaultGroup("DEFAULT_GROUP"), + DefaultUser("DEFAULT_USER"), + IndividualGroup("INDIVIDUAL_GROUP"), + IndividualUser("INDIVIDUAL_USER"), + + /** + * 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(PrincipalType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PrincipalType v : PrincipalType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PrincipalType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PrincipalType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PrincipalType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of the owner of this quota rule and usage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalType") + private final PrincipalType principalType; + + /** + * The type of the owner of this quota rule and usage. + * + * @return the value + **/ + public PrincipalType getPrincipalType() { + return principalType; + } + + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private final Integer principalId; + + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + * @return the value + **/ + public Integer getPrincipalId() { + return principalId; + } + + /** + * Whether the quota rule will be enforced. + * If {@code isHardQuota} is true, the quota rule is enforced so that the write is blocked if usage + * exceeds the hard quota limit. + * If {@code isHardQuota} is false, writes succeed even if usage exceeds the soft quota limit, but the quota rule is violated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHardQuota") + private final Boolean isHardQuota; + + /** + * Whether the quota rule will be enforced. + * If {@code isHardQuota} is true, the quota rule is enforced so that the write is blocked if usage + * exceeds the hard quota limit. + * If {@code isHardQuota} is false, writes succeed even if usage exceeds the soft quota limit, but the quota rule is violated. + * + * @return the value + **/ + public Boolean getIsHardQuota() { + return isHardQuota; + } + + /** + * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The usage value corresponding to this principal in bytes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("usageInBytes") + private final Long usageInBytes; + + /** + * The usage value corresponding to this principal in bytes. + * + * @return the value + **/ + public Long getUsageInBytes() { + return usageInBytes; + } + + /** + * The value of the quota rule in gigabytes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("quotaLimitInGigabytes") + private final Integer quotaLimitInGigabytes; + + /** + * The value of the quota rule in gigabytes. + * + * @return the value + **/ + public Integer getQuotaLimitInGigabytes() { + return quotaLimitInGigabytes; + } + + /** + * The date and time the quota rule was created, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * 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 quota rule was created, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

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

+ * 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 quota rule was last updated, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * An option to display only the users or groups that violate their quota rules. + * If {@code areViolatorsOnly} is false, results report all the quota and usage. + * If {@code areViolatorsOnly} is true, results only report the quota and usage for + * the users or groups that violate their quota rules. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areViolatorsOnly") + private final Boolean areViolatorsOnly; + + /** + * An option to display only the users or groups that violate their quota rules. + * If {@code areViolatorsOnly} is false, results report all the quota and usage. + * If {@code areViolatorsOnly} is true, results only report the quota and usage for + * the users or groups that violate their quota rules. + * + * @return the value + **/ + public Boolean getAreViolatorsOnly() { + return areViolatorsOnly; + } + + @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("QuotaRuleSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", fileSystemId=").append(String.valueOf(this.fileSystemId)); + sb.append(", principalType=").append(String.valueOf(this.principalType)); + sb.append(", principalId=").append(String.valueOf(this.principalId)); + sb.append(", isHardQuota=").append(String.valueOf(this.isHardQuota)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", usageInBytes=").append(String.valueOf(this.usageInBytes)); + sb.append(", quotaLimitInGigabytes=").append(String.valueOf(this.quotaLimitInGigabytes)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", areViolatorsOnly=").append(String.valueOf(this.areViolatorsOnly)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof QuotaRuleSummary)) { + return false; + } + + QuotaRuleSummary other = (QuotaRuleSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) + && java.util.Objects.equals(this.principalType, other.principalType) + && java.util.Objects.equals(this.principalId, other.principalId) + && java.util.Objects.equals(this.isHardQuota, other.isHardQuota) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.usageInBytes, other.usageInBytes) + && java.util.Objects.equals(this.quotaLimitInGigabytes, other.quotaLimitInGigabytes) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.areViolatorsOnly, other.areViolatorsOnly) + && 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.fileSystemId == null ? 43 : this.fileSystemId.hashCode()); + result = + (result * PRIME) + + (this.principalType == null ? 43 : this.principalType.hashCode()); + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = (result * PRIME) + (this.isHardQuota == null ? 43 : this.isHardQuota.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.usageInBytes == null ? 43 : this.usageInBytes.hashCode()); + result = + (result * PRIME) + + (this.quotaLimitInGigabytes == null + ? 43 + : this.quotaLimitInGigabytes.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.areViolatorsOnly == null ? 43 : this.areViolatorsOnly.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ToggleQuotaRulesDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ToggleQuotaRulesDetails.java new file mode 100644 index 0000000000..97275653c4 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ToggleQuotaRulesDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.model; + +/** + * Details for enabling or disabling quota enforcement in the file system. + *
+ * 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: 20171215") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ToggleQuotaRulesDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ToggleQuotaRulesDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"areQuotaRulesEnabled"}) + public ToggleQuotaRulesDetails(Boolean areQuotaRulesEnabled) { + super(); + this.areQuotaRulesEnabled = areQuotaRulesEnabled; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Specifies the enforcement of quota rules on the file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areQuotaRulesEnabled") + private Boolean areQuotaRulesEnabled; + + /** + * Specifies the enforcement of quota rules on the file system. + * @param areQuotaRulesEnabled the value to set + * @return this builder + **/ + public Builder areQuotaRulesEnabled(Boolean areQuotaRulesEnabled) { + this.areQuotaRulesEnabled = areQuotaRulesEnabled; + this.__explicitlySet__.add("areQuotaRulesEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ToggleQuotaRulesDetails build() { + ToggleQuotaRulesDetails model = new ToggleQuotaRulesDetails(this.areQuotaRulesEnabled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ToggleQuotaRulesDetails model) { + if (model.wasPropertyExplicitlySet("areQuotaRulesEnabled")) { + this.areQuotaRulesEnabled(model.getAreQuotaRulesEnabled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Specifies the enforcement of quota rules on the file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areQuotaRulesEnabled") + private final Boolean areQuotaRulesEnabled; + + /** + * Specifies the enforcement of quota rules on the file system. + * @return the value + **/ + public Boolean getAreQuotaRulesEnabled() { + return areQuotaRulesEnabled; + } + + @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("ToggleQuotaRulesDetails("); + sb.append("super=").append(super.toString()); + sb.append("areQuotaRulesEnabled=").append(String.valueOf(this.areQuotaRulesEnabled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ToggleQuotaRulesDetails)) { + return false; + } + + ToggleQuotaRulesDetails other = (ToggleQuotaRulesDetails) o; + return java.util.Objects.equals(this.areQuotaRulesEnabled, other.areQuotaRulesEnabled) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.areQuotaRulesEnabled == null + ? 43 + : this.areQuotaRulesEnabled.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/UpdateQuotaRuleDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/UpdateQuotaRuleDetails.java new file mode 100644 index 0000000000..42de391bf2 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/UpdateQuotaRuleDetails.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.model; + +/** + * Details for updating a quota rule in the file system. + *
+ * 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: 20171215") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateQuotaRuleDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateQuotaRuleDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"displayName", "quotaLimitInGigabytes"}) + public UpdateQuotaRuleDetails(String displayName, Integer quotaLimitInGigabytes) { + super(); + this.displayName = displayName; + this.quotaLimitInGigabytes = quotaLimitInGigabytes; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name that the quota rule will be renamed to. It does not have to be unique. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name that the quota rule will be renamed to. It does not have to be unique. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * An updated value of the quota rule in gigabytes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("quotaLimitInGigabytes") + private Integer quotaLimitInGigabytes; + + /** + * An updated value of the quota rule in gigabytes. + * + * @param quotaLimitInGigabytes the value to set + * @return this builder + **/ + public Builder quotaLimitInGigabytes(Integer quotaLimitInGigabytes) { + this.quotaLimitInGigabytes = quotaLimitInGigabytes; + this.__explicitlySet__.add("quotaLimitInGigabytes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateQuotaRuleDetails build() { + UpdateQuotaRuleDetails model = + new UpdateQuotaRuleDetails(this.displayName, this.quotaLimitInGigabytes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateQuotaRuleDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("quotaLimitInGigabytes")) { + this.quotaLimitInGigabytes(model.getQuotaLimitInGigabytes()); + } + 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 that the quota rule will be renamed to. It does not have to be unique. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name that the quota rule will be renamed to. It does not have to be unique. + * Avoid entering confidential information. + * Example: {@code UserXYZ's quota} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * An updated value of the quota rule in gigabytes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("quotaLimitInGigabytes") + private final Integer quotaLimitInGigabytes; + + /** + * An updated value of the quota rule in gigabytes. + * + * @return the value + **/ + public Integer getQuotaLimitInGigabytes() { + return quotaLimitInGigabytes; + } + + @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("UpdateQuotaRuleDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", quotaLimitInGigabytes=").append(String.valueOf(this.quotaLimitInGigabytes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateQuotaRuleDetails)) { + return false; + } + + UpdateQuotaRuleDetails other = (UpdateQuotaRuleDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.quotaLimitInGigabytes, other.quotaLimitInGigabytes) + && 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.quotaLimitInGigabytes == null + ? 43 + : this.quotaLimitInGigabytes.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/CreateQuotaRuleRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/CreateQuotaRuleRequest.java new file mode 100644 index 0000000000..69bde5ba43 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/CreateQuotaRuleRequest.java @@ -0,0 +1,372 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use CreateQuotaRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class CreateQuotaRuleRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.filestorage.model.CreateQuotaRuleDetails> { + + /** + * Details for adding a new quota rule. + */ + private com.oracle.bmc.filestorage.model.CreateQuotaRuleDetails createQuotaRuleDetails; + + /** + * Details for adding a new quota rule. + */ + public com.oracle.bmc.filestorage.model.CreateQuotaRuleDetails getCreateQuotaRuleDetails() { + return createQuotaRuleDetails; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + public String getFileSystemId() { + return fileSystemId; + } + /** + * 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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 token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. 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.filestorage.model.CreateQuotaRuleDetails getBody$() { + return createQuotaRuleDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateQuotaRuleRequest, + com.oracle.bmc.filestorage.model.CreateQuotaRuleDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for adding a new quota rule. + */ + private com.oracle.bmc.filestorage.model.CreateQuotaRuleDetails createQuotaRuleDetails = + null; + + /** + * Details for adding a new quota rule. + * @param createQuotaRuleDetails the value to set + * @return this builder instance + */ + public Builder createQuotaRuleDetails( + com.oracle.bmc.filestorage.model.CreateQuotaRuleDetails createQuotaRuleDetails) { + this.createQuotaRuleDetails = createQuotaRuleDetails; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + * @param fileSystemId the value to set + * @return this builder instance + */ + public Builder fileSystemId(String fileSystemId) { + this.fileSystemId = fileSystemId; + 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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 token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. 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(CreateQuotaRuleRequest o) { + createQuotaRuleDetails(o.getCreateQuotaRuleDetails()); + fileSystemId(o.getFileSystemId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateQuotaRuleRequest 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 CreateQuotaRuleRequest + */ + public CreateQuotaRuleRequest build() { + CreateQuotaRuleRequest 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.filestorage.model.CreateQuotaRuleDetails body) { + createQuotaRuleDetails(body); + return this; + } + + /** + * Build the instance of CreateQuotaRuleRequest 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 CreateQuotaRuleRequest + */ + public CreateQuotaRuleRequest buildWithoutInvocationCallback() { + CreateQuotaRuleRequest request = new CreateQuotaRuleRequest(); + request.createQuotaRuleDetails = createQuotaRuleDetails; + request.fileSystemId = fileSystemId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new CreateQuotaRuleRequest(createQuotaRuleDetails, fileSystemId, 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() + .createQuotaRuleDetails(createQuotaRuleDetails) + .fileSystemId(fileSystemId) + .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(",createQuotaRuleDetails=").append(String.valueOf(this.createQuotaRuleDetails)); + sb.append(",fileSystemId=").append(String.valueOf(this.fileSystemId)); + 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 CreateQuotaRuleRequest)) { + return false; + } + + CreateQuotaRuleRequest other = (CreateQuotaRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createQuotaRuleDetails, other.createQuotaRuleDetails) + && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) + && 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.createQuotaRuleDetails == null + ? 43 + : this.createQuotaRuleDetails.hashCode()); + result = (result * PRIME) + (this.fileSystemId == null ? 43 : this.fileSystemId.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-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteQuotaRuleRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteQuotaRuleRequest.java new file mode 100644 index 0000000000..3cbeee148b --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteQuotaRuleRequest.java @@ -0,0 +1,287 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use DeleteQuotaRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class DeleteQuotaRuleRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + public String getFileSystemId() { + return fileSystemId; + } + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + */ + private String quotaRuleId; + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + */ + public String getQuotaRuleId() { + return quotaRuleId; + } + /** + * 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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< + DeleteQuotaRuleRequest, 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 file system. + */ + private String fileSystemId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + * @param fileSystemId the value to set + * @return this builder instance + */ + public Builder fileSystemId(String fileSystemId) { + this.fileSystemId = fileSystemId; + return this; + } + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + */ + private String quotaRuleId = null; + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + * @param quotaRuleId the value to set + * @return this builder instance + */ + public Builder quotaRuleId(String quotaRuleId) { + this.quotaRuleId = quotaRuleId; + 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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(DeleteQuotaRuleRequest o) { + fileSystemId(o.getFileSystemId()); + quotaRuleId(o.getQuotaRuleId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteQuotaRuleRequest 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 DeleteQuotaRuleRequest + */ + public DeleteQuotaRuleRequest build() { + DeleteQuotaRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteQuotaRuleRequest 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 DeleteQuotaRuleRequest + */ + public DeleteQuotaRuleRequest buildWithoutInvocationCallback() { + DeleteQuotaRuleRequest request = new DeleteQuotaRuleRequest(); + request.fileSystemId = fileSystemId; + request.quotaRuleId = quotaRuleId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteQuotaRuleRequest(fileSystemId, quotaRuleId, 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() + .fileSystemId(fileSystemId) + .quotaRuleId(quotaRuleId) + .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(",fileSystemId=").append(String.valueOf(this.fileSystemId)); + sb.append(",quotaRuleId=").append(String.valueOf(this.quotaRuleId)); + 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 DeleteQuotaRuleRequest)) { + return false; + } + + DeleteQuotaRuleRequest other = (DeleteQuotaRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) + && java.util.Objects.equals(this.quotaRuleId, other.quotaRuleId) + && 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.fileSystemId == null ? 43 : this.fileSystemId.hashCode()); + result = (result * PRIME) + (this.quotaRuleId == null ? 43 : this.quotaRuleId.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-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/GetQuotaRuleRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/GetQuotaRuleRequest.java new file mode 100644 index 0000000000..051f72ddd3 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/GetQuotaRuleRequest.java @@ -0,0 +1,287 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use GetQuotaRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class GetQuotaRuleRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + public String getFileSystemId() { + return fileSystemId; + } + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + */ + private String quotaRuleId; + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + */ + public String getQuotaRuleId() { + return quotaRuleId; + } + /** + * 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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< + GetQuotaRuleRequest, 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 file system. + */ + private String fileSystemId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + * @param fileSystemId the value to set + * @return this builder instance + */ + public Builder fileSystemId(String fileSystemId) { + this.fileSystemId = fileSystemId; + return this; + } + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + */ + private String quotaRuleId = null; + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + * @param quotaRuleId the value to set + * @return this builder instance + */ + public Builder quotaRuleId(String quotaRuleId) { + this.quotaRuleId = quotaRuleId; + 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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(GetQuotaRuleRequest o) { + fileSystemId(o.getFileSystemId()); + quotaRuleId(o.getQuotaRuleId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetQuotaRuleRequest 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 GetQuotaRuleRequest + */ + public GetQuotaRuleRequest build() { + GetQuotaRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetQuotaRuleRequest 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 GetQuotaRuleRequest + */ + public GetQuotaRuleRequest buildWithoutInvocationCallback() { + GetQuotaRuleRequest request = new GetQuotaRuleRequest(); + request.fileSystemId = fileSystemId; + request.quotaRuleId = quotaRuleId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new GetQuotaRuleRequest(fileSystemId, quotaRuleId, 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() + .fileSystemId(fileSystemId) + .quotaRuleId(quotaRuleId) + .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(",fileSystemId=").append(String.valueOf(this.fileSystemId)); + sb.append(",quotaRuleId=").append(String.valueOf(this.quotaRuleId)); + 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 GetQuotaRuleRequest)) { + return false; + } + + GetQuotaRuleRequest other = (GetQuotaRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) + && java.util.Objects.equals(this.quotaRuleId, other.quotaRuleId) + && 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.fileSystemId == null ? 43 : this.fileSystemId.hashCode()); + result = (result * PRIME) + (this.quotaRuleId == null ? 43 : this.quotaRuleId.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-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListQuotaRulesRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListQuotaRulesRequest.java new file mode 100644 index 0000000000..e8f41329eb --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListQuotaRulesRequest.java @@ -0,0 +1,622 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use ListQuotaRulesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class ListQuotaRulesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + public String getFileSystemId() { + return fileSystemId; + } + /** + * The type of the owner of this quota rule and usage. + * + */ + private PrincipalType principalType; + + /** + * The type of the owner of this quota rule and usage. + * + **/ + public enum PrincipalType { + FileSystemLevel("FILE_SYSTEM_LEVEL"), + DefaultGroup("DEFAULT_GROUP"), + DefaultUser("DEFAULT_USER"), + IndividualGroup("INDIVIDUAL_GROUP"), + IndividualUser("INDIVIDUAL_USER"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PrincipalType v : PrincipalType.values()) { + map.put(v.getValue(), v); + } + } + + PrincipalType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PrincipalType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid PrincipalType: " + key); + } + }; + + /** + * The type of the owner of this quota rule and usage. + * + */ + public PrincipalType getPrincipalType() { + return principalType; + } + /** + * For list pagination. The maximum number of results per page, + * or items to return in a paginated "List" call. + * 1 is the minimum, 4096 is the maximum. + *

+ * For important details about how pagination works, + * see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + *

+ * Example: {@code 500} + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, + * or items to return in a paginated "List" call. + * 1 is the minimum, 4096 is the maximum. + *

+ * For important details about how pagination works, + * see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + *

+ * Example: {@code 500} + * + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the {@code 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 {@code 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; + } + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + */ + private Integer principalId; + + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + */ + public Integer getPrincipalId() { + return principalId; + } + /** + * An option to display only the users or groups that violate their quota rules. + * If {@code areViolatorsOnly} is false, results report all the quota and usage. + * If {@code areViolatorsOnly} is true, results only report the quota and usage for + * the users or groups that violate their quota rules. + * + */ + private Boolean areViolatorsOnly; + + /** + * An option to display only the users or groups that violate their quota rules. + * If {@code areViolatorsOnly} is false, results report all the quota and usage. + * If {@code areViolatorsOnly} is true, results only report the quota and usage for + * the users or groups that violate their quota rules. + * + */ + public Boolean getAreViolatorsOnly() { + return areViolatorsOnly; + } + /** + * The sort order to use, either 'asc' or 'desc', where 'asc' is + * ascending and 'desc' is descending. The default order is 'desc' + * except for numeric values. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc', where 'asc' is + * ascending and 'desc' is descending. The default order is 'desc' + * except for numeric values. + * + **/ + 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, either 'asc' or 'desc', where 'asc' is + * ascending and 'desc' is descending. The default order is 'desc' + * except for numeric values. + * + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique 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< + ListQuotaRulesRequest, 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 file system. + */ + private String fileSystemId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + * @param fileSystemId the value to set + * @return this builder instance + */ + public Builder fileSystemId(String fileSystemId) { + this.fileSystemId = fileSystemId; + return this; + } + + /** + * The type of the owner of this quota rule and usage. + * + */ + private PrincipalType principalType = null; + + /** + * The type of the owner of this quota rule and usage. + * + * @param principalType the value to set + * @return this builder instance + */ + public Builder principalType(PrincipalType principalType) { + this.principalType = principalType; + return this; + } + + /** + * For list pagination. The maximum number of results per page, + * or items to return in a paginated "List" call. + * 1 is the minimum, 4096 is the maximum. + *

+ * For important details about how pagination works, + * see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + *

+ * Example: {@code 500} + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, + * or items to return in a paginated "List" call. + * 1 is the minimum, 4096 is the maximum. + *

+ * For important details about how pagination works, + * see [List Pagination](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + *

+ * Example: {@code 500} + * + * @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 {@code 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 {@code 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; + } + + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + */ + private Integer principalId = null; + + /** + * An identifier for the user or the group associated with quota rule and usage. UNIX-like operating systems use this integer value to + * identify a user or group to manage access control. + * + * @param principalId the value to set + * @return this builder instance + */ + public Builder principalId(Integer principalId) { + this.principalId = principalId; + return this; + } + + /** + * An option to display only the users or groups that violate their quota rules. + * If {@code areViolatorsOnly} is false, results report all the quota and usage. + * If {@code areViolatorsOnly} is true, results only report the quota and usage for + * the users or groups that violate their quota rules. + * + */ + private Boolean areViolatorsOnly = null; + + /** + * An option to display only the users or groups that violate their quota rules. + * If {@code areViolatorsOnly} is false, results report all the quota and usage. + * If {@code areViolatorsOnly} is true, results only report the quota and usage for + * the users or groups that violate their quota rules. + * + * @param areViolatorsOnly the value to set + * @return this builder instance + */ + public Builder areViolatorsOnly(Boolean areViolatorsOnly) { + this.areViolatorsOnly = areViolatorsOnly; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc', where 'asc' is + * ascending and 'desc' is descending. The default order is 'desc' + * except for numeric values. + * + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc', where 'asc' is + * ascending and 'desc' is descending. The default order is 'desc' + * except for numeric values. + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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(ListQuotaRulesRequest o) { + fileSystemId(o.getFileSystemId()); + principalType(o.getPrincipalType()); + limit(o.getLimit()); + page(o.getPage()); + principalId(o.getPrincipalId()); + areViolatorsOnly(o.getAreViolatorsOnly()); + sortOrder(o.getSortOrder()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListQuotaRulesRequest 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 ListQuotaRulesRequest + */ + public ListQuotaRulesRequest build() { + ListQuotaRulesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListQuotaRulesRequest 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 ListQuotaRulesRequest + */ + public ListQuotaRulesRequest buildWithoutInvocationCallback() { + ListQuotaRulesRequest request = new ListQuotaRulesRequest(); + request.fileSystemId = fileSystemId; + request.principalType = principalType; + request.limit = limit; + request.page = page; + request.principalId = principalId; + request.areViolatorsOnly = areViolatorsOnly; + request.sortOrder = sortOrder; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ListQuotaRulesRequest(fileSystemId, principalType, limit, page, principalId, areViolatorsOnly, sortOrder, 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() + .fileSystemId(fileSystemId) + .principalType(principalType) + .limit(limit) + .page(page) + .principalId(principalId) + .areViolatorsOnly(areViolatorsOnly) + .sortOrder(sortOrder) + .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(",fileSystemId=").append(String.valueOf(this.fileSystemId)); + sb.append(",principalType=").append(String.valueOf(this.principalType)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",principalId=").append(String.valueOf(this.principalId)); + sb.append(",areViolatorsOnly=").append(String.valueOf(this.areViolatorsOnly)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + 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 ListQuotaRulesRequest)) { + return false; + } + + ListQuotaRulesRequest other = (ListQuotaRulesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) + && java.util.Objects.equals(this.principalType, other.principalType) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.principalId, other.principalId) + && java.util.Objects.equals(this.areViolatorsOnly, other.areViolatorsOnly) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && 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.fileSystemId == null ? 43 : this.fileSystemId.hashCode()); + result = + (result * PRIME) + + (this.principalType == null ? 43 : this.principalType.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.principalId == null ? 43 : this.principalId.hashCode()); + result = + (result * PRIME) + + (this.areViolatorsOnly == null ? 43 : this.areViolatorsOnly.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.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-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ToggleQuotaRulesRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ToggleQuotaRulesRequest.java new file mode 100644 index 0000000000..ae66e6c5b6 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ToggleQuotaRulesRequest.java @@ -0,0 +1,372 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use ToggleQuotaRulesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class ToggleQuotaRulesRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.filestorage.model.ToggleQuotaRulesDetails> { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + public String getFileSystemId() { + return fileSystemId; + } + /** + * Details for toggling quota enforcement in the file system. + */ + private com.oracle.bmc.filestorage.model.ToggleQuotaRulesDetails toggleQuotaRulesDetails; + + /** + * Details for toggling quota enforcement in the file system. + */ + public com.oracle.bmc.filestorage.model.ToggleQuotaRulesDetails getToggleQuotaRulesDetails() { + return toggleQuotaRulesDetails; + } + /** + * 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; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ToggleQuotaRulesDetails getBody$() { + return toggleQuotaRulesDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ToggleQuotaRulesRequest, + com.oracle.bmc.filestorage.model.ToggleQuotaRulesDetails> { + 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 file system. + */ + private String fileSystemId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + * @param fileSystemId the value to set + * @return this builder instance + */ + public Builder fileSystemId(String fileSystemId) { + this.fileSystemId = fileSystemId; + return this; + } + + /** + * Details for toggling quota enforcement in the file system. + */ + private com.oracle.bmc.filestorage.model.ToggleQuotaRulesDetails toggleQuotaRulesDetails = + null; + + /** + * Details for toggling quota enforcement in the file system. + * @param toggleQuotaRulesDetails the value to set + * @return this builder instance + */ + public Builder toggleQuotaRulesDetails( + com.oracle.bmc.filestorage.model.ToggleQuotaRulesDetails toggleQuotaRulesDetails) { + this.toggleQuotaRulesDetails = toggleQuotaRulesDetails; + 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; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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(ToggleQuotaRulesRequest o) { + fileSystemId(o.getFileSystemId()); + toggleQuotaRulesDetails(o.getToggleQuotaRulesDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ToggleQuotaRulesRequest 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 ToggleQuotaRulesRequest + */ + public ToggleQuotaRulesRequest build() { + ToggleQuotaRulesRequest 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.filestorage.model.ToggleQuotaRulesDetails body) { + toggleQuotaRulesDetails(body); + return this; + } + + /** + * Build the instance of ToggleQuotaRulesRequest 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 ToggleQuotaRulesRequest + */ + public ToggleQuotaRulesRequest buildWithoutInvocationCallback() { + ToggleQuotaRulesRequest request = new ToggleQuotaRulesRequest(); + request.fileSystemId = fileSystemId; + request.toggleQuotaRulesDetails = toggleQuotaRulesDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new ToggleQuotaRulesRequest(fileSystemId, toggleQuotaRulesDetails, 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() + .fileSystemId(fileSystemId) + .toggleQuotaRulesDetails(toggleQuotaRulesDetails) + .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(",fileSystemId=").append(String.valueOf(this.fileSystemId)); + sb.append(",toggleQuotaRulesDetails=").append(String.valueOf(this.toggleQuotaRulesDetails)); + 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 ToggleQuotaRulesRequest)) { + return false; + } + + ToggleQuotaRulesRequest other = (ToggleQuotaRulesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) + && java.util.Objects.equals( + this.toggleQuotaRulesDetails, other.toggleQuotaRulesDetails) + && 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.fileSystemId == null ? 43 : this.fileSystemId.hashCode()); + result = + (result * PRIME) + + (this.toggleQuotaRulesDetails == null + ? 43 + : this.toggleQuotaRulesDetails.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-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateQuotaRuleRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateQuotaRuleRequest.java new file mode 100644 index 0000000000..d86a0e21d1 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateQuotaRuleRequest.java @@ -0,0 +1,350 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use UpdateQuotaRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class UpdateQuotaRuleRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.filestorage.model.UpdateQuotaRuleDetails> { + + /** + * Details for editing a quota rule. + */ + private com.oracle.bmc.filestorage.model.UpdateQuotaRuleDetails updateQuotaRuleDetails; + + /** + * Details for editing a quota rule. + */ + public com.oracle.bmc.filestorage.model.UpdateQuotaRuleDetails getUpdateQuotaRuleDetails() { + return updateQuotaRuleDetails; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + public String getFileSystemId() { + return fileSystemId; + } + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + */ + private String quotaRuleId; + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + */ + public String getQuotaRuleId() { + return quotaRuleId; + } + /** + * 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.UpdateQuotaRuleDetails getBody$() { + return updateQuotaRuleDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateQuotaRuleRequest, + com.oracle.bmc.filestorage.model.UpdateQuotaRuleDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for editing a quota rule. + */ + private com.oracle.bmc.filestorage.model.UpdateQuotaRuleDetails updateQuotaRuleDetails = + null; + + /** + * Details for editing a quota rule. + * @param updateQuotaRuleDetails the value to set + * @return this builder instance + */ + public Builder updateQuotaRuleDetails( + com.oracle.bmc.filestorage.model.UpdateQuotaRuleDetails updateQuotaRuleDetails) { + this.updateQuotaRuleDetails = updateQuotaRuleDetails; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system. + * @param fileSystemId the value to set + * @return this builder instance + */ + public Builder fileSystemId(String fileSystemId) { + this.fileSystemId = fileSystemId; + return this; + } + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + */ + private String quotaRuleId = null; + + /** + * The identifier of the quota rule. It is the base64 encoded string of the tuple . + * @param quotaRuleId the value to set + * @return this builder instance + */ + public Builder quotaRuleId(String quotaRuleId) { + this.quotaRuleId = quotaRuleId; + 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 identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique 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(UpdateQuotaRuleRequest o) { + updateQuotaRuleDetails(o.getUpdateQuotaRuleDetails()); + fileSystemId(o.getFileSystemId()); + quotaRuleId(o.getQuotaRuleId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateQuotaRuleRequest 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 UpdateQuotaRuleRequest + */ + public UpdateQuotaRuleRequest build() { + UpdateQuotaRuleRequest 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.filestorage.model.UpdateQuotaRuleDetails body) { + updateQuotaRuleDetails(body); + return this; + } + + /** + * Build the instance of UpdateQuotaRuleRequest 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 UpdateQuotaRuleRequest + */ + public UpdateQuotaRuleRequest buildWithoutInvocationCallback() { + UpdateQuotaRuleRequest request = new UpdateQuotaRuleRequest(); + request.updateQuotaRuleDetails = updateQuotaRuleDetails; + request.fileSystemId = fileSystemId; + request.quotaRuleId = quotaRuleId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateQuotaRuleRequest(updateQuotaRuleDetails, fileSystemId, quotaRuleId, 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() + .updateQuotaRuleDetails(updateQuotaRuleDetails) + .fileSystemId(fileSystemId) + .quotaRuleId(quotaRuleId) + .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(",updateQuotaRuleDetails=").append(String.valueOf(this.updateQuotaRuleDetails)); + sb.append(",fileSystemId=").append(String.valueOf(this.fileSystemId)); + sb.append(",quotaRuleId=").append(String.valueOf(this.quotaRuleId)); + 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 UpdateQuotaRuleRequest)) { + return false; + } + + UpdateQuotaRuleRequest other = (UpdateQuotaRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.updateQuotaRuleDetails, other.updateQuotaRuleDetails) + && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) + && java.util.Objects.equals(this.quotaRuleId, other.quotaRuleId) + && 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.updateQuotaRuleDetails == null + ? 43 + : this.updateQuotaRuleDetails.hashCode()); + result = (result * PRIME) + (this.fileSystemId == null ? 43 : this.fileSystemId.hashCode()); + result = (result * PRIME) + (this.quotaRuleId == null ? 43 : this.quotaRuleId.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-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/CreateQuotaRuleResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/CreateQuotaRuleResponse.java new file mode 100644 index 0000000000..d394e3034b --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/CreateQuotaRuleResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class CreateQuotaRuleResponse 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 QuotaRule instance. + */ + private com.oracle.bmc.filestorage.model.QuotaRule quotaRule; + + /** + * The returned QuotaRule instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.QuotaRule getQuotaRule() { + return quotaRule; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "quotaRule" + }) + private CreateQuotaRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.QuotaRule quotaRule) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.quotaRule = quotaRule; + } + + 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 QuotaRule instance. + */ + private com.oracle.bmc.filestorage.model.QuotaRule quotaRule; + + /** + * The returned QuotaRule instance. + * @param quotaRule the value to set + * @return this builder + */ + public Builder quotaRule(com.oracle.bmc.filestorage.model.QuotaRule quotaRule) { + this.quotaRule = quotaRule; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateQuotaRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + quotaRule(o.getQuotaRule()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateQuotaRuleResponse build() { + return new CreateQuotaRuleResponse( + __httpStatusCode__, headers, etag, opcRequestId, quotaRule); + } + } + + /** + * 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(",quotaRule=").append(String.valueOf(quotaRule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateQuotaRuleResponse)) { + return false; + } + + CreateQuotaRuleResponse other = (CreateQuotaRuleResponse) 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.quotaRule, other.quotaRule); + } + + @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.quotaRule == null ? 43 : this.quotaRule.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/DeleteQuotaRuleResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/DeleteQuotaRuleResponse.java new file mode 100644 index 0000000000..e86093c55d --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/DeleteQuotaRuleResponse.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class DeleteQuotaRuleResponse 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 DeleteQuotaRuleResponse( + 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(DeleteQuotaRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteQuotaRuleResponse build() { + return new DeleteQuotaRuleResponse(__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 DeleteQuotaRuleResponse)) { + return false; + } + + DeleteQuotaRuleResponse other = (DeleteQuotaRuleResponse) 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-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/GetQuotaRuleResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/GetQuotaRuleResponse.java new file mode 100644 index 0000000000..50901470b6 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/GetQuotaRuleResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class GetQuotaRuleResponse 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 QuotaRule instance. + */ + private com.oracle.bmc.filestorage.model.QuotaRule quotaRule; + + /** + * The returned QuotaRule instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.QuotaRule getQuotaRule() { + return quotaRule; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "quotaRule" + }) + private GetQuotaRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.QuotaRule quotaRule) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.quotaRule = quotaRule; + } + + 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 QuotaRule instance. + */ + private com.oracle.bmc.filestorage.model.QuotaRule quotaRule; + + /** + * The returned QuotaRule instance. + * @param quotaRule the value to set + * @return this builder + */ + public Builder quotaRule(com.oracle.bmc.filestorage.model.QuotaRule quotaRule) { + this.quotaRule = quotaRule; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetQuotaRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + quotaRule(o.getQuotaRule()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetQuotaRuleResponse build() { + return new GetQuotaRuleResponse( + __httpStatusCode__, headers, etag, opcRequestId, quotaRule); + } + } + + /** + * 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(",quotaRule=").append(String.valueOf(quotaRule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetQuotaRuleResponse)) { + return false; + } + + GetQuotaRuleResponse other = (GetQuotaRuleResponse) 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.quotaRule, other.quotaRule); + } + + @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.quotaRule == null ? 43 : this.quotaRule.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/ListQuotaRulesResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/ListQuotaRulesResponse.java new file mode 100644 index 0000000000..b9254a2a56 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/ListQuotaRulesResponse.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class ListQuotaRulesResponse 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; + } + + /** + * A list of com.oracle.bmc.filestorage.model.QuotaRuleSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.filestorage.model.QuotaRuleSummary instances. + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "items" + }) + private ListQuotaRulesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.items = items; + } + + 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; + } + + /** + * A list of com.oracle.bmc.filestorage.model.QuotaRuleSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.filestorage.model.QuotaRuleSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListQuotaRulesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListQuotaRulesResponse build() { + return new ListQuotaRulesResponse( + __httpStatusCode__, headers, opcNextPage, opcRequestId, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListQuotaRulesResponse)) { + return false; + } + + ListQuotaRulesResponse other = (ListQuotaRulesResponse) 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.items, other.items); + } + + @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.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/ToggleQuotaRulesResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/ToggleQuotaRulesResponse.java new file mode 100644 index 0000000000..989edd46b4 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/ToggleQuotaRulesResponse.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class ToggleQuotaRulesResponse 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 ToggleQuotaRulesResponse( + 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(ToggleQuotaRulesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ToggleQuotaRulesResponse build() { + return new ToggleQuotaRulesResponse(__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 ToggleQuotaRulesResponse)) { + return false; + } + + ToggleQuotaRulesResponse other = (ToggleQuotaRulesResponse) 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-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/UpdateQuotaRuleResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/UpdateQuotaRuleResponse.java new file mode 100644 index 0000000000..7341fe7a21 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/UpdateQuotaRuleResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class UpdateQuotaRuleResponse 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 QuotaRule instance. + */ + private com.oracle.bmc.filestorage.model.QuotaRule quotaRule; + + /** + * The returned QuotaRule instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.QuotaRule getQuotaRule() { + return quotaRule; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "quotaRule" + }) + private UpdateQuotaRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.QuotaRule quotaRule) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.quotaRule = quotaRule; + } + + 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 QuotaRule instance. + */ + private com.oracle.bmc.filestorage.model.QuotaRule quotaRule; + + /** + * The returned QuotaRule instance. + * @param quotaRule the value to set + * @return this builder + */ + public Builder quotaRule(com.oracle.bmc.filestorage.model.QuotaRule quotaRule) { + this.quotaRule = quotaRule; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateQuotaRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + quotaRule(o.getQuotaRule()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateQuotaRuleResponse build() { + return new UpdateQuotaRuleResponse( + __httpStatusCode__, headers, etag, opcRequestId, quotaRule); + } + } + + /** + * 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(",quotaRule=").append(String.valueOf(quotaRule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateQuotaRuleResponse)) { + return false; + } + + UpdateQuotaRuleResponse other = (UpdateQuotaRuleResponse) 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.quotaRule, other.quotaRule); + } + + @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.quotaRule == null ? 43 : this.quotaRule.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/pom.xml b/bmc-fleetappsmanagement/pom.xml index bc8049081d..a8c529ad7d 100644 --- a/bmc-fleetappsmanagement/pom.xml +++ b/bmc-fleetappsmanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-fleetappsmanagement @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-fleetsoftwareupdate/pom.xml b/bmc-fleetsoftwareupdate/pom.xml index ee2bd3cd55..f8cc95010e 100644 --- a/bmc-fleetsoftwareupdate/pom.xml +++ b/bmc-fleetsoftwareupdate/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-fleetsoftwareupdate @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-full/pom.xml b/bmc-full/pom.xml index 5ecd9baba4..3dbcb94dea 100644 --- a/bmc-full/pom.xml +++ b/bmc-full/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-full @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 2.81.0 + 2.82.0 pom import @@ -623,5 +623,9 @@ com.oracle.oci.sdk oci-java-sdk-dblm + + com.oracle.oci.sdk + oci-java-sdk-mngdmac + \ No newline at end of file diff --git a/bmc-functions/pom.xml b/bmc-functions/pom.xml index 7017817c0d..eec968cca1 100644 --- a/bmc-functions/pom.xml +++ b/bmc-functions/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-functions @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-fusionapps/pom.xml b/bmc-fusionapps/pom.xml index 677b7c4b09..64949e80bc 100644 --- a/bmc-fusionapps/pom.xml +++ b/bmc-fusionapps/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-fusionapps @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-generativeai/pom.xml b/bmc-generativeai/pom.xml index 579ebaebea..8f58f85bba 100644 --- a/bmc-generativeai/pom.xml +++ b/bmc-generativeai/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-generativeai @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-generativeaiagent/pom.xml b/bmc-generativeaiagent/pom.xml index 45f487f55d..49e0a5a0cd 100644 --- a/bmc-generativeaiagent/pom.xml +++ b/bmc-generativeaiagent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-generativeaiagent @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgent.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgent.java index 6c135d2c36..36a8cd2f6a 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgent.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgent.java @@ -190,6 +190,19 @@ ChangeKnowledgeBaseCompartmentResponse changeKnowledgeBaseCompartment( */ CreateKnowledgeBaseResponse createKnowledgeBase(CreateKnowledgeBaseRequest request); + /** + * Creates a tool. + * + * @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 CreateTool API. + */ + CreateToolResponse createTool(CreateToolRequest request); + /** * Deletes an agent. * @@ -255,6 +268,19 @@ ChangeKnowledgeBaseCompartmentResponse changeKnowledgeBaseCompartment( */ DeleteKnowledgeBaseResponse deleteKnowledgeBase(DeleteKnowledgeBaseRequest request); + /** + * Deletes a tool. + * + * @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 DeleteTool API. + */ + DeleteToolResponse deleteTool(DeleteToolRequest request); + /** * Gets information about an agent. * @@ -334,6 +360,19 @@ GetDataIngestionJobLogContentResponse getDataIngestionJobLogContent( */ GetKnowledgeBaseResponse getKnowledgeBase(GetKnowledgeBaseRequest request); + /** + * Gets information about a tool. + * + * @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 GetTool API. + */ + GetToolResponse getTool(GetToolRequest request); + /** * Gets the details of a work request. * @@ -412,6 +451,19 @@ GetDataIngestionJobLogContentResponse getDataIngestionJobLogContent( */ ListKnowledgeBasesResponse listKnowledgeBases(ListKnowledgeBasesRequest request); + /** + * Gets a list of tools. + * + * @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 ListTools API. + */ + ListToolsResponse listTools(ListToolsRequest request); + /** * Lists the errors for a work request. * @@ -503,6 +555,19 @@ GetDataIngestionJobLogContentResponse getDataIngestionJobLogContent( */ UpdateKnowledgeBaseResponse updateKnowledgeBase(UpdateKnowledgeBaseRequest request); + /** + * Updates a tool. + * + * @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 UpdateTool API. + */ + UpdateToolResponse updateTool(UpdateToolRequest request); + /** * Gets the pre-configured waiters available for resources for this service. * diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsync.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsync.java index 92bf59348d..7e112c1571 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsync.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsync.java @@ -224,6 +224,21 @@ java.util.concurrent.Future createKnowledgeBase( CreateKnowledgeBaseRequest, CreateKnowledgeBaseResponse> handler); + /** + * Creates a tool. + * + * + * @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 createTool( + CreateToolRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + /** * Deletes an agent. * @@ -306,6 +321,21 @@ java.util.concurrent.Future deleteKnowledgeBase( DeleteKnowledgeBaseRequest, DeleteKnowledgeBaseResponse> handler); + /** + * Deletes a tool. + * + * + * @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 deleteTool( + DeleteToolRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + /** * Gets information about an agent. * @@ -405,6 +435,21 @@ java.util.concurrent.Future getKnowledgeBase( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets information about a tool. + * + * + * @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 getTool( + GetToolRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + /** * Gets the details of a work request. * @@ -503,6 +548,21 @@ java.util.concurrent.Future listKnowledgeBases( ListKnowledgeBasesRequest, ListKnowledgeBasesResponse> handler); + /** + * Gets a list of tools. + * + * + * @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 listTools( + ListToolsRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + /** * Lists the errors for a work request. * @@ -617,4 +677,19 @@ java.util.concurrent.Future updateKnowledgeBase( com.oracle.bmc.responses.AsyncHandler< UpdateKnowledgeBaseRequest, UpdateKnowledgeBaseResponse> handler); + + /** + * Updates a tool. + * + * + * @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 updateTool( + UpdateToolRequest request, + com.oracle.bmc.responses.AsyncHandler handler); } diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsyncClient.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsyncClient.java index d305d48bb9..d76d9862e4 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsyncClient.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsyncClient.java @@ -940,6 +940,55 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future createTool( + CreateToolRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async createTool"); + final CreateToolRequest interceptedRequest = CreateToolConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateToolConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CreateTool", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Tool/CreateTool"); + final java.util.function.Function + transformer = + CreateToolConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateToolRequest, CreateToolResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateToolDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateToolRequest, CreateToolResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteAgent( DeleteAgentRequest request, @@ -1171,6 +1220,49 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deleteTool( + DeleteToolRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async deleteTool"); + final DeleteToolRequest interceptedRequest = DeleteToolConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteToolConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "DeleteTool", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Tool/DeleteTool"); + final java.util.function.Function + transformer = + DeleteToolConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteToolRequest, DeleteToolResponse>, + 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< + DeleteToolRequest, DeleteToolResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getAgent( GetAgentRequest request, @@ -1446,6 +1538,46 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getTool( + GetToolRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { + LOG.trace("Called async getTool"); + final GetToolRequest interceptedRequest = GetToolConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetToolConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetTool", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Tool/GetTool"); + final java.util.function.Function transformer = + GetToolConverter.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.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetToolRequest, GetToolResponse>( + (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, @@ -1719,6 +1851,48 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listTools( + ListToolsRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listTools"); + final ListToolsRequest interceptedRequest = ListToolsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListToolsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListTools", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Tool/ListTools"); + final java.util.function.Function + transformer = + ListToolsConverter.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.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListToolsRequest, ListToolsResponse>( + (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, @@ -2062,4 +2236,52 @@ protected void beforeRetryAction() {} return futureSupplier.apply(handlerToUse); } } + + @Override + public java.util.concurrent.Future updateTool( + UpdateToolRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async updateTool"); + final UpdateToolRequest interceptedRequest = UpdateToolConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateToolConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "UpdateTool", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Tool/UpdateTool"); + final java.util.function.Function + transformer = + UpdateToolConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateToolRequest, UpdateToolResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateToolDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateToolRequest, UpdateToolResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } } diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentClient.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentClient.java index cf4287ff35..c95b211f7e 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentClient.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentClient.java @@ -933,6 +933,45 @@ public CreateKnowledgeBaseResponse createKnowledgeBase(CreateKnowledgeBaseReques }); } + @Override + public CreateToolResponse createTool(CreateToolRequest request) { + LOG.trace("Called createTool"); + final CreateToolRequest interceptedRequest = CreateToolConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateToolConverter.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( + "GenerativeAiAgent", + "CreateTool", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Tool/CreateTool"); + java.util.function.Function transformer = + CreateToolConverter.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.getCreateToolDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteAgentResponse deleteAgent(DeleteAgentRequest request) { LOG.trace("Called deleteAgent"); @@ -1122,6 +1161,41 @@ public DeleteKnowledgeBaseResponse deleteKnowledgeBase(DeleteKnowledgeBaseReques }); } + @Override + public DeleteToolResponse deleteTool(DeleteToolRequest request) { + LOG.trace("Called deleteTool"); + final DeleteToolRequest interceptedRequest = DeleteToolConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteToolConverter.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( + "GenerativeAiAgent", + "DeleteTool", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Tool/DeleteTool"); + java.util.function.Function transformer = + DeleteToolConverter.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 GetAgentResponse getAgent(GetAgentRequest request) { LOG.trace("Called getAgent"); @@ -1341,6 +1415,40 @@ public GetKnowledgeBaseResponse getKnowledgeBase(GetKnowledgeBaseRequest request }); } + @Override + public GetToolResponse getTool(GetToolRequest request) { + LOG.trace("Called getTool"); + final GetToolRequest interceptedRequest = GetToolConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetToolConverter.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( + "GenerativeAiAgent", + "GetTool", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Tool/GetTool"); + java.util.function.Function transformer = + GetToolConverter.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"); @@ -1559,6 +1667,40 @@ public ListKnowledgeBasesResponse listKnowledgeBases(ListKnowledgeBasesRequest r }); } + @Override + public ListToolsResponse listTools(ListToolsRequest request) { + LOG.trace("Called listTools"); + final ListToolsRequest interceptedRequest = ListToolsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListToolsConverter.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( + "GenerativeAiAgent", + "ListTools", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Tool/ListTools"); + java.util.function.Function transformer = + ListToolsConverter.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) { @@ -1833,6 +1975,44 @@ public UpdateKnowledgeBaseResponse updateKnowledgeBase(UpdateKnowledgeBaseReques }); } + @Override + public UpdateToolResponse updateTool(UpdateToolRequest request) { + LOG.trace("Called updateTool"); + final UpdateToolRequest interceptedRequest = UpdateToolConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateToolConverter.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( + "GenerativeAiAgent", + "UpdateTool", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Tool/UpdateTool"); + java.util.function.Function transformer = + UpdateToolConverter.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.getUpdateToolDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GenerativeAiAgentWaiters getWaiters() { return waiters; diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentPaginators.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentPaginators.java index 65dae569bf..d398e25093 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentPaginators.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentPaginators.java @@ -604,6 +604,115 @@ public ListKnowledgeBasesResponse apply(ListKnowledgeBasesRequest request) { }); } + /** + * Creates a new iterable which will iterate over the responses received from the listTools 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 listToolsResponseIterator(final ListToolsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListToolsRequest.Builder, ListToolsRequest, ListToolsResponse>( + new java.util.function.Supplier() { + @Override + public ListToolsRequest.Builder get() { + return ListToolsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListToolsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListToolsRequest.Builder>, + ListToolsRequest>() { + @Override + public ListToolsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListToolsRequest.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 ListToolsResponse apply(ListToolsRequest request) { + return client.listTools(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.generativeaiagent.model.ToolSummary} objects + * contained in responses from the listTools 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.generativeaiagent.model.ToolSummary} objects + * contained in responses received from the service. + */ + public Iterable listToolsRecordIterator( + final ListToolsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListToolsRequest.Builder, ListToolsRequest, ListToolsResponse, + com.oracle.bmc.generativeaiagent.model.ToolSummary>( + new java.util.function.Supplier() { + @Override + public ListToolsRequest.Builder get() { + return ListToolsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListToolsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListToolsRequest.Builder>, + ListToolsRequest>() { + @Override + public ListToolsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListToolsRequest.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 ListToolsResponse apply(ListToolsRequest request) { + return client.listTools(request); + } + }, + new java.util.function.Function< + ListToolsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListToolsResponse response) { + return response.getToolCollection().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. diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentWaiters.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentWaiters.java index 6f105e9a3a..46514c1623 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentWaiters.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentWaiters.java @@ -542,6 +542,103 @@ public boolean test(GetKnowledgeBaseResponse 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 forTool( + GetToolRequest request, + com.oracle.bmc.generativeaiagent.model.Tool.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 forTool(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 forTool( + GetToolRequest request, + com.oracle.bmc.generativeaiagent.model.Tool.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 forTool( + 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 forTool( + GetToolRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.generativeaiagent.model.Tool.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 forTool( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Tool. + private com.oracle.bmc.waiter.Waiter forTool( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetToolRequest request, + final com.oracle.bmc.generativeaiagent.model.Tool.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 GetToolResponse apply(GetToolRequest request) { + return client.getTool(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetToolResponse response) { + return targetStatesSet.contains( + response.getTool().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.generativeaiagent.model.Tool.LifecycleState + .Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using default configuration. * diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateToolConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateToolConverter.java new file mode 100644 index 0000000000..c71fe5893d --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateToolConverter.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateToolConverter { + 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(CreateToolConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.CreateToolRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.CreateToolRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.CreateToolRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCreateToolDetails(), "createToolDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("tools"); + + 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.generativeaiagent.responses.CreateToolResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateToolResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateToolResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateToolResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses.CreateToolResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.CreateToolResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .Tool>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model.Tool + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model.Tool + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model.Tool> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.CreateToolResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .CreateToolResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.tool(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.generativeaiagent.responses.CreateToolResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteToolConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteToolConverter.java new file mode 100644 index 0000000000..be2c097cd7 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteToolConverter.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteToolConverter { + 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(DeleteToolConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.DeleteToolRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.DeleteToolRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.DeleteToolRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getToolId(), "toolId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("tools") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getToolId())); + + 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.generativeaiagent.responses.DeleteToolResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteToolResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteToolResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteToolResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses.DeleteToolResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.DeleteToolResponse"); + 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.generativeaiagent.responses.DeleteToolResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .DeleteToolResponse.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.generativeaiagent.responses.DeleteToolResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetToolConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetToolConverter.java new file mode 100644 index 0000000000..e74d00e937 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetToolConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetToolConverter { + 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(GetToolConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.GetToolRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.GetToolRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.GetToolRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getToolId(), "toolId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("tools") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getToolId())); + + 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.generativeaiagent.responses.GetToolResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetToolResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetToolResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetToolResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses.GetToolResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.GetToolResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .Tool>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model.Tool + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model.Tool + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model.Tool> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.GetToolResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .GetToolResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.tool(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.generativeaiagent.responses.GetToolResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListToolsConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListToolsConverter.java new file mode 100644 index 0000000000..377cf0002f --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListToolsConverter.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListToolsConverter { + 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(ListToolsConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.ListToolsRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.ListToolsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.ListToolsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("tools"); + + 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.getAgentId() != null) { + target = + target.queryParam( + "agentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAgentId())); + } + + 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.generativeaiagent.responses.ListToolsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListToolsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListToolsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListToolsResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses.ListToolsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.ListToolsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .ToolCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .ToolCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .ToolCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .ToolCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.ListToolsResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .ListToolsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.toolCollection(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.generativeaiagent.responses.ListToolsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateToolConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateToolConverter.java new file mode 100644 index 0000000000..c211ec7452 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateToolConverter.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateToolConverter { + 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(UpdateToolConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.UpdateToolRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.UpdateToolRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.UpdateToolRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getToolId(), "toolId must not be blank"); + Validate.notNull(request.getUpdateToolDetails(), "updateToolDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("tools") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getToolId())); + + 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.generativeaiagent.responses.UpdateToolResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateToolResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateToolResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateToolResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses.UpdateToolResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.UpdateToolResponse"); + 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.generativeaiagent.responses.UpdateToolResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .UpdateToolResponse.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.generativeaiagent.responses.UpdateToolResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Agent.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Agent.java index e2735bb56a..e709682831 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Agent.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Agent.java @@ -29,6 +29,7 @@ public final class Agent extends com.oracle.bmc.http.internal.ExplicitlySetBmcMo "compartmentId", "knowledgeBaseIds", "welcomeMessage", + "llmConfig", "timeCreated", "timeUpdated", "lifecycleState", @@ -44,6 +45,7 @@ public Agent( String compartmentId, java.util.List knowledgeBaseIds, String welcomeMessage, + LlmConfig llmConfig, java.util.Date timeCreated, java.util.Date timeUpdated, LifecycleState lifecycleState, @@ -58,6 +60,7 @@ public Agent( this.compartmentId = compartmentId; this.knowledgeBaseIds = knowledgeBaseIds; this.welcomeMessage = welcomeMessage; + this.llmConfig = llmConfig; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; @@ -134,13 +137,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. **/ @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") private java.util.List knowledgeBaseIds; /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. * @param knowledgeBaseIds the value to set * @return this builder **/ @@ -165,6 +168,15 @@ public Builder welcomeMessage(String welcomeMessage) { this.__explicitlySet__.add("welcomeMessage"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("llmConfig") + private LlmConfig llmConfig; + + public Builder llmConfig(LlmConfig llmConfig) { + this.llmConfig = llmConfig; + this.__explicitlySet__.add("llmConfig"); + return this; + } /** * The date and time the agent was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). *

@@ -329,6 +341,7 @@ public Agent build() { this.compartmentId, this.knowledgeBaseIds, this.welcomeMessage, + this.llmConfig, this.timeCreated, this.timeUpdated, this.lifecycleState, @@ -362,6 +375,9 @@ public Builder copy(Agent model) { if (model.wasPropertyExplicitlySet("welcomeMessage")) { this.welcomeMessage(model.getWelcomeMessage()); } + if (model.wasPropertyExplicitlySet("llmConfig")) { + this.llmConfig(model.getLlmConfig()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -455,13 +471,13 @@ public String getCompartmentId() { } /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. **/ @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") private final java.util.List knowledgeBaseIds; /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. * @return the value **/ public java.util.List getKnowledgeBaseIds() { @@ -482,6 +498,13 @@ public String getWelcomeMessage() { return welcomeMessage; } + @com.fasterxml.jackson.annotation.JsonProperty("llmConfig") + private final LlmConfig llmConfig; + + public LlmConfig getLlmConfig() { + return llmConfig; + } + /** * The date and time the agent was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). *

@@ -690,6 +713,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", knowledgeBaseIds=").append(String.valueOf(this.knowledgeBaseIds)); sb.append(", welcomeMessage=").append(String.valueOf(this.welcomeMessage)); + sb.append(", llmConfig=").append(String.valueOf(this.llmConfig)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); @@ -717,6 +741,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.knowledgeBaseIds, other.knowledgeBaseIds) && java.util.Objects.equals(this.welcomeMessage, other.welcomeMessage) + && java.util.Objects.equals(this.llmConfig, other.llmConfig) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) @@ -743,6 +768,7 @@ public int hashCode() { result = (result * PRIME) + (this.welcomeMessage == null ? 43 : this.welcomeMessage.hashCode()); + result = (result * PRIME) + (this.llmConfig == null ? 43 : this.llmConfig.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); result = diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpoint.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpoint.java index 9c817d25aa..31e924e00c 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpoint.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpoint.java @@ -29,9 +29,14 @@ public final class AgentEndpoint extends com.oracle.bmc.http.internal.Explicitly "compartmentId", "agentId", "contentModerationConfig", + "guardrailConfig", + "metadata", + "humanInputConfig", + "outputConfig", "shouldEnableTrace", "shouldEnableCitation", "shouldEnableSession", + "shouldEnableMultiLanguage", "sessionConfig", "timeCreated", "timeUpdated", @@ -48,9 +53,14 @@ public AgentEndpoint( String compartmentId, String agentId, ContentModerationConfig contentModerationConfig, + GuardrailConfig guardrailConfig, + java.util.Map metadata, + HumanInputConfig humanInputConfig, + OutputConfig outputConfig, Boolean shouldEnableTrace, Boolean shouldEnableCitation, Boolean shouldEnableSession, + Boolean shouldEnableMultiLanguage, SessionConfig sessionConfig, java.util.Date timeCreated, java.util.Date timeUpdated, @@ -66,9 +76,14 @@ public AgentEndpoint( this.compartmentId = compartmentId; this.agentId = agentId; this.contentModerationConfig = contentModerationConfig; + this.guardrailConfig = guardrailConfig; + this.metadata = metadata; + this.humanInputConfig = humanInputConfig; + this.outputConfig = outputConfig; this.shouldEnableTrace = shouldEnableTrace; this.shouldEnableCitation = shouldEnableCitation; this.shouldEnableSession = shouldEnableSession; + this.shouldEnableMultiLanguage = shouldEnableMultiLanguage; this.sessionConfig = sessionConfig; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; @@ -170,6 +185,49 @@ public Builder contentModerationConfig(ContentModerationConfig contentModeration this.__explicitlySet__.add("contentModerationConfig"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("guardrailConfig") + private GuardrailConfig guardrailConfig; + + public Builder guardrailConfig(GuardrailConfig guardrailConfig) { + this.guardrailConfig = guardrailConfig; + this.__explicitlySet__.add("guardrailConfig"); + return this; + } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @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.JsonProperty("humanInputConfig") + private HumanInputConfig humanInputConfig; + + public Builder humanInputConfig(HumanInputConfig humanInputConfig) { + this.humanInputConfig = humanInputConfig; + this.__explicitlySet__.add("humanInputConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("outputConfig") + private OutputConfig outputConfig; + + public Builder outputConfig(OutputConfig outputConfig) { + this.outputConfig = outputConfig; + this.__explicitlySet__.add("outputConfig"); + return this; + } /** * Whether to show traces in the chat result. **/ @@ -218,6 +276,22 @@ public Builder shouldEnableSession(Boolean shouldEnableSession) { this.__explicitlySet__.add("shouldEnableSession"); return this; } + /** + * Whether to enable multi-language for chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableMultiLanguage") + private Boolean shouldEnableMultiLanguage; + + /** + * Whether to enable multi-language for chat. + * @param shouldEnableMultiLanguage the value to set + * @return this builder + **/ + public Builder shouldEnableMultiLanguage(Boolean shouldEnableMultiLanguage) { + this.shouldEnableMultiLanguage = shouldEnableMultiLanguage; + this.__explicitlySet__.add("shouldEnableMultiLanguage"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") private SessionConfig sessionConfig; @@ -391,9 +465,14 @@ public AgentEndpoint build() { this.compartmentId, this.agentId, this.contentModerationConfig, + this.guardrailConfig, + this.metadata, + this.humanInputConfig, + this.outputConfig, this.shouldEnableTrace, this.shouldEnableCitation, this.shouldEnableSession, + this.shouldEnableMultiLanguage, this.sessionConfig, this.timeCreated, this.timeUpdated, @@ -428,6 +507,18 @@ public Builder copy(AgentEndpoint model) { if (model.wasPropertyExplicitlySet("contentModerationConfig")) { this.contentModerationConfig(model.getContentModerationConfig()); } + if (model.wasPropertyExplicitlySet("guardrailConfig")) { + this.guardrailConfig(model.getGuardrailConfig()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("humanInputConfig")) { + this.humanInputConfig(model.getHumanInputConfig()); + } + if (model.wasPropertyExplicitlySet("outputConfig")) { + this.outputConfig(model.getOutputConfig()); + } if (model.wasPropertyExplicitlySet("shouldEnableTrace")) { this.shouldEnableTrace(model.getShouldEnableTrace()); } @@ -437,6 +528,9 @@ public Builder copy(AgentEndpoint model) { if (model.wasPropertyExplicitlySet("shouldEnableSession")) { this.shouldEnableSession(model.getShouldEnableSession()); } + if (model.wasPropertyExplicitlySet("shouldEnableMultiLanguage")) { + this.shouldEnableMultiLanguage(model.getShouldEnableMultiLanguage()); + } if (model.wasPropertyExplicitlySet("sessionConfig")) { this.sessionConfig(model.getSessionConfig()); } @@ -553,6 +647,41 @@ public ContentModerationConfig getContentModerationConfig() { return contentModerationConfig; } + @com.fasterxml.jackson.annotation.JsonProperty("guardrailConfig") + private final GuardrailConfig guardrailConfig; + + public GuardrailConfig getGuardrailConfig() { + return guardrailConfig; + } + + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + + @com.fasterxml.jackson.annotation.JsonProperty("humanInputConfig") + private final HumanInputConfig humanInputConfig; + + public HumanInputConfig getHumanInputConfig() { + return humanInputConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("outputConfig") + private final OutputConfig outputConfig; + + public OutputConfig getOutputConfig() { + return outputConfig; + } + /** * Whether to show traces in the chat result. **/ @@ -595,6 +724,20 @@ public Boolean getShouldEnableSession() { return shouldEnableSession; } + /** + * Whether to enable multi-language for chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableMultiLanguage") + private final Boolean shouldEnableMultiLanguage; + + /** + * Whether to enable multi-language for chat. + * @return the value + **/ + public Boolean getShouldEnableMultiLanguage() { + return shouldEnableMultiLanguage; + } + @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") private final SessionConfig sessionConfig; @@ -811,9 +954,15 @@ public String toString(boolean includeByteArrayContents) { sb.append(", agentId=").append(String.valueOf(this.agentId)); sb.append(", contentModerationConfig=") .append(String.valueOf(this.contentModerationConfig)); + sb.append(", guardrailConfig=").append(String.valueOf(this.guardrailConfig)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(", humanInputConfig=").append(String.valueOf(this.humanInputConfig)); + sb.append(", outputConfig=").append(String.valueOf(this.outputConfig)); sb.append(", shouldEnableTrace=").append(String.valueOf(this.shouldEnableTrace)); sb.append(", shouldEnableCitation=").append(String.valueOf(this.shouldEnableCitation)); sb.append(", shouldEnableSession=").append(String.valueOf(this.shouldEnableSession)); + sb.append(", shouldEnableMultiLanguage=") + .append(String.valueOf(this.shouldEnableMultiLanguage)); sb.append(", sessionConfig=").append(String.valueOf(this.sessionConfig)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); @@ -843,9 +992,15 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.agentId, other.agentId) && java.util.Objects.equals( this.contentModerationConfig, other.contentModerationConfig) + && java.util.Objects.equals(this.guardrailConfig, other.guardrailConfig) + && java.util.Objects.equals(this.metadata, other.metadata) + && java.util.Objects.equals(this.humanInputConfig, other.humanInputConfig) + && java.util.Objects.equals(this.outputConfig, other.outputConfig) && java.util.Objects.equals(this.shouldEnableTrace, other.shouldEnableTrace) && java.util.Objects.equals(this.shouldEnableCitation, other.shouldEnableCitation) && java.util.Objects.equals(this.shouldEnableSession, other.shouldEnableSession) + && java.util.Objects.equals( + this.shouldEnableMultiLanguage, other.shouldEnableMultiLanguage) && java.util.Objects.equals(this.sessionConfig, other.sessionConfig) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) @@ -873,6 +1028,14 @@ public int hashCode() { + (this.contentModerationConfig == null ? 43 : this.contentModerationConfig.hashCode()); + result = + (result * PRIME) + + (this.guardrailConfig == null ? 43 : this.guardrailConfig.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = + (result * PRIME) + + (this.humanInputConfig == null ? 43 : this.humanInputConfig.hashCode()); + result = (result * PRIME) + (this.outputConfig == null ? 43 : this.outputConfig.hashCode()); result = (result * PRIME) + (this.shouldEnableTrace == null ? 43 : this.shouldEnableTrace.hashCode()); @@ -886,6 +1049,11 @@ public int hashCode() { + (this.shouldEnableSession == null ? 43 : this.shouldEnableSession.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableMultiLanguage == null + ? 43 + : this.shouldEnableMultiLanguage.hashCode()); result = (result * PRIME) + (this.sessionConfig == null ? 43 : this.sessionConfig.hashCode()); diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpointSummary.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpointSummary.java index f5061ac8f6..5fda1925ae 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpointSummary.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpointSummary.java @@ -29,9 +29,14 @@ public final class AgentEndpointSummary extends com.oracle.bmc.http.internal.Exp "compartmentId", "agentId", "contentModerationConfig", + "guardrailConfig", + "metadata", + "humanInputConfig", + "outputConfig", "shouldEnableTrace", "shouldEnableCitation", "shouldEnableSession", + "shouldEnableMultiLanguage", "sessionConfig", "timeCreated", "timeUpdated", @@ -48,9 +53,14 @@ public AgentEndpointSummary( String compartmentId, String agentId, ContentModerationConfig contentModerationConfig, + GuardrailConfig guardrailConfig, + java.util.Map metadata, + HumanInputConfig humanInputConfig, + OutputConfig outputConfig, Boolean shouldEnableTrace, Boolean shouldEnableCitation, Boolean shouldEnableSession, + Boolean shouldEnableMultiLanguage, SessionConfig sessionConfig, java.util.Date timeCreated, java.util.Date timeUpdated, @@ -66,9 +76,14 @@ public AgentEndpointSummary( this.compartmentId = compartmentId; this.agentId = agentId; this.contentModerationConfig = contentModerationConfig; + this.guardrailConfig = guardrailConfig; + this.metadata = metadata; + this.humanInputConfig = humanInputConfig; + this.outputConfig = outputConfig; this.shouldEnableTrace = shouldEnableTrace; this.shouldEnableCitation = shouldEnableCitation; this.shouldEnableSession = shouldEnableSession; + this.shouldEnableMultiLanguage = shouldEnableMultiLanguage; this.sessionConfig = sessionConfig; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; @@ -170,6 +185,49 @@ public Builder contentModerationConfig(ContentModerationConfig contentModeration this.__explicitlySet__.add("contentModerationConfig"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("guardrailConfig") + private GuardrailConfig guardrailConfig; + + public Builder guardrailConfig(GuardrailConfig guardrailConfig) { + this.guardrailConfig = guardrailConfig; + this.__explicitlySet__.add("guardrailConfig"); + return this; + } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @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.JsonProperty("humanInputConfig") + private HumanInputConfig humanInputConfig; + + public Builder humanInputConfig(HumanInputConfig humanInputConfig) { + this.humanInputConfig = humanInputConfig; + this.__explicitlySet__.add("humanInputConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("outputConfig") + private OutputConfig outputConfig; + + public Builder outputConfig(OutputConfig outputConfig) { + this.outputConfig = outputConfig; + this.__explicitlySet__.add("outputConfig"); + return this; + } /** * Whether to show traces in the chat result. **/ @@ -218,6 +276,22 @@ public Builder shouldEnableSession(Boolean shouldEnableSession) { this.__explicitlySet__.add("shouldEnableSession"); return this; } + /** + * Whether to enable multi-language for chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableMultiLanguage") + private Boolean shouldEnableMultiLanguage; + + /** + * Whether to enable multi-language for chat. + * @param shouldEnableMultiLanguage the value to set + * @return this builder + **/ + public Builder shouldEnableMultiLanguage(Boolean shouldEnableMultiLanguage) { + this.shouldEnableMultiLanguage = shouldEnableMultiLanguage; + this.__explicitlySet__.add("shouldEnableMultiLanguage"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") private SessionConfig sessionConfig; @@ -391,9 +465,14 @@ public AgentEndpointSummary build() { this.compartmentId, this.agentId, this.contentModerationConfig, + this.guardrailConfig, + this.metadata, + this.humanInputConfig, + this.outputConfig, this.shouldEnableTrace, this.shouldEnableCitation, this.shouldEnableSession, + this.shouldEnableMultiLanguage, this.sessionConfig, this.timeCreated, this.timeUpdated, @@ -428,6 +507,18 @@ public Builder copy(AgentEndpointSummary model) { if (model.wasPropertyExplicitlySet("contentModerationConfig")) { this.contentModerationConfig(model.getContentModerationConfig()); } + if (model.wasPropertyExplicitlySet("guardrailConfig")) { + this.guardrailConfig(model.getGuardrailConfig()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("humanInputConfig")) { + this.humanInputConfig(model.getHumanInputConfig()); + } + if (model.wasPropertyExplicitlySet("outputConfig")) { + this.outputConfig(model.getOutputConfig()); + } if (model.wasPropertyExplicitlySet("shouldEnableTrace")) { this.shouldEnableTrace(model.getShouldEnableTrace()); } @@ -437,6 +528,9 @@ public Builder copy(AgentEndpointSummary model) { if (model.wasPropertyExplicitlySet("shouldEnableSession")) { this.shouldEnableSession(model.getShouldEnableSession()); } + if (model.wasPropertyExplicitlySet("shouldEnableMultiLanguage")) { + this.shouldEnableMultiLanguage(model.getShouldEnableMultiLanguage()); + } if (model.wasPropertyExplicitlySet("sessionConfig")) { this.sessionConfig(model.getSessionConfig()); } @@ -553,6 +647,41 @@ public ContentModerationConfig getContentModerationConfig() { return contentModerationConfig; } + @com.fasterxml.jackson.annotation.JsonProperty("guardrailConfig") + private final GuardrailConfig guardrailConfig; + + public GuardrailConfig getGuardrailConfig() { + return guardrailConfig; + } + + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + + @com.fasterxml.jackson.annotation.JsonProperty("humanInputConfig") + private final HumanInputConfig humanInputConfig; + + public HumanInputConfig getHumanInputConfig() { + return humanInputConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("outputConfig") + private final OutputConfig outputConfig; + + public OutputConfig getOutputConfig() { + return outputConfig; + } + /** * Whether to show traces in the chat result. **/ @@ -595,6 +724,20 @@ public Boolean getShouldEnableSession() { return shouldEnableSession; } + /** + * Whether to enable multi-language for chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableMultiLanguage") + private final Boolean shouldEnableMultiLanguage; + + /** + * Whether to enable multi-language for chat. + * @return the value + **/ + public Boolean getShouldEnableMultiLanguage() { + return shouldEnableMultiLanguage; + } + @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") private final SessionConfig sessionConfig; @@ -759,9 +902,15 @@ public String toString(boolean includeByteArrayContents) { sb.append(", agentId=").append(String.valueOf(this.agentId)); sb.append(", contentModerationConfig=") .append(String.valueOf(this.contentModerationConfig)); + sb.append(", guardrailConfig=").append(String.valueOf(this.guardrailConfig)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(", humanInputConfig=").append(String.valueOf(this.humanInputConfig)); + sb.append(", outputConfig=").append(String.valueOf(this.outputConfig)); sb.append(", shouldEnableTrace=").append(String.valueOf(this.shouldEnableTrace)); sb.append(", shouldEnableCitation=").append(String.valueOf(this.shouldEnableCitation)); sb.append(", shouldEnableSession=").append(String.valueOf(this.shouldEnableSession)); + sb.append(", shouldEnableMultiLanguage=") + .append(String.valueOf(this.shouldEnableMultiLanguage)); sb.append(", sessionConfig=").append(String.valueOf(this.sessionConfig)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); @@ -791,9 +940,15 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.agentId, other.agentId) && java.util.Objects.equals( this.contentModerationConfig, other.contentModerationConfig) + && java.util.Objects.equals(this.guardrailConfig, other.guardrailConfig) + && java.util.Objects.equals(this.metadata, other.metadata) + && java.util.Objects.equals(this.humanInputConfig, other.humanInputConfig) + && java.util.Objects.equals(this.outputConfig, other.outputConfig) && java.util.Objects.equals(this.shouldEnableTrace, other.shouldEnableTrace) && java.util.Objects.equals(this.shouldEnableCitation, other.shouldEnableCitation) && java.util.Objects.equals(this.shouldEnableSession, other.shouldEnableSession) + && java.util.Objects.equals( + this.shouldEnableMultiLanguage, other.shouldEnableMultiLanguage) && java.util.Objects.equals(this.sessionConfig, other.sessionConfig) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) @@ -821,6 +976,14 @@ public int hashCode() { + (this.contentModerationConfig == null ? 43 : this.contentModerationConfig.hashCode()); + result = + (result * PRIME) + + (this.guardrailConfig == null ? 43 : this.guardrailConfig.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = + (result * PRIME) + + (this.humanInputConfig == null ? 43 : this.humanInputConfig.hashCode()); + result = (result * PRIME) + (this.outputConfig == null ? 43 : this.outputConfig.hashCode()); result = (result * PRIME) + (this.shouldEnableTrace == null ? 43 : this.shouldEnableTrace.hashCode()); @@ -834,6 +997,11 @@ public int hashCode() { + (this.shouldEnableSession == null ? 43 : this.shouldEnableSession.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableMultiLanguage == null + ? 43 + : this.shouldEnableMultiLanguage.hashCode()); result = (result * PRIME) + (this.sessionConfig == null ? 43 : this.sessionConfig.hashCode()); diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentSummary.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentSummary.java index 3c7fdee53c..1a0823f875 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentSummary.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentSummary.java @@ -27,6 +27,7 @@ public final class AgentSummary extends com.oracle.bmc.http.internal.ExplicitlyS "compartmentId", "knowledgeBaseIds", "welcomeMessage", + "llmConfig", "timeCreated", "timeUpdated", "lifecycleState", @@ -42,6 +43,7 @@ public AgentSummary( String compartmentId, java.util.List knowledgeBaseIds, String welcomeMessage, + LlmConfig llmConfig, java.util.Date timeCreated, java.util.Date timeUpdated, Agent.LifecycleState lifecycleState, @@ -56,6 +58,7 @@ public AgentSummary( this.compartmentId = compartmentId; this.knowledgeBaseIds = knowledgeBaseIds; this.welcomeMessage = welcomeMessage; + this.llmConfig = llmConfig; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; @@ -132,13 +135,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. **/ @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") private java.util.List knowledgeBaseIds; /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. * @param knowledgeBaseIds the value to set * @return this builder **/ @@ -163,6 +166,15 @@ public Builder welcomeMessage(String welcomeMessage) { this.__explicitlySet__.add("welcomeMessage"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("llmConfig") + private LlmConfig llmConfig; + + public Builder llmConfig(LlmConfig llmConfig) { + this.llmConfig = llmConfig; + this.__explicitlySet__.add("llmConfig"); + return this; + } /** * The date and time the agent was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). *

@@ -327,6 +339,7 @@ public AgentSummary build() { this.compartmentId, this.knowledgeBaseIds, this.welcomeMessage, + this.llmConfig, this.timeCreated, this.timeUpdated, this.lifecycleState, @@ -360,6 +373,9 @@ public Builder copy(AgentSummary model) { if (model.wasPropertyExplicitlySet("welcomeMessage")) { this.welcomeMessage(model.getWelcomeMessage()); } + if (model.wasPropertyExplicitlySet("llmConfig")) { + this.llmConfig(model.getLlmConfig()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -453,13 +469,13 @@ public String getCompartmentId() { } /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. **/ @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") private final java.util.List knowledgeBaseIds; /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. * @return the value **/ public java.util.List getKnowledgeBaseIds() { @@ -480,6 +496,13 @@ public String getWelcomeMessage() { return welcomeMessage; } + @com.fasterxml.jackson.annotation.JsonProperty("llmConfig") + private final LlmConfig llmConfig; + + public LlmConfig getLlmConfig() { + return llmConfig; + } + /** * The date and time the agent was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). *

@@ -636,6 +659,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", knowledgeBaseIds=").append(String.valueOf(this.knowledgeBaseIds)); sb.append(", welcomeMessage=").append(String.valueOf(this.welcomeMessage)); + sb.append(", llmConfig=").append(String.valueOf(this.llmConfig)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); @@ -663,6 +687,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.knowledgeBaseIds, other.knowledgeBaseIds) && java.util.Objects.equals(this.welcomeMessage, other.welcomeMessage) + && java.util.Objects.equals(this.llmConfig, other.llmConfig) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) @@ -689,6 +714,7 @@ public int hashCode() { result = (result * PRIME) + (this.welcomeMessage == null ? 43 : this.welcomeMessage.hashCode()); + result = (result * PRIME) + (this.llmConfig == null ? 43 : this.llmConfig.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); result = diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ApiSchemaInlineInputLocation.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ApiSchemaInlineInputLocation.java new file mode 100644 index 0000000000..1fe6344bd8 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ApiSchemaInlineInputLocation.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The details of inline input of Api schema. + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ApiSchemaInlineInputLocation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "apiSchemaInputLocationType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ApiSchemaInlineInputLocation extends ApiSchemaInputLocation { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Inline content as input. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("content") + private String content; + + /** + * Inline content as input. + * @param content the value to set + * @return this builder + **/ + public Builder content(String content) { + this.content = content; + this.__explicitlySet__.add("content"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ApiSchemaInlineInputLocation build() { + ApiSchemaInlineInputLocation model = new ApiSchemaInlineInputLocation(this.content); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ApiSchemaInlineInputLocation model) { + if (model.wasPropertyExplicitlySet("content")) { + this.content(model.getContent()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ApiSchemaInlineInputLocation(String content) { + super(); + this.content = content; + } + + /** + * Inline content as input. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("content") + private final String content; + + /** + * Inline content as input. + * @return the value + **/ + public String getContent() { + return content; + } + + @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("ApiSchemaInlineInputLocation("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", content=").append(String.valueOf(this.content)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ApiSchemaInlineInputLocation)) { + return false; + } + + ApiSchemaInlineInputLocation other = (ApiSchemaInlineInputLocation) o; + return java.util.Objects.equals(this.content, other.content) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.content == null ? 43 : this.content.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ApiSchemaInputLocation.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ApiSchemaInputLocation.java new file mode 100644 index 0000000000..8370945854 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ApiSchemaInputLocation.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The input location definition for Api schema. + *
+ * 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: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "apiSchemaInputLocationType", + defaultImpl = ApiSchemaInputLocation.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ApiSchemaObjectStorageInputLocation.class, + name = "OBJECT_STORAGE_LOCATION" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ApiSchemaInlineInputLocation.class, + name = "INLINE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ApiSchemaInputLocation extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected ApiSchemaInputLocation() { + 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("ApiSchemaInputLocation("); + 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 ApiSchemaInputLocation)) { + return false; + } + + ApiSchemaInputLocation other = (ApiSchemaInputLocation) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Type of Api Schema InputLocation. + * The allowed values are: + * - {@code INLINE}: The Api schema input location is inline. + * - {@code OBJECT_STORAGE_LOCATION}: The Api schema input location is object storage. + * + **/ + public enum ApiSchemaInputLocationType { + Inline("INLINE"), + ObjectStorageLocation("OBJECT_STORAGE_LOCATION"), + + /** + * 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(ApiSchemaInputLocationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ApiSchemaInputLocationType v : ApiSchemaInputLocationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ApiSchemaInputLocationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ApiSchemaInputLocationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ApiSchemaInputLocationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ApiSchemaObjectStorageInputLocation.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ApiSchemaObjectStorageInputLocation.java new file mode 100644 index 0000000000..71b9e703c2 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ApiSchemaObjectStorageInputLocation.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The details of OCI Object Storage object location for Api schema. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ApiSchemaObjectStorageInputLocation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "apiSchemaInputLocationType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ApiSchemaObjectStorageInputLocation extends ApiSchemaInputLocation { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The namespace name of an object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private String namespaceName; + + /** + * The namespace name of an object. + * @param namespaceName the value to set + * @return this builder + **/ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + this.__explicitlySet__.add("namespaceName"); + return this; + } + /** + * The bucket name of an object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * The bucket name of an object. + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + /** + * The location/name of object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectName") + private String objectName; + + /** + * The location/name of object. + * @param objectName the value to set + * @return this builder + **/ + public Builder objectName(String objectName) { + this.objectName = objectName; + this.__explicitlySet__.add("objectName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ApiSchemaObjectStorageInputLocation build() { + ApiSchemaObjectStorageInputLocation model = + new ApiSchemaObjectStorageInputLocation( + this.namespaceName, this.bucketName, this.objectName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ApiSchemaObjectStorageInputLocation model) { + if (model.wasPropertyExplicitlySet("namespaceName")) { + this.namespaceName(model.getNamespaceName()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + if (model.wasPropertyExplicitlySet("objectName")) { + this.objectName(model.getObjectName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ApiSchemaObjectStorageInputLocation( + String namespaceName, String bucketName, String objectName) { + super(); + this.namespaceName = namespaceName; + this.bucketName = bucketName; + this.objectName = objectName; + } + + /** + * The namespace name of an object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private final String namespaceName; + + /** + * The namespace name of an object. + * @return the value + **/ + public String getNamespaceName() { + return namespaceName; + } + + /** + * The bucket name of an object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * The bucket name of an object. + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + /** + * The location/name of object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectName") + private final String objectName; + + /** + * The location/name of object. + * @return the value + **/ + public String getObjectName() { + return objectName; + } + + @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("ApiSchemaObjectStorageInputLocation("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(", objectName=").append(String.valueOf(this.objectName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ApiSchemaObjectStorageInputLocation)) { + return false; + } + + ApiSchemaObjectStorageInputLocation other = (ApiSchemaObjectStorageInputLocation) o; + return java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && java.util.Objects.equals(this.objectName, other.objectName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + result = (result * PRIME) + (this.objectName == null ? 43 : this.objectName.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ContentModerationGuardrailConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ContentModerationGuardrailConfig.java new file mode 100644 index 0000000000..fdb4248729 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ContentModerationGuardrailConfig.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The configuration details about whether to apply the content moderation feature to input and output. Content moderation removes toxic and biased content from responses. It is recommended to use content moderation. + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ContentModerationGuardrailConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ContentModerationGuardrailConfig + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"inputGuardrailMode", "outputGuardrailMode"}) + public ContentModerationGuardrailConfig( + GuardrailMode inputGuardrailMode, GuardrailMode outputGuardrailMode) { + super(); + this.inputGuardrailMode = inputGuardrailMode; + this.outputGuardrailMode = outputGuardrailMode; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An input guardrail mode for content moderation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inputGuardrailMode") + private GuardrailMode inputGuardrailMode; + + /** + * An input guardrail mode for content moderation. + * @param inputGuardrailMode the value to set + * @return this builder + **/ + public Builder inputGuardrailMode(GuardrailMode inputGuardrailMode) { + this.inputGuardrailMode = inputGuardrailMode; + this.__explicitlySet__.add("inputGuardrailMode"); + return this; + } + /** + * An output guardrail mode for content moderation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("outputGuardrailMode") + private GuardrailMode outputGuardrailMode; + + /** + * An output guardrail mode for content moderation. + * @param outputGuardrailMode the value to set + * @return this builder + **/ + public Builder outputGuardrailMode(GuardrailMode outputGuardrailMode) { + this.outputGuardrailMode = outputGuardrailMode; + this.__explicitlySet__.add("outputGuardrailMode"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ContentModerationGuardrailConfig build() { + ContentModerationGuardrailConfig model = + new ContentModerationGuardrailConfig( + this.inputGuardrailMode, this.outputGuardrailMode); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ContentModerationGuardrailConfig model) { + if (model.wasPropertyExplicitlySet("inputGuardrailMode")) { + this.inputGuardrailMode(model.getInputGuardrailMode()); + } + if (model.wasPropertyExplicitlySet("outputGuardrailMode")) { + this.outputGuardrailMode(model.getOutputGuardrailMode()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * An input guardrail mode for content moderation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inputGuardrailMode") + private final GuardrailMode inputGuardrailMode; + + /** + * An input guardrail mode for content moderation. + * @return the value + **/ + public GuardrailMode getInputGuardrailMode() { + return inputGuardrailMode; + } + + /** + * An output guardrail mode for content moderation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("outputGuardrailMode") + private final GuardrailMode outputGuardrailMode; + + /** + * An output guardrail mode for content moderation. + * @return the value + **/ + public GuardrailMode getOutputGuardrailMode() { + return outputGuardrailMode; + } + + @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("ContentModerationGuardrailConfig("); + sb.append("super=").append(super.toString()); + sb.append("inputGuardrailMode=").append(String.valueOf(this.inputGuardrailMode)); + sb.append(", outputGuardrailMode=").append(String.valueOf(this.outputGuardrailMode)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ContentModerationGuardrailConfig)) { + return false; + } + + ContentModerationGuardrailConfig other = (ContentModerationGuardrailConfig) o; + return java.util.Objects.equals(this.inputGuardrailMode, other.inputGuardrailMode) + && java.util.Objects.equals(this.outputGuardrailMode, other.outputGuardrailMode) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.inputGuardrailMode == null + ? 43 + : this.inputGuardrailMode.hashCode()); + result = + (result * PRIME) + + (this.outputGuardrailMode == null + ? 43 + : this.outputGuardrailMode.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentDetails.java index ee25b9a467..72b42d8ab6 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentDetails.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentDetails.java @@ -28,6 +28,7 @@ public final class CreateAgentDetails extends com.oracle.bmc.http.internal.Expli "compartmentId", "knowledgeBaseIds", "welcomeMessage", + "llmConfig", "freeformTags", "definedTags" }) @@ -37,6 +38,7 @@ public CreateAgentDetails( String compartmentId, java.util.List knowledgeBaseIds, String welcomeMessage, + LlmConfig llmConfig, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -45,6 +47,7 @@ public CreateAgentDetails( this.compartmentId = compartmentId; this.knowledgeBaseIds = knowledgeBaseIds; this.welcomeMessage = welcomeMessage; + this.llmConfig = llmConfig; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -102,13 +105,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. **/ @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") private java.util.List knowledgeBaseIds; /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. * @param knowledgeBaseIds the value to set * @return this builder **/ @@ -133,6 +136,15 @@ public Builder welcomeMessage(String welcomeMessage) { this.__explicitlySet__.add("welcomeMessage"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("llmConfig") + private LlmConfig llmConfig; + + public Builder llmConfig(LlmConfig llmConfig) { + this.llmConfig = llmConfig; + this.__explicitlySet__.add("llmConfig"); + 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). @@ -194,6 +206,7 @@ public CreateAgentDetails build() { this.compartmentId, this.knowledgeBaseIds, this.welcomeMessage, + this.llmConfig, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -219,6 +232,9 @@ public Builder copy(CreateAgentDetails model) { if (model.wasPropertyExplicitlySet("welcomeMessage")) { this.welcomeMessage(model.getWelcomeMessage()); } + if (model.wasPropertyExplicitlySet("llmConfig")) { + this.llmConfig(model.getLlmConfig()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -285,13 +301,13 @@ public String getCompartmentId() { } /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. **/ @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") private final java.util.List knowledgeBaseIds; /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. * @return the value **/ public java.util.List getKnowledgeBaseIds() { @@ -312,6 +328,13 @@ public String getWelcomeMessage() { return welcomeMessage; } + @com.fasterxml.jackson.annotation.JsonProperty("llmConfig") + private final LlmConfig llmConfig; + + public LlmConfig getLlmConfig() { + return llmConfig; + } + /** * 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). @@ -375,6 +398,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", knowledgeBaseIds=").append(String.valueOf(this.knowledgeBaseIds)); sb.append(", welcomeMessage=").append(String.valueOf(this.welcomeMessage)); + sb.append(", llmConfig=").append(String.valueOf(this.llmConfig)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -396,6 +420,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.knowledgeBaseIds, other.knowledgeBaseIds) && java.util.Objects.equals(this.welcomeMessage, other.welcomeMessage) + && java.util.Objects.equals(this.llmConfig, other.llmConfig) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -416,6 +441,7 @@ public int hashCode() { result = (result * PRIME) + (this.welcomeMessage == null ? 43 : this.welcomeMessage.hashCode()); + result = (result * PRIME) + (this.llmConfig == null ? 43 : this.llmConfig.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-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentEndpointDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentEndpointDetails.java index b963958960..5363fc3feb 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentEndpointDetails.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentEndpointDetails.java @@ -28,9 +28,14 @@ public final class CreateAgentEndpointDetails "description", "agentId", "contentModerationConfig", + "guardrailConfig", + "metadata", + "humanInputConfig", + "outputConfig", "shouldEnableTrace", "shouldEnableCitation", "shouldEnableSession", + "shouldEnableMultiLanguage", "sessionConfig", "compartmentId", "freeformTags", @@ -41,9 +46,14 @@ public CreateAgentEndpointDetails( String description, String agentId, ContentModerationConfig contentModerationConfig, + GuardrailConfig guardrailConfig, + java.util.Map metadata, + HumanInputConfig humanInputConfig, + OutputConfig outputConfig, Boolean shouldEnableTrace, Boolean shouldEnableCitation, Boolean shouldEnableSession, + Boolean shouldEnableMultiLanguage, SessionConfig sessionConfig, String compartmentId, java.util.Map freeformTags, @@ -53,9 +63,14 @@ public CreateAgentEndpointDetails( this.description = description; this.agentId = agentId; this.contentModerationConfig = contentModerationConfig; + this.guardrailConfig = guardrailConfig; + this.metadata = metadata; + this.humanInputConfig = humanInputConfig; + this.outputConfig = outputConfig; this.shouldEnableTrace = shouldEnableTrace; this.shouldEnableCitation = shouldEnableCitation; this.shouldEnableSession = shouldEnableSession; + this.shouldEnableMultiLanguage = shouldEnableMultiLanguage; this.sessionConfig = sessionConfig; this.compartmentId = compartmentId; this.freeformTags = freeformTags; @@ -121,6 +136,49 @@ public Builder contentModerationConfig(ContentModerationConfig contentModeration this.__explicitlySet__.add("contentModerationConfig"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("guardrailConfig") + private GuardrailConfig guardrailConfig; + + public Builder guardrailConfig(GuardrailConfig guardrailConfig) { + this.guardrailConfig = guardrailConfig; + this.__explicitlySet__.add("guardrailConfig"); + return this; + } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @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.JsonProperty("humanInputConfig") + private HumanInputConfig humanInputConfig; + + public Builder humanInputConfig(HumanInputConfig humanInputConfig) { + this.humanInputConfig = humanInputConfig; + this.__explicitlySet__.add("humanInputConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("outputConfig") + private OutputConfig outputConfig; + + public Builder outputConfig(OutputConfig outputConfig) { + this.outputConfig = outputConfig; + this.__explicitlySet__.add("outputConfig"); + return this; + } /** * Whether to show traces in the chat result. **/ @@ -169,6 +227,22 @@ public Builder shouldEnableSession(Boolean shouldEnableSession) { this.__explicitlySet__.add("shouldEnableSession"); return this; } + /** + * Whether to enable multi-language for chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableMultiLanguage") + private Boolean shouldEnableMultiLanguage; + + /** + * Whether to enable multi-language for chat. + * @param shouldEnableMultiLanguage the value to set + * @return this builder + **/ + public Builder shouldEnableMultiLanguage(Boolean shouldEnableMultiLanguage) { + this.shouldEnableMultiLanguage = shouldEnableMultiLanguage; + this.__explicitlySet__.add("shouldEnableMultiLanguage"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") private SessionConfig sessionConfig; @@ -256,9 +330,14 @@ public CreateAgentEndpointDetails build() { this.description, this.agentId, this.contentModerationConfig, + this.guardrailConfig, + this.metadata, + this.humanInputConfig, + this.outputConfig, this.shouldEnableTrace, this.shouldEnableCitation, this.shouldEnableSession, + this.shouldEnableMultiLanguage, this.sessionConfig, this.compartmentId, this.freeformTags, @@ -283,6 +362,18 @@ public Builder copy(CreateAgentEndpointDetails model) { if (model.wasPropertyExplicitlySet("contentModerationConfig")) { this.contentModerationConfig(model.getContentModerationConfig()); } + if (model.wasPropertyExplicitlySet("guardrailConfig")) { + this.guardrailConfig(model.getGuardrailConfig()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("humanInputConfig")) { + this.humanInputConfig(model.getHumanInputConfig()); + } + if (model.wasPropertyExplicitlySet("outputConfig")) { + this.outputConfig(model.getOutputConfig()); + } if (model.wasPropertyExplicitlySet("shouldEnableTrace")) { this.shouldEnableTrace(model.getShouldEnableTrace()); } @@ -292,6 +383,9 @@ public Builder copy(CreateAgentEndpointDetails model) { if (model.wasPropertyExplicitlySet("shouldEnableSession")) { this.shouldEnableSession(model.getShouldEnableSession()); } + if (model.wasPropertyExplicitlySet("shouldEnableMultiLanguage")) { + this.shouldEnableMultiLanguage(model.getShouldEnableMultiLanguage()); + } if (model.wasPropertyExplicitlySet("sessionConfig")) { this.sessionConfig(model.getSessionConfig()); } @@ -368,6 +462,41 @@ public ContentModerationConfig getContentModerationConfig() { return contentModerationConfig; } + @com.fasterxml.jackson.annotation.JsonProperty("guardrailConfig") + private final GuardrailConfig guardrailConfig; + + public GuardrailConfig getGuardrailConfig() { + return guardrailConfig; + } + + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + + @com.fasterxml.jackson.annotation.JsonProperty("humanInputConfig") + private final HumanInputConfig humanInputConfig; + + public HumanInputConfig getHumanInputConfig() { + return humanInputConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("outputConfig") + private final OutputConfig outputConfig; + + public OutputConfig getOutputConfig() { + return outputConfig; + } + /** * Whether to show traces in the chat result. **/ @@ -410,6 +539,20 @@ public Boolean getShouldEnableSession() { return shouldEnableSession; } + /** + * Whether to enable multi-language for chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableMultiLanguage") + private final Boolean shouldEnableMultiLanguage; + + /** + * Whether to enable multi-language for chat. + * @return the value + **/ + public Boolean getShouldEnableMultiLanguage() { + return shouldEnableMultiLanguage; + } + @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") private final SessionConfig sessionConfig; @@ -496,9 +639,15 @@ public String toString(boolean includeByteArrayContents) { sb.append(", agentId=").append(String.valueOf(this.agentId)); sb.append(", contentModerationConfig=") .append(String.valueOf(this.contentModerationConfig)); + sb.append(", guardrailConfig=").append(String.valueOf(this.guardrailConfig)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(", humanInputConfig=").append(String.valueOf(this.humanInputConfig)); + sb.append(", outputConfig=").append(String.valueOf(this.outputConfig)); sb.append(", shouldEnableTrace=").append(String.valueOf(this.shouldEnableTrace)); sb.append(", shouldEnableCitation=").append(String.valueOf(this.shouldEnableCitation)); sb.append(", shouldEnableSession=").append(String.valueOf(this.shouldEnableSession)); + sb.append(", shouldEnableMultiLanguage=") + .append(String.valueOf(this.shouldEnableMultiLanguage)); sb.append(", sessionConfig=").append(String.valueOf(this.sessionConfig)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); @@ -522,9 +671,15 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.agentId, other.agentId) && java.util.Objects.equals( this.contentModerationConfig, other.contentModerationConfig) + && java.util.Objects.equals(this.guardrailConfig, other.guardrailConfig) + && java.util.Objects.equals(this.metadata, other.metadata) + && java.util.Objects.equals(this.humanInputConfig, other.humanInputConfig) + && java.util.Objects.equals(this.outputConfig, other.outputConfig) && java.util.Objects.equals(this.shouldEnableTrace, other.shouldEnableTrace) && java.util.Objects.equals(this.shouldEnableCitation, other.shouldEnableCitation) && java.util.Objects.equals(this.shouldEnableSession, other.shouldEnableSession) + && java.util.Objects.equals( + this.shouldEnableMultiLanguage, other.shouldEnableMultiLanguage) && java.util.Objects.equals(this.sessionConfig, other.sessionConfig) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) @@ -544,6 +699,14 @@ public int hashCode() { + (this.contentModerationConfig == null ? 43 : this.contentModerationConfig.hashCode()); + result = + (result * PRIME) + + (this.guardrailConfig == null ? 43 : this.guardrailConfig.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = + (result * PRIME) + + (this.humanInputConfig == null ? 43 : this.humanInputConfig.hashCode()); + result = (result * PRIME) + (this.outputConfig == null ? 43 : this.outputConfig.hashCode()); result = (result * PRIME) + (this.shouldEnableTrace == null ? 43 : this.shouldEnableTrace.hashCode()); @@ -557,6 +720,11 @@ public int hashCode() { + (this.shouldEnableSession == null ? 43 : this.shouldEnableSession.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableMultiLanguage == null + ? 43 + : this.shouldEnableMultiLanguage.hashCode()); result = (result * PRIME) + (this.sessionConfig == null ? 43 : this.sessionConfig.hashCode()); diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateDataSourceDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateDataSourceDetails.java index 086880d13b..7c3cb30ad6 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateDataSourceDetails.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateDataSourceDetails.java @@ -28,6 +28,7 @@ public final class CreateDataSourceDetails "description", "knowledgeBaseId", "dataSourceConfig", + "metadata", "compartmentId", "freeformTags", "definedTags" @@ -37,6 +38,7 @@ public CreateDataSourceDetails( String description, String knowledgeBaseId, DataSourceConfig dataSourceConfig, + java.util.Map metadata, String compartmentId, java.util.Map freeformTags, java.util.Map> definedTags) { @@ -45,6 +47,7 @@ public CreateDataSourceDetails( this.description = description; this.knowledgeBaseId = knowledgeBaseId; this.dataSourceConfig = dataSourceConfig; + this.metadata = metadata; this.compartmentId = compartmentId; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -109,6 +112,22 @@ public Builder dataSourceConfig(DataSourceConfig dataSourceConfig) { this.__explicitlySet__.add("dataSourceConfig"); return this; } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @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; + } /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the data source in. * @@ -187,6 +206,7 @@ public CreateDataSourceDetails build() { this.description, this.knowledgeBaseId, this.dataSourceConfig, + this.metadata, this.compartmentId, this.freeformTags, this.definedTags); @@ -210,6 +230,9 @@ public Builder copy(CreateDataSourceDetails model) { if (model.wasPropertyExplicitlySet("dataSourceConfig")) { this.dataSourceConfig(model.getDataSourceConfig()); } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -283,6 +306,20 @@ public DataSourceConfig getDataSourceConfig() { return dataSourceConfig; } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the data source in. * @@ -361,6 +398,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", description=").append(String.valueOf(this.description)); sb.append(", knowledgeBaseId=").append(String.valueOf(this.knowledgeBaseId)); sb.append(", dataSourceConfig=").append(String.valueOf(this.dataSourceConfig)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -382,6 +420,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.knowledgeBaseId, other.knowledgeBaseId) && java.util.Objects.equals(this.dataSourceConfig, other.dataSourceConfig) + && java.util.Objects.equals(this.metadata, other.metadata) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -400,6 +439,7 @@ public int hashCode() { result = (result * PRIME) + (this.dataSourceConfig == null ? 43 : this.dataSourceConfig.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAuditProfileDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateToolDetails.java similarity index 61% rename from bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAuditProfileDetails.java rename to bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateToolDetails.java index 17a4f2f313..bb8f70d354 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAuditProfileDetails.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateToolDetails.java @@ -1,11 +1,12 @@ /** - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ -package com.oracle.bmc.datasafe.model; +package com.oracle.bmc.generativeaiagent.model; /** - * The details used to create a new audit profile. + * The data to create a Tool. + * *
* 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 @@ -14,37 +15,39 @@ * {@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: 20181201") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") @com.fasterxml.jackson.databind.annotation.JsonDeserialize( - builder = CreateAuditProfileDetails.Builder.class + builder = CreateToolDetails.Builder.class ) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) -public final class CreateAuditProfileDetails - extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { +public final class CreateToolDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ "displayName", - "compartmentId", - "targetId", "description", - "isPaidUsageEnabled", + "agentId", + "compartmentId", + "toolConfig", + "metadata", "freeformTags", "definedTags" }) - public CreateAuditProfileDetails( + public CreateToolDetails( String displayName, - String compartmentId, - String targetId, String description, - Boolean isPaidUsageEnabled, + String agentId, + String compartmentId, + ToolConfig toolConfig, + java.util.Map metadata, java.util.Map freeformTags, java.util.Map> definedTags) { super(); this.displayName = displayName; - this.compartmentId = compartmentId; - this.targetId = targetId; this.description = description; - this.isPaidUsageEnabled = isPaidUsageEnabled; + this.agentId = agentId; + this.compartmentId = compartmentId; + this.toolConfig = toolConfig; + this.metadata = metadata; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -52,13 +55,13 @@ public CreateAuditProfileDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The display name of the audit profile. The name does not have to be unique, and it's changeable. + * 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; /** - * The display name of the audit profile. The name does not have to be unique, and it's changeable. + * 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 **/ @@ -68,77 +71,81 @@ public Builder displayName(String displayName) { return this; } /** - * The OCID of the compartment where you want to create the audit profile. + * Description about the Tool. **/ - @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") - private String compartmentId; + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; /** - * The OCID of the compartment where you want to create the audit profile. - * @param compartmentId the value to set + * Description about the Tool. + * @param description the value to set * @return this builder **/ - public Builder compartmentId(String compartmentId) { - this.compartmentId = compartmentId; - this.__explicitlySet__.add("compartmentId"); + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); return this; } /** - * The OCID of the Data Safe target for which the audit profile is created. + * The OCID of the agent that this Tool is attached to. **/ - @com.fasterxml.jackson.annotation.JsonProperty("targetId") - private String targetId; + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private String agentId; /** - * The OCID of the Data Safe target for which the audit profile is created. - * @param targetId the value to set + * The OCID of the agent that this Tool is attached to. + * @param agentId the value to set * @return this builder **/ - public Builder targetId(String targetId) { - this.targetId = targetId; - this.__explicitlySet__.add("targetId"); + public Builder agentId(String agentId) { + this.agentId = agentId; + this.__explicitlySet__.add("agentId"); return this; } /** - * The description of the audit profile. + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. **/ - @com.fasterxml.jackson.annotation.JsonProperty("description") - private String description; + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; /** - * The description of the audit profile. - * @param description the value to set + * 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 description(String description) { - this.description = description; - this.__explicitlySet__.add("description"); + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("toolConfig") + private ToolConfig toolConfig; + + public Builder toolConfig(ToolConfig toolConfig) { + this.toolConfig = toolConfig; + this.__explicitlySet__.add("toolConfig"); return this; } /** - * Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, - * potentially incurring additional charges. The default value is inherited from the global settings. - * You can change at the global level or at the target level. - * + * Key-value pairs to allow additional configurations. **/ - @com.fasterxml.jackson.annotation.JsonProperty("isPaidUsageEnabled") - private Boolean isPaidUsageEnabled; + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; /** - * Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, - * potentially incurring additional charges. The default value is inherited from the global settings. - * You can change at the global level or at the target level. - * - * @param isPaidUsageEnabled the value to set + * Key-value pairs to allow additional configurations. + * @param metadata the value to set * @return this builder **/ - public Builder isPaidUsageEnabled(Boolean isPaidUsageEnabled) { - this.isPaidUsageEnabled = isPaidUsageEnabled; - this.__explicitlySet__.add("isPaidUsageEnabled"); + public Builder metadata(java.util.Map metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); return this; } /** - * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + * 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"}} * @@ -147,7 +154,8 @@ public Builder isPaidUsageEnabled(Boolean isPaidUsageEnabled) { private java.util.Map freeformTags; /** - * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + * 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"}} * @@ -160,7 +168,8 @@ public Builder freeformTags(java.util.Map freeformTags) { return this; } /** - * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + * 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"}}} * @@ -169,7 +178,8 @@ public Builder freeformTags(java.util.Map freeformTags) { private java.util.Map> definedTags; /** - * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + * 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"}}} * @@ -186,14 +196,15 @@ public Builder definedTags( @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); - public CreateAuditProfileDetails build() { - CreateAuditProfileDetails model = - new CreateAuditProfileDetails( + public CreateToolDetails build() { + CreateToolDetails model = + new CreateToolDetails( this.displayName, - this.compartmentId, - this.targetId, this.description, - this.isPaidUsageEnabled, + this.agentId, + this.compartmentId, + this.toolConfig, + this.metadata, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -203,21 +214,24 @@ public CreateAuditProfileDetails build() { } @com.fasterxml.jackson.annotation.JsonIgnore - public Builder copy(CreateAuditProfileDetails model) { + public Builder copy(CreateToolDetails model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("agentId")) { + this.agentId(model.getAgentId()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } - if (model.wasPropertyExplicitlySet("targetId")) { - this.targetId(model.getTargetId()); + if (model.wasPropertyExplicitlySet("toolConfig")) { + this.toolConfig(model.getToolConfig()); } - if (model.wasPropertyExplicitlySet("description")) { - this.description(model.getDescription()); - } - if (model.wasPropertyExplicitlySet("isPaidUsageEnabled")) { - this.isPaidUsageEnabled(model.getIsPaidUsageEnabled()); + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); @@ -241,13 +255,13 @@ public Builder toBuilder() { } /** - * The display name of the audit profile. The name does not have to be unique, and it's changeable. + * 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; /** - * The display name of the audit profile. The name does not have to be unique, and it's changeable. + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. * @return the value **/ public String getDisplayName() { @@ -255,69 +269,71 @@ public String getDisplayName() { } /** - * The OCID of the compartment where you want to create the audit profile. + * Description about the Tool. **/ - @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") - private final String compartmentId; + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; /** - * The OCID of the compartment where you want to create the audit profile. + * Description about the Tool. * @return the value **/ - public String getCompartmentId() { - return compartmentId; + public String getDescription() { + return description; } /** - * The OCID of the Data Safe target for which the audit profile is created. + * The OCID of the agent that this Tool is attached to. **/ - @com.fasterxml.jackson.annotation.JsonProperty("targetId") - private final String targetId; + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private final String agentId; /** - * The OCID of the Data Safe target for which the audit profile is created. + * The OCID of the agent that this Tool is attached to. * @return the value **/ - public String getTargetId() { - return targetId; + public String getAgentId() { + return agentId; } /** - * The description of the audit profile. + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. **/ - @com.fasterxml.jackson.annotation.JsonProperty("description") - private final String description; + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; /** - * The description of the audit profile. + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. * @return the value **/ - public String getDescription() { - return description; + public String getCompartmentId() { + return compartmentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("toolConfig") + private final ToolConfig toolConfig; + + public ToolConfig getToolConfig() { + return toolConfig; } /** - * Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, - * potentially incurring additional charges. The default value is inherited from the global settings. - * You can change at the global level or at the target level. - * + * Key-value pairs to allow additional configurations. **/ - @com.fasterxml.jackson.annotation.JsonProperty("isPaidUsageEnabled") - private final Boolean isPaidUsageEnabled; + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; /** - * Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, - * potentially incurring additional charges. The default value is inherited from the global settings. - * You can change at the global level or at the target level. - * + * Key-value pairs to allow additional configurations. * @return the value **/ - public Boolean getIsPaidUsageEnabled() { - return isPaidUsageEnabled; + public java.util.Map getMetadata() { + return metadata; } /** - * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + * 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"}} * @@ -326,7 +342,8 @@ public Boolean getIsPaidUsageEnabled() { private final java.util.Map freeformTags; /** - * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + * 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"}} * @@ -337,7 +354,8 @@ public java.util.Map getFreeformTags() { } /** - * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + * 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"}}} * @@ -346,7 +364,8 @@ public java.util.Map getFreeformTags() { private final java.util.Map> definedTags; /** - * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + * 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"}}} * @@ -368,13 +387,14 @@ public String toString() { */ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); - sb.append("CreateAuditProfileDetails("); + sb.append("CreateToolDetails("); sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); - sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); - sb.append(", targetId=").append(String.valueOf(this.targetId)); sb.append(", description=").append(String.valueOf(this.description)); - sb.append(", isPaidUsageEnabled=").append(String.valueOf(this.isPaidUsageEnabled)); + sb.append(", agentId=").append(String.valueOf(this.agentId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", toolConfig=").append(String.valueOf(this.toolConfig)); + 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(")"); @@ -386,16 +406,17 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof CreateAuditProfileDetails)) { + if (!(o instanceof CreateToolDetails)) { return false; } - CreateAuditProfileDetails other = (CreateAuditProfileDetails) o; + CreateToolDetails other = (CreateToolDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) - && java.util.Objects.equals(this.compartmentId, other.compartmentId) - && java.util.Objects.equals(this.targetId, other.targetId) && java.util.Objects.equals(this.description, other.description) - && java.util.Objects.equals(this.isPaidUsageEnabled, other.isPaidUsageEnabled) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.toolConfig, other.toolConfig) + && java.util.Objects.equals(this.metadata, other.metadata) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -406,16 +427,13 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); - result = - (result * PRIME) - + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); - result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); result = (result * PRIME) - + (this.isPaidUsageEnabled == null - ? 43 - : this.isPaidUsageEnabled.hashCode()); + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.toolConfig == null ? 43 : this.toolConfig.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) + super.hashCode(); diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSource.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSource.java index 1cbc75db63..2dc4a3e25d 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSource.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSource.java @@ -29,6 +29,7 @@ public final class DataSource extends com.oracle.bmc.http.internal.ExplicitlySet "compartmentId", "knowledgeBaseId", "dataSourceConfig", + "metadata", "timeCreated", "timeUpdated", "lifecycleState", @@ -44,6 +45,7 @@ public DataSource( String compartmentId, String knowledgeBaseId, DataSourceConfig dataSourceConfig, + java.util.Map metadata, java.util.Date timeCreated, java.util.Date timeUpdated, LifecycleState lifecycleState, @@ -58,6 +60,7 @@ public DataSource( this.compartmentId = compartmentId; this.knowledgeBaseId = knowledgeBaseId; this.dataSourceConfig = dataSourceConfig; + this.metadata = metadata; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; @@ -158,6 +161,22 @@ public Builder dataSourceConfig(DataSourceConfig dataSourceConfig) { this.__explicitlySet__.add("dataSourceConfig"); return this; } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @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; + } /** * The date and time the data source was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). *

@@ -322,6 +341,7 @@ public DataSource build() { this.compartmentId, this.knowledgeBaseId, this.dataSourceConfig, + this.metadata, this.timeCreated, this.timeUpdated, this.lifecycleState, @@ -355,6 +375,9 @@ public Builder copy(DataSource model) { if (model.wasPropertyExplicitlySet("dataSourceConfig")) { this.dataSourceConfig(model.getDataSourceConfig()); } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -468,6 +491,20 @@ public DataSourceConfig getDataSourceConfig() { return dataSourceConfig; } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + /** * The date and time the data source was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). *

@@ -677,6 +714,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", knowledgeBaseId=").append(String.valueOf(this.knowledgeBaseId)); sb.append(", dataSourceConfig=").append(String.valueOf(this.dataSourceConfig)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); @@ -704,6 +742,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.knowledgeBaseId, other.knowledgeBaseId) && java.util.Objects.equals(this.dataSourceConfig, other.dataSourceConfig) + && java.util.Objects.equals(this.metadata, other.metadata) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) @@ -730,6 +769,7 @@ public int hashCode() { result = (result * PRIME) + (this.dataSourceConfig == null ? 43 : this.dataSourceConfig.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); result = diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Function.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Function.java new file mode 100644 index 0000000000..a61654710f --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Function.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Details of Function for Function calling tool. + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Function.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Function extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "description", "parameters"}) + public Function(String name, String description, java.util.Map parameters) { + super(); + this.name = name; + this.description = description; + this.parameters = parameters; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the function to invoke. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the function to invoke. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * A description of the function. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description of the function. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The parameters the function accepts, defined using a JSON Schema object. + * Refer to the guide for examples and the JSON Schema documentation for details on the format. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parameters") + private java.util.Map parameters; + + /** + * The parameters the function accepts, defined using a JSON Schema object. + * Refer to the guide for examples and the JSON Schema documentation for details on the format. + * + * @param parameters the value to set + * @return this builder + **/ + public Builder parameters(java.util.Map parameters) { + this.parameters = parameters; + this.__explicitlySet__.add("parameters"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Function build() { + Function model = new Function(this.name, this.description, this.parameters); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Function model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("parameters")) { + this.parameters(model.getParameters()); + } + 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 function to invoke. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the function to invoke. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * A description of the function. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description of the function. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The parameters the function accepts, defined using a JSON Schema object. + * Refer to the guide for examples and the JSON Schema documentation for details on the format. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parameters") + private final java.util.Map parameters; + + /** + * The parameters the function accepts, defined using a JSON Schema object. + * Refer to the guide for examples and the JSON Schema documentation for details on the format. + * + * @return the value + **/ + public java.util.Map getParameters() { + return parameters; + } + + @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("Function("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", parameters=").append(String.valueOf(this.parameters)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Function)) { + return false; + } + + Function other = (Function) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.parameters, other.parameters) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.parameters == null ? 43 : this.parameters.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/FunctionCallingToolConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/FunctionCallingToolConfig.java new file mode 100644 index 0000000000..50b9c150ac --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/FunctionCallingToolConfig.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The configuration for Function calling Tool. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FunctionCallingToolConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "toolConfigType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FunctionCallingToolConfig extends ToolConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("function") + private Function function; + + public Builder function(Function function) { + this.function = function; + this.__explicitlySet__.add("function"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FunctionCallingToolConfig build() { + FunctionCallingToolConfig model = new FunctionCallingToolConfig(this.function); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FunctionCallingToolConfig model) { + if (model.wasPropertyExplicitlySet("function")) { + this.function(model.getFunction()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public FunctionCallingToolConfig(Function function) { + super(); + this.function = function; + } + + @com.fasterxml.jackson.annotation.JsonProperty("function") + private final Function function; + + public Function getFunction() { + return function; + } + + @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("FunctionCallingToolConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", function=").append(String.valueOf(this.function)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FunctionCallingToolConfig)) { + return false; + } + + FunctionCallingToolConfig other = (FunctionCallingToolConfig) o; + return java.util.Objects.equals(this.function, other.function) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.function == null ? 43 : this.function.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/GuardrailConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/GuardrailConfig.java new file mode 100644 index 0000000000..05e771b49b --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/GuardrailConfig.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The configuration details about whether to apply the guardrail checks to input and output. + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = GuardrailConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GuardrailConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "contentModerationConfig", + "promptInjectionConfig", + "personallyIdentifiableInformationConfig" + }) + public GuardrailConfig( + ContentModerationGuardrailConfig contentModerationConfig, + PromptInjectionGuardrailConfig promptInjectionConfig, + PersonallyIdentifiableInformationGuardrailConfig + personallyIdentifiableInformationConfig) { + super(); + this.contentModerationConfig = contentModerationConfig; + this.promptInjectionConfig = promptInjectionConfig; + this.personallyIdentifiableInformationConfig = personallyIdentifiableInformationConfig; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("contentModerationConfig") + private ContentModerationGuardrailConfig contentModerationConfig; + + public Builder contentModerationConfig( + ContentModerationGuardrailConfig contentModerationConfig) { + this.contentModerationConfig = contentModerationConfig; + this.__explicitlySet__.add("contentModerationConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("promptInjectionConfig") + private PromptInjectionGuardrailConfig promptInjectionConfig; + + public Builder promptInjectionConfig(PromptInjectionGuardrailConfig promptInjectionConfig) { + this.promptInjectionConfig = promptInjectionConfig; + this.__explicitlySet__.add("promptInjectionConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("personallyIdentifiableInformationConfig") + private PersonallyIdentifiableInformationGuardrailConfig + personallyIdentifiableInformationConfig; + + public Builder personallyIdentifiableInformationConfig( + PersonallyIdentifiableInformationGuardrailConfig + personallyIdentifiableInformationConfig) { + this.personallyIdentifiableInformationConfig = personallyIdentifiableInformationConfig; + this.__explicitlySet__.add("personallyIdentifiableInformationConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GuardrailConfig build() { + GuardrailConfig model = + new GuardrailConfig( + this.contentModerationConfig, + this.promptInjectionConfig, + this.personallyIdentifiableInformationConfig); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GuardrailConfig model) { + if (model.wasPropertyExplicitlySet("contentModerationConfig")) { + this.contentModerationConfig(model.getContentModerationConfig()); + } + if (model.wasPropertyExplicitlySet("promptInjectionConfig")) { + this.promptInjectionConfig(model.getPromptInjectionConfig()); + } + if (model.wasPropertyExplicitlySet("personallyIdentifiableInformationConfig")) { + this.personallyIdentifiableInformationConfig( + model.getPersonallyIdentifiableInformationConfig()); + } + 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("contentModerationConfig") + private final ContentModerationGuardrailConfig contentModerationConfig; + + public ContentModerationGuardrailConfig getContentModerationConfig() { + return contentModerationConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("promptInjectionConfig") + private final PromptInjectionGuardrailConfig promptInjectionConfig; + + public PromptInjectionGuardrailConfig getPromptInjectionConfig() { + return promptInjectionConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("personallyIdentifiableInformationConfig") + private final PersonallyIdentifiableInformationGuardrailConfig + personallyIdentifiableInformationConfig; + + public PersonallyIdentifiableInformationGuardrailConfig + getPersonallyIdentifiableInformationConfig() { + return personallyIdentifiableInformationConfig; + } + + @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("GuardrailConfig("); + sb.append("super=").append(super.toString()); + sb.append("contentModerationConfig=").append(String.valueOf(this.contentModerationConfig)); + sb.append(", promptInjectionConfig=").append(String.valueOf(this.promptInjectionConfig)); + sb.append(", personallyIdentifiableInformationConfig=") + .append(String.valueOf(this.personallyIdentifiableInformationConfig)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GuardrailConfig)) { + return false; + } + + GuardrailConfig other = (GuardrailConfig) o; + return java.util.Objects.equals(this.contentModerationConfig, other.contentModerationConfig) + && java.util.Objects.equals(this.promptInjectionConfig, other.promptInjectionConfig) + && java.util.Objects.equals( + this.personallyIdentifiableInformationConfig, + other.personallyIdentifiableInformationConfig) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.contentModerationConfig == null + ? 43 + : this.contentModerationConfig.hashCode()); + result = + (result * PRIME) + + (this.promptInjectionConfig == null + ? 43 + : this.promptInjectionConfig.hashCode()); + result = + (result * PRIME) + + (this.personallyIdentifiableInformationConfig == null + ? 43 + : this.personallyIdentifiableInformationConfig.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/GuardrailMode.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/GuardrailMode.java new file mode 100644 index 0000000000..f4f13da209 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/GuardrailMode.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Configuration setting applied to determine the guardrail mode for input or output. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public enum GuardrailMode { + Disable("DISABLE"), + Block("BLOCK"), + Inform("INFORM"), + + /** + * 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(GuardrailMode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (GuardrailMode v : GuardrailMode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + GuardrailMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static GuardrailMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'GuardrailMode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointAuthConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointAuthConfig.java new file mode 100644 index 0000000000..5201949b1c --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointAuthConfig.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Auth related information to be used when invoking external endpoint + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "httpEndpointAuthConfigType", + defaultImpl = HttpEndpointAuthConfig.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HttpEndpointIdcsAuthConfig.class, + name = "HTTP_ENDPOINT_IDCS_AUTH_CONFIG" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HttpEndpointDelegatedBearerAuthConfig.class, + name = "HTTP_ENDPOINT_DELEGATED_BEARER_AUTH_CONFIG" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HttpEndpointNoAuthConfig.class, + name = "HTTP_ENDPOINT_NO_AUTH_CONFIG" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HttpEndpointOciResourcePrincipalAuthConfig.class, + name = "HTTP_ENDPOINT_OCI_RESOURCE_PRINCIPAL_AUTH_CONFIG" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class HttpEndpointAuthConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected HttpEndpointAuthConfig() { + 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("HttpEndpointAuthConfig("); + 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 HttpEndpointAuthConfig)) { + return false; + } + + HttpEndpointAuthConfig other = (HttpEndpointAuthConfig) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The type of Auth config to be used when invoking an external endpoint. + * The allowed values are: + * - {@code HTTP_ENDPOINT_NO_AUTH_CONFIG}: Indicates that no authentication is required for invoking the endpoint. + * - {@code HTTP_ENDPOINT_DELEGATED_BEARER_AUTH_CONFIG}: Specifies Bearer Token Authentication, where the same Bearer token received as part of the Agent Chat + * API request is used to invoke the external endpoint. + * - {@code HTTP_ENDPOINT_OCI_RESOURCE_PRINCIPAL_AUTH_CONFIG}: Specifies authentication using Oracle Cloud Infrastructure (OCI) Resource Principal, leveraging + * OCI's identity-based authentication mechanism. + * - {@code HTTP_ENDPOINT_IDCS_AUTH_CONFIG}: Specifies authentication using Oracle Identity Cloud Service (IDCS), leveraging OAuth 2.0 for token-based authentication. + * + **/ + public enum HttpEndpointAuthConfigType { + HttpEndpointNoAuthConfig("HTTP_ENDPOINT_NO_AUTH_CONFIG"), + HttpEndpointDelegatedBearerAuthConfig("HTTP_ENDPOINT_DELEGATED_BEARER_AUTH_CONFIG"), + HttpEndpointOciResourcePrincipalAuthConfig( + "HTTP_ENDPOINT_OCI_RESOURCE_PRINCIPAL_AUTH_CONFIG"), + HttpEndpointIdcsAuthConfig("HTTP_ENDPOINT_IDCS_AUTH_CONFIG"), + + /** + * 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(HttpEndpointAuthConfigType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (HttpEndpointAuthConfigType v : HttpEndpointAuthConfigType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + HttpEndpointAuthConfigType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static HttpEndpointAuthConfigType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'HttpEndpointAuthConfigType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointDelegatedBearerAuthConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointDelegatedBearerAuthConfig.java new file mode 100644 index 0000000000..30175f9f4f --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointDelegatedBearerAuthConfig.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Specifies Bearer Token Authentication, where the same Bearer token received as part of the Agent Chat API request is used to invoke + * the external endpoint. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = HttpEndpointDelegatedBearerAuthConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "httpEndpointAuthConfigType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HttpEndpointDelegatedBearerAuthConfig extends HttpEndpointAuthConfig { + @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 HttpEndpointDelegatedBearerAuthConfig build() { + HttpEndpointDelegatedBearerAuthConfig model = + new HttpEndpointDelegatedBearerAuthConfig(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HttpEndpointDelegatedBearerAuthConfig model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HttpEndpointDelegatedBearerAuthConfig() { + 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("HttpEndpointDelegatedBearerAuthConfig("); + 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 HttpEndpointDelegatedBearerAuthConfig)) { + return false; + } + + HttpEndpointDelegatedBearerAuthConfig other = (HttpEndpointDelegatedBearerAuthConfig) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointIdcsAuthConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointIdcsAuthConfig.java new file mode 100644 index 0000000000..3ddd8ce760 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointIdcsAuthConfig.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Specifies authentication using Oracle Identity Cloud Service (IDCS), leveraging OAuth 2.0 for token-based authentication. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = HttpEndpointIdcsAuthConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "httpEndpointAuthConfigType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HttpEndpointIdcsAuthConfig extends HttpEndpointAuthConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("idcsSecret") + private IdcsSecret idcsSecret; + + public Builder idcsSecret(IdcsSecret idcsSecret) { + this.idcsSecret = idcsSecret; + this.__explicitlySet__.add("idcsSecret"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HttpEndpointIdcsAuthConfig build() { + HttpEndpointIdcsAuthConfig model = new HttpEndpointIdcsAuthConfig(this.idcsSecret); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HttpEndpointIdcsAuthConfig model) { + if (model.wasPropertyExplicitlySet("idcsSecret")) { + this.idcsSecret(model.getIdcsSecret()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HttpEndpointIdcsAuthConfig(IdcsSecret idcsSecret) { + super(); + this.idcsSecret = idcsSecret; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsSecret") + private final IdcsSecret idcsSecret; + + public IdcsSecret getIdcsSecret() { + return idcsSecret; + } + + @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("HttpEndpointIdcsAuthConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", idcsSecret=").append(String.valueOf(this.idcsSecret)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HttpEndpointIdcsAuthConfig)) { + return false; + } + + HttpEndpointIdcsAuthConfig other = (HttpEndpointIdcsAuthConfig) o; + return java.util.Objects.equals(this.idcsSecret, other.idcsSecret) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.idcsSecret == null ? 43 : this.idcsSecret.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointNoAuthConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointNoAuthConfig.java new file mode 100644 index 0000000000..f53aebbfaa --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointNoAuthConfig.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Indicates that no authentication is required for invoking the endpoint. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = HttpEndpointNoAuthConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "httpEndpointAuthConfigType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HttpEndpointNoAuthConfig extends HttpEndpointAuthConfig { + @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 HttpEndpointNoAuthConfig build() { + HttpEndpointNoAuthConfig model = new HttpEndpointNoAuthConfig(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HttpEndpointNoAuthConfig model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HttpEndpointNoAuthConfig() { + 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("HttpEndpointNoAuthConfig("); + 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 HttpEndpointNoAuthConfig)) { + return false; + } + + HttpEndpointNoAuthConfig other = (HttpEndpointNoAuthConfig) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointOciResourcePrincipalAuthConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointOciResourcePrincipalAuthConfig.java new file mode 100644 index 0000000000..f3799629a5 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointOciResourcePrincipalAuthConfig.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Specifies authentication using Oracle Cloud Infrastructure (OCI) Resource Principal, leveraging OCI's identity-based authentication mechanism. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = HttpEndpointOciResourcePrincipalAuthConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "httpEndpointAuthConfigType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HttpEndpointOciResourcePrincipalAuthConfig extends HttpEndpointAuthConfig { + @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 HttpEndpointOciResourcePrincipalAuthConfig build() { + HttpEndpointOciResourcePrincipalAuthConfig model = + new HttpEndpointOciResourcePrincipalAuthConfig(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HttpEndpointOciResourcePrincipalAuthConfig model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HttpEndpointOciResourcePrincipalAuthConfig() { + 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("HttpEndpointOciResourcePrincipalAuthConfig("); + 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 HttpEndpointOciResourcePrincipalAuthConfig)) { + return false; + } + + HttpEndpointOciResourcePrincipalAuthConfig other = + (HttpEndpointOciResourcePrincipalAuthConfig) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointToolConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointToolConfig.java new file mode 100644 index 0000000000..bf7a8c6b93 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HttpEndpointToolConfig.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The configuration for HTTP endpoint Tool. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = HttpEndpointToolConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "toolConfigType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HttpEndpointToolConfig extends ToolConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("apiSchema") + private ApiSchemaInputLocation apiSchema; + + public Builder apiSchema(ApiSchemaInputLocation apiSchema) { + this.apiSchema = apiSchema; + this.__explicitlySet__.add("apiSchema"); + return this; + } + /** + * The subnet ID from agent developer tenancy through which the egress is going to be routed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The subnet ID from agent developer tenancy through which the egress is going to be routed. + * @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.JsonProperty("httpEndpointAuthConfig") + private HttpEndpointAuthConfig httpEndpointAuthConfig; + + public Builder httpEndpointAuthConfig(HttpEndpointAuthConfig httpEndpointAuthConfig) { + this.httpEndpointAuthConfig = httpEndpointAuthConfig; + this.__explicitlySet__.add("httpEndpointAuthConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HttpEndpointToolConfig build() { + HttpEndpointToolConfig model = + new HttpEndpointToolConfig( + this.apiSchema, this.subnetId, this.httpEndpointAuthConfig); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HttpEndpointToolConfig model) { + if (model.wasPropertyExplicitlySet("apiSchema")) { + this.apiSchema(model.getApiSchema()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("httpEndpointAuthConfig")) { + this.httpEndpointAuthConfig(model.getHttpEndpointAuthConfig()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HttpEndpointToolConfig( + ApiSchemaInputLocation apiSchema, + String subnetId, + HttpEndpointAuthConfig httpEndpointAuthConfig) { + super(); + this.apiSchema = apiSchema; + this.subnetId = subnetId; + this.httpEndpointAuthConfig = httpEndpointAuthConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("apiSchema") + private final ApiSchemaInputLocation apiSchema; + + public ApiSchemaInputLocation getApiSchema() { + return apiSchema; + } + + /** + * The subnet ID from agent developer tenancy through which the egress is going to be routed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The subnet ID from agent developer tenancy through which the egress is going to be routed. + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("httpEndpointAuthConfig") + private final HttpEndpointAuthConfig httpEndpointAuthConfig; + + public HttpEndpointAuthConfig getHttpEndpointAuthConfig() { + return httpEndpointAuthConfig; + } + + @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("HttpEndpointToolConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", apiSchema=").append(String.valueOf(this.apiSchema)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", httpEndpointAuthConfig=").append(String.valueOf(this.httpEndpointAuthConfig)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HttpEndpointToolConfig)) { + return false; + } + + HttpEndpointToolConfig other = (HttpEndpointToolConfig) o; + return java.util.Objects.equals(this.apiSchema, other.apiSchema) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals( + this.httpEndpointAuthConfig, other.httpEndpointAuthConfig) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.apiSchema == null ? 43 : this.apiSchema.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = + (result * PRIME) + + (this.httpEndpointAuthConfig == null + ? 43 + : this.httpEndpointAuthConfig.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HumanInputConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HumanInputConfig.java new file mode 100644 index 0000000000..6be57a3681 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/HumanInputConfig.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Human Input Configuration for an AgentEndpoint. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = HumanInputConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HumanInputConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"shouldEnableHumanInput"}) + public HumanInputConfig(Boolean shouldEnableHumanInput) { + super(); + this.shouldEnableHumanInput = shouldEnableHumanInput; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The Agent will request for human input for disambiguation or additional information gathering if this is enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableHumanInput") + private Boolean shouldEnableHumanInput; + + /** + * The Agent will request for human input for disambiguation or additional information gathering if this is enabled. + * @param shouldEnableHumanInput the value to set + * @return this builder + **/ + public Builder shouldEnableHumanInput(Boolean shouldEnableHumanInput) { + this.shouldEnableHumanInput = shouldEnableHumanInput; + this.__explicitlySet__.add("shouldEnableHumanInput"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HumanInputConfig build() { + HumanInputConfig model = new HumanInputConfig(this.shouldEnableHumanInput); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HumanInputConfig model) { + if (model.wasPropertyExplicitlySet("shouldEnableHumanInput")) { + this.shouldEnableHumanInput(model.getShouldEnableHumanInput()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The Agent will request for human input for disambiguation or additional information gathering if this is enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableHumanInput") + private final Boolean shouldEnableHumanInput; + + /** + * The Agent will request for human input for disambiguation or additional information gathering if this is enabled. + * @return the value + **/ + public Boolean getShouldEnableHumanInput() { + return shouldEnableHumanInput; + } + + @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("HumanInputConfig("); + sb.append("super=").append(super.toString()); + sb.append("shouldEnableHumanInput=").append(String.valueOf(this.shouldEnableHumanInput)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HumanInputConfig)) { + return false; + } + + HumanInputConfig other = (HumanInputConfig) o; + return java.util.Objects.equals(this.shouldEnableHumanInput, other.shouldEnableHumanInput) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.shouldEnableHumanInput == null + ? 43 + : this.shouldEnableHumanInput.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/InlineInputLocation.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/InlineInputLocation.java new file mode 100644 index 0000000000..e002f5acc9 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/InlineInputLocation.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The details of inline input location. + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = InlineInputLocation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "inputLocationType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InlineInputLocation extends InputLocation { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Inline content as input. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("content") + private String content; + + /** + * Inline content as input. + * @param content the value to set + * @return this builder + **/ + public Builder content(String content) { + this.content = content; + this.__explicitlySet__.add("content"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public InlineInputLocation build() { + InlineInputLocation model = new InlineInputLocation(this.content); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InlineInputLocation model) { + if (model.wasPropertyExplicitlySet("content")) { + this.content(model.getContent()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public InlineInputLocation(String content) { + super(); + this.content = content; + } + + /** + * Inline content as input. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("content") + private final String content; + + /** + * Inline content as input. + * @return the value + **/ + public String getContent() { + return content; + } + + @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("InlineInputLocation("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", content=").append(String.valueOf(this.content)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InlineInputLocation)) { + return false; + } + + InlineInputLocation other = (InlineInputLocation) o; + return java.util.Objects.equals(this.content, other.content) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.content == null ? 43 : this.content.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/InputLocation.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/InputLocation.java new file mode 100644 index 0000000000..d913ff48d9 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/InputLocation.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The input location 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: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "inputLocationType", + defaultImpl = InputLocation.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ObjectStorageInputLocation.class, + name = "OBJECT_STORAGE_PREFIX" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = InlineInputLocation.class, + name = "INLINE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class InputLocation extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected InputLocation() { + 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("InputLocation("); + 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 InputLocation)) { + return false; + } + + InputLocation other = (InputLocation) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Type of InputLocation. + * The allowed values are: + * - {@code INLINE}: The input location is inline. + * - {@code OBJECT_STORAGE_PREFIX}: The input location is object storage. + * + **/ + public enum InputLocationType { + Inline("INLINE"), + ObjectStoragePrefix("OBJECT_STORAGE_PREFIX"), + + /** + * 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(InputLocationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (InputLocationType v : InputLocationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + InputLocationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static InputLocationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'InputLocationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseConfig.java new file mode 100644 index 0000000000..acb05a4158 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseConfig.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The KnowledgeBase configuration this RAG Tool uses. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = KnowledgeBaseConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class KnowledgeBaseConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"knowledgeBaseId"}) + public KnowledgeBaseConfig(String knowledgeBaseId) { + super(); + this.knowledgeBaseId = knowledgeBaseId; + } + + @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 knowledgeBase this RAG Tool uses + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseId") + private String knowledgeBaseId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBase this RAG Tool uses + * @param knowledgeBaseId the value to set + * @return this builder + **/ + public Builder knowledgeBaseId(String knowledgeBaseId) { + this.knowledgeBaseId = knowledgeBaseId; + this.__explicitlySet__.add("knowledgeBaseId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public KnowledgeBaseConfig build() { + KnowledgeBaseConfig model = new KnowledgeBaseConfig(this.knowledgeBaseId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(KnowledgeBaseConfig model) { + if (model.wasPropertyExplicitlySet("knowledgeBaseId")) { + this.knowledgeBaseId(model.getKnowledgeBaseId()); + } + 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 knowledgeBase this RAG Tool uses + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseId") + private final String knowledgeBaseId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBase this RAG Tool uses + * @return the value + **/ + public String getKnowledgeBaseId() { + return knowledgeBaseId; + } + + @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("KnowledgeBaseConfig("); + sb.append("super=").append(super.toString()); + sb.append("knowledgeBaseId=").append(String.valueOf(this.knowledgeBaseId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof KnowledgeBaseConfig)) { + return false; + } + + KnowledgeBaseConfig other = (KnowledgeBaseConfig) o; + return java.util.Objects.equals(this.knowledgeBaseId, other.knowledgeBaseId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.knowledgeBaseId == null ? 43 : this.knowledgeBaseId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseStatistics.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseStatistics.java index 5110251446..367aaefcb4 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseStatistics.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseStatistics.java @@ -23,7 +23,7 @@ public final class KnowledgeBaseStatistics extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({"sizeInBytes"}) - public KnowledgeBaseStatistics(Integer sizeInBytes) { + public KnowledgeBaseStatistics(Long sizeInBytes) { super(); this.sizeInBytes = sizeInBytes; } @@ -34,14 +34,14 @@ public static class Builder { * Knowledge Base size in bytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("sizeInBytes") - private Integer sizeInBytes; + private Long sizeInBytes; /** * Knowledge Base size in bytes. * @param sizeInBytes the value to set * @return this builder **/ - public Builder sizeInBytes(Integer sizeInBytes) { + public Builder sizeInBytes(Long sizeInBytes) { this.sizeInBytes = sizeInBytes; this.__explicitlySet__.add("sizeInBytes"); return this; @@ -82,13 +82,13 @@ public Builder toBuilder() { * Knowledge Base size in bytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("sizeInBytes") - private final Integer sizeInBytes; + private final Long sizeInBytes; /** * Knowledge Base size in bytes. * @return the value **/ - public Integer getSizeInBytes() { + public Long getSizeInBytes() { return sizeInBytes; } diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/LlmConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/LlmConfig.java new file mode 100644 index 0000000000..8a66523c78 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/LlmConfig.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Configuration to Agent LLM. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = LlmConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class LlmConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"routingLlmCustomization"}) + public LlmConfig(LlmCustomization routingLlmCustomization) { + super(); + this.routingLlmCustomization = routingLlmCustomization; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("routingLlmCustomization") + private LlmCustomization routingLlmCustomization; + + public Builder routingLlmCustomization(LlmCustomization routingLlmCustomization) { + this.routingLlmCustomization = routingLlmCustomization; + this.__explicitlySet__.add("routingLlmCustomization"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public LlmConfig build() { + LlmConfig model = new LlmConfig(this.routingLlmCustomization); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(LlmConfig model) { + if (model.wasPropertyExplicitlySet("routingLlmCustomization")) { + this.routingLlmCustomization(model.getRoutingLlmCustomization()); + } + 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("routingLlmCustomization") + private final LlmCustomization routingLlmCustomization; + + public LlmCustomization getRoutingLlmCustomization() { + return routingLlmCustomization; + } + + @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("LlmConfig("); + sb.append("super=").append(super.toString()); + sb.append("routingLlmCustomization=").append(String.valueOf(this.routingLlmCustomization)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof LlmConfig)) { + return false; + } + + LlmConfig other = (LlmConfig) o; + return java.util.Objects.equals(this.routingLlmCustomization, other.routingLlmCustomization) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.routingLlmCustomization == null + ? 43 + : this.routingLlmCustomization.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/LlmCustomization.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/LlmCustomization.java new file mode 100644 index 0000000000..a6a6c8c827 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/LlmCustomization.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Configuration to customize LLM. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = LlmCustomization.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class LlmCustomization extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"instruction"}) + public LlmCustomization(String instruction) { + super(); + this.instruction = instruction; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * If specified, the default instruction is replaced with provided instruction. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instruction") + private String instruction; + + /** + * If specified, the default instruction is replaced with provided instruction. + * @param instruction the value to set + * @return this builder + **/ + public Builder instruction(String instruction) { + this.instruction = instruction; + this.__explicitlySet__.add("instruction"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public LlmCustomization build() { + LlmCustomization model = new LlmCustomization(this.instruction); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(LlmCustomization model) { + if (model.wasPropertyExplicitlySet("instruction")) { + this.instruction(model.getInstruction()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * If specified, the default instruction is replaced with provided instruction. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instruction") + private final String instruction; + + /** + * If specified, the default instruction is replaced with provided instruction. + * @return the value + **/ + public String getInstruction() { + return instruction; + } + + @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("LlmCustomization("); + sb.append("super=").append(super.toString()); + sb.append("instruction=").append(String.valueOf(this.instruction)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof LlmCustomization)) { + return false; + } + + LlmCustomization other = (LlmCustomization) o; + return java.util.Objects.equals(this.instruction, other.instruction) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.instruction == null ? 43 : this.instruction.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStorageInputLocation.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStorageInputLocation.java new file mode 100644 index 0000000000..c07960564b --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStorageInputLocation.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The details of OCI Object Storage object. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ObjectStorageInputLocation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "inputLocationType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ObjectStorageInputLocation extends InputLocation { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The namespace name of an object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private String namespaceName; + + /** + * The namespace name of an object. + * @param namespaceName the value to set + * @return this builder + **/ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + this.__explicitlySet__.add("namespaceName"); + return this; + } + /** + * The bucket name of an object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * The bucket name of an object. + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + /** + * The prefix of file object(s) or folder prefix. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * The prefix of file object(s) or folder prefix. + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ObjectStorageInputLocation build() { + ObjectStorageInputLocation model = + new ObjectStorageInputLocation( + this.namespaceName, this.bucketName, this.prefix); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ObjectStorageInputLocation model) { + if (model.wasPropertyExplicitlySet("namespaceName")) { + this.namespaceName(model.getNamespaceName()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ObjectStorageInputLocation(String namespaceName, String bucketName, String prefix) { + super(); + this.namespaceName = namespaceName; + this.bucketName = bucketName; + this.prefix = prefix; + } + + /** + * The namespace name of an object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private final String namespaceName; + + /** + * The namespace name of an object. + * @return the value + **/ + public String getNamespaceName() { + return namespaceName; + } + + /** + * The bucket name of an object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * The bucket name of an object. + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + /** + * The prefix of file object(s) or folder prefix. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * The prefix of file object(s) or folder prefix. + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + @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("ObjectStorageInputLocation("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ObjectStorageInputLocation)) { + return false; + } + + ObjectStorageInputLocation other = (ObjectStorageInputLocation) o; + return java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && java.util.Objects.equals(this.prefix, other.prefix) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + result = (result * PRIME) + (this.prefix == null ? 43 : this.prefix.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStoragePrefix.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStoragePrefix.java index dd7c97ffb5..b1579438d8 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStoragePrefix.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStoragePrefix.java @@ -65,13 +65,13 @@ public Builder bucketName(String bucketName) { return this; } /** - * The name of the object (file) or prefix (folder). + * The prefix of file object(s) or folder prefix. **/ @com.fasterxml.jackson.annotation.JsonProperty("prefix") private String prefix; /** - * The name of the object (file) or prefix (folder). + * The prefix of file object(s) or folder prefix. * @param prefix the value to set * @return this builder **/ @@ -148,13 +148,13 @@ public String getBucketName() { } /** - * The name of the object (file) or prefix (folder). + * The prefix of file object(s) or folder prefix. **/ @com.fasterxml.jackson.annotation.JsonProperty("prefix") private final String prefix; /** - * The name of the object (file) or prefix (folder). + * The prefix of file object(s) or folder prefix. * @return the value **/ public String getPrefix() { diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStoragePrefixOutputLocation.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStoragePrefixOutputLocation.java new file mode 100644 index 0000000000..897dae54cc --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStoragePrefixOutputLocation.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The config of object storage. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ObjectStoragePrefixOutputLocation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "outputLocationType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ObjectStoragePrefixOutputLocation extends OutputLocation { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The namespace of the object storage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private String namespaceName; + + /** + * The namespace of the object storage. + * @param namespaceName the value to set + * @return this builder + **/ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + this.__explicitlySet__.add("namespaceName"); + return this; + } + /** + * The name of the bucket. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * The name of the bucket. + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + /** + * The prefix of the object storage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * The prefix of the object storage. + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ObjectStoragePrefixOutputLocation build() { + ObjectStoragePrefixOutputLocation model = + new ObjectStoragePrefixOutputLocation( + this.namespaceName, this.bucketName, this.prefix); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ObjectStoragePrefixOutputLocation model) { + if (model.wasPropertyExplicitlySet("namespaceName")) { + this.namespaceName(model.getNamespaceName()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ObjectStoragePrefixOutputLocation( + String namespaceName, String bucketName, String prefix) { + super(); + this.namespaceName = namespaceName; + this.bucketName = bucketName; + this.prefix = prefix; + } + + /** + * The namespace of the object storage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private final String namespaceName; + + /** + * The namespace of the object storage. + * @return the value + **/ + public String getNamespaceName() { + return namespaceName; + } + + /** + * The name of the bucket. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * The name of the bucket. + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + /** + * The prefix of the object storage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * The prefix of the object storage. + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + @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("ObjectStoragePrefixOutputLocation("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ObjectStoragePrefixOutputLocation)) { + return false; + } + + ObjectStoragePrefixOutputLocation other = (ObjectStoragePrefixOutputLocation) o; + return java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && java.util.Objects.equals(this.prefix, other.prefix) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + result = (result * PRIME) + (this.prefix == null ? 43 : this.prefix.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OperationType.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OperationType.java index 162d49ad36..ac46621ca3 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OperationType.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OperationType.java @@ -29,6 +29,10 @@ public enum OperationType { CreateTool("CREATE_TOOL"), UpdateTool("UPDATE_TOOL"), DeleteTool("DELETE_TOOL"), + CreateProvisionedCapacity("CREATE_PROVISIONED_CAPACITY"), + UpdateProvisionedCapacity("UPDATE_PROVISIONED_CAPACITY"), + DeleteProvisionedCapacity("DELETE_PROVISIONED_CAPACITY"), + MoveProvisionedCapacity("MOVE_PROVISIONED_CAPACITY"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OutputConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OutputConfig.java new file mode 100644 index 0000000000..ee606ceb10 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OutputConfig.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Configuration to store results generated by agent. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = OutputConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OutputConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"outputLocation", "retentionPeriodInMinutes"}) + public OutputConfig(OutputLocation outputLocation, Integer retentionPeriodInMinutes) { + super(); + this.outputLocation = outputLocation; + this.retentionPeriodInMinutes = retentionPeriodInMinutes; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("outputLocation") + private OutputLocation outputLocation; + + public Builder outputLocation(OutputLocation outputLocation) { + this.outputLocation = outputLocation; + this.__explicitlySet__.add("outputLocation"); + return this; + } + /** + * Retention duration of the output data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInMinutes") + private Integer retentionPeriodInMinutes; + + /** + * Retention duration of the output data. + * @param retentionPeriodInMinutes the value to set + * @return this builder + **/ + public Builder retentionPeriodInMinutes(Integer retentionPeriodInMinutes) { + this.retentionPeriodInMinutes = retentionPeriodInMinutes; + this.__explicitlySet__.add("retentionPeriodInMinutes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OutputConfig build() { + OutputConfig model = + new OutputConfig(this.outputLocation, this.retentionPeriodInMinutes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OutputConfig model) { + if (model.wasPropertyExplicitlySet("outputLocation")) { + this.outputLocation(model.getOutputLocation()); + } + if (model.wasPropertyExplicitlySet("retentionPeriodInMinutes")) { + this.retentionPeriodInMinutes(model.getRetentionPeriodInMinutes()); + } + 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("outputLocation") + private final OutputLocation outputLocation; + + public OutputLocation getOutputLocation() { + return outputLocation; + } + + /** + * Retention duration of the output data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodInMinutes") + private final Integer retentionPeriodInMinutes; + + /** + * Retention duration of the output data. + * @return the value + **/ + public Integer getRetentionPeriodInMinutes() { + return retentionPeriodInMinutes; + } + + @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("OutputConfig("); + sb.append("super=").append(super.toString()); + sb.append("outputLocation=").append(String.valueOf(this.outputLocation)); + sb.append(", retentionPeriodInMinutes=") + .append(String.valueOf(this.retentionPeriodInMinutes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OutputConfig)) { + return false; + } + + OutputConfig other = (OutputConfig) o; + return java.util.Objects.equals(this.outputLocation, other.outputLocation) + && java.util.Objects.equals( + this.retentionPeriodInMinutes, other.retentionPeriodInMinutes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.outputLocation == null ? 43 : this.outputLocation.hashCode()); + result = + (result * PRIME) + + (this.retentionPeriodInMinutes == null + ? 43 + : this.retentionPeriodInMinutes.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OutputLocation.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OutputLocation.java new file mode 100644 index 0000000000..baf071750c --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OutputLocation.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Location of the output. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "outputLocationType", + defaultImpl = OutputLocation.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ObjectStoragePrefixOutputLocation.class, + name = "OBJECT_STORAGE_PREFIX" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class OutputLocation extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected OutputLocation() { + 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("OutputLocation("); + 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 OutputLocation)) { + return false; + } + + OutputLocation other = (OutputLocation) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Type of OutputLocation. + **/ + public enum OutputLocationType { + ObjectStoragePrefix("OBJECT_STORAGE_PREFIX"), + + /** + * 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(OutputLocationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OutputLocationType v : OutputLocationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OutputLocationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OutputLocationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OutputLocationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/PersonallyIdentifiableInformationGuardrailConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/PersonallyIdentifiableInformationGuardrailConfig.java new file mode 100644 index 0000000000..b611b5a204 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/PersonallyIdentifiableInformationGuardrailConfig.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The configuration details for Personally Identifiable Information. + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PersonallyIdentifiableInformationGuardrailConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PersonallyIdentifiableInformationGuardrailConfig + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"inputGuardrailMode", "outputGuardrailMode"}) + public PersonallyIdentifiableInformationGuardrailConfig( + GuardrailMode inputGuardrailMode, GuardrailMode outputGuardrailMode) { + super(); + this.inputGuardrailMode = inputGuardrailMode; + this.outputGuardrailMode = outputGuardrailMode; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An input guardrail mode for personally identifiable information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inputGuardrailMode") + private GuardrailMode inputGuardrailMode; + + /** + * An input guardrail mode for personally identifiable information. + * @param inputGuardrailMode the value to set + * @return this builder + **/ + public Builder inputGuardrailMode(GuardrailMode inputGuardrailMode) { + this.inputGuardrailMode = inputGuardrailMode; + this.__explicitlySet__.add("inputGuardrailMode"); + return this; + } + /** + * An output guardrail mode for personally identifiable information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("outputGuardrailMode") + private GuardrailMode outputGuardrailMode; + + /** + * An output guardrail mode for personally identifiable information. + * @param outputGuardrailMode the value to set + * @return this builder + **/ + public Builder outputGuardrailMode(GuardrailMode outputGuardrailMode) { + this.outputGuardrailMode = outputGuardrailMode; + this.__explicitlySet__.add("outputGuardrailMode"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PersonallyIdentifiableInformationGuardrailConfig build() { + PersonallyIdentifiableInformationGuardrailConfig model = + new PersonallyIdentifiableInformationGuardrailConfig( + this.inputGuardrailMode, this.outputGuardrailMode); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PersonallyIdentifiableInformationGuardrailConfig model) { + if (model.wasPropertyExplicitlySet("inputGuardrailMode")) { + this.inputGuardrailMode(model.getInputGuardrailMode()); + } + if (model.wasPropertyExplicitlySet("outputGuardrailMode")) { + this.outputGuardrailMode(model.getOutputGuardrailMode()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * An input guardrail mode for personally identifiable information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inputGuardrailMode") + private final GuardrailMode inputGuardrailMode; + + /** + * An input guardrail mode for personally identifiable information. + * @return the value + **/ + public GuardrailMode getInputGuardrailMode() { + return inputGuardrailMode; + } + + /** + * An output guardrail mode for personally identifiable information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("outputGuardrailMode") + private final GuardrailMode outputGuardrailMode; + + /** + * An output guardrail mode for personally identifiable information. + * @return the value + **/ + public GuardrailMode getOutputGuardrailMode() { + return outputGuardrailMode; + } + + @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("PersonallyIdentifiableInformationGuardrailConfig("); + sb.append("super=").append(super.toString()); + sb.append("inputGuardrailMode=").append(String.valueOf(this.inputGuardrailMode)); + sb.append(", outputGuardrailMode=").append(String.valueOf(this.outputGuardrailMode)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PersonallyIdentifiableInformationGuardrailConfig)) { + return false; + } + + PersonallyIdentifiableInformationGuardrailConfig other = + (PersonallyIdentifiableInformationGuardrailConfig) o; + return java.util.Objects.equals(this.inputGuardrailMode, other.inputGuardrailMode) + && java.util.Objects.equals(this.outputGuardrailMode, other.outputGuardrailMode) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.inputGuardrailMode == null + ? 43 + : this.inputGuardrailMode.hashCode()); + result = + (result * PRIME) + + (this.outputGuardrailMode == null + ? 43 + : this.outputGuardrailMode.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/PromptInjectionGuardrailConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/PromptInjectionGuardrailConfig.java new file mode 100644 index 0000000000..a54ed9ffa7 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/PromptInjectionGuardrailConfig.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The configuration details for Prompt Injection. + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PromptInjectionGuardrailConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PromptInjectionGuardrailConfig + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"inputGuardrailMode"}) + public PromptInjectionGuardrailConfig(GuardrailMode inputGuardrailMode) { + super(); + this.inputGuardrailMode = inputGuardrailMode; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An input guardrail mode for prompt injection. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inputGuardrailMode") + private GuardrailMode inputGuardrailMode; + + /** + * An input guardrail mode for prompt injection. + * @param inputGuardrailMode the value to set + * @return this builder + **/ + public Builder inputGuardrailMode(GuardrailMode inputGuardrailMode) { + this.inputGuardrailMode = inputGuardrailMode; + this.__explicitlySet__.add("inputGuardrailMode"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PromptInjectionGuardrailConfig build() { + PromptInjectionGuardrailConfig model = + new PromptInjectionGuardrailConfig(this.inputGuardrailMode); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PromptInjectionGuardrailConfig model) { + if (model.wasPropertyExplicitlySet("inputGuardrailMode")) { + this.inputGuardrailMode(model.getInputGuardrailMode()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * An input guardrail mode for prompt injection. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inputGuardrailMode") + private final GuardrailMode inputGuardrailMode; + + /** + * An input guardrail mode for prompt injection. + * @return the value + **/ + public GuardrailMode getInputGuardrailMode() { + return inputGuardrailMode; + } + + @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("PromptInjectionGuardrailConfig("); + sb.append("super=").append(super.toString()); + sb.append("inputGuardrailMode=").append(String.valueOf(this.inputGuardrailMode)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PromptInjectionGuardrailConfig)) { + return false; + } + + PromptInjectionGuardrailConfig other = (PromptInjectionGuardrailConfig) o; + return java.util.Objects.equals(this.inputGuardrailMode, other.inputGuardrailMode) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.inputGuardrailMode == null + ? 43 + : this.inputGuardrailMode.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/RagToolConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/RagToolConfig.java new file mode 100644 index 0000000000..6106811e99 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/RagToolConfig.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The configuration for RAG Tool. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = RagToolConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "toolConfigType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RagToolConfig extends ToolConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The KnowledgeBase configurations that this RAG Tool uses + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseConfigs") + private java.util.List knowledgeBaseConfigs; + + /** + * The KnowledgeBase configurations that this RAG Tool uses + * @param knowledgeBaseConfigs the value to set + * @return this builder + **/ + public Builder knowledgeBaseConfigs( + java.util.List knowledgeBaseConfigs) { + this.knowledgeBaseConfigs = knowledgeBaseConfigs; + this.__explicitlySet__.add("knowledgeBaseConfigs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("generationLlmCustomization") + private LlmCustomization generationLlmCustomization; + + public Builder generationLlmCustomization(LlmCustomization generationLlmCustomization) { + this.generationLlmCustomization = generationLlmCustomization; + this.__explicitlySet__.add("generationLlmCustomization"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RagToolConfig build() { + RagToolConfig model = + new RagToolConfig(this.knowledgeBaseConfigs, this.generationLlmCustomization); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RagToolConfig model) { + if (model.wasPropertyExplicitlySet("knowledgeBaseConfigs")) { + this.knowledgeBaseConfigs(model.getKnowledgeBaseConfigs()); + } + if (model.wasPropertyExplicitlySet("generationLlmCustomization")) { + this.generationLlmCustomization(model.getGenerationLlmCustomization()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RagToolConfig( + java.util.List knowledgeBaseConfigs, + LlmCustomization generationLlmCustomization) { + super(); + this.knowledgeBaseConfigs = knowledgeBaseConfigs; + this.generationLlmCustomization = generationLlmCustomization; + } + + /** + * The KnowledgeBase configurations that this RAG Tool uses + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseConfigs") + private final java.util.List knowledgeBaseConfigs; + + /** + * The KnowledgeBase configurations that this RAG Tool uses + * @return the value + **/ + public java.util.List getKnowledgeBaseConfigs() { + return knowledgeBaseConfigs; + } + + @com.fasterxml.jackson.annotation.JsonProperty("generationLlmCustomization") + private final LlmCustomization generationLlmCustomization; + + public LlmCustomization getGenerationLlmCustomization() { + return generationLlmCustomization; + } + + @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("RagToolConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", knowledgeBaseConfigs=").append(String.valueOf(this.knowledgeBaseConfigs)); + sb.append(", generationLlmCustomization=") + .append(String.valueOf(this.generationLlmCustomization)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RagToolConfig)) { + return false; + } + + RagToolConfig other = (RagToolConfig) o; + return java.util.Objects.equals(this.knowledgeBaseConfigs, other.knowledgeBaseConfigs) + && java.util.Objects.equals( + this.generationLlmCustomization, other.generationLlmCustomization) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.knowledgeBaseConfigs == null + ? 43 + : this.knowledgeBaseConfigs.hashCode()); + result = + (result * PRIME) + + (this.generationLlmCustomization == null + ? 43 + : this.generationLlmCustomization.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/SqlToolConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/SqlToolConfig.java new file mode 100644 index 0000000000..07f8de1b00 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/SqlToolConfig.java @@ -0,0 +1,508 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The configuration for SQL Tool. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = SqlToolConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "toolConfigType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SqlToolConfig extends ToolConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("iclExamples") + private InputLocation iclExamples; + + public Builder iclExamples(InputLocation iclExamples) { + this.iclExamples = iclExamples; + this.__explicitlySet__.add("iclExamples"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseSchema") + private InputLocation databaseSchema; + + public Builder databaseSchema(InputLocation databaseSchema) { + this.databaseSchema = databaseSchema; + this.__explicitlySet__.add("databaseSchema"); + return this; + } + /** + * To enable/disable SQL execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableSqlExecution") + private Boolean shouldEnableSqlExecution; + + /** + * To enable/disable SQL execution. + * @param shouldEnableSqlExecution the value to set + * @return this builder + **/ + public Builder shouldEnableSqlExecution(Boolean shouldEnableSqlExecution) { + this.shouldEnableSqlExecution = shouldEnableSqlExecution; + this.__explicitlySet__.add("shouldEnableSqlExecution"); + return this; + } + /** + * Dialect to be used for SQL generation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dialect") + private Dialect dialect; + + /** + * Dialect to be used for SQL generation. + * @param dialect the value to set + * @return this builder + **/ + public Builder dialect(Dialect dialect) { + this.dialect = dialect; + this.__explicitlySet__.add("dialect"); + return this; + } + /** + * Size of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("modelSize") + private ModelSize modelSize; + + /** + * Size of the model. + * @param modelSize the value to set + * @return this builder + **/ + public Builder modelSize(ModelSize modelSize) { + this.modelSize = modelSize; + this.__explicitlySet__.add("modelSize"); + return this; + } + /** + * To enable/disable self correction. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableSelfCorrection") + private Boolean shouldEnableSelfCorrection; + + /** + * To enable/disable self correction. + * @param shouldEnableSelfCorrection the value to set + * @return this builder + **/ + public Builder shouldEnableSelfCorrection(Boolean shouldEnableSelfCorrection) { + this.shouldEnableSelfCorrection = shouldEnableSelfCorrection; + this.__explicitlySet__.add("shouldEnableSelfCorrection"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("tableAndColumnDescription") + private InputLocation tableAndColumnDescription; + + public Builder tableAndColumnDescription(InputLocation tableAndColumnDescription) { + this.tableAndColumnDescription = tableAndColumnDescription; + this.__explicitlySet__.add("tableAndColumnDescription"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("generationLlmCustomization") + private LlmCustomization generationLlmCustomization; + + public Builder generationLlmCustomization(LlmCustomization generationLlmCustomization) { + this.generationLlmCustomization = generationLlmCustomization; + this.__explicitlySet__.add("generationLlmCustomization"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnection") + private DatabaseConnection databaseConnection; + + public Builder databaseConnection(DatabaseConnection databaseConnection) { + this.databaseConnection = databaseConnection; + this.__explicitlySet__.add("databaseConnection"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SqlToolConfig build() { + SqlToolConfig model = + new SqlToolConfig( + this.iclExamples, + this.databaseSchema, + this.shouldEnableSqlExecution, + this.dialect, + this.modelSize, + this.shouldEnableSelfCorrection, + this.tableAndColumnDescription, + this.generationLlmCustomization, + this.databaseConnection); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SqlToolConfig model) { + if (model.wasPropertyExplicitlySet("iclExamples")) { + this.iclExamples(model.getIclExamples()); + } + if (model.wasPropertyExplicitlySet("databaseSchema")) { + this.databaseSchema(model.getDatabaseSchema()); + } + if (model.wasPropertyExplicitlySet("shouldEnableSqlExecution")) { + this.shouldEnableSqlExecution(model.getShouldEnableSqlExecution()); + } + if (model.wasPropertyExplicitlySet("dialect")) { + this.dialect(model.getDialect()); + } + if (model.wasPropertyExplicitlySet("modelSize")) { + this.modelSize(model.getModelSize()); + } + if (model.wasPropertyExplicitlySet("shouldEnableSelfCorrection")) { + this.shouldEnableSelfCorrection(model.getShouldEnableSelfCorrection()); + } + if (model.wasPropertyExplicitlySet("tableAndColumnDescription")) { + this.tableAndColumnDescription(model.getTableAndColumnDescription()); + } + if (model.wasPropertyExplicitlySet("generationLlmCustomization")) { + this.generationLlmCustomization(model.getGenerationLlmCustomization()); + } + if (model.wasPropertyExplicitlySet("databaseConnection")) { + this.databaseConnection(model.getDatabaseConnection()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public SqlToolConfig( + InputLocation iclExamples, + InputLocation databaseSchema, + Boolean shouldEnableSqlExecution, + Dialect dialect, + ModelSize modelSize, + Boolean shouldEnableSelfCorrection, + InputLocation tableAndColumnDescription, + LlmCustomization generationLlmCustomization, + DatabaseConnection databaseConnection) { + super(); + this.iclExamples = iclExamples; + this.databaseSchema = databaseSchema; + this.shouldEnableSqlExecution = shouldEnableSqlExecution; + this.dialect = dialect; + this.modelSize = modelSize; + this.shouldEnableSelfCorrection = shouldEnableSelfCorrection; + this.tableAndColumnDescription = tableAndColumnDescription; + this.generationLlmCustomization = generationLlmCustomization; + this.databaseConnection = databaseConnection; + } + + @com.fasterxml.jackson.annotation.JsonProperty("iclExamples") + private final InputLocation iclExamples; + + public InputLocation getIclExamples() { + return iclExamples; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseSchema") + private final InputLocation databaseSchema; + + public InputLocation getDatabaseSchema() { + return databaseSchema; + } + + /** + * To enable/disable SQL execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableSqlExecution") + private final Boolean shouldEnableSqlExecution; + + /** + * To enable/disable SQL execution. + * @return the value + **/ + public Boolean getShouldEnableSqlExecution() { + return shouldEnableSqlExecution; + } + + /** + * Dialect to be used for SQL generation. + **/ + public enum Dialect { + SqlLite("SQL_LITE"), + OracleSql("ORACLE_SQL"), + + /** + * 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(Dialect.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Dialect v : Dialect.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Dialect(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Dialect create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Dialect', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Dialect to be used for SQL generation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dialect") + private final Dialect dialect; + + /** + * Dialect to be used for SQL generation. + * @return the value + **/ + public Dialect getDialect() { + return dialect; + } + + /** + * Size of the model. + **/ + public enum ModelSize { + Small("SMALL"), + Large("LARGE"), + + /** + * 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(ModelSize.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ModelSize v : ModelSize.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ModelSize(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ModelSize create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ModelSize', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Size of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("modelSize") + private final ModelSize modelSize; + + /** + * Size of the model. + * @return the value + **/ + public ModelSize getModelSize() { + return modelSize; + } + + /** + * To enable/disable self correction. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableSelfCorrection") + private final Boolean shouldEnableSelfCorrection; + + /** + * To enable/disable self correction. + * @return the value + **/ + public Boolean getShouldEnableSelfCorrection() { + return shouldEnableSelfCorrection; + } + + @com.fasterxml.jackson.annotation.JsonProperty("tableAndColumnDescription") + private final InputLocation tableAndColumnDescription; + + public InputLocation getTableAndColumnDescription() { + return tableAndColumnDescription; + } + + @com.fasterxml.jackson.annotation.JsonProperty("generationLlmCustomization") + private final LlmCustomization generationLlmCustomization; + + public LlmCustomization getGenerationLlmCustomization() { + return generationLlmCustomization; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnection") + private final DatabaseConnection databaseConnection; + + public DatabaseConnection getDatabaseConnection() { + return databaseConnection; + } + + @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("SqlToolConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", iclExamples=").append(String.valueOf(this.iclExamples)); + sb.append(", databaseSchema=").append(String.valueOf(this.databaseSchema)); + sb.append(", shouldEnableSqlExecution=") + .append(String.valueOf(this.shouldEnableSqlExecution)); + sb.append(", dialect=").append(String.valueOf(this.dialect)); + sb.append(", modelSize=").append(String.valueOf(this.modelSize)); + sb.append(", shouldEnableSelfCorrection=") + .append(String.valueOf(this.shouldEnableSelfCorrection)); + sb.append(", tableAndColumnDescription=") + .append(String.valueOf(this.tableAndColumnDescription)); + sb.append(", generationLlmCustomization=") + .append(String.valueOf(this.generationLlmCustomization)); + sb.append(", databaseConnection=").append(String.valueOf(this.databaseConnection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SqlToolConfig)) { + return false; + } + + SqlToolConfig other = (SqlToolConfig) o; + return java.util.Objects.equals(this.iclExamples, other.iclExamples) + && java.util.Objects.equals(this.databaseSchema, other.databaseSchema) + && java.util.Objects.equals( + this.shouldEnableSqlExecution, other.shouldEnableSqlExecution) + && java.util.Objects.equals(this.dialect, other.dialect) + && java.util.Objects.equals(this.modelSize, other.modelSize) + && java.util.Objects.equals( + this.shouldEnableSelfCorrection, other.shouldEnableSelfCorrection) + && java.util.Objects.equals( + this.tableAndColumnDescription, other.tableAndColumnDescription) + && java.util.Objects.equals( + this.generationLlmCustomization, other.generationLlmCustomization) + && java.util.Objects.equals(this.databaseConnection, other.databaseConnection) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.iclExamples == null ? 43 : this.iclExamples.hashCode()); + result = + (result * PRIME) + + (this.databaseSchema == null ? 43 : this.databaseSchema.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableSqlExecution == null + ? 43 + : this.shouldEnableSqlExecution.hashCode()); + result = (result * PRIME) + (this.dialect == null ? 43 : this.dialect.hashCode()); + result = (result * PRIME) + (this.modelSize == null ? 43 : this.modelSize.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableSelfCorrection == null + ? 43 + : this.shouldEnableSelfCorrection.hashCode()); + result = + (result * PRIME) + + (this.tableAndColumnDescription == null + ? 43 + : this.tableAndColumnDescription.hashCode()); + result = + (result * PRIME) + + (this.generationLlmCustomization == null + ? 43 + : this.generationLlmCustomization.hashCode()); + result = + (result * PRIME) + + (this.databaseConnection == null + ? 43 + : this.databaseConnection.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Tool.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Tool.java new file mode 100644 index 0000000000..b80d2183fa --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Tool.java @@ -0,0 +1,732 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The description of Tool. + *

+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Tool.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Tool extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "lifecycleState", + "timeCreated", + "timeUpdated", + "displayName", + "description", + "compartmentId", + "agentId", + "toolConfig", + "metadata", + "freeformTags", + "definedTags", + "systemTags" + }) + public Tool( + String id, + LifecycleState lifecycleState, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String displayName, + String description, + String compartmentId, + String agentId, + ToolConfig toolConfig, + java.util.Map metadata, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.agentId = agentId; + this.toolConfig = toolConfig; + 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 Tool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The current state of the Tool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Tool. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The date and time the Tool 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 Tool 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 Tool 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 Tool 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; + } + /** + * 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; + } + /** + * Description of the Tool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Tool. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.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 OCID of the agent that this Tool is attached to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private String agentId; + + /** + * The OCID of the agent that this Tool is attached to. + * @param agentId the value to set + * @return this builder + **/ + public Builder agentId(String agentId) { + this.agentId = agentId; + this.__explicitlySet__.add("agentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("toolConfig") + private ToolConfig toolConfig; + + public Builder toolConfig(ToolConfig toolConfig) { + this.toolConfig = toolConfig; + this.__explicitlySet__.add("toolConfig"); + return this; + } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @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; + } + /** + * 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 Tool build() { + Tool model = + new Tool( + this.id, + this.lifecycleState, + this.timeCreated, + this.timeUpdated, + this.displayName, + this.description, + this.compartmentId, + this.agentId, + this.toolConfig, + 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(Tool model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("agentId")) { + this.agentId(model.getAgentId()); + } + if (model.wasPropertyExplicitlySet("toolConfig")) { + this.toolConfig(model.getToolConfig()); + } + 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 Tool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The current state of the Tool. + **/ + 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 Tool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Tool. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The date and time the Tool 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 Tool 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 Tool 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 Tool 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; + } + + /** + * 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; + } + + /** + * Description of the Tool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Tool. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * 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 OCID of the agent that this Tool is attached to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private final String agentId; + + /** + * The OCID of the agent that this Tool is attached to. + * @return the value + **/ + public String getAgentId() { + return agentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("toolConfig") + private final ToolConfig toolConfig; + + public ToolConfig getToolConfig() { + return toolConfig; + } + + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + + /** + * 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("Tool("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", agentId=").append(String.valueOf(this.agentId)); + sb.append(", toolConfig=").append(String.valueOf(this.toolConfig)); + 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 Tool)) { + return false; + } + + Tool other = (Tool) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals(this.toolConfig, other.toolConfig) + && 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.lifecycleState == null ? 43 : this.lifecycleState.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.displayName == null ? 43 : this.displayName.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.agentId == null ? 43 : this.agentId.hashCode()); + result = (result * PRIME) + (this.toolConfig == null ? 43 : this.toolConfig.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-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ToolCollection.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ToolCollection.java new file mode 100644 index 0000000000..b00667b0f2 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ToolCollection.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Results of a Tool search. Contains both ToolSummary 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ToolCollection.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ToolCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ToolCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Tools. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Tools. + * @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 ToolCollection build() { + ToolCollection model = new ToolCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ToolCollection 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 Tools. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Tools. + * @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("ToolCollection("); + 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 ToolCollection)) { + return false; + } + + ToolCollection other = (ToolCollection) 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-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ToolConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ToolConfig.java new file mode 100644 index 0000000000..33a4b7c7ef --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ToolConfig.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The configuration and type of Tool. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "toolConfigType", + defaultImpl = ToolConfig.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = SqlToolConfig.class, + name = "SQL_TOOL_CONFIG" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = FunctionCallingToolConfig.class, + name = "FUNCTION_CALLING_TOOL_CONFIG" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HttpEndpointToolConfig.class, + name = "HTTP_ENDPOINT_TOOL_CONFIG" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RagToolConfig.class, + name = "RAG_TOOL_CONFIG" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ToolConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected ToolConfig() { + 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("ToolConfig("); + 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 ToolConfig)) { + return false; + } + + ToolConfig other = (ToolConfig) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The type of the Tool config. + * The allowed values are: + * - {@code SQL_TOOL_CONFIG}: The config for sql Tool. + * - {@code RAG_TOOL_CONFIG}: The config for rag Tool. + * - FUNCTION_CALLING_TOOL_CONFIG: The config for Function calling Tool. + * - HTTP_ENDPOINT_TOOL_CONFIG: The config for HTTP endpoint Tool. + * + **/ + public enum ToolConfigType { + SqlToolConfig("SQL_TOOL_CONFIG"), + RagToolConfig("RAG_TOOL_CONFIG"), + FunctionCallingToolConfig("FUNCTION_CALLING_TOOL_CONFIG"), + HttpEndpointToolConfig("HTTP_ENDPOINT_TOOL_CONFIG"), + + /** + * 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(ToolConfigType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ToolConfigType v : ToolConfigType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ToolConfigType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ToolConfigType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ToolConfigType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ToolSummary.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ToolSummary.java new file mode 100644 index 0000000000..cb73feb8a0 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ToolSummary.java @@ -0,0 +1,678 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Summary information of a Tool. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ToolSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ToolSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "lifecycleState", + "timeCreated", + "timeUpdated", + "displayName", + "description", + "compartmentId", + "agentId", + "toolConfig", + "metadata", + "freeformTags", + "definedTags", + "systemTags" + }) + public ToolSummary( + String id, + Tool.LifecycleState lifecycleState, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String displayName, + String description, + String compartmentId, + String agentId, + ToolConfig toolConfig, + java.util.Map metadata, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.agentId = agentId; + this.toolConfig = toolConfig; + 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 Tool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The current state of the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private Tool.LifecycleState lifecycleState; + + /** + * The current state of the agent. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(Tool.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The date and time the Tool 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 Tool 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 Tool 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 Tool 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; + } + /** + * 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; + } + /** + * Description about the Tool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description about the Tool. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.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 OCID of the agent that this Tool is attached to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private String agentId; + + /** + * The OCID of the agent that this Tool is attached to. + * @param agentId the value to set + * @return this builder + **/ + public Builder agentId(String agentId) { + this.agentId = agentId; + this.__explicitlySet__.add("agentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("toolConfig") + private ToolConfig toolConfig; + + public Builder toolConfig(ToolConfig toolConfig) { + this.toolConfig = toolConfig; + this.__explicitlySet__.add("toolConfig"); + return this; + } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @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; + } + /** + * 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 ToolSummary build() { + ToolSummary model = + new ToolSummary( + this.id, + this.lifecycleState, + this.timeCreated, + this.timeUpdated, + this.displayName, + this.description, + this.compartmentId, + this.agentId, + this.toolConfig, + 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(ToolSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("agentId")) { + this.agentId(model.getAgentId()); + } + if (model.wasPropertyExplicitlySet("toolConfig")) { + this.toolConfig(model.getToolConfig()); + } + 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 Tool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The current state of the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final Tool.LifecycleState lifecycleState; + + /** + * The current state of the agent. + * @return the value + **/ + public Tool.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The date and time the Tool 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 Tool 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 Tool 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 Tool 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; + } + + /** + * 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; + } + + /** + * Description about the Tool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description about the Tool. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * 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 OCID of the agent that this Tool is attached to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private final String agentId; + + /** + * The OCID of the agent that this Tool is attached to. + * @return the value + **/ + public String getAgentId() { + return agentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("toolConfig") + private final ToolConfig toolConfig; + + public ToolConfig getToolConfig() { + return toolConfig; + } + + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + + /** + * 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("ToolSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", agentId=").append(String.valueOf(this.agentId)); + sb.append(", toolConfig=").append(String.valueOf(this.toolConfig)); + 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 ToolSummary)) { + return false; + } + + ToolSummary other = (ToolSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals(this.toolConfig, other.toolConfig) + && 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.lifecycleState == null ? 43 : this.lifecycleState.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.displayName == null ? 43 : this.displayName.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.agentId == null ? 43 : this.agentId.hashCode()); + result = (result * PRIME) + (this.toolConfig == null ? 43 : this.toolConfig.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-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentDetails.java index 7e1b9ecc69..1aad2d5756 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentDetails.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentDetails.java @@ -27,6 +27,7 @@ public final class UpdateAgentDetails extends com.oracle.bmc.http.internal.Expli "description", "knowledgeBaseIds", "welcomeMessage", + "llmConfig", "freeformTags", "definedTags" }) @@ -35,6 +36,7 @@ public UpdateAgentDetails( String description, java.util.List knowledgeBaseIds, String welcomeMessage, + LlmConfig llmConfig, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -42,6 +44,7 @@ public UpdateAgentDetails( this.description = description; this.knowledgeBaseIds = knowledgeBaseIds; this.welcomeMessage = welcomeMessage; + this.llmConfig = llmConfig; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -81,13 +84,13 @@ public Builder description(String description) { return this; } /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. **/ @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") private java.util.List knowledgeBaseIds; /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. * @param knowledgeBaseIds the value to set * @return this builder **/ @@ -112,6 +115,15 @@ public Builder welcomeMessage(String welcomeMessage) { this.__explicitlySet__.add("welcomeMessage"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("llmConfig") + private LlmConfig llmConfig; + + public Builder llmConfig(LlmConfig llmConfig) { + this.llmConfig = llmConfig; + this.__explicitlySet__.add("llmConfig"); + 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). @@ -172,6 +184,7 @@ public UpdateAgentDetails build() { this.description, this.knowledgeBaseIds, this.welcomeMessage, + this.llmConfig, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -194,6 +207,9 @@ public Builder copy(UpdateAgentDetails model) { if (model.wasPropertyExplicitlySet("welcomeMessage")) { this.welcomeMessage(model.getWelcomeMessage()); } + if (model.wasPropertyExplicitlySet("llmConfig")) { + this.llmConfig(model.getLlmConfig()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -244,13 +260,13 @@ public String getDescription() { } /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. **/ @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") private final java.util.List knowledgeBaseIds; /** - * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * List of [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. This field is deprecated and will be removed after March 26 2026. * @return the value **/ public java.util.List getKnowledgeBaseIds() { @@ -271,6 +287,13 @@ public String getWelcomeMessage() { return welcomeMessage; } + @com.fasterxml.jackson.annotation.JsonProperty("llmConfig") + private final LlmConfig llmConfig; + + public LlmConfig getLlmConfig() { + return llmConfig; + } + /** * 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). @@ -333,6 +356,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", description=").append(String.valueOf(this.description)); sb.append(", knowledgeBaseIds=").append(String.valueOf(this.knowledgeBaseIds)); sb.append(", welcomeMessage=").append(String.valueOf(this.welcomeMessage)); + sb.append(", llmConfig=").append(String.valueOf(this.llmConfig)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -353,6 +377,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.knowledgeBaseIds, other.knowledgeBaseIds) && java.util.Objects.equals(this.welcomeMessage, other.welcomeMessage) + && java.util.Objects.equals(this.llmConfig, other.llmConfig) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -370,6 +395,7 @@ public int hashCode() { result = (result * PRIME) + (this.welcomeMessage == null ? 43 : this.welcomeMessage.hashCode()); + result = (result * PRIME) + (this.llmConfig == null ? 43 : this.llmConfig.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-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentEndpointDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentEndpointDetails.java index 8fcce58f7b..a3083aaf30 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentEndpointDetails.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentEndpointDetails.java @@ -27,8 +27,13 @@ public final class UpdateAgentEndpointDetails "displayName", "description", "contentModerationConfig", + "guardrailConfig", + "metadata", + "humanInputConfig", + "outputConfig", "shouldEnableTrace", "shouldEnableCitation", + "shouldEnableMultiLanguage", "sessionConfig", "freeformTags", "definedTags" @@ -37,8 +42,13 @@ public UpdateAgentEndpointDetails( String displayName, String description, ContentModerationConfig contentModerationConfig, + GuardrailConfig guardrailConfig, + java.util.Map metadata, + HumanInputConfig humanInputConfig, + OutputConfig outputConfig, Boolean shouldEnableTrace, Boolean shouldEnableCitation, + Boolean shouldEnableMultiLanguage, SessionConfig sessionConfig, java.util.Map freeformTags, java.util.Map> definedTags) { @@ -46,8 +56,13 @@ public UpdateAgentEndpointDetails( this.displayName = displayName; this.description = description; this.contentModerationConfig = contentModerationConfig; + this.guardrailConfig = guardrailConfig; + this.metadata = metadata; + this.humanInputConfig = humanInputConfig; + this.outputConfig = outputConfig; this.shouldEnableTrace = shouldEnableTrace; this.shouldEnableCitation = shouldEnableCitation; + this.shouldEnableMultiLanguage = shouldEnableMultiLanguage; this.sessionConfig = sessionConfig; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -96,6 +111,49 @@ public Builder contentModerationConfig(ContentModerationConfig contentModeration this.__explicitlySet__.add("contentModerationConfig"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("guardrailConfig") + private GuardrailConfig guardrailConfig; + + public Builder guardrailConfig(GuardrailConfig guardrailConfig) { + this.guardrailConfig = guardrailConfig; + this.__explicitlySet__.add("guardrailConfig"); + return this; + } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @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.JsonProperty("humanInputConfig") + private HumanInputConfig humanInputConfig; + + public Builder humanInputConfig(HumanInputConfig humanInputConfig) { + this.humanInputConfig = humanInputConfig; + this.__explicitlySet__.add("humanInputConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("outputConfig") + private OutputConfig outputConfig; + + public Builder outputConfig(OutputConfig outputConfig) { + this.outputConfig = outputConfig; + this.__explicitlySet__.add("outputConfig"); + return this; + } /** * Whether to show traces in the chat result. **/ @@ -128,6 +186,22 @@ public Builder shouldEnableCitation(Boolean shouldEnableCitation) { this.__explicitlySet__.add("shouldEnableCitation"); return this; } + /** + * Whether to enable multi-language for chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableMultiLanguage") + private Boolean shouldEnableMultiLanguage; + + /** + * Whether to enable multi-language for chat. + * @param shouldEnableMultiLanguage the value to set + * @return this builder + **/ + public Builder shouldEnableMultiLanguage(Boolean shouldEnableMultiLanguage) { + this.shouldEnableMultiLanguage = shouldEnableMultiLanguage; + this.__explicitlySet__.add("shouldEnableMultiLanguage"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") private SessionConfig sessionConfig; @@ -196,8 +270,13 @@ public UpdateAgentEndpointDetails build() { this.displayName, this.description, this.contentModerationConfig, + this.guardrailConfig, + this.metadata, + this.humanInputConfig, + this.outputConfig, this.shouldEnableTrace, this.shouldEnableCitation, + this.shouldEnableMultiLanguage, this.sessionConfig, this.freeformTags, this.definedTags); @@ -218,12 +297,27 @@ public Builder copy(UpdateAgentEndpointDetails model) { if (model.wasPropertyExplicitlySet("contentModerationConfig")) { this.contentModerationConfig(model.getContentModerationConfig()); } + if (model.wasPropertyExplicitlySet("guardrailConfig")) { + this.guardrailConfig(model.getGuardrailConfig()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + if (model.wasPropertyExplicitlySet("humanInputConfig")) { + this.humanInputConfig(model.getHumanInputConfig()); + } + if (model.wasPropertyExplicitlySet("outputConfig")) { + this.outputConfig(model.getOutputConfig()); + } if (model.wasPropertyExplicitlySet("shouldEnableTrace")) { this.shouldEnableTrace(model.getShouldEnableTrace()); } if (model.wasPropertyExplicitlySet("shouldEnableCitation")) { this.shouldEnableCitation(model.getShouldEnableCitation()); } + if (model.wasPropertyExplicitlySet("shouldEnableMultiLanguage")) { + this.shouldEnableMultiLanguage(model.getShouldEnableMultiLanguage()); + } if (model.wasPropertyExplicitlySet("sessionConfig")) { this.sessionConfig(model.getSessionConfig()); } @@ -283,6 +377,41 @@ public ContentModerationConfig getContentModerationConfig() { return contentModerationConfig; } + @com.fasterxml.jackson.annotation.JsonProperty("guardrailConfig") + private final GuardrailConfig guardrailConfig; + + public GuardrailConfig getGuardrailConfig() { + return guardrailConfig; + } + + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + + @com.fasterxml.jackson.annotation.JsonProperty("humanInputConfig") + private final HumanInputConfig humanInputConfig; + + public HumanInputConfig getHumanInputConfig() { + return humanInputConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("outputConfig") + private final OutputConfig outputConfig; + + public OutputConfig getOutputConfig() { + return outputConfig; + } + /** * Whether to show traces in the chat result. **/ @@ -311,6 +440,20 @@ public Boolean getShouldEnableCitation() { return shouldEnableCitation; } + /** + * Whether to enable multi-language for chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableMultiLanguage") + private final Boolean shouldEnableMultiLanguage; + + /** + * Whether to enable multi-language for chat. + * @return the value + **/ + public Boolean getShouldEnableMultiLanguage() { + return shouldEnableMultiLanguage; + } + @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") private final SessionConfig sessionConfig; @@ -380,8 +523,14 @@ public String toString(boolean includeByteArrayContents) { sb.append(", description=").append(String.valueOf(this.description)); sb.append(", contentModerationConfig=") .append(String.valueOf(this.contentModerationConfig)); + sb.append(", guardrailConfig=").append(String.valueOf(this.guardrailConfig)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(", humanInputConfig=").append(String.valueOf(this.humanInputConfig)); + sb.append(", outputConfig=").append(String.valueOf(this.outputConfig)); sb.append(", shouldEnableTrace=").append(String.valueOf(this.shouldEnableTrace)); sb.append(", shouldEnableCitation=").append(String.valueOf(this.shouldEnableCitation)); + sb.append(", shouldEnableMultiLanguage=") + .append(String.valueOf(this.shouldEnableMultiLanguage)); sb.append(", sessionConfig=").append(String.valueOf(this.sessionConfig)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -403,8 +552,14 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals( this.contentModerationConfig, other.contentModerationConfig) + && java.util.Objects.equals(this.guardrailConfig, other.guardrailConfig) + && java.util.Objects.equals(this.metadata, other.metadata) + && java.util.Objects.equals(this.humanInputConfig, other.humanInputConfig) + && java.util.Objects.equals(this.outputConfig, other.outputConfig) && java.util.Objects.equals(this.shouldEnableTrace, other.shouldEnableTrace) && java.util.Objects.equals(this.shouldEnableCitation, other.shouldEnableCitation) + && java.util.Objects.equals( + this.shouldEnableMultiLanguage, other.shouldEnableMultiLanguage) && java.util.Objects.equals(this.sessionConfig, other.sessionConfig) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -422,6 +577,14 @@ public int hashCode() { + (this.contentModerationConfig == null ? 43 : this.contentModerationConfig.hashCode()); + result = + (result * PRIME) + + (this.guardrailConfig == null ? 43 : this.guardrailConfig.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = + (result * PRIME) + + (this.humanInputConfig == null ? 43 : this.humanInputConfig.hashCode()); + result = (result * PRIME) + (this.outputConfig == null ? 43 : this.outputConfig.hashCode()); result = (result * PRIME) + (this.shouldEnableTrace == null ? 43 : this.shouldEnableTrace.hashCode()); @@ -430,6 +593,11 @@ public int hashCode() { + (this.shouldEnableCitation == null ? 43 : this.shouldEnableCitation.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableMultiLanguage == null + ? 43 + : this.shouldEnableMultiLanguage.hashCode()); result = (result * PRIME) + (this.sessionConfig == null ? 43 : this.sessionConfig.hashCode()); diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateDataSourceDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateDataSourceDetails.java index 3dc2720d89..697674c3e5 100644 --- a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateDataSourceDetails.java +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateDataSourceDetails.java @@ -27,6 +27,7 @@ public final class UpdateDataSourceDetails "displayName", "description", "dataSourceConfig", + "metadata", "freeformTags", "definedTags" }) @@ -34,12 +35,14 @@ public UpdateDataSourceDetails( String displayName, String description, DataSourceConfig dataSourceConfig, + java.util.Map metadata, java.util.Map freeformTags, java.util.Map> definedTags) { super(); this.displayName = displayName; this.description = description; this.dataSourceConfig = dataSourceConfig; + this.metadata = metadata; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -87,6 +90,22 @@ public Builder dataSourceConfig(DataSourceConfig dataSourceConfig) { this.__explicitlySet__.add("dataSourceConfig"); return this; } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @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; + } /** * 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). @@ -146,6 +165,7 @@ public UpdateDataSourceDetails build() { this.displayName, this.description, this.dataSourceConfig, + this.metadata, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -165,6 +185,9 @@ public Builder copy(UpdateDataSourceDetails model) { if (model.wasPropertyExplicitlySet("dataSourceConfig")) { this.dataSourceConfig(model.getDataSourceConfig()); } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -221,6 +244,20 @@ public DataSourceConfig getDataSourceConfig() { return dataSourceConfig; } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + /** * 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). @@ -282,6 +319,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", dataSourceConfig=").append(String.valueOf(this.dataSourceConfig)); + 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(")"); @@ -301,6 +339,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.dataSourceConfig, other.dataSourceConfig) + && java.util.Objects.equals(this.metadata, other.metadata) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -315,6 +354,7 @@ public int hashCode() { result = (result * PRIME) + (this.dataSourceConfig == null ? 43 : this.dataSourceConfig.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) + super.hashCode(); diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateToolDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateToolDetails.java new file mode 100644 index 0000000000..a346bc5548 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateToolDetails.java @@ -0,0 +1,360 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The data to update a Tool. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateToolDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateToolDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "toolConfig", + "metadata", + "freeformTags", + "definedTags" + }) + public UpdateToolDetails( + String displayName, + String description, + ToolConfig toolConfig, + java.util.Map metadata, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.toolConfig = toolConfig; + this.metadata = metadata; + 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; + } + /** + * Description about the Tool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description about the Tool. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("toolConfig") + private ToolConfig toolConfig; + + public Builder toolConfig(ToolConfig toolConfig) { + this.toolConfig = toolConfig; + this.__explicitlySet__.add("toolConfig"); + return this; + } + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @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; + } + /** + * 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 UpdateToolDetails build() { + UpdateToolDetails model = + new UpdateToolDetails( + this.displayName, + this.description, + this.toolConfig, + this.metadata, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateToolDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("toolConfig")) { + this.toolConfig(model.getToolConfig()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + 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; + } + + /** + * Description about the Tool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description about the Tool. + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("toolConfig") + private final ToolConfig toolConfig; + + public ToolConfig getToolConfig() { + return toolConfig; + } + + /** + * Key-value pairs to allow additional configurations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Key-value pairs to allow additional configurations. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + + /** + * 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("UpdateToolDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", toolConfig=").append(String.valueOf(this.toolConfig)); + 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(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateToolDetails)) { + return false; + } + + UpdateToolDetails other = (UpdateToolDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.toolConfig, other.toolConfig) + && java.util.Objects.equals(this.metadata, other.metadata) + && 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.toolConfig == null ? 43 : this.toolConfig.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) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateToolRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateToolRequest.java new file mode 100644 index 0000000000..40b954e592 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateToolRequest.java @@ -0,0 +1,291 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use CreateToolRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateToolRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.CreateToolDetails> { + + /** + * Details for the new tool. + */ + private com.oracle.bmc.generativeaiagent.model.CreateToolDetails createToolDetails; + + /** + * Details for the new tool. + */ + public com.oracle.bmc.generativeaiagent.model.CreateToolDetails getCreateToolDetails() { + return createToolDetails; + } + /** + * 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.generativeaiagent.model.CreateToolDetails getBody$() { + return createToolDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateToolRequest, com.oracle.bmc.generativeaiagent.model.CreateToolDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new tool. + */ + private com.oracle.bmc.generativeaiagent.model.CreateToolDetails createToolDetails = null; + + /** + * Details for the new tool. + * @param createToolDetails the value to set + * @return this builder instance + */ + public Builder createToolDetails( + com.oracle.bmc.generativeaiagent.model.CreateToolDetails createToolDetails) { + this.createToolDetails = createToolDetails; + 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(CreateToolRequest o) { + createToolDetails(o.getCreateToolDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateToolRequest 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 CreateToolRequest + */ + public CreateToolRequest build() { + CreateToolRequest 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.generativeaiagent.model.CreateToolDetails body) { + createToolDetails(body); + return this; + } + + /** + * Build the instance of CreateToolRequest 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 CreateToolRequest + */ + public CreateToolRequest buildWithoutInvocationCallback() { + CreateToolRequest request = new CreateToolRequest(); + request.createToolDetails = createToolDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateToolRequest(createToolDetails, 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() + .createToolDetails(createToolDetails) + .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(",createToolDetails=").append(String.valueOf(this.createToolDetails)); + 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 CreateToolRequest)) { + return false; + } + + CreateToolRequest other = (CreateToolRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.createToolDetails, other.createToolDetails) + && 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.createToolDetails == null ? 43 : this.createToolDetails.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-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteToolRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteToolRequest.java new file mode 100644 index 0000000000..287b4578ea --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteToolRequest.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use DeleteToolRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteToolRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + */ + private String toolId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + */ + public String getToolId() { + return toolId; + } + /** + * 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< + DeleteToolRequest, 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 Tool. + */ + private String toolId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + * @param toolId the value to set + * @return this builder instance + */ + public Builder toolId(String toolId) { + this.toolId = toolId; + 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(DeleteToolRequest o) { + toolId(o.getToolId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteToolRequest 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 DeleteToolRequest + */ + public DeleteToolRequest build() { + DeleteToolRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteToolRequest 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 DeleteToolRequest + */ + public DeleteToolRequest buildWithoutInvocationCallback() { + DeleteToolRequest request = new DeleteToolRequest(); + request.toolId = toolId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteToolRequest(toolId, 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().toolId(toolId).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(",toolId=").append(String.valueOf(this.toolId)); + 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 DeleteToolRequest)) { + return false; + } + + DeleteToolRequest other = (DeleteToolRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.toolId, other.toolId) + && 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.toolId == null ? 43 : this.toolId.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-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetToolRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetToolRequest.java new file mode 100644 index 0000000000..bff47a0514 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetToolRequest.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use GetToolRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetToolRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + */ + private String toolId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + */ + public String getToolId() { + return toolId; + } + /** + * 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 { + 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 Tool. + */ + private String toolId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + * @param toolId the value to set + * @return this builder instance + */ + public Builder toolId(String toolId) { + this.toolId = toolId; + 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(GetToolRequest o) { + toolId(o.getToolId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetToolRequest 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 GetToolRequest + */ + public GetToolRequest build() { + GetToolRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetToolRequest 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 GetToolRequest + */ + public GetToolRequest buildWithoutInvocationCallback() { + GetToolRequest request = new GetToolRequest(); + request.toolId = toolId; + request.opcRequestId = opcRequestId; + return request; + // new GetToolRequest(toolId, 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().toolId(toolId).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(",toolId=").append(String.valueOf(this.toolId)); + 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 GetToolRequest)) { + return false; + } + + GetToolRequest other = (GetToolRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.toolId, other.toolId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.toolId == null ? 43 : this.toolId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListToolsRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListToolsRequest.java new file mode 100644 index 0000000000..31cb35d1e4 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListToolsRequest.java @@ -0,0 +1,518 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use ListToolsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListToolsRequest 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.generativeaiagent.model.Tool.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + public com.oracle.bmc.generativeaiagent.model.Tool.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 agent. + */ + private String agentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + public String getAgentId() { + return agentId; + } + /** + * 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.generativeaiagent.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.generativeaiagent.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< + ListToolsRequest, 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.generativeaiagent.model.Tool.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.generativeaiagent.model.Tool.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 agent. + */ + private String agentId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + * @param agentId the value to set + * @return this builder instance + */ + public Builder agentId(String agentId) { + this.agentId = agentId; + 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.generativeaiagent.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.generativeaiagent.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(ListToolsRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + agentId(o.getAgentId()); + 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 ListToolsRequest 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 ListToolsRequest + */ + public ListToolsRequest build() { + ListToolsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListToolsRequest 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 ListToolsRequest + */ + public ListToolsRequest buildWithoutInvocationCallback() { + ListToolsRequest request = new ListToolsRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.agentId = agentId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListToolsRequest(compartmentId, lifecycleState, displayName, agentId, 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) + .agentId(agentId) + .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(",agentId=").append(String.valueOf(this.agentId)); + 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 ListToolsRequest)) { + return false; + } + + ListToolsRequest other = (ListToolsRequest) 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.agentId, other.agentId) + && 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.agentId == null ? 43 : this.agentId.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-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateToolRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateToolRequest.java new file mode 100644 index 0000000000..b0849d1137 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateToolRequest.java @@ -0,0 +1,317 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use UpdateToolRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateToolRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.UpdateToolDetails> { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + */ + private String toolId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + */ + public String getToolId() { + return toolId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.UpdateToolDetails updateToolDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.generativeaiagent.model.UpdateToolDetails getUpdateToolDetails() { + return updateToolDetails; + } + /** + * 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.generativeaiagent.model.UpdateToolDetails getBody$() { + return updateToolDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateToolRequest, com.oracle.bmc.generativeaiagent.model.UpdateToolDetails> { + 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 Tool. + */ + private String toolId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Tool. + * @param toolId the value to set + * @return this builder instance + */ + public Builder toolId(String toolId) { + this.toolId = toolId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.UpdateToolDetails updateToolDetails = null; + + /** + * The information to be updated. + * @param updateToolDetails the value to set + * @return this builder instance + */ + public Builder updateToolDetails( + com.oracle.bmc.generativeaiagent.model.UpdateToolDetails updateToolDetails) { + this.updateToolDetails = updateToolDetails; + 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(UpdateToolRequest o) { + toolId(o.getToolId()); + updateToolDetails(o.getUpdateToolDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateToolRequest 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 UpdateToolRequest + */ + public UpdateToolRequest build() { + UpdateToolRequest 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.generativeaiagent.model.UpdateToolDetails body) { + updateToolDetails(body); + return this; + } + + /** + * Build the instance of UpdateToolRequest 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 UpdateToolRequest + */ + public UpdateToolRequest buildWithoutInvocationCallback() { + UpdateToolRequest request = new UpdateToolRequest(); + request.toolId = toolId; + request.updateToolDetails = updateToolDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateToolRequest(toolId, updateToolDetails, 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() + .toolId(toolId) + .updateToolDetails(updateToolDetails) + .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(",toolId=").append(String.valueOf(this.toolId)); + sb.append(",updateToolDetails=").append(String.valueOf(this.updateToolDetails)); + 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 UpdateToolRequest)) { + return false; + } + + UpdateToolRequest other = (UpdateToolRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.toolId, other.toolId) + && java.util.Objects.equals(this.updateToolDetails, other.updateToolDetails) + && 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.toolId == null ? 43 : this.toolId.hashCode()); + result = + (result * PRIME) + + (this.updateToolDetails == null ? 43 : this.updateToolDetails.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-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateToolResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateToolResponse.java new file mode 100644 index 0000000000..34e09595e7 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateToolResponse.java @@ -0,0 +1,334 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateToolResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created tool. The tool OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created tool. The tool 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 Tool instance. + */ + private com.oracle.bmc.generativeaiagent.model.Tool tool; + + /** + * The returned Tool instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.Tool getTool() { + return tool; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "tool" + }) + private CreateToolResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.Tool tool) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.tool = tool; + } + + 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 tool. The tool OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created tool. The tool 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 Tool instance. + */ + private com.oracle.bmc.generativeaiagent.model.Tool tool; + + /** + * The returned Tool instance. + * @param tool the value to set + * @return this builder + */ + public Builder tool(com.oracle.bmc.generativeaiagent.model.Tool tool) { + this.tool = tool; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateToolResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + tool(o.getTool()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateToolResponse build() { + return new CreateToolResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + tool); + } + } + + /** + * 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(",tool=").append(String.valueOf(tool)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateToolResponse)) { + return false; + } + + CreateToolResponse other = (CreateToolResponse) 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.tool, other.tool); + } + + @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.tool == null ? 43 : this.tool.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteToolResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteToolResponse.java new file mode 100644 index 0000000000..58f60cd876 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteToolResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteToolResponse 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 DeleteToolResponse( + 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(DeleteToolResponse 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 DeleteToolResponse build() { + return new DeleteToolResponse( + __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 DeleteToolResponse)) { + return false; + } + + DeleteToolResponse other = (DeleteToolResponse) 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-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetToolResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetToolResponse.java new file mode 100644 index 0000000000..c3fec0a494 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetToolResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetToolResponse 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 Tool instance. + */ + private com.oracle.bmc.generativeaiagent.model.Tool tool; + + /** + * The returned Tool instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.Tool getTool() { + return tool; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "tool" + }) + private GetToolResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.Tool tool) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.tool = tool; + } + + 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 Tool instance. + */ + private com.oracle.bmc.generativeaiagent.model.Tool tool; + + /** + * The returned Tool instance. + * @param tool the value to set + * @return this builder + */ + public Builder tool(com.oracle.bmc.generativeaiagent.model.Tool tool) { + this.tool = tool; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetToolResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + tool(o.getTool()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetToolResponse build() { + return new GetToolResponse(__httpStatusCode__, headers, etag, opcRequestId, tool); + } + } + + /** + * 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(",tool=").append(String.valueOf(tool)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetToolResponse)) { + return false; + } + + GetToolResponse other = (GetToolResponse) 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.tool, other.tool); + } + + @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.tool == null ? 43 : this.tool.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListToolsResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListToolsResponse.java new file mode 100644 index 0000000000..54d25af62b --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListToolsResponse.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListToolsResponse 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 ToolCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.ToolCollection toolCollection; + + /** + * The returned ToolCollection instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.ToolCollection getToolCollection() { + return toolCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "toolCollection" + }) + private ListToolsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.generativeaiagent.model.ToolCollection toolCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.toolCollection = toolCollection; + } + + 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 ToolCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.ToolCollection toolCollection; + + /** + * The returned ToolCollection instance. + * @param toolCollection the value to set + * @return this builder + */ + public Builder toolCollection( + com.oracle.bmc.generativeaiagent.model.ToolCollection toolCollection) { + this.toolCollection = toolCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListToolsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + toolCollection(o.getToolCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListToolsResponse build() { + return new ListToolsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, toolCollection); + } + } + + /** + * 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(",toolCollection=").append(String.valueOf(toolCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListToolsResponse)) { + return false; + } + + ListToolsResponse other = (ListToolsResponse) 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.toolCollection, other.toolCollection); + } + + @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.toolCollection == null ? 43 : this.toolCollection.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateToolResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateToolResponse.java new file mode 100644 index 0000000000..6996dcd8db --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateToolResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateToolResponse 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 UpdateToolResponse( + 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(UpdateToolResponse 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 UpdateToolResponse build() { + return new UpdateToolResponse( + __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 UpdateToolResponse)) { + return false; + } + + UpdateToolResponse other = (UpdateToolResponse) 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-generativeaiagentruntime/pom.xml b/bmc-generativeaiagentruntime/pom.xml index eb84ee05a5..be21072c2f 100644 --- a/bmc-generativeaiagentruntime/pom.xml +++ b/bmc-generativeaiagentruntime/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-generativeaiagentruntime @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntime.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntime.java index 2b9f6452c3..16b0591952 100644 --- a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntime.java +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntime.java @@ -122,6 +122,19 @@ public interface GenerativeAiAgentRuntime extends AutoCloseable { */ GetSessionResponse getSession(GetSessionRequest request); + /** + * Returns metadata of provided knowledgeBase. Return available metadata with information of field names, their types, supported operations, and possible values. + * + * @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 RetrieveMetadata API. + */ + RetrieveMetadataResponse retrieveMetadata(RetrieveMetadataRequest request); + /** * Update session metadata, including but not limited to description, tags. * diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsync.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsync.java index 58e38534e3..61484b20a5 100644 --- a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsync.java +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsync.java @@ -131,6 +131,22 @@ java.util.concurrent.Future getSession( GetSessionRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Returns metadata of provided knowledgeBase. Return available metadata with information of field names, their types, supported operations, and possible values. + * + * + * @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 retrieveMetadata( + RetrieveMetadataRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Update session metadata, including but not limited to description, tags. * diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsyncClient.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsyncClient.java index 826aa50902..82c306e566 100644 --- a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsyncClient.java +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsyncClient.java @@ -31,7 +31,7 @@ public class GenerativeAiAgentRuntimeAsyncClient implements GenerativeAiAgentRun .serviceName("GENERATIVEAIAGENTRUNTIME") .serviceEndpointPrefix("") .serviceEndpointTemplate( - "https://genai-agent-service.{region}.oci.{secondLevelDomain}") + "https://agent-runtime.generativeai.{region}.oci.{secondLevelDomain}") .build(); private static final org.slf4j.Logger LOG = @@ -641,6 +641,58 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future retrieveMetadata( + RetrieveMetadataRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RetrieveMetadataRequest, RetrieveMetadataResponse> + handler) { + LOG.trace("Called async retrieveMetadata"); + final RetrieveMetadataRequest interceptedRequest = + RetrieveMetadataConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RetrieveMetadataConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgentRuntime", + "RetrieveMetadata", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/KnowledgeBaseMetadataSummary/RetrieveMetadata"); + final java.util.function.Function + transformer = + RetrieveMetadataConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RetrieveMetadataRequest, RetrieveMetadataResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRetrieveMetadataDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RetrieveMetadataRequest, RetrieveMetadataResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateSession( UpdateSessionRequest request, diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeClient.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeClient.java index 03c31e61ff..d64482287a 100644 --- a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeClient.java +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeClient.java @@ -20,7 +20,7 @@ public class GenerativeAiAgentRuntimeClient implements GenerativeAiAgentRuntime .serviceName("GENERATIVEAIAGENTRUNTIME") .serviceEndpointPrefix("") .serviceEndpointTemplate( - "https://genai-agent-service.{region}.oci.{secondLevelDomain}") + "https://agent-runtime.generativeai.{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; @@ -621,6 +621,48 @@ public GetSessionResponse getSession(GetSessionRequest request) { }); } + @Override + public RetrieveMetadataResponse retrieveMetadata(RetrieveMetadataRequest request) { + LOG.trace("Called retrieveMetadata"); + final RetrieveMetadataRequest interceptedRequest = + RetrieveMetadataConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RetrieveMetadataConverter.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( + "GenerativeAiAgentRuntime", + "RetrieveMetadata", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/KnowledgeBaseMetadataSummary/RetrieveMetadata"); + java.util.function.Function + transformer = + RetrieveMetadataConverter.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.getRetrieveMetadataDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateSessionResponse updateSession(UpdateSessionRequest request) { LOG.trace("Called updateSession"); diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/RetrieveMetadataConverter.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/RetrieveMetadataConverter.java new file mode 100644 index 0000000000..9cfc5ac7b4 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/RetrieveMetadataConverter.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagentruntime.model.*; +import com.oracle.bmc.generativeaiagentruntime.requests.*; +import com.oracle.bmc.generativeaiagentruntime.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class RetrieveMetadataConverter { + 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(RetrieveMetadataConverter.class); + + public static com.oracle.bmc.generativeaiagentruntime.requests.RetrieveMetadataRequest + interceptRequest( + com.oracle.bmc.generativeaiagentruntime.requests.RetrieveMetadataRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagentruntime.requests.RetrieveMetadataRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getKnowledgeBaseId(), "knowledgeBaseId must not be blank"); + Validate.notNull( + request.getRetrieveMetadataDetails(), "retrieveMetadataDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("knowledgeBases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getKnowledgeBaseId())) + .path("actions") + .path("retrieveMetadata"); + + 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.generativeaiagentruntime.responses.RetrieveMetadataResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.RetrieveMetadataResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.RetrieveMetadataResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses + .RetrieveMetadataResponse>() { + @Override + public com.oracle.bmc.generativeaiagentruntime.responses + .RetrieveMetadataResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagentruntime.responses.RetrieveMetadataResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc + .generativeaiagentruntime + .model + .KnowledgeBaseMetadataSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc + .generativeaiagentruntime + .model + .KnowledgeBaseMetadataSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc + .generativeaiagentruntime + .model + .KnowledgeBaseMetadataSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.generativeaiagentruntime + .model + .KnowledgeBaseMetadataSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagentruntime.responses + .RetrieveMetadataResponse.Builder + builder = + com.oracle.bmc.generativeaiagentruntime.responses + .RetrieveMetadataResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(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.generativeaiagentruntime.responses + .RetrieveMetadataResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatDetails.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatDetails.java index 7634326a98..63e8f905cf 100644 --- a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatDetails.java +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatDetails.java @@ -20,12 +20,25 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class ChatDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"userMessage", "shouldStream", "sessionId"}) - public ChatDetails(String userMessage, Boolean shouldStream, String sessionId) { + @java.beans.ConstructorProperties({ + "userMessage", + "shouldStream", + "sessionId", + "toolParameters", + "performedActions" + }) + public ChatDetails( + String userMessage, + Boolean shouldStream, + String sessionId, + java.util.Map toolParameters, + java.util.List performedActions) { super(); this.userMessage = userMessage; this.shouldStream = shouldStream; this.sessionId = sessionId; + this.toolParameters = toolParameters; + this.performedActions = performedActions; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -78,13 +91,50 @@ public Builder sessionId(String sessionId) { this.__explicitlySet__.add("sessionId"); return this; } + /** + * A map where each key is a toolId and the value contains tool type and additional dynamic parameters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("toolParameters") + private java.util.Map toolParameters; + + /** + * A map where each key is a toolId and the value contains tool type and additional dynamic parameters. + * @param toolParameters the value to set + * @return this builder + **/ + public Builder toolParameters(java.util.Map toolParameters) { + this.toolParameters = toolParameters; + this.__explicitlySet__.add("toolParameters"); + return this; + } + /** + * A list of actions that have been performed based on prior required actions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("performedActions") + private java.util.List performedActions; + + /** + * A list of actions that have been performed based on prior required actions. + * @param performedActions the value to set + * @return this builder + **/ + public Builder performedActions(java.util.List performedActions) { + this.performedActions = performedActions; + this.__explicitlySet__.add("performedActions"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public ChatDetails build() { ChatDetails model = - new ChatDetails(this.userMessage, this.shouldStream, this.sessionId); + new ChatDetails( + this.userMessage, + this.shouldStream, + this.sessionId, + this.toolParameters, + this.performedActions); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -102,6 +152,12 @@ public Builder copy(ChatDetails model) { if (model.wasPropertyExplicitlySet("sessionId")) { this.sessionId(model.getSessionId()); } + if (model.wasPropertyExplicitlySet("toolParameters")) { + this.toolParameters(model.getToolParameters()); + } + if (model.wasPropertyExplicitlySet("performedActions")) { + this.performedActions(model.getPerformedActions()); + } return this; } } @@ -159,6 +215,34 @@ public String getSessionId() { return sessionId; } + /** + * A map where each key is a toolId and the value contains tool type and additional dynamic parameters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("toolParameters") + private final java.util.Map toolParameters; + + /** + * A map where each key is a toolId and the value contains tool type and additional dynamic parameters. + * @return the value + **/ + public java.util.Map getToolParameters() { + return toolParameters; + } + + /** + * A list of actions that have been performed based on prior required actions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("performedActions") + private final java.util.List performedActions; + + /** + * A list of actions that have been performed based on prior required actions. + * @return the value + **/ + public java.util.List getPerformedActions() { + return performedActions; + } + @Override public String toString() { return this.toString(true); @@ -176,6 +260,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("userMessage=").append(String.valueOf(this.userMessage)); sb.append(", shouldStream=").append(String.valueOf(this.shouldStream)); sb.append(", sessionId=").append(String.valueOf(this.sessionId)); + sb.append(", toolParameters=").append(String.valueOf(this.toolParameters)); + sb.append(", performedActions=").append(String.valueOf(this.performedActions)); sb.append(")"); return sb.toString(); } @@ -193,6 +279,8 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.userMessage, other.userMessage) && java.util.Objects.equals(this.shouldStream, other.shouldStream) && java.util.Objects.equals(this.sessionId, other.sessionId) + && java.util.Objects.equals(this.toolParameters, other.toolParameters) + && java.util.Objects.equals(this.performedActions, other.performedActions) && super.equals(other); } @@ -203,6 +291,12 @@ public int hashCode() { result = (result * PRIME) + (this.userMessage == null ? 43 : this.userMessage.hashCode()); result = (result * PRIME) + (this.shouldStream == null ? 43 : this.shouldStream.hashCode()); result = (result * PRIME) + (this.sessionId == null ? 43 : this.sessionId.hashCode()); + result = + (result * PRIME) + + (this.toolParameters == null ? 43 : this.toolParameters.hashCode()); + result = + (result * PRIME) + + (this.performedActions == null ? 43 : this.performedActions.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatResult.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatResult.java index bfcd164703..18440f7a21 100644 --- a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatResult.java +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatResult.java @@ -20,11 +20,25 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class ChatResult extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"message", "traces"}) - public ChatResult(Message message, java.util.List traces) { + @java.beans.ConstructorProperties({ + "message", + "traces", + "toolResults", + "requiredActions", + "guardrailResult" + }) + public ChatResult( + Message message, + java.util.List traces, + java.util.Map toolResults, + java.util.List requiredActions, + String guardrailResult) { super(); this.message = message; this.traces = traces; + this.toolResults = toolResults; + this.requiredActions = requiredActions; + this.guardrailResult = guardrailResult; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -54,12 +68,68 @@ public Builder traces(java.util.List traces) { this.__explicitlySet__.add("traces"); return this; } + /** + * A map where each key is a toolId and the value contains tool type and additional dynamic results. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("toolResults") + private java.util.Map toolResults; + + /** + * A map where each key is a toolId and the value contains tool type and additional dynamic results. + * @param toolResults the value to set + * @return this builder + **/ + public Builder toolResults(java.util.Map toolResults) { + this.toolResults = toolResults; + this.__explicitlySet__.add("toolResults"); + return this; + } + /** + * A list of actions the agent requires the user or agent client to perform. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requiredActions") + private java.util.List requiredActions; + + /** + * A list of actions the agent requires the user or agent client to perform. + * + * @param requiredActions the value to set + * @return this builder + **/ + public Builder requiredActions(java.util.List requiredActions) { + this.requiredActions = requiredActions; + this.__explicitlySet__.add("requiredActions"); + return this; + } + /** + * Captures the result of guardrail evaluations as JSON string performed on either the input to the agent or the output generated by the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("guardrailResult") + private String guardrailResult; + + /** + * Captures the result of guardrail evaluations as JSON string performed on either the input to the agent or the output generated by the agent. + * @param guardrailResult the value to set + * @return this builder + **/ + public Builder guardrailResult(String guardrailResult) { + this.guardrailResult = guardrailResult; + this.__explicitlySet__.add("guardrailResult"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public ChatResult build() { - ChatResult model = new ChatResult(this.message, this.traces); + ChatResult model = + new ChatResult( + this.message, + this.traces, + this.toolResults, + this.requiredActions, + this.guardrailResult); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -74,6 +144,15 @@ public Builder copy(ChatResult model) { if (model.wasPropertyExplicitlySet("traces")) { this.traces(model.getTraces()); } + if (model.wasPropertyExplicitlySet("toolResults")) { + this.toolResults(model.getToolResults()); + } + if (model.wasPropertyExplicitlySet("requiredActions")) { + this.requiredActions(model.getRequiredActions()); + } + if (model.wasPropertyExplicitlySet("guardrailResult")) { + this.guardrailResult(model.getGuardrailResult()); + } return this; } } @@ -110,6 +189,50 @@ public java.util.List getTraces() { return traces; } + /** + * A map where each key is a toolId and the value contains tool type and additional dynamic results. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("toolResults") + private final java.util.Map toolResults; + + /** + * A map where each key is a toolId and the value contains tool type and additional dynamic results. + * @return the value + **/ + public java.util.Map getToolResults() { + return toolResults; + } + + /** + * A list of actions the agent requires the user or agent client to perform. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requiredActions") + private final java.util.List requiredActions; + + /** + * A list of actions the agent requires the user or agent client to perform. + * + * @return the value + **/ + public java.util.List getRequiredActions() { + return requiredActions; + } + + /** + * Captures the result of guardrail evaluations as JSON string performed on either the input to the agent or the output generated by the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("guardrailResult") + private final String guardrailResult; + + /** + * Captures the result of guardrail evaluations as JSON string performed on either the input to the agent or the output generated by the agent. + * @return the value + **/ + public String getGuardrailResult() { + return guardrailResult; + } + @Override public String toString() { return this.toString(true); @@ -126,6 +249,9 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("message=").append(String.valueOf(this.message)); sb.append(", traces=").append(String.valueOf(this.traces)); + sb.append(", toolResults=").append(String.valueOf(this.toolResults)); + sb.append(", requiredActions=").append(String.valueOf(this.requiredActions)); + sb.append(", guardrailResult=").append(String.valueOf(this.guardrailResult)); sb.append(")"); return sb.toString(); } @@ -142,6 +268,9 @@ public boolean equals(Object o) { ChatResult other = (ChatResult) o; return java.util.Objects.equals(this.message, other.message) && java.util.Objects.equals(this.traces, other.traces) + && java.util.Objects.equals(this.toolResults, other.toolResults) + && java.util.Objects.equals(this.requiredActions, other.requiredActions) + && java.util.Objects.equals(this.guardrailResult, other.guardrailResult) && super.equals(other); } @@ -151,6 +280,13 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); result = (result * PRIME) + (this.traces == null ? 43 : this.traces.hashCode()); + result = (result * PRIME) + (this.toolResults == null ? 43 : this.toolResults.hashCode()); + result = + (result * PRIME) + + (this.requiredActions == null ? 43 : this.requiredActions.hashCode()); + result = + (result * PRIME) + + (this.guardrailResult == null ? 43 : this.guardrailResult.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Citation.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Citation.java index b19d4b63a5..16ffe11b74 100644 --- a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Citation.java +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Citation.java @@ -5,7 +5,7 @@ package com.oracle.bmc.generativeaiagentruntime.model; /** - * The citation displays the location of source text that is the agent uses to create the responses. + * The source of information for the agent's response. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -25,20 +25,23 @@ public final class Citation extends com.oracle.bmc.http.internal.ExplicitlySetBm "sourceLocation", "title", "docId", - "pageNumbers" + "pageNumbers", + "metadata" }) public Citation( String sourceText, SourceLocation sourceLocation, String title, String docId, - java.util.List pageNumbers) { + java.util.List pageNumbers, + java.util.Map metadata) { super(); this.sourceText = sourceText; this.sourceLocation = sourceLocation; this.title = title; this.docId = docId; this.pageNumbers = pageNumbers; + this.metadata = metadata; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -116,6 +119,22 @@ public Builder pageNumbers(java.util.List pageNumbers) { this.__explicitlySet__.add("pageNumbers"); return this; } + /** + * The metadata of the retrieved document, if available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * The metadata of the retrieved document, if available. + * @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(); @@ -127,7 +146,8 @@ public Citation build() { this.sourceLocation, this.title, this.docId, - this.pageNumbers); + this.pageNumbers, + this.metadata); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -151,6 +171,9 @@ public Builder copy(Citation model) { if (model.wasPropertyExplicitlySet("pageNumbers")) { this.pageNumbers(model.getPageNumbers()); } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } return this; } } @@ -229,6 +252,20 @@ public java.util.List getPageNumbers() { return pageNumbers; } + /** + * The metadata of the retrieved document, if available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * The metadata of the retrieved document, if available. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + @Override public String toString() { return this.toString(true); @@ -248,6 +285,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", title=").append(String.valueOf(this.title)); sb.append(", docId=").append(String.valueOf(this.docId)); sb.append(", pageNumbers=").append(String.valueOf(this.pageNumbers)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); sb.append(")"); return sb.toString(); } @@ -267,6 +305,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.title, other.title) && java.util.Objects.equals(this.docId, other.docId) && java.util.Objects.equals(this.pageNumbers, other.pageNumbers) + && java.util.Objects.equals(this.metadata, other.metadata) && super.equals(other); } @@ -281,6 +320,7 @@ public int hashCode() { result = (result * PRIME) + (this.title == null ? 43 : this.title.hashCode()); result = (result * PRIME) + (this.docId == null ? 43 : this.docId.hashCode()); result = (result * PRIME) + (this.pageNumbers == null ? 43 : this.pageNumbers.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/FunctionCall.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/FunctionCall.java new file mode 100644 index 0000000000..61412f3159 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/FunctionCall.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * Represent a function call the client need to execute in order to fulfill the required action. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = FunctionCall.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FunctionCall extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "arguments"}) + public FunctionCall(String name, String arguments) { + super(); + this.name = name; + this.arguments = arguments; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of the function to be executed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of the function to be executed. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Arguments for the function call as a JSON string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("arguments") + private String arguments; + + /** + * Arguments for the function call as a JSON string. + * @param arguments the value to set + * @return this builder + **/ + public Builder arguments(String arguments) { + this.arguments = arguments; + this.__explicitlySet__.add("arguments"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FunctionCall build() { + FunctionCall model = new FunctionCall(this.name, this.arguments); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FunctionCall model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("arguments")) { + this.arguments(model.getArguments()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Name of the function to be executed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the function to be executed. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Arguments for the function call as a JSON string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("arguments") + private final String arguments; + + /** + * Arguments for the function call as a JSON string. + * @return the value + **/ + public String getArguments() { + return arguments; + } + + @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("FunctionCall("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", arguments=").append(String.valueOf(this.arguments)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FunctionCall)) { + return false; + } + + FunctionCall other = (FunctionCall) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.arguments, other.arguments) + && 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.arguments == null ? 43 : this.arguments.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/FunctionCallingPerformedAction.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/FunctionCallingPerformedAction.java new file mode 100644 index 0000000000..35eb2743a2 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/FunctionCallingPerformedAction.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * Represents an action for recording the result of a function call. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FunctionCallingPerformedAction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "performedActionType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FunctionCallingPerformedAction extends PerformedAction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("actionId") + private String actionId; + + public Builder actionId(String actionId) { + this.actionId = actionId; + this.__explicitlySet__.add("actionId"); + return this; + } + /** + * The result or output of the function call. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("functionCallOutput") + private String functionCallOutput; + + /** + * The result or output of the function call. + * @param functionCallOutput the value to set + * @return this builder + **/ + public Builder functionCallOutput(String functionCallOutput) { + this.functionCallOutput = functionCallOutput; + this.__explicitlySet__.add("functionCallOutput"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FunctionCallingPerformedAction build() { + FunctionCallingPerformedAction model = + new FunctionCallingPerformedAction(this.actionId, this.functionCallOutput); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FunctionCallingPerformedAction model) { + if (model.wasPropertyExplicitlySet("actionId")) { + this.actionId(model.getActionId()); + } + if (model.wasPropertyExplicitlySet("functionCallOutput")) { + this.functionCallOutput(model.getFunctionCallOutput()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public FunctionCallingPerformedAction(String actionId, String functionCallOutput) { + super(actionId); + this.functionCallOutput = functionCallOutput; + } + + /** + * The result or output of the function call. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("functionCallOutput") + private final String functionCallOutput; + + /** + * The result or output of the function call. + * @return the value + **/ + public String getFunctionCallOutput() { + return functionCallOutput; + } + + @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("FunctionCallingPerformedAction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", functionCallOutput=").append(String.valueOf(this.functionCallOutput)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FunctionCallingPerformedAction)) { + return false; + } + + FunctionCallingPerformedAction other = (FunctionCallingPerformedAction) o; + return java.util.Objects.equals(this.functionCallOutput, other.functionCallOutput) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.functionCallOutput == null + ? 43 + : this.functionCallOutput.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/FunctionCallingRequiredAction.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/FunctionCallingRequiredAction.java new file mode 100644 index 0000000000..ee22ea4d45 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/FunctionCallingRequiredAction.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * Represents an action for submitting function call outputs. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FunctionCallingRequiredAction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "requiredActionType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FunctionCallingRequiredAction extends RequiredAction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("actionId") + private String actionId; + + public Builder actionId(String actionId) { + this.actionId = actionId; + this.__explicitlySet__.add("actionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("functionCall") + private FunctionCall functionCall; + + public Builder functionCall(FunctionCall functionCall) { + this.functionCall = functionCall; + this.__explicitlySet__.add("functionCall"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FunctionCallingRequiredAction build() { + FunctionCallingRequiredAction model = + new FunctionCallingRequiredAction(this.actionId, this.functionCall); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FunctionCallingRequiredAction model) { + if (model.wasPropertyExplicitlySet("actionId")) { + this.actionId(model.getActionId()); + } + if (model.wasPropertyExplicitlySet("functionCall")) { + this.functionCall(model.getFunctionCall()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public FunctionCallingRequiredAction(String actionId, FunctionCall functionCall) { + super(actionId); + this.functionCall = functionCall; + } + + @com.fasterxml.jackson.annotation.JsonProperty("functionCall") + private final FunctionCall functionCall; + + public FunctionCall getFunctionCall() { + return functionCall; + } + + @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("FunctionCallingRequiredAction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", functionCall=").append(String.valueOf(this.functionCall)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FunctionCallingRequiredAction)) { + return false; + } + + FunctionCallingRequiredAction other = (FunctionCallingRequiredAction) o; + return java.util.Objects.equals(this.functionCall, other.functionCall) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.functionCall == null ? 43 : this.functionCall.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/HumanApprovalPerformedAction.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/HumanApprovalPerformedAction.java new file mode 100644 index 0000000000..a1023f5e7b --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/HumanApprovalPerformedAction.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * An action describing user approval to the agent. + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = HumanApprovalPerformedAction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "performedActionType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HumanApprovalPerformedAction extends PerformedAction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("actionId") + private String actionId; + + public Builder actionId(String actionId) { + this.actionId = actionId; + this.__explicitlySet__.add("actionId"); + return this; + } + /** + * The chosen approval or denial option to the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chosenOption") + private ChosenOption chosenOption; + + /** + * The chosen approval or denial option to the agent. + * @param chosenOption the value to set + * @return this builder + **/ + public Builder chosenOption(ChosenOption chosenOption) { + this.chosenOption = chosenOption; + this.__explicitlySet__.add("chosenOption"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HumanApprovalPerformedAction build() { + HumanApprovalPerformedAction model = + new HumanApprovalPerformedAction(this.actionId, this.chosenOption); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HumanApprovalPerformedAction model) { + if (model.wasPropertyExplicitlySet("actionId")) { + this.actionId(model.getActionId()); + } + if (model.wasPropertyExplicitlySet("chosenOption")) { + this.chosenOption(model.getChosenOption()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HumanApprovalPerformedAction(String actionId, ChosenOption chosenOption) { + super(actionId); + this.chosenOption = chosenOption; + } + + /** + * The chosen approval or denial option to the agent. + **/ + public enum ChosenOption { + Approve("APPROVE"), + Deny("DENY"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ChosenOption v : ChosenOption.values()) { + map.put(v.getValue(), v); + } + } + + ChosenOption(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ChosenOption create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ChosenOption: " + key); + } + }; + /** + * The chosen approval or denial option to the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chosenOption") + private final ChosenOption chosenOption; + + /** + * The chosen approval or denial option to the agent. + * @return the value + **/ + public ChosenOption getChosenOption() { + return chosenOption; + } + + @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("HumanApprovalPerformedAction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", chosenOption=").append(String.valueOf(this.chosenOption)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HumanApprovalPerformedAction)) { + return false; + } + + HumanApprovalPerformedAction other = (HumanApprovalPerformedAction) o; + return java.util.Objects.equals(this.chosenOption, other.chosenOption) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.chosenOption == null ? 43 : this.chosenOption.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/KnowledgeBaseMetadataSummary.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/KnowledgeBaseMetadataSummary.java new file mode 100644 index 0000000000..9725d6d0c1 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/KnowledgeBaseMetadataSummary.java @@ -0,0 +1,407 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * Represents metadata about a field including its name, type, supported operations, and possible values. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = KnowledgeBaseMetadataSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class KnowledgeBaseMetadataSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "type", + "operations", + "values", + "freeformTags", + "definedTags", + "systemTags" + }) + public KnowledgeBaseMetadataSummary( + String name, + String type, + java.util.List operations, + java.util.List values, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.name = name; + this.type = type; + this.operations = operations; + this.values = values; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the field + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the field + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The data type of the field (e.g., "array", "number", "string") + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private String type; + + /** + * The data type of the field (e.g., "array", "number", "string") + * @param type the value to set + * @return this builder + **/ + public Builder type(String type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * List of supported operations for this field (e.g., "equals", "in", "contains") + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operations") + private java.util.List operations; + + /** + * List of supported operations for this field (e.g., "equals", "in", "contains") + * @param operations the value to set + * @return this builder + **/ + public Builder operations(java.util.List operations) { + this.operations = operations; + this.__explicitlySet__.add("operations"); + return this; + } + /** + * List of metadata values available in the knowledge base along with the matching documents count. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private java.util.List values; + + /** + * List of metadata values available in the knowledge base along with the matching documents count. + * @param values the value to set + * @return this builder + **/ + public Builder values(java.util.List values) { + this.values = values; + this.__explicitlySet__.add("values"); + return this; + } + /** + * 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 KnowledgeBaseMetadataSummary build() { + KnowledgeBaseMetadataSummary model = + new KnowledgeBaseMetadataSummary( + this.name, + this.type, + this.operations, + this.values, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(KnowledgeBaseMetadataSummary model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("operations")) { + this.operations(model.getOperations()); + } + if (model.wasPropertyExplicitlySet("values")) { + this.values(model.getValues()); + } + 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 name of the field + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the field + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The data type of the field (e.g., "array", "number", "string") + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final String type; + + /** + * The data type of the field (e.g., "array", "number", "string") + * @return the value + **/ + public String getType() { + return type; + } + + /** + * List of supported operations for this field (e.g., "equals", "in", "contains") + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operations") + private final java.util.List operations; + + /** + * List of supported operations for this field (e.g., "equals", "in", "contains") + * @return the value + **/ + public java.util.List getOperations() { + return operations; + } + + /** + * List of metadata values available in the knowledge base along with the matching documents count. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private final java.util.List values; + + /** + * List of metadata values available in the knowledge base along with the matching documents count. + * @return the value + **/ + public java.util.List getValues() { + return values; + } + + /** + * 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("KnowledgeBaseMetadataSummary("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", operations=").append(String.valueOf(this.operations)); + sb.append(", values=").append(String.valueOf(this.values)); + 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 KnowledgeBaseMetadataSummary)) { + return false; + } + + KnowledgeBaseMetadataSummary other = (KnowledgeBaseMetadataSummary) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.operations, other.operations) + && java.util.Objects.equals(this.values, other.values) + && 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.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.operations == null ? 43 : this.operations.hashCode()); + result = (result * PRIME) + (this.values == null ? 43 : this.values.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-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/KnowledgeBaseMetadataValue.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/KnowledgeBaseMetadataValue.java new file mode 100644 index 0000000000..48817d63ff --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/KnowledgeBaseMetadataValue.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * Represents a metadata value and the number of appearances in knowledge base. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = KnowledgeBaseMetadataValue.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class KnowledgeBaseMetadataValue + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"value", "count"}) + public KnowledgeBaseMetadataValue(String value, Long count) { + super(); + this.value = value; + this.count = count; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The value of the metadata + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * The value of the metadata + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * Number of documents where this value exists + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private Long count; + + /** + * Number of documents where this value exists + * @param count the value to set + * @return this builder + **/ + public Builder count(Long count) { + this.count = count; + this.__explicitlySet__.add("count"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public KnowledgeBaseMetadataValue build() { + KnowledgeBaseMetadataValue model = + new KnowledgeBaseMetadataValue(this.value, this.count); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(KnowledgeBaseMetadataValue model) { + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("count")) { + this.count(model.getCount()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The value of the metadata + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * The value of the metadata + * @return the value + **/ + public String getValue() { + return value; + } + + /** + * Number of documents where this value exists + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private final Long count; + + /** + * Number of documents where this value exists + * @return the value + **/ + public Long getCount() { + return count; + } + + @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("KnowledgeBaseMetadataValue("); + sb.append("super=").append(super.toString()); + sb.append("value=").append(String.valueOf(this.value)); + sb.append(", count=").append(String.valueOf(this.count)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof KnowledgeBaseMetadataValue)) { + return false; + } + + KnowledgeBaseMetadataValue other = (KnowledgeBaseMetadataValue) o; + return java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.count, other.count) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.count == null ? 43 : this.count.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/MessageContent.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/MessageContent.java index b07e5357e6..522471f355 100644 --- a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/MessageContent.java +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/MessageContent.java @@ -20,11 +20,15 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class MessageContent extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"text", "citations"}) - public MessageContent(String text, java.util.List citations) { + @java.beans.ConstructorProperties({"text", "citations", "paragraphCitations"}) + public MessageContent( + String text, + java.util.List citations, + java.util.List paragraphCitations) { super(); this.text = text; this.citations = citations; + this.paragraphCitations = paragraphCitations; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -61,12 +65,29 @@ public Builder citations(java.util.List citations) { this.__explicitlySet__.add("citations"); return this; } + /** + * A list of citations used to generate the paragraphs of the agent message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("paragraphCitations") + private java.util.List paragraphCitations; + + /** + * A list of citations used to generate the paragraphs of the agent message. + * @param paragraphCitations the value to set + * @return this builder + **/ + public Builder paragraphCitations(java.util.List paragraphCitations) { + this.paragraphCitations = paragraphCitations; + this.__explicitlySet__.add("paragraphCitations"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public MessageContent build() { - MessageContent model = new MessageContent(this.text, this.citations); + MessageContent model = + new MessageContent(this.text, this.citations, this.paragraphCitations); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -81,6 +102,9 @@ public Builder copy(MessageContent model) { if (model.wasPropertyExplicitlySet("citations")) { this.citations(model.getCitations()); } + if (model.wasPropertyExplicitlySet("paragraphCitations")) { + this.paragraphCitations(model.getParagraphCitations()); + } return this; } } @@ -124,6 +148,20 @@ public java.util.List getCitations() { return citations; } + /** + * A list of citations used to generate the paragraphs of the agent message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("paragraphCitations") + private final java.util.List paragraphCitations; + + /** + * A list of citations used to generate the paragraphs of the agent message. + * @return the value + **/ + public java.util.List getParagraphCitations() { + return paragraphCitations; + } + @Override public String toString() { return this.toString(true); @@ -140,6 +178,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("text=").append(String.valueOf(this.text)); sb.append(", citations=").append(String.valueOf(this.citations)); + sb.append(", paragraphCitations=").append(String.valueOf(this.paragraphCitations)); sb.append(")"); return sb.toString(); } @@ -156,6 +195,7 @@ public boolean equals(Object o) { MessageContent other = (MessageContent) o; return java.util.Objects.equals(this.text, other.text) && java.util.Objects.equals(this.citations, other.citations) + && java.util.Objects.equals(this.paragraphCitations, other.paragraphCitations) && super.equals(other); } @@ -165,6 +205,11 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.text == null ? 43 : this.text.hashCode()); result = (result * PRIME) + (this.citations == null ? 43 : this.citations.hashCode()); + result = + (result * PRIME) + + (this.paragraphCitations == null + ? 43 + : this.paragraphCitations.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/MetadataFilter.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/MetadataFilter.java new file mode 100644 index 0000000000..cd6efd0955 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/MetadataFilter.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * Filter for retrieving specific 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = MetadataFilter.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MetadataFilter extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"fieldName", "value"}) + public MetadataFilter(String fieldName, String value) { + super(); + this.fieldName = fieldName; + this.value = value; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the field to filter on + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fieldName") + private String fieldName; + + /** + * The name of the field to filter on + * @param fieldName the value to set + * @return this builder + **/ + public Builder fieldName(String fieldName) { + this.fieldName = fieldName; + this.__explicitlySet__.add("fieldName"); + return this; + } + /** + * The value to filter for in the specified field + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * The value to filter for in the specified field + * @param value the value to set + * @return this builder + **/ + public Builder value(String 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 MetadataFilter build() { + MetadataFilter model = new MetadataFilter(this.fieldName, this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MetadataFilter model) { + if (model.wasPropertyExplicitlySet("fieldName")) { + this.fieldName(model.getFieldName()); + } + 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); + } + + /** + * The name of the field to filter on + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fieldName") + private final String fieldName; + + /** + * The name of the field to filter on + * @return the value + **/ + public String getFieldName() { + return fieldName; + } + + /** + * The value to filter for in the specified field + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * The value to filter for in the specified field + * @return the value + **/ + public String 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("MetadataFilter("); + sb.append("super=").append(super.toString()); + sb.append("fieldName=").append(String.valueOf(this.fieldName)); + 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 MetadataFilter)) { + return false; + } + + MetadataFilter other = (MetadataFilter) o; + return java.util.Objects.equals(this.fieldName, other.fieldName) + && java.util.Objects.equals(this.value, other.value) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.fieldName == null ? 43 : this.fieldName.hashCode()); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Paragraph.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Paragraph.java new file mode 100644 index 0000000000..37e0489574 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Paragraph.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The paragraph of the generated message that contains a citation. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Paragraph.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Paragraph extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"text", "start", "end"}) + public Paragraph(String text, Integer start, Integer end) { + super(); + this.text = text; + this.start = start; + this.end = end; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The part of the generated message that contains a citation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("text") + private String text; + + /** + * The part of the generated message that contains a citation. + * @param text the value to set + * @return this builder + **/ + public Builder text(String text) { + this.text = text; + this.__explicitlySet__.add("text"); + return this; + } + /** + * Where the text with a citation starts in the generated message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("start") + private Integer start; + + /** + * Where the text with a citation starts in the generated message. + * @param start the value to set + * @return this builder + **/ + public Builder start(Integer start) { + this.start = start; + this.__explicitlySet__.add("start"); + return this; + } + /** + * Where the text with a citation ends in the generated message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("end") + private Integer end; + + /** + * Where the text with a citation ends in the generated message. + * @param end the value to set + * @return this builder + **/ + public Builder end(Integer end) { + this.end = end; + this.__explicitlySet__.add("end"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Paragraph build() { + Paragraph model = new Paragraph(this.text, this.start, this.end); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Paragraph model) { + if (model.wasPropertyExplicitlySet("text")) { + this.text(model.getText()); + } + if (model.wasPropertyExplicitlySet("start")) { + this.start(model.getStart()); + } + if (model.wasPropertyExplicitlySet("end")) { + this.end(model.getEnd()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The part of the generated message that contains a citation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("text") + private final String text; + + /** + * The part of the generated message that contains a citation. + * @return the value + **/ + public String getText() { + return text; + } + + /** + * Where the text with a citation starts in the generated message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("start") + private final Integer start; + + /** + * Where the text with a citation starts in the generated message. + * @return the value + **/ + public Integer getStart() { + return start; + } + + /** + * Where the text with a citation ends in the generated message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("end") + private final Integer end; + + /** + * Where the text with a citation ends in the generated message. + * @return the value + **/ + public Integer getEnd() { + return end; + } + + @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("Paragraph("); + sb.append("super=").append(super.toString()); + sb.append("text=").append(String.valueOf(this.text)); + sb.append(", start=").append(String.valueOf(this.start)); + sb.append(", end=").append(String.valueOf(this.end)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Paragraph)) { + return false; + } + + Paragraph other = (Paragraph) o; + return java.util.Objects.equals(this.text, other.text) + && java.util.Objects.equals(this.start, other.start) + && java.util.Objects.equals(this.end, other.end) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.text == null ? 43 : this.text.hashCode()); + result = (result * PRIME) + (this.start == null ? 43 : this.start.hashCode()); + result = (result * PRIME) + (this.end == null ? 43 : this.end.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ParagraphCitation.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ParagraphCitation.java new file mode 100644 index 0000000000..e2c8e9f876 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ParagraphCitation.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The source of information for the paragraph of agent's 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ParagraphCitation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ParagraphCitation extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"paragraph", "citations"}) + public ParagraphCitation(Paragraph paragraph, java.util.List citations) { + super(); + this.paragraph = paragraph; + this.citations = citations; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("paragraph") + private Paragraph paragraph; + + public Builder paragraph(Paragraph paragraph) { + this.paragraph = paragraph; + this.__explicitlySet__.add("paragraph"); + return this; + } + /** + * A list of citations for the paragraph of the generated message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("citations") + private java.util.List citations; + + /** + * A list of citations for the paragraph of the generated message. + * @param citations the value to set + * @return this builder + **/ + public Builder citations(java.util.List citations) { + this.citations = citations; + this.__explicitlySet__.add("citations"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ParagraphCitation build() { + ParagraphCitation model = new ParagraphCitation(this.paragraph, this.citations); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ParagraphCitation model) { + if (model.wasPropertyExplicitlySet("paragraph")) { + this.paragraph(model.getParagraph()); + } + if (model.wasPropertyExplicitlySet("citations")) { + this.citations(model.getCitations()); + } + 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("paragraph") + private final Paragraph paragraph; + + public Paragraph getParagraph() { + return paragraph; + } + + /** + * A list of citations for the paragraph of the generated message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("citations") + private final java.util.List citations; + + /** + * A list of citations for the paragraph of the generated message. + * @return the value + **/ + public java.util.List getCitations() { + return citations; + } + + @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("ParagraphCitation("); + sb.append("super=").append(super.toString()); + sb.append("paragraph=").append(String.valueOf(this.paragraph)); + sb.append(", citations=").append(String.valueOf(this.citations)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ParagraphCitation)) { + return false; + } + + ParagraphCitation other = (ParagraphCitation) o; + return java.util.Objects.equals(this.paragraph, other.paragraph) + && java.util.Objects.equals(this.citations, other.citations) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.paragraph == null ? 43 : this.paragraph.hashCode()); + result = (result * PRIME) + (this.citations == null ? 43 : this.citations.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/PerformedAction.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/PerformedAction.java new file mode 100644 index 0000000000..b1a58f1a0d --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/PerformedAction.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The base structure for an action that has already been performed. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "performedActionType", + defaultImpl = PerformedAction.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = FunctionCallingPerformedAction.class, + name = "FUNCTION_CALLING_PERFORMED_ACTION" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HumanApprovalPerformedAction.class, + name = "HUMAN_APPROVAL_PERFORMED_ACTION" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class PerformedAction extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"actionId"}) + protected PerformedAction(String actionId) { + super(); + this.actionId = actionId; + } + + /** + * The unique identifier for the action that has been performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionId") + private final String actionId; + + /** + * The unique identifier for the action that has been performed. + * @return the value + **/ + public String getActionId() { + return actionId; + } + + @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("PerformedAction("); + sb.append("super=").append(super.toString()); + sb.append("actionId=").append(String.valueOf(this.actionId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PerformedAction)) { + return false; + } + + PerformedAction other = (PerformedAction) o; + return java.util.Objects.equals(this.actionId, other.actionId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.actionId == null ? 43 : this.actionId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Specifies the type of the performed action. + **/ + public enum PerformedActionType { + HumanApprovalPerformedAction("HUMAN_APPROVAL_PERFORMED_ACTION"), + FunctionCallingPerformedAction("FUNCTION_CALLING_PERFORMED_ACTION"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PerformedActionType v : PerformedActionType.values()) { + map.put(v.getValue(), v); + } + } + + PerformedActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PerformedActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid PerformedActionType: " + key); + } + }; +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/RequiredAction.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/RequiredAction.java new file mode 100644 index 0000000000..3e4778d95b --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/RequiredAction.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * Represents an action that needs to be performed by the user or client. + * + *
+ * 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: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "requiredActionType", + defaultImpl = RequiredAction.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = FunctionCallingRequiredAction.class, + name = "FUNCTION_CALLING_REQUIRED_ACTION" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class RequiredAction extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"actionId"}) + protected RequiredAction(String actionId) { + super(); + this.actionId = actionId; + } + + /** + * The unique identifier for the action to be performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionId") + private final String actionId; + + /** + * The unique identifier for the action to be performed. + * @return the value + **/ + public String getActionId() { + return actionId; + } + + @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("RequiredAction("); + sb.append("super=").append(super.toString()); + sb.append("actionId=").append(String.valueOf(this.actionId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RequiredAction)) { + return false; + } + + RequiredAction other = (RequiredAction) o; + return java.util.Objects.equals(this.actionId, other.actionId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.actionId == null ? 43 : this.actionId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Specifies the type of action. Used for determining the action subtype. + **/ + public enum RequiredActionType { + HumanApprovalRequiredAction("HUMAN_APPROVAL_REQUIRED_ACTION"), + FunctionCallingRequiredAction("FUNCTION_CALLING_REQUIRED_ACTION"), + + /** + * 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(RequiredActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RequiredActionType v : RequiredActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + RequiredActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RequiredActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'RequiredActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/RetrieveMetadataDetails.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/RetrieveMetadataDetails.java new file mode 100644 index 0000000000..873056148d --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/RetrieveMetadataDetails.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * Details to retrieve 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: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RetrieveMetadataDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RetrieveMetadataDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"filters"}) + public RetrieveMetadataDetails(java.util.List filters) { + super(); + this.filters = filters; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of metadata filters to narrow down the retrieved metadata + **/ + @com.fasterxml.jackson.annotation.JsonProperty("filters") + private java.util.List filters; + + /** + * List of metadata filters to narrow down the retrieved metadata + * @param filters the value to set + * @return this builder + **/ + public Builder filters(java.util.List filters) { + this.filters = filters; + this.__explicitlySet__.add("filters"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RetrieveMetadataDetails build() { + RetrieveMetadataDetails model = new RetrieveMetadataDetails(this.filters); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RetrieveMetadataDetails model) { + if (model.wasPropertyExplicitlySet("filters")) { + this.filters(model.getFilters()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of metadata filters to narrow down the retrieved metadata + **/ + @com.fasterxml.jackson.annotation.JsonProperty("filters") + private final java.util.List filters; + + /** + * List of metadata filters to narrow down the retrieved metadata + * @return the value + **/ + public java.util.List getFilters() { + return filters; + } + + @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("RetrieveMetadataDetails("); + sb.append("super=").append(super.toString()); + sb.append("filters=").append(String.valueOf(this.filters)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RetrieveMetadataDetails)) { + return false; + } + + RetrieveMetadataDetails other = (RetrieveMetadataDetails) o; + return java.util.Objects.equals(this.filters, other.filters) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.filters == null ? 43 : this.filters.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/RetrieveMetadataRequest.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/RetrieveMetadataRequest.java new file mode 100644 index 0000000000..c76fb148ee --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/RetrieveMetadataRequest.java @@ -0,0 +1,370 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.requests; + +import com.oracle.bmc.generativeaiagentruntime.model.*; +/** + * Example: Click here to see how to use RetrieveMetadataRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class RetrieveMetadataRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagentruntime.model.RetrieveMetadataDetails> { + + /** + * A unique ID for the Knowledge Base. + */ + private String knowledgeBaseId; + + /** + * A unique ID for the Knowledge Base. + */ + public String getKnowledgeBaseId() { + return knowledgeBaseId; + } + /** + * Input for retrieve metadata. + */ + private com.oracle.bmc.generativeaiagentruntime.model.RetrieveMetadataDetails + retrieveMetadataDetails; + + /** + * Input for retrieve metadata. + */ + public com.oracle.bmc.generativeaiagentruntime.model.RetrieveMetadataDetails + getRetrieveMetadataDetails() { + return retrieveMetadataDetails; + } + /** + * 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.generativeaiagentruntime.model.RetrieveMetadataDetails getBody$() { + return retrieveMetadataDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RetrieveMetadataRequest, + com.oracle.bmc.generativeaiagentruntime.model.RetrieveMetadataDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A unique ID for the Knowledge Base. + */ + private String knowledgeBaseId = null; + + /** + * A unique ID for the Knowledge Base. + * @param knowledgeBaseId the value to set + * @return this builder instance + */ + public Builder knowledgeBaseId(String knowledgeBaseId) { + this.knowledgeBaseId = knowledgeBaseId; + return this; + } + + /** + * Input for retrieve metadata. + */ + private com.oracle.bmc.generativeaiagentruntime.model.RetrieveMetadataDetails + retrieveMetadataDetails = null; + + /** + * Input for retrieve metadata. + * @param retrieveMetadataDetails the value to set + * @return this builder instance + */ + public Builder retrieveMetadataDetails( + com.oracle.bmc.generativeaiagentruntime.model.RetrieveMetadataDetails + retrieveMetadataDetails) { + this.retrieveMetadataDetails = retrieveMetadataDetails; + 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(RetrieveMetadataRequest o) { + knowledgeBaseId(o.getKnowledgeBaseId()); + retrieveMetadataDetails(o.getRetrieveMetadataDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RetrieveMetadataRequest 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 RetrieveMetadataRequest + */ + public RetrieveMetadataRequest build() { + RetrieveMetadataRequest 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.generativeaiagentruntime.model.RetrieveMetadataDetails body) { + retrieveMetadataDetails(body); + return this; + } + + /** + * Build the instance of RetrieveMetadataRequest 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 RetrieveMetadataRequest + */ + public RetrieveMetadataRequest buildWithoutInvocationCallback() { + RetrieveMetadataRequest request = new RetrieveMetadataRequest(); + request.knowledgeBaseId = knowledgeBaseId; + request.retrieveMetadataDetails = retrieveMetadataDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new RetrieveMetadataRequest(knowledgeBaseId, retrieveMetadataDetails, 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() + .knowledgeBaseId(knowledgeBaseId) + .retrieveMetadataDetails(retrieveMetadataDetails) + .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(",knowledgeBaseId=").append(String.valueOf(this.knowledgeBaseId)); + sb.append(",retrieveMetadataDetails=").append(String.valueOf(this.retrieveMetadataDetails)); + 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 RetrieveMetadataRequest)) { + return false; + } + + RetrieveMetadataRequest other = (RetrieveMetadataRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.knowledgeBaseId, other.knowledgeBaseId) + && java.util.Objects.equals( + this.retrieveMetadataDetails, other.retrieveMetadataDetails) + && 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.knowledgeBaseId == null ? 43 : this.knowledgeBaseId.hashCode()); + result = + (result * PRIME) + + (this.retrieveMetadataDetails == null + ? 43 + : this.retrieveMetadataDetails.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-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/RetrieveMetadataResponse.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/RetrieveMetadataResponse.java new file mode 100644 index 0000000000..b2a3d122a8 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/RetrieveMetadataResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.responses; + +import com.oracle.bmc.generativeaiagentruntime.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class RetrieveMetadataResponse 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 list of com.oracle.bmc.generativeaiagentruntime.model.KnowledgeBaseMetadataSummary instances. + */ + private java.util.List< + com.oracle.bmc.generativeaiagentruntime.model.KnowledgeBaseMetadataSummary> + items; + + /** + * A list of com.oracle.bmc.generativeaiagentruntime.model.KnowledgeBaseMetadataSummary instances. + * @return the value + */ + public java.util.List< + com.oracle.bmc.generativeaiagentruntime.model.KnowledgeBaseMetadataSummary> + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "items" + }) + private RetrieveMetadataResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + java.util.List< + com.oracle.bmc.generativeaiagentruntime.model + .KnowledgeBaseMetadataSummary> + items) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.items = items; + } + + 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 list of com.oracle.bmc.generativeaiagentruntime.model.KnowledgeBaseMetadataSummary instances. + */ + private java.util.List< + com.oracle.bmc.generativeaiagentruntime.model.KnowledgeBaseMetadataSummary> + items; + + /** + * A list of com.oracle.bmc.generativeaiagentruntime.model.KnowledgeBaseMetadataSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List< + com.oracle.bmc.generativeaiagentruntime.model + .KnowledgeBaseMetadataSummary> + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RetrieveMetadataResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RetrieveMetadataResponse build() { + return new RetrieveMetadataResponse( + __httpStatusCode__, headers, etag, opcRequestId, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RetrieveMetadataResponse)) { + return false; + } + + RetrieveMetadataResponse other = (RetrieveMetadataResponse) 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.items, other.items); + } + + @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.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiinference/pom.xml b/bmc-generativeaiinference/pom.xml index f92342d45d..ed67a840e3 100644 --- a/bmc-generativeaiinference/pom.xml +++ b/bmc-generativeaiinference/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-generativeaiinference @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-genericartifactscontent/pom.xml b/bmc-genericartifactscontent/pom.xml index 2dc67660ae..e159eb74b0 100644 --- a/bmc-genericartifactscontent/pom.xml +++ b/bmc-genericartifactscontent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-genericartifactscontent @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-globallydistributeddatabase/pom.xml b/bmc-globallydistributeddatabase/pom.xml index 441d35f42c..eb51ed42d9 100644 --- a/bmc-globallydistributeddatabase/pom.xml +++ b/bmc-globallydistributeddatabase/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-globallydistributeddatabase @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-goldengate/pom.xml b/bmc-goldengate/pom.xml index 365da2f6ee..5960015722 100644 --- a/bmc-goldengate/pom.xml +++ b/bmc-goldengate/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-goldengate @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/BackupSchedule.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/BackupSchedule.java new file mode 100644 index 0000000000..2403667a56 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/BackupSchedule.java @@ -0,0 +1,421 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.model; + +/** + * Defines the schedule of the deployment backup. + * + *
+ * 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: 20200407") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = BackupSchedule.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BackupSchedule extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "timeBackupScheduled", + "frequencyBackupScheduled", + "bucketName", + "compartmentId", + "namespaceName", + "isMetadataOnly" + }) + public BackupSchedule( + java.util.Date timeBackupScheduled, + FrequencyBackupScheduled frequencyBackupScheduled, + String bucketName, + String compartmentId, + String namespaceName, + Boolean isMetadataOnly) { + super(); + this.timeBackupScheduled = timeBackupScheduled; + this.frequencyBackupScheduled = frequencyBackupScheduled; + this.bucketName = bucketName; + this.compartmentId = compartmentId; + this.namespaceName = namespaceName; + this.isMetadataOnly = isMetadataOnly; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The start timestamp for the deployment backup schedule. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBackupScheduled") + private java.util.Date timeBackupScheduled; + + /** + * The start timestamp for the deployment backup schedule. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + * @param timeBackupScheduled the value to set + * @return this builder + **/ + public Builder timeBackupScheduled(java.util.Date timeBackupScheduled) { + this.timeBackupScheduled = timeBackupScheduled; + this.__explicitlySet__.add("timeBackupScheduled"); + return this; + } + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("frequencyBackupScheduled") + private FrequencyBackupScheduled frequencyBackupScheduled; + + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + * @param frequencyBackupScheduled the value to set + * @return this builder + **/ + public Builder frequencyBackupScheduled(FrequencyBackupScheduled frequencyBackupScheduled) { + this.frequencyBackupScheduled = frequencyBackupScheduled; + this.__explicitlySet__.add("frequencyBackupScheduled"); + return this; + } + /** + * Name of the bucket where the object is to be uploaded in the object storage + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * Name of the bucket where the object is to be uploaded in the object storage + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Name of namespace that serves as a container for all of your buckets + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private String namespaceName; + + /** + * Name of namespace that serves as a container for all of your buckets + * @param namespaceName the value to set + * @return this builder + **/ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + this.__explicitlySet__.add("namespaceName"); + return this; + } + /** + * Parameter to allow users to create backup without trails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMetadataOnly") + private Boolean isMetadataOnly; + + /** + * Parameter to allow users to create backup without trails + * @param isMetadataOnly the value to set + * @return this builder + **/ + public Builder isMetadataOnly(Boolean isMetadataOnly) { + this.isMetadataOnly = isMetadataOnly; + this.__explicitlySet__.add("isMetadataOnly"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BackupSchedule build() { + BackupSchedule model = + new BackupSchedule( + this.timeBackupScheduled, + this.frequencyBackupScheduled, + this.bucketName, + this.compartmentId, + this.namespaceName, + this.isMetadataOnly); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BackupSchedule model) { + if (model.wasPropertyExplicitlySet("timeBackupScheduled")) { + this.timeBackupScheduled(model.getTimeBackupScheduled()); + } + if (model.wasPropertyExplicitlySet("frequencyBackupScheduled")) { + this.frequencyBackupScheduled(model.getFrequencyBackupScheduled()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("namespaceName")) { + this.namespaceName(model.getNamespaceName()); + } + if (model.wasPropertyExplicitlySet("isMetadataOnly")) { + this.isMetadataOnly(model.getIsMetadataOnly()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The start timestamp for the deployment backup schedule. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBackupScheduled") + private final java.util.Date timeBackupScheduled; + + /** + * The start timestamp for the deployment backup schedule. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + * @return the value + **/ + public java.util.Date getTimeBackupScheduled() { + return timeBackupScheduled; + } + + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + **/ + public enum FrequencyBackupScheduled { + Daily("DAILY"), + Weekly("WEEKLY"), + Monthly("MONTHLY"), + + /** + * 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(FrequencyBackupScheduled.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (FrequencyBackupScheduled v : FrequencyBackupScheduled.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + FrequencyBackupScheduled(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static FrequencyBackupScheduled create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'FrequencyBackupScheduled', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("frequencyBackupScheduled") + private final FrequencyBackupScheduled frequencyBackupScheduled; + + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + * @return the value + **/ + public FrequencyBackupScheduled getFrequencyBackupScheduled() { + return frequencyBackupScheduled; + } + + /** + * Name of the bucket where the object is to be uploaded in the object storage + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * Name of the bucket where the object is to be uploaded in the object storage + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + * + **/ + @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 being referenced. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Name of namespace that serves as a container for all of your buckets + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private final String namespaceName; + + /** + * Name of namespace that serves as a container for all of your buckets + * @return the value + **/ + public String getNamespaceName() { + return namespaceName; + } + + /** + * Parameter to allow users to create backup without trails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMetadataOnly") + private final Boolean isMetadataOnly; + + /** + * Parameter to allow users to create backup without trails + * @return the value + **/ + public Boolean getIsMetadataOnly() { + return isMetadataOnly; + } + + @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("BackupSchedule("); + sb.append("super=").append(super.toString()); + sb.append("timeBackupScheduled=").append(String.valueOf(this.timeBackupScheduled)); + sb.append(", frequencyBackupScheduled=") + .append(String.valueOf(this.frequencyBackupScheduled)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(", isMetadataOnly=").append(String.valueOf(this.isMetadataOnly)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BackupSchedule)) { + return false; + } + + BackupSchedule other = (BackupSchedule) o; + return java.util.Objects.equals(this.timeBackupScheduled, other.timeBackupScheduled) + && java.util.Objects.equals( + this.frequencyBackupScheduled, other.frequencyBackupScheduled) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.isMetadataOnly, other.isMetadataOnly) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.timeBackupScheduled == null + ? 43 + : this.timeBackupScheduled.hashCode()); + result = + (result * PRIME) + + (this.frequencyBackupScheduled == null + ? 43 + : this.frequencyBackupScheduled.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = + (result * PRIME) + + (this.isMetadataOnly == null ? 43 : this.isMetadataOnly.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateBackupScheduleDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateBackupScheduleDetails.java new file mode 100644 index 0000000000..6689b43d0a --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateBackupScheduleDetails.java @@ -0,0 +1,411 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.model; + +/** + * Defines the backup schedule details for create 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: 20200407") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateBackupScheduleDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateBackupScheduleDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "timeBackupScheduled", + "frequencyBackupScheduled", + "bucketName", + "compartmentId", + "namespaceName", + "isMetadataOnly" + }) + public CreateBackupScheduleDetails( + java.util.Date timeBackupScheduled, + FrequencyBackupScheduled frequencyBackupScheduled, + String bucketName, + String compartmentId, + String namespaceName, + Boolean isMetadataOnly) { + super(); + this.timeBackupScheduled = timeBackupScheduled; + this.frequencyBackupScheduled = frequencyBackupScheduled; + this.bucketName = bucketName; + this.compartmentId = compartmentId; + this.namespaceName = namespaceName; + this.isMetadataOnly = isMetadataOnly; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The start timestamp for the deployment backup schedule. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBackupScheduled") + private java.util.Date timeBackupScheduled; + + /** + * The start timestamp for the deployment backup schedule. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + * @param timeBackupScheduled the value to set + * @return this builder + **/ + public Builder timeBackupScheduled(java.util.Date timeBackupScheduled) { + this.timeBackupScheduled = timeBackupScheduled; + this.__explicitlySet__.add("timeBackupScheduled"); + return this; + } + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("frequencyBackupScheduled") + private FrequencyBackupScheduled frequencyBackupScheduled; + + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + * @param frequencyBackupScheduled the value to set + * @return this builder + **/ + public Builder frequencyBackupScheduled(FrequencyBackupScheduled frequencyBackupScheduled) { + this.frequencyBackupScheduled = frequencyBackupScheduled; + this.__explicitlySet__.add("frequencyBackupScheduled"); + return this; + } + /** + * Name of the bucket where the object is to be uploaded in the object storage + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * Name of the bucket where the object is to be uploaded in the object storage + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Name of namespace that serves as a container for all of your buckets + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private String namespaceName; + + /** + * Name of namespace that serves as a container for all of your buckets + * @param namespaceName the value to set + * @return this builder + **/ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + this.__explicitlySet__.add("namespaceName"); + return this; + } + /** + * Parameter to allow users to create backup without trails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMetadataOnly") + private Boolean isMetadataOnly; + + /** + * Parameter to allow users to create backup without trails + * @param isMetadataOnly the value to set + * @return this builder + **/ + public Builder isMetadataOnly(Boolean isMetadataOnly) { + this.isMetadataOnly = isMetadataOnly; + this.__explicitlySet__.add("isMetadataOnly"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateBackupScheduleDetails build() { + CreateBackupScheduleDetails model = + new CreateBackupScheduleDetails( + this.timeBackupScheduled, + this.frequencyBackupScheduled, + this.bucketName, + this.compartmentId, + this.namespaceName, + this.isMetadataOnly); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateBackupScheduleDetails model) { + if (model.wasPropertyExplicitlySet("timeBackupScheduled")) { + this.timeBackupScheduled(model.getTimeBackupScheduled()); + } + if (model.wasPropertyExplicitlySet("frequencyBackupScheduled")) { + this.frequencyBackupScheduled(model.getFrequencyBackupScheduled()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("namespaceName")) { + this.namespaceName(model.getNamespaceName()); + } + if (model.wasPropertyExplicitlySet("isMetadataOnly")) { + this.isMetadataOnly(model.getIsMetadataOnly()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The start timestamp for the deployment backup schedule. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBackupScheduled") + private final java.util.Date timeBackupScheduled; + + /** + * The start timestamp for the deployment backup schedule. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + * @return the value + **/ + public java.util.Date getTimeBackupScheduled() { + return timeBackupScheduled; + } + + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + **/ + public enum FrequencyBackupScheduled { + Daily("DAILY"), + Weekly("WEEKLY"), + Monthly("MONTHLY"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (FrequencyBackupScheduled v : FrequencyBackupScheduled.values()) { + map.put(v.getValue(), v); + } + } + + FrequencyBackupScheduled(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static FrequencyBackupScheduled create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid FrequencyBackupScheduled: " + key); + } + }; + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("frequencyBackupScheduled") + private final FrequencyBackupScheduled frequencyBackupScheduled; + + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + * @return the value + **/ + public FrequencyBackupScheduled getFrequencyBackupScheduled() { + return frequencyBackupScheduled; + } + + /** + * Name of the bucket where the object is to be uploaded in the object storage + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * Name of the bucket where the object is to be uploaded in the object storage + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + * + **/ + @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 being referenced. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Name of namespace that serves as a container for all of your buckets + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private final String namespaceName; + + /** + * Name of namespace that serves as a container for all of your buckets + * @return the value + **/ + public String getNamespaceName() { + return namespaceName; + } + + /** + * Parameter to allow users to create backup without trails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMetadataOnly") + private final Boolean isMetadataOnly; + + /** + * Parameter to allow users to create backup without trails + * @return the value + **/ + public Boolean getIsMetadataOnly() { + return isMetadataOnly; + } + + @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("CreateBackupScheduleDetails("); + sb.append("super=").append(super.toString()); + sb.append("timeBackupScheduled=").append(String.valueOf(this.timeBackupScheduled)); + sb.append(", frequencyBackupScheduled=") + .append(String.valueOf(this.frequencyBackupScheduled)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(", isMetadataOnly=").append(String.valueOf(this.isMetadataOnly)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateBackupScheduleDetails)) { + return false; + } + + CreateBackupScheduleDetails other = (CreateBackupScheduleDetails) o; + return java.util.Objects.equals(this.timeBackupScheduled, other.timeBackupScheduled) + && java.util.Objects.equals( + this.frequencyBackupScheduled, other.frequencyBackupScheduled) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.isMetadataOnly, other.isMetadataOnly) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.timeBackupScheduled == null + ? 43 + : this.timeBackupScheduled.hashCode()); + result = + (result * PRIME) + + (this.frequencyBackupScheduled == null + ? 43 + : this.frequencyBackupScheduled.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = + (result * PRIME) + + (this.isMetadataOnly == null ? 43 : this.isMetadataOnly.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDeploymentDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDeploymentDetails.java index 6ff49e1384..f8d0f62150 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDeploymentDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDeploymentDetails.java @@ -43,7 +43,8 @@ public final class CreateDeploymentDetails "deploymentType", "oggData", "maintenanceWindow", - "maintenanceConfiguration" + "maintenanceConfiguration", + "backupSchedule" }) public CreateDeploymentDetails( String displayName, @@ -65,7 +66,8 @@ public CreateDeploymentDetails( DeploymentType deploymentType, CreateOggDeploymentDetails oggData, CreateMaintenanceWindowDetails maintenanceWindow, - CreateMaintenanceConfigurationDetails maintenanceConfiguration) { + CreateMaintenanceConfigurationDetails maintenanceConfiguration, + CreateBackupScheduleDetails backupSchedule) { super(); this.displayName = displayName; this.licenseModel = licenseModel; @@ -87,6 +89,7 @@ public CreateDeploymentDetails( this.oggData = oggData; this.maintenanceWindow = maintenanceWindow; this.maintenanceConfiguration = maintenanceConfiguration; + this.backupSchedule = backupSchedule; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -447,6 +450,15 @@ public Builder maintenanceConfiguration( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("backupSchedule") + private CreateBackupScheduleDetails backupSchedule; + + public Builder backupSchedule(CreateBackupScheduleDetails backupSchedule) { + this.backupSchedule = backupSchedule; + this.__explicitlySet__.add("backupSchedule"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -472,7 +484,8 @@ public CreateDeploymentDetails build() { this.deploymentType, this.oggData, this.maintenanceWindow, - this.maintenanceConfiguration); + this.maintenanceConfiguration, + this.backupSchedule); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -541,6 +554,9 @@ public Builder copy(CreateDeploymentDetails model) { if (model.wasPropertyExplicitlySet("maintenanceConfiguration")) { this.maintenanceConfiguration(model.getMaintenanceConfiguration()); } + if (model.wasPropertyExplicitlySet("backupSchedule")) { + this.backupSchedule(model.getBackupSchedule()); + } return this; } } @@ -869,6 +885,13 @@ public CreateMaintenanceConfigurationDetails getMaintenanceConfiguration() { return maintenanceConfiguration; } + @com.fasterxml.jackson.annotation.JsonProperty("backupSchedule") + private final CreateBackupScheduleDetails backupSchedule; + + public CreateBackupScheduleDetails getBackupSchedule() { + return backupSchedule; + } + @Override public String toString() { return this.toString(true); @@ -904,6 +927,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", maintenanceWindow=").append(String.valueOf(this.maintenanceWindow)); sb.append(", maintenanceConfiguration=") .append(String.valueOf(this.maintenanceConfiguration)); + sb.append(", backupSchedule=").append(String.valueOf(this.backupSchedule)); sb.append(")"); return sb.toString(); } @@ -939,6 +963,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.maintenanceWindow, other.maintenanceWindow) && java.util.Objects.equals( this.maintenanceConfiguration, other.maintenanceConfiguration) + && java.util.Objects.equals(this.backupSchedule, other.backupSchedule) && super.equals(other); } @@ -990,6 +1015,9 @@ public int hashCode() { + (this.maintenanceConfiguration == null ? 43 : this.maintenanceConfiguration.hashCode()); + result = + (result * PRIME) + + (this.backupSchedule == null ? 43 : this.backupSchedule.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Deployment.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Deployment.java index e6721c6ff7..8b45f2b2ac 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Deployment.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Deployment.java @@ -63,6 +63,9 @@ public final class Deployment extends com.oracle.bmc.http.internal.ExplicitlySet "nextMaintenanceDescription", "maintenanceConfiguration", "timeOggVersionSupportedUntil", + "backupSchedule", + "timeLastBackupScheduled", + "timeNextBackupScheduled", "ingressIps" }) public Deployment( @@ -108,6 +111,9 @@ public Deployment( String nextMaintenanceDescription, MaintenanceConfiguration maintenanceConfiguration, java.util.Date timeOggVersionSupportedUntil, + BackupSchedule backupSchedule, + java.util.Date timeLastBackupScheduled, + java.util.Date timeNextBackupScheduled, java.util.List ingressIps) { super(); this.id = id; @@ -152,6 +158,9 @@ public Deployment( this.nextMaintenanceDescription = nextMaintenanceDescription; this.maintenanceConfiguration = maintenanceConfiguration; this.timeOggVersionSupportedUntil = timeOggVersionSupportedUntil; + this.backupSchedule = backupSchedule; + this.timeLastBackupScheduled = timeLastBackupScheduled; + this.timeNextBackupScheduled = timeNextBackupScheduled; this.ingressIps = ingressIps; } @@ -937,6 +946,55 @@ public Builder timeOggVersionSupportedUntil(java.util.Date timeOggVersionSupport this.__explicitlySet__.add("timeOggVersionSupportedUntil"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("backupSchedule") + private BackupSchedule backupSchedule; + + public Builder backupSchedule(BackupSchedule backupSchedule) { + this.backupSchedule = backupSchedule; + this.__explicitlySet__.add("backupSchedule"); + return this; + } + /** + * The timestamp of last deployment backup scheduled. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastBackupScheduled") + private java.util.Date timeLastBackupScheduled; + + /** + * The timestamp of last deployment backup scheduled. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + * @param timeLastBackupScheduled the value to set + * @return this builder + **/ + public Builder timeLastBackupScheduled(java.util.Date timeLastBackupScheduled) { + this.timeLastBackupScheduled = timeLastBackupScheduled; + this.__explicitlySet__.add("timeLastBackupScheduled"); + return this; + } + /** + * The timestamp of next deployment backup scheduled. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-26T20:19:29.600Z}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeNextBackupScheduled") + private java.util.Date timeNextBackupScheduled; + + /** + * The timestamp of next deployment backup scheduled. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-26T20:19:29.600Z}. + * + * @param timeNextBackupScheduled the value to set + * @return this builder + **/ + public Builder timeNextBackupScheduled(java.util.Date timeNextBackupScheduled) { + this.timeNextBackupScheduled = timeNextBackupScheduled; + this.__explicitlySet__.add("timeNextBackupScheduled"); + return this; + } /** * List of ingress IP addresses from where the GoldenGate deployment connects to this connection's privateIp. * Customers may optionally set up ingress security rules to restrict traffic from these IP addresses. @@ -1006,6 +1064,9 @@ public Deployment build() { this.nextMaintenanceDescription, this.maintenanceConfiguration, this.timeOggVersionSupportedUntil, + this.backupSchedule, + this.timeLastBackupScheduled, + this.timeNextBackupScheduled, this.ingressIps); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -1142,6 +1203,15 @@ public Builder copy(Deployment model) { if (model.wasPropertyExplicitlySet("timeOggVersionSupportedUntil")) { this.timeOggVersionSupportedUntil(model.getTimeOggVersionSupportedUntil()); } + if (model.wasPropertyExplicitlySet("backupSchedule")) { + this.backupSchedule(model.getBackupSchedule()); + } + if (model.wasPropertyExplicitlySet("timeLastBackupScheduled")) { + this.timeLastBackupScheduled(model.getTimeLastBackupScheduled()); + } + if (model.wasPropertyExplicitlySet("timeNextBackupScheduled")) { + this.timeNextBackupScheduled(model.getTimeNextBackupScheduled()); + } if (model.wasPropertyExplicitlySet("ingressIps")) { this.ingressIps(model.getIngressIps()); } @@ -1854,6 +1924,49 @@ public java.util.Date getTimeOggVersionSupportedUntil() { return timeOggVersionSupportedUntil; } + @com.fasterxml.jackson.annotation.JsonProperty("backupSchedule") + private final BackupSchedule backupSchedule; + + public BackupSchedule getBackupSchedule() { + return backupSchedule; + } + + /** + * The timestamp of last deployment backup scheduled. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastBackupScheduled") + private final java.util.Date timeLastBackupScheduled; + + /** + * The timestamp of last deployment backup scheduled. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + * @return the value + **/ + public java.util.Date getTimeLastBackupScheduled() { + return timeLastBackupScheduled; + } + + /** + * The timestamp of next deployment backup scheduled. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-26T20:19:29.600Z}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeNextBackupScheduled") + private final java.util.Date timeNextBackupScheduled; + + /** + * The timestamp of next deployment backup scheduled. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-26T20:19:29.600Z}. + * + * @return the value + **/ + public java.util.Date getTimeNextBackupScheduled() { + return timeNextBackupScheduled; + } + /** * List of ingress IP addresses from where the GoldenGate deployment connects to this connection's privateIp. * Customers may optionally set up ingress security rules to restrict traffic from these IP addresses. @@ -1935,6 +2048,11 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.maintenanceConfiguration)); sb.append(", timeOggVersionSupportedUntil=") .append(String.valueOf(this.timeOggVersionSupportedUntil)); + sb.append(", backupSchedule=").append(String.valueOf(this.backupSchedule)); + sb.append(", timeLastBackupScheduled=") + .append(String.valueOf(this.timeLastBackupScheduled)); + sb.append(", timeNextBackupScheduled=") + .append(String.valueOf(this.timeNextBackupScheduled)); sb.append(", ingressIps=").append(String.valueOf(this.ingressIps)); sb.append(")"); return sb.toString(); @@ -2000,6 +2118,11 @@ public boolean equals(Object o) { this.maintenanceConfiguration, other.maintenanceConfiguration) && java.util.Objects.equals( this.timeOggVersionSupportedUntil, other.timeOggVersionSupportedUntil) + && java.util.Objects.equals(this.backupSchedule, other.backupSchedule) + && java.util.Objects.equals( + this.timeLastBackupScheduled, other.timeLastBackupScheduled) + && java.util.Objects.equals( + this.timeNextBackupScheduled, other.timeNextBackupScheduled) && java.util.Objects.equals(this.ingressIps, other.ingressIps) && super.equals(other); } @@ -2122,6 +2245,19 @@ public int hashCode() { + (this.timeOggVersionSupportedUntil == null ? 43 : this.timeOggVersionSupportedUntil.hashCode()); + result = + (result * PRIME) + + (this.backupSchedule == null ? 43 : this.backupSchedule.hashCode()); + result = + (result * PRIME) + + (this.timeLastBackupScheduled == null + ? 43 + : this.timeLastBackupScheduled.hashCode()); + result = + (result * PRIME) + + (this.timeNextBackupScheduled == null + ? 43 + : this.timeNextBackupScheduled.hashCode()); result = (result * PRIME) + (this.ingressIps == null ? 43 : this.ingressIps.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackup.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackup.java index adf58664e9..150bc6d0e2 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackup.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackup.java @@ -27,6 +27,7 @@ public final class DeploymentBackup extends com.oracle.bmc.http.internal.Explici "compartmentId", "displayName", "isAutomatic", + "backupSourceType", "lifecycleState", "lifecycleDetails", "timeOfBackup", @@ -52,6 +53,7 @@ public DeploymentBackup( String compartmentId, String displayName, Boolean isAutomatic, + BackupSourceType backupSourceType, LifecycleState lifecycleState, String lifecycleDetails, java.util.Date timeOfBackup, @@ -76,6 +78,7 @@ public DeploymentBackup( this.compartmentId = compartmentId; this.displayName = displayName; this.isAutomatic = isAutomatic; + this.backupSourceType = backupSourceType; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; this.timeOfBackup = timeOfBackup; @@ -209,6 +212,24 @@ public Builder isAutomatic(Boolean isAutomatic) { this.__explicitlySet__.add("isAutomatic"); return this; } + /** + * Possible deployment backup source types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSourceType") + private BackupSourceType backupSourceType; + + /** + * Possible deployment backup source types. + * + * @param backupSourceType the value to set + * @return this builder + **/ + public Builder backupSourceType(BackupSourceType backupSourceType) { + this.backupSourceType = backupSourceType; + this.__explicitlySet__.add("backupSourceType"); + return this; + } /** * Possible lifecycle states. * @@ -547,6 +568,7 @@ public DeploymentBackup build() { this.compartmentId, this.displayName, this.isAutomatic, + this.backupSourceType, this.lifecycleState, this.lifecycleDetails, this.timeOfBackup, @@ -590,6 +612,9 @@ public Builder copy(DeploymentBackup model) { if (model.wasPropertyExplicitlySet("isAutomatic")) { this.isAutomatic(model.getIsAutomatic()); } + if (model.wasPropertyExplicitlySet("backupSourceType")) { + this.backupSourceType(model.getBackupSourceType()); + } if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } @@ -756,6 +781,72 @@ public Boolean getIsAutomatic() { return isAutomatic; } + /** + * Possible deployment backup source types. + * + **/ + public enum BackupSourceType { + Manual("MANUAL"), + Automatic("AUTOMATIC"), + Scheduled("SCHEDULED"), + + /** + * 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(BackupSourceType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (BackupSourceType v : BackupSourceType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + BackupSourceType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static BackupSourceType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'BackupSourceType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Possible deployment backup source types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSourceType") + private final BackupSourceType backupSourceType; + + /** + * Possible deployment backup source types. + * + * @return the value + **/ + public BackupSourceType getBackupSourceType() { + return backupSourceType; + } + /** * Possible lifecycle states. * @@ -1066,6 +1157,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", isAutomatic=").append(String.valueOf(this.isAutomatic)); + sb.append(", backupSourceType=").append(String.valueOf(this.backupSourceType)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", timeOfBackup=").append(String.valueOf(this.timeOfBackup)); @@ -1103,6 +1195,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.isAutomatic, other.isAutomatic) + && java.util.Objects.equals(this.backupSourceType, other.backupSourceType) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.timeOfBackup, other.timeOfBackup) @@ -1137,6 +1230,9 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.isAutomatic == null ? 43 : this.isAutomatic.hashCode()); + result = + (result * PRIME) + + (this.backupSourceType == null ? 43 : this.backupSourceType.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackupSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackupSummary.java index 0861c7b5d0..7cbc052f84 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackupSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackupSummary.java @@ -30,6 +30,7 @@ public final class DeploymentBackupSummary "compartmentId", "displayName", "isAutomatic", + "backupSourceType", "lifecycleState", "lifecycleDetails", "timeOfBackup", @@ -55,6 +56,7 @@ public DeploymentBackupSummary( String compartmentId, String displayName, Boolean isAutomatic, + BackupSourceType backupSourceType, LifecycleState lifecycleState, String lifecycleDetails, java.util.Date timeOfBackup, @@ -79,6 +81,7 @@ public DeploymentBackupSummary( this.compartmentId = compartmentId; this.displayName = displayName; this.isAutomatic = isAutomatic; + this.backupSourceType = backupSourceType; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; this.timeOfBackup = timeOfBackup; @@ -212,6 +215,24 @@ public Builder isAutomatic(Boolean isAutomatic) { this.__explicitlySet__.add("isAutomatic"); return this; } + /** + * Possible deployment backup source types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSourceType") + private BackupSourceType backupSourceType; + + /** + * Possible deployment backup source types. + * + * @param backupSourceType the value to set + * @return this builder + **/ + public Builder backupSourceType(BackupSourceType backupSourceType) { + this.backupSourceType = backupSourceType; + this.__explicitlySet__.add("backupSourceType"); + return this; + } /** * Possible lifecycle states. * @@ -550,6 +571,7 @@ public DeploymentBackupSummary build() { this.compartmentId, this.displayName, this.isAutomatic, + this.backupSourceType, this.lifecycleState, this.lifecycleDetails, this.timeOfBackup, @@ -593,6 +615,9 @@ public Builder copy(DeploymentBackupSummary model) { if (model.wasPropertyExplicitlySet("isAutomatic")) { this.isAutomatic(model.getIsAutomatic()); } + if (model.wasPropertyExplicitlySet("backupSourceType")) { + this.backupSourceType(model.getBackupSourceType()); + } if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } @@ -759,6 +784,72 @@ public Boolean getIsAutomatic() { return isAutomatic; } + /** + * Possible deployment backup source types. + * + **/ + public enum BackupSourceType { + Manual("MANUAL"), + Automatic("AUTOMATIC"), + Scheduled("SCHEDULED"), + + /** + * 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(BackupSourceType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (BackupSourceType v : BackupSourceType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + BackupSourceType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static BackupSourceType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'BackupSourceType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Possible deployment backup source types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSourceType") + private final BackupSourceType backupSourceType; + + /** + * Possible deployment backup source types. + * + * @return the value + **/ + public BackupSourceType getBackupSourceType() { + return backupSourceType; + } + /** * Possible lifecycle states. * @@ -1069,6 +1160,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", isAutomatic=").append(String.valueOf(this.isAutomatic)); + sb.append(", backupSourceType=").append(String.valueOf(this.backupSourceType)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", timeOfBackup=").append(String.valueOf(this.timeOfBackup)); @@ -1106,6 +1198,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.isAutomatic, other.isAutomatic) + && java.util.Objects.equals(this.backupSourceType, other.backupSourceType) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.timeOfBackup, other.timeOfBackup) @@ -1140,6 +1233,9 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.isAutomatic == null ? 43 : this.isAutomatic.hashCode()); + result = + (result * PRIME) + + (this.backupSourceType == null ? 43 : this.backupSourceType.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateBackupScheduleDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateBackupScheduleDetails.java new file mode 100644 index 0000000000..de3c6a5e0c --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateBackupScheduleDetails.java @@ -0,0 +1,411 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.model; + +/** + * Defines the backup schedule details for update 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: 20200407") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateBackupScheduleDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateBackupScheduleDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "timeBackupScheduled", + "frequencyBackupScheduled", + "bucketName", + "compartmentId", + "namespaceName", + "isMetadataOnly" + }) + public UpdateBackupScheduleDetails( + java.util.Date timeBackupScheduled, + FrequencyBackupScheduled frequencyBackupScheduled, + String bucketName, + String compartmentId, + String namespaceName, + Boolean isMetadataOnly) { + super(); + this.timeBackupScheduled = timeBackupScheduled; + this.frequencyBackupScheduled = frequencyBackupScheduled; + this.bucketName = bucketName; + this.compartmentId = compartmentId; + this.namespaceName = namespaceName; + this.isMetadataOnly = isMetadataOnly; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The start timestamp for the deployment backup schedule. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBackupScheduled") + private java.util.Date timeBackupScheduled; + + /** + * The start timestamp for the deployment backup schedule. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + * @param timeBackupScheduled the value to set + * @return this builder + **/ + public Builder timeBackupScheduled(java.util.Date timeBackupScheduled) { + this.timeBackupScheduled = timeBackupScheduled; + this.__explicitlySet__.add("timeBackupScheduled"); + return this; + } + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("frequencyBackupScheduled") + private FrequencyBackupScheduled frequencyBackupScheduled; + + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + * @param frequencyBackupScheduled the value to set + * @return this builder + **/ + public Builder frequencyBackupScheduled(FrequencyBackupScheduled frequencyBackupScheduled) { + this.frequencyBackupScheduled = frequencyBackupScheduled; + this.__explicitlySet__.add("frequencyBackupScheduled"); + return this; + } + /** + * Name of the bucket where the object is to be uploaded in the object storage + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * Name of the bucket where the object is to be uploaded in the object storage + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Name of namespace that serves as a container for all of your buckets + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private String namespaceName; + + /** + * Name of namespace that serves as a container for all of your buckets + * @param namespaceName the value to set + * @return this builder + **/ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + this.__explicitlySet__.add("namespaceName"); + return this; + } + /** + * Parameter to allow users to create backup without trails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMetadataOnly") + private Boolean isMetadataOnly; + + /** + * Parameter to allow users to create backup without trails + * @param isMetadataOnly the value to set + * @return this builder + **/ + public Builder isMetadataOnly(Boolean isMetadataOnly) { + this.isMetadataOnly = isMetadataOnly; + this.__explicitlySet__.add("isMetadataOnly"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateBackupScheduleDetails build() { + UpdateBackupScheduleDetails model = + new UpdateBackupScheduleDetails( + this.timeBackupScheduled, + this.frequencyBackupScheduled, + this.bucketName, + this.compartmentId, + this.namespaceName, + this.isMetadataOnly); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateBackupScheduleDetails model) { + if (model.wasPropertyExplicitlySet("timeBackupScheduled")) { + this.timeBackupScheduled(model.getTimeBackupScheduled()); + } + if (model.wasPropertyExplicitlySet("frequencyBackupScheduled")) { + this.frequencyBackupScheduled(model.getFrequencyBackupScheduled()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("namespaceName")) { + this.namespaceName(model.getNamespaceName()); + } + if (model.wasPropertyExplicitlySet("isMetadataOnly")) { + this.isMetadataOnly(model.getIsMetadataOnly()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The start timestamp for the deployment backup schedule. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBackupScheduled") + private final java.util.Date timeBackupScheduled; + + /** + * The start timestamp for the deployment backup schedule. The format is defined by + * [RFC3339](https://tools.ietf.org/html/rfc3339), such as {@code 2024-10-25T18:19:29.600Z}. + * + * @return the value + **/ + public java.util.Date getTimeBackupScheduled() { + return timeBackupScheduled; + } + + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + **/ + public enum FrequencyBackupScheduled { + Daily("DAILY"), + Weekly("WEEKLY"), + Monthly("MONTHLY"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (FrequencyBackupScheduled v : FrequencyBackupScheduled.values()) { + map.put(v.getValue(), v); + } + } + + FrequencyBackupScheduled(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static FrequencyBackupScheduled create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid FrequencyBackupScheduled: " + key); + } + }; + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("frequencyBackupScheduled") + private final FrequencyBackupScheduled frequencyBackupScheduled; + + /** + * The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY. + * + * @return the value + **/ + public FrequencyBackupScheduled getFrequencyBackupScheduled() { + return frequencyBackupScheduled; + } + + /** + * Name of the bucket where the object is to be uploaded in the object storage + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * Name of the bucket where the object is to be uploaded in the object storage + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + * + **/ + @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 being referenced. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Name of namespace that serves as a container for all of your buckets + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private final String namespaceName; + + /** + * Name of namespace that serves as a container for all of your buckets + * @return the value + **/ + public String getNamespaceName() { + return namespaceName; + } + + /** + * Parameter to allow users to create backup without trails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMetadataOnly") + private final Boolean isMetadataOnly; + + /** + * Parameter to allow users to create backup without trails + * @return the value + **/ + public Boolean getIsMetadataOnly() { + return isMetadataOnly; + } + + @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("UpdateBackupScheduleDetails("); + sb.append("super=").append(super.toString()); + sb.append("timeBackupScheduled=").append(String.valueOf(this.timeBackupScheduled)); + sb.append(", frequencyBackupScheduled=") + .append(String.valueOf(this.frequencyBackupScheduled)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(", isMetadataOnly=").append(String.valueOf(this.isMetadataOnly)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateBackupScheduleDetails)) { + return false; + } + + UpdateBackupScheduleDetails other = (UpdateBackupScheduleDetails) o; + return java.util.Objects.equals(this.timeBackupScheduled, other.timeBackupScheduled) + && java.util.Objects.equals( + this.frequencyBackupScheduled, other.frequencyBackupScheduled) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.isMetadataOnly, other.isMetadataOnly) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.timeBackupScheduled == null + ? 43 + : this.timeBackupScheduled.hashCode()); + result = + (result * PRIME) + + (this.frequencyBackupScheduled == null + ? 43 + : this.frequencyBackupScheduled.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = + (result * PRIME) + + (this.isMetadataOnly == null ? 43 : this.isMetadataOnly.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDeploymentDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDeploymentDetails.java index b644cf144e..94170ba310 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDeploymentDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDeploymentDetails.java @@ -39,7 +39,8 @@ public final class UpdateDeploymentDetails "isAutoScalingEnabled", "oggData", "maintenanceWindow", - "maintenanceConfiguration" + "maintenanceConfiguration", + "backupSchedule" }) public UpdateDeploymentDetails( String displayName, @@ -57,7 +58,8 @@ public UpdateDeploymentDetails( Boolean isAutoScalingEnabled, UpdateOggDeploymentDetails oggData, UpdateMaintenanceWindowDetails maintenanceWindow, - UpdateMaintenanceConfigurationDetails maintenanceConfiguration) { + UpdateMaintenanceConfigurationDetails maintenanceConfiguration, + UpdateBackupScheduleDetails backupSchedule) { super(); this.displayName = displayName; this.licenseModel = licenseModel; @@ -75,6 +77,7 @@ public UpdateDeploymentDetails( this.oggData = oggData; this.maintenanceWindow = maintenanceWindow; this.maintenanceConfiguration = maintenanceConfiguration; + this.backupSchedule = backupSchedule; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -361,6 +364,15 @@ public Builder maintenanceConfiguration( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("backupSchedule") + private UpdateBackupScheduleDetails backupSchedule; + + public Builder backupSchedule(UpdateBackupScheduleDetails backupSchedule) { + this.backupSchedule = backupSchedule; + this.__explicitlySet__.add("backupSchedule"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -382,7 +394,8 @@ public UpdateDeploymentDetails build() { this.isAutoScalingEnabled, this.oggData, this.maintenanceWindow, - this.maintenanceConfiguration); + this.maintenanceConfiguration, + this.backupSchedule); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -439,6 +452,9 @@ public Builder copy(UpdateDeploymentDetails model) { if (model.wasPropertyExplicitlySet("maintenanceConfiguration")) { this.maintenanceConfiguration(model.getMaintenanceConfiguration()); } + if (model.wasPropertyExplicitlySet("backupSchedule")) { + this.backupSchedule(model.getBackupSchedule()); + } return this; } } @@ -701,6 +717,13 @@ public UpdateMaintenanceConfigurationDetails getMaintenanceConfiguration() { return maintenanceConfiguration; } + @com.fasterxml.jackson.annotation.JsonProperty("backupSchedule") + private final UpdateBackupScheduleDetails backupSchedule; + + public UpdateBackupScheduleDetails getBackupSchedule() { + return backupSchedule; + } + @Override public String toString() { return this.toString(true); @@ -732,6 +755,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", maintenanceWindow=").append(String.valueOf(this.maintenanceWindow)); sb.append(", maintenanceConfiguration=") .append(String.valueOf(this.maintenanceConfiguration)); + sb.append(", backupSchedule=").append(String.valueOf(this.backupSchedule)); sb.append(")"); return sb.toString(); } @@ -763,6 +787,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.maintenanceWindow, other.maintenanceWindow) && java.util.Objects.equals( this.maintenanceConfiguration, other.maintenanceConfiguration) + && java.util.Objects.equals(this.backupSchedule, other.backupSchedule) && super.equals(other); } @@ -802,6 +827,9 @@ public int hashCode() { + (this.maintenanceConfiguration == null ? 43 : this.maintenanceConfiguration.hashCode()); + result = + (result * PRIME) + + (this.backupSchedule == null ? 43 : this.backupSchedule.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-governancerulescontrolplane/pom.xml b/bmc-governancerulescontrolplane/pom.xml index a6aaa30fc6..99560afe2a 100644 --- a/bmc-governancerulescontrolplane/pom.xml +++ b/bmc-governancerulescontrolplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-governancerulescontrolplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-healthchecks/pom.xml b/bmc-healthchecks/pom.xml index 562e17dd96..a10538445b 100644 --- a/bmc-healthchecks/pom.xml +++ b/bmc-healthchecks/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-healthchecks @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-identity/pom.xml b/bmc-identity/pom.xml index 6db1374438..7be7f7e67b 100644 --- a/bmc-identity/pom.xml +++ b/bmc-identity/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-identitydataplane/pom.xml b/bmc-identitydataplane/pom.xml index e1ca9d310c..75489353ed 100644 --- a/bmc-identitydataplane/pom.xml +++ b/bmc-identitydataplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-identitydataplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-identitydomains/pom.xml b/bmc-identitydomains/pom.xml index e820c73dfa..03812c1072 100644 --- a/bmc-identitydomains/pom.xml +++ b/bmc-identitydomains/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-identitydomains @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-integration/pom.xml b/bmc-integration/pom.xml index 308ff42f14..9e3a9df31d 100644 --- a/bmc-integration/pom.xml +++ b/bmc-integration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-integration @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-jms/pom.xml b/bmc-jms/pom.xml index f6debf6151..bfb1fe37c1 100644 --- a/bmc-jms/pom.xml +++ b/bmc-jms/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-jms @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-jmsjavadownloads/pom.xml b/bmc-jmsjavadownloads/pom.xml index 091b9fde97..b5ad74792e 100644 --- a/bmc-jmsjavadownloads/pom.xml +++ b/bmc-jmsjavadownloads/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-jmsjavadownloads @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-keymanagement/pom.xml b/bmc-keymanagement/pom.xml index fe47aa5f0d..457a3f5632 100644 --- a/bmc-keymanagement/pom.xml +++ b/bmc-keymanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-keymanagement @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-licensemanager/pom.xml b/bmc-licensemanager/pom.xml index df6cc4523e..233e40e4ba 100644 --- a/bmc-licensemanager/pom.xml +++ b/bmc-licensemanager/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-licensemanager @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-limits/pom.xml b/bmc-limits/pom.xml index 396f9aa654..5411a2430d 100644 --- a/bmc-limits/pom.xml +++ b/bmc-limits/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-limits @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-loadbalancer/pom.xml b/bmc-loadbalancer/pom.xml index 3205ae8ce8..538b1db1b3 100644 --- a/bmc-loadbalancer/pom.xml +++ b/bmc-loadbalancer/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-lockbox/pom.xml b/bmc-lockbox/pom.xml index 473fdf804c..e011869740 100644 --- a/bmc-lockbox/pom.xml +++ b/bmc-lockbox/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-lockbox @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-loganalytics/pom.xml b/bmc-loganalytics/pom.xml index 325695ecff..081105b1ac 100644 --- a/bmc-loganalytics/pom.xml +++ b/bmc-loganalytics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-loganalytics @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-logging/pom.xml b/bmc-logging/pom.xml index 6b2ebb5e30..04dc2b9e07 100644 --- a/bmc-logging/pom.xml +++ b/bmc-logging/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-logging @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-loggingingestion/pom.xml b/bmc-loggingingestion/pom.xml index fc6f59df11..f9c9400eec 100644 --- a/bmc-loggingingestion/pom.xml +++ b/bmc-loggingingestion/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-loggingingestion @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-loggingsearch/pom.xml b/bmc-loggingsearch/pom.xml index 43feb11767..85ef54bfb8 100644 --- a/bmc-loggingsearch/pom.xml +++ b/bmc-loggingsearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-loggingsearch @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-managementagent/pom.xml b/bmc-managementagent/pom.xml index cc775f1e3f..ee5126c2ff 100644 --- a/bmc-managementagent/pom.xml +++ b/bmc-managementagent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-managementagent @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-managementdashboard/pom.xml b/bmc-managementdashboard/pom.xml index ab039c78e7..b7793168e7 100644 --- a/bmc-managementdashboard/pom.xml +++ b/bmc-managementdashboard/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-managementdashboard @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-marketplace/pom.xml b/bmc-marketplace/pom.xml index a1c59e58a1..1b3360bd91 100644 --- a/bmc-marketplace/pom.xml +++ b/bmc-marketplace/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-marketplace @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-marketplaceprivateoffer/pom.xml b/bmc-marketplaceprivateoffer/pom.xml index 5527c68cc1..99aaffcdec 100644 --- a/bmc-marketplaceprivateoffer/pom.xml +++ b/bmc-marketplaceprivateoffer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-marketplaceprivateoffer @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-marketplacepublisher/pom.xml b/bmc-marketplacepublisher/pom.xml index e276024d94..c56224a5ef 100644 --- a/bmc-marketplacepublisher/pom.xml +++ b/bmc-marketplacepublisher/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-marketplacepublisher @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-mediaservices/pom.xml b/bmc-mediaservices/pom.xml index a00f7e11cd..d11ff09699 100644 --- a/bmc-mediaservices/pom.xml +++ b/bmc-mediaservices/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-mediaservices @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-mngdmac/pom.xml b/bmc-mngdmac/pom.xml new file mode 100644 index 0000000000..a97865eea2 --- /dev/null +++ b/bmc-mngdmac/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.oracle.oci.sdk + oci-java-sdk + 2.82.0 + ../pom.xml + + oci-java-sdk-mngdmac + Oracle Cloud Infrastructure SDK - Mngdmac + This project contains the SDK used for Oracle Cloud Infrastructure Mngdmac + https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm + + + com.oracle.oci.sdk + oci-java-sdk-common + 2.82.0 + + + \ No newline at end of file diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDevice.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDevice.java new file mode 100644 index 0000000000..aacd77606c --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDevice.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; + +/** + * Use the OCI Managed Services for Mac API to create and manage orders for dedicated, partially-managed Mac servers hosted in an OCI Data Center. For more information, see the user guide documentation for the [OCI Managed Services for Mac]() + * 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: 20250320") +public interface MacDevice 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 information about a MacDevice. + * @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 GetMacDevice API. + */ + GetMacDeviceResponse getMacDevice(GetMacDeviceRequest request); + + /** + * Gets a list of MacDevices assigned to this 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 ListMacDevices API. + */ + ListMacDevicesResponse listMacDevices(ListMacDevicesRequest request); + + /** + * Terminates a MacDevice. + * @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 TerminateMacDevice API. + */ + TerminateMacDeviceResponse terminateMacDevice(TerminateMacDeviceRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + MacDeviceWaiters 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. + */ + MacDevicePaginators getPaginators(); +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDeviceAsync.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDeviceAsync.java new file mode 100644 index 0000000000..a1225be7ad --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDeviceAsync.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; + +/** + * Use the OCI Managed Services for Mac API to create and manage orders for dedicated, partially-managed Mac servers hosted in an OCI Data Center. For more information, see the user guide documentation for the [OCI Managed Services for Mac]() + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public interface MacDeviceAsync 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 information about a MacDevice. + * + * @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 getMacDevice( + GetMacDeviceRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets a list of MacDevices assigned to this 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 listMacDevices( + ListMacDevicesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Terminates a MacDevice. + * + * @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 terminateMacDevice( + TerminateMacDeviceRequest request, + com.oracle.bmc.responses.AsyncHandler< + TerminateMacDeviceRequest, TerminateMacDeviceResponse> + handler); +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDeviceAsyncClient.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDeviceAsyncClient.java new file mode 100644 index 0000000000..d678e7c5a6 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDeviceAsyncClient.java @@ -0,0 +1,595 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.mngdmac.internal.http.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; + +/** + * Async client implementation for MacDevice 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: 20250320") +public class MacDeviceAsyncClient implements MacDeviceAsync { + /** + * Service instance for MacDevice. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("MACDEVICE") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://mngdmac.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MacDeviceAsyncClient.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; + + /** + * 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 MacDeviceAsyncClient( + 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 MacDeviceAsyncClient( + 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 MacDeviceAsyncClient( + 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 MacDeviceAsyncClient( + 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 MacDeviceAsyncClient( + 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 MacDeviceAsyncClient( + 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 MacDeviceAsyncClient( + 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 MacDeviceAsyncClient( + 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); + 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 MacDeviceAsyncClient 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 MacDeviceAsyncClient( + 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 endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @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); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + 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 getMacDevice( + GetMacDeviceRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getMacDevice"); + final GetMacDeviceRequest interceptedRequest = + GetMacDeviceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetMacDeviceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "MacDevice", + "GetMacDevice", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacDevice/GetMacDevice"); + final java.util.function.Function + transformer = + GetMacDeviceConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetMacDeviceRequest, GetMacDeviceResponse>, + 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< + GetMacDeviceRequest, GetMacDeviceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listMacDevices( + ListMacDevicesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListMacDevicesRequest, ListMacDevicesResponse> + handler) { + LOG.trace("Called async listMacDevices"); + final ListMacDevicesRequest interceptedRequest = + ListMacDevicesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMacDevicesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "MacDevice", + "ListMacDevices", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacDeviceCollection/ListMacDevices"); + final java.util.function.Function + transformer = + ListMacDevicesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListMacDevicesRequest, ListMacDevicesResponse>, + 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< + ListMacDevicesRequest, ListMacDevicesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future terminateMacDevice( + TerminateMacDeviceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + TerminateMacDeviceRequest, TerminateMacDeviceResponse> + handler) { + LOG.trace("Called async terminateMacDevice"); + final TerminateMacDeviceRequest interceptedRequest = + TerminateMacDeviceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + TerminateMacDeviceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "MacDevice", + "TerminateMacDevice", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacDevice/TerminateMacDevice"); + final java.util.function.Function + transformer = + TerminateMacDeviceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + TerminateMacDeviceRequest, TerminateMacDeviceResponse>, + 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< + TerminateMacDeviceRequest, TerminateMacDeviceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDeviceClient.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDeviceClient.java new file mode 100644 index 0000000000..5ac06abd0d --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDeviceClient.java @@ -0,0 +1,668 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.mngdmac.internal.http.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class MacDeviceClient implements MacDevice { + /** + * Service instance for MacDevice. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("MACDEVICE") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://mngdmac.{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(MacDeviceClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final MacDeviceWaiters waiters; + + private final MacDevicePaginators 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; + + /** + * 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 MacDeviceClient( + 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 MacDeviceClient( + 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 MacDeviceClient( + 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 MacDeviceClient( + 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 MacDeviceClient( + 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 MacDeviceClient( + 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 MacDeviceClient( + 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 MacDeviceClient( + 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 MacDeviceClient( + 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); + 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("MacDevice-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new MacDeviceWaiters(executorService, this); + + this.paginators = new MacDevicePaginators(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 MacDeviceClient 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 MacDeviceClient( + 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 endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @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); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + 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 GetMacDeviceResponse getMacDevice(GetMacDeviceRequest request) { + LOG.trace("Called getMacDevice"); + final GetMacDeviceRequest interceptedRequest = + GetMacDeviceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetMacDeviceConverter.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( + "MacDevice", + "GetMacDevice", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacDevice/GetMacDevice"); + java.util.function.Function transformer = + GetMacDeviceConverter.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 ListMacDevicesResponse listMacDevices(ListMacDevicesRequest request) { + LOG.trace("Called listMacDevices"); + final ListMacDevicesRequest interceptedRequest = + ListMacDevicesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMacDevicesConverter.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( + "MacDevice", + "ListMacDevices", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacDeviceCollection/ListMacDevices"); + java.util.function.Function transformer = + ListMacDevicesConverter.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 TerminateMacDeviceResponse terminateMacDevice(TerminateMacDeviceRequest request) { + LOG.trace("Called terminateMacDevice"); + final TerminateMacDeviceRequest interceptedRequest = + TerminateMacDeviceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + TerminateMacDeviceConverter.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( + "MacDevice", + "TerminateMacDevice", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacDevice/TerminateMacDevice"); + java.util.function.Function + transformer = + TerminateMacDeviceConverter.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 MacDeviceWaiters getWaiters() { + return waiters; + } + + @Override + public MacDevicePaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDevicePaginators.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDevicePaginators.java new file mode 100644 index 0000000000..3a7533894f --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDevicePaginators.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of MacDevice 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: 20250320") +public class MacDevicePaginators { + private final MacDevice client; + + public MacDevicePaginators(MacDevice client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listMacDevices 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 listMacDevicesResponseIterator( + final ListMacDevicesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListMacDevicesRequest.Builder, ListMacDevicesRequest, ListMacDevicesResponse>( + new java.util.function.Supplier() { + @Override + public ListMacDevicesRequest.Builder get() { + return ListMacDevicesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMacDevicesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMacDevicesRequest.Builder>, + ListMacDevicesRequest>() { + @Override + public ListMacDevicesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMacDevicesRequest.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 ListMacDevicesResponse apply(ListMacDevicesRequest request) { + return client.listMacDevices(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.mngdmac.model.MacDeviceSummary} objects + * contained in responses from the listMacDevices 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.mngdmac.model.MacDeviceSummary} objects + * contained in responses received from the service. + */ + public Iterable listMacDevicesRecordIterator( + final ListMacDevicesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListMacDevicesRequest.Builder, ListMacDevicesRequest, ListMacDevicesResponse, + com.oracle.bmc.mngdmac.model.MacDeviceSummary>( + new java.util.function.Supplier() { + @Override + public ListMacDevicesRequest.Builder get() { + return ListMacDevicesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMacDevicesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMacDevicesRequest.Builder>, + ListMacDevicesRequest>() { + @Override + public ListMacDevicesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMacDevicesRequest.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 ListMacDevicesResponse apply(ListMacDevicesRequest request) { + return client.listMacDevices(request); + } + }, + new java.util.function.Function< + ListMacDevicesResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListMacDevicesResponse response) { + return response.getMacDeviceCollection().getItems(); + } + }); + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDeviceWaiters.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDeviceWaiters.java new file mode 100644 index 0000000000..3c95cdb1e7 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacDeviceWaiters.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of MacDevice. + *

+ * 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: 20250320") +public class MacDeviceWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final MacDevice client; + + public MacDeviceWaiters( + java.util.concurrent.ExecutorService executorService, MacDevice 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 forMacDevice( + GetMacDeviceRequest request, + com.oracle.bmc.mngdmac.model.MacDevice.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 forMacDevice( + 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 forMacDevice( + GetMacDeviceRequest request, + com.oracle.bmc.mngdmac.model.MacDevice.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 forMacDevice( + 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 forMacDevice( + GetMacDeviceRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.mngdmac.model.MacDevice.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 forMacDevice( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for MacDevice. + private com.oracle.bmc.waiter.Waiter forMacDevice( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetMacDeviceRequest request, + final com.oracle.bmc.mngdmac.model.MacDevice.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< + GetMacDeviceRequest, GetMacDeviceResponse>() { + @Override + public GetMacDeviceResponse apply(GetMacDeviceRequest request) { + return client.getMacDevice(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetMacDeviceResponse response) { + return targetStatesSet.contains( + response.getMacDevice().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.mngdmac.model.MacDevice.LifecycleState.Deleted)), + request); + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrder.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrder.java new file mode 100644 index 0000000000..b22346151c --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrder.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; + +/** + * Use the OCI Managed Services for Mac API to create and manage orders for dedicated, partially-managed Mac servers hosted in an OCI Data Center. For more information, see the user guide documentation for the [OCI Managed Services for Mac]() + * 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: 20250320") +public interface MacOrder 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 MacOrder. + * @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 CancelMacOrder API. + */ + CancelMacOrderResponse cancelMacOrder(CancelMacOrderRequest request); + + /** + * 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 a MacOrder 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 ChangeMacOrderCompartment API. + */ + ChangeMacOrderCompartmentResponse changeMacOrderCompartment( + ChangeMacOrderCompartmentRequest request); + + /** + * Creates a MacOrder. + * + * @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 CreateMacOrder API. + */ + CreateMacOrderResponse createMacOrder(CreateMacOrderRequest request); + + /** + * Gets information about a MacOrder. + * @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 GetMacOrder API. + */ + GetMacOrderResponse getMacOrder(GetMacOrderRequest 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 MacOrders. + * + * @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 ListMacOrders API. + */ + ListMacOrdersResponse listMacOrders(ListMacOrdersRequest 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 a MacOrder. + * @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 UpdateMacOrder API. + */ + UpdateMacOrderResponse updateMacOrder(UpdateMacOrderRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + MacOrderWaiters 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. + */ + MacOrderPaginators getPaginators(); +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderAsync.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderAsync.java new file mode 100644 index 0000000000..0d2f4189b3 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderAsync.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; + +/** + * Use the OCI Managed Services for Mac API to create and manage orders for dedicated, partially-managed Mac servers hosted in an OCI Data Center. For more information, see the user guide documentation for the [OCI Managed Services for Mac]() + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public interface MacOrderAsync 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 MacOrder. + * + * @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 cancelMacOrder( + CancelMacOrderRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * 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 a MacOrder 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 changeMacOrderCompartment( + ChangeMacOrderCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeMacOrderCompartmentRequest, ChangeMacOrderCompartmentResponse> + handler); + + /** + * Creates a MacOrder. + * + * + * @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 createMacOrder( + CreateMacOrderRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets information about a MacOrder. + * + * @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 getMacOrder( + GetMacOrderRequest 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 MacOrders. + * + * + * @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 listMacOrders( + ListMacOrdersRequest 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 a MacOrder. + * + * @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 updateMacOrder( + UpdateMacOrderRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderAsyncClient.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderAsyncClient.java new file mode 100644 index 0000000000..459e51c2d9 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderAsyncClient.java @@ -0,0 +1,984 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.mngdmac.internal.http.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; + +/** + * Async client implementation for MacOrder 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: 20250320") +public class MacOrderAsyncClient implements MacOrderAsync { + /** + * Service instance for MacOrder. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("MACORDER") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://mngdmac.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MacOrderAsyncClient.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; + + /** + * 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 MacOrderAsyncClient( + 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 MacOrderAsyncClient( + 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 MacOrderAsyncClient( + 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 MacOrderAsyncClient( + 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 MacOrderAsyncClient( + 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 MacOrderAsyncClient( + 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 MacOrderAsyncClient( + 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 MacOrderAsyncClient( + 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); + 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 MacOrderAsyncClient 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 MacOrderAsyncClient( + 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 endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @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); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + 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 cancelMacOrder( + CancelMacOrderRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CancelMacOrderRequest, CancelMacOrderResponse> + handler) { + LOG.trace("Called async cancelMacOrder"); + final CancelMacOrderRequest interceptedRequest = + CancelMacOrderConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelMacOrderConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "MacOrder", + "CancelMacOrder", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacOrder/CancelMacOrder"); + final java.util.function.Function + transformer = + CancelMacOrderConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CancelMacOrderRequest, CancelMacOrderResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCancelMacOrderDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CancelMacOrderRequest, CancelMacOrderResponse>( + (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, + 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( + "MacOrder", + "CancelWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/WorkRequest/CancelWorkRequest"); + 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 changeMacOrderCompartment( + ChangeMacOrderCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeMacOrderCompartmentRequest, ChangeMacOrderCompartmentResponse> + handler) { + LOG.trace("Called async changeMacOrderCompartment"); + final ChangeMacOrderCompartmentRequest interceptedRequest = + ChangeMacOrderCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeMacOrderCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "MacOrder", + "ChangeMacOrderCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacOrder/ChangeMacOrderCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeMacOrderCompartmentResponse> + transformer = + ChangeMacOrderCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeMacOrderCompartmentRequest, ChangeMacOrderCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeMacOrderCompartmentRequest, + ChangeMacOrderCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeMacOrderCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeMacOrderCompartmentRequest, ChangeMacOrderCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createMacOrder( + CreateMacOrderRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateMacOrderRequest, CreateMacOrderResponse> + handler) { + LOG.trace("Called async createMacOrder"); + final CreateMacOrderRequest interceptedRequest = + CreateMacOrderConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateMacOrderConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "MacOrder", + "CreateMacOrder", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacOrder/CreateMacOrder"); + final java.util.function.Function + transformer = + CreateMacOrderConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateMacOrderRequest, CreateMacOrderResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateMacOrderDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateMacOrderRequest, CreateMacOrderResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getMacOrder( + GetMacOrderRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getMacOrder"); + final GetMacOrderRequest interceptedRequest = + GetMacOrderConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetMacOrderConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "MacOrder", + "GetMacOrder", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacOrder/GetMacOrder"); + final java.util.function.Function + transformer = + GetMacOrderConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetMacOrderRequest, GetMacOrderResponse>, + 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< + GetMacOrderRequest, GetMacOrderResponse>( + (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( + "MacOrder", + "GetWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/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 listMacOrders( + ListMacOrdersRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listMacOrders"); + final ListMacOrdersRequest interceptedRequest = + ListMacOrdersConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMacOrdersConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "MacOrder", + "ListMacOrders", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacOrderCollection/ListMacOrders"); + final java.util.function.Function + transformer = + ListMacOrdersConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListMacOrdersRequest, ListMacOrdersResponse>, + 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< + ListMacOrdersRequest, ListMacOrdersResponse>( + (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( + "MacOrder", + "ListWorkRequestErrors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/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( + "MacOrder", + "ListWorkRequestLogs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/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( + "MacOrder", + "ListWorkRequests", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/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); + } + } + + @Override + public java.util.concurrent.Future updateMacOrder( + UpdateMacOrderRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateMacOrderRequest, UpdateMacOrderResponse> + handler) { + LOG.trace("Called async updateMacOrder"); + final UpdateMacOrderRequest interceptedRequest = + UpdateMacOrderConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateMacOrderConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "MacOrder", + "UpdateMacOrder", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacOrder/UpdateMacOrder"); + final java.util.function.Function + transformer = + UpdateMacOrderConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateMacOrderRequest, UpdateMacOrderResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateMacOrderDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateMacOrderRequest, UpdateMacOrderResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderClient.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderClient.java new file mode 100644 index 0000000000..acd4f76969 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderClient.java @@ -0,0 +1,976 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.mngdmac.internal.http.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class MacOrderClient implements MacOrder { + /** + * Service instance for MacOrder. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("MACORDER") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://mngdmac.{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(MacOrderClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final MacOrderWaiters waiters; + + private final MacOrderPaginators 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; + + /** + * 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 MacOrderClient( + 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 MacOrderClient( + 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 MacOrderClient( + 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 MacOrderClient( + 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 MacOrderClient( + 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 MacOrderClient( + 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 MacOrderClient( + 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 MacOrderClient( + 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 MacOrderClient( + 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); + 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("MacOrder-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new MacOrderWaiters(executorService, this); + + this.paginators = new MacOrderPaginators(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 MacOrderClient 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 MacOrderClient( + 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 endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @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); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + 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 CancelMacOrderResponse cancelMacOrder(CancelMacOrderRequest request) { + LOG.trace("Called cancelMacOrder"); + final CancelMacOrderRequest interceptedRequest = + CancelMacOrderConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelMacOrderConverter.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( + "MacOrder", + "CancelMacOrder", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacOrder/CancelMacOrder"); + java.util.function.Function transformer = + CancelMacOrderConverter.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.getCancelMacOrderDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @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( + "MacOrder", + "CancelWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/WorkRequest/CancelWorkRequest"); + 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 ChangeMacOrderCompartmentResponse changeMacOrderCompartment( + ChangeMacOrderCompartmentRequest request) { + LOG.trace("Called changeMacOrderCompartment"); + final ChangeMacOrderCompartmentRequest interceptedRequest = + ChangeMacOrderCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeMacOrderCompartmentConverter.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( + "MacOrder", + "ChangeMacOrderCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacOrder/ChangeMacOrderCompartment"); + java.util.function.Function + transformer = + ChangeMacOrderCompartmentConverter.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 + .getChangeMacOrderCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateMacOrderResponse createMacOrder(CreateMacOrderRequest request) { + LOG.trace("Called createMacOrder"); + final CreateMacOrderRequest interceptedRequest = + CreateMacOrderConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateMacOrderConverter.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( + "MacOrder", + "CreateMacOrder", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacOrder/CreateMacOrder"); + java.util.function.Function transformer = + CreateMacOrderConverter.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.getCreateMacOrderDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetMacOrderResponse getMacOrder(GetMacOrderRequest request) { + LOG.trace("Called getMacOrder"); + final GetMacOrderRequest interceptedRequest = + GetMacOrderConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetMacOrderConverter.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( + "MacOrder", + "GetMacOrder", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacOrder/GetMacOrder"); + java.util.function.Function transformer = + GetMacOrderConverter.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( + "MacOrder", + "GetWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/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 ListMacOrdersResponse listMacOrders(ListMacOrdersRequest request) { + LOG.trace("Called listMacOrders"); + final ListMacOrdersRequest interceptedRequest = + ListMacOrdersConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMacOrdersConverter.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( + "MacOrder", + "ListMacOrders", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacOrderCollection/ListMacOrders"); + java.util.function.Function transformer = + ListMacOrdersConverter.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( + "MacOrder", + "ListWorkRequestErrors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/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( + "MacOrder", + "ListWorkRequestLogs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/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( + "MacOrder", + "ListWorkRequests", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/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 UpdateMacOrderResponse updateMacOrder(UpdateMacOrderRequest request) { + LOG.trace("Called updateMacOrder"); + final UpdateMacOrderRequest interceptedRequest = + UpdateMacOrderConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateMacOrderConverter.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( + "MacOrder", + "UpdateMacOrder", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/mngdmac/20250320/MacOrder/UpdateMacOrder"); + java.util.function.Function transformer = + UpdateMacOrderConverter.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.getUpdateMacOrderDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public MacOrderWaiters getWaiters() { + return waiters; + } + + @Override + public MacOrderPaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderPaginators.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderPaginators.java new file mode 100644 index 0000000000..01e30d0996 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderPaginators.java @@ -0,0 +1,485 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of MacOrder 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: 20250320") +public class MacOrderPaginators { + private final MacOrder client; + + public MacOrderPaginators(MacOrder client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listMacOrders 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 listMacOrdersResponseIterator( + final ListMacOrdersRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListMacOrdersRequest.Builder, ListMacOrdersRequest, ListMacOrdersResponse>( + new java.util.function.Supplier() { + @Override + public ListMacOrdersRequest.Builder get() { + return ListMacOrdersRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMacOrdersResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMacOrdersRequest.Builder>, + ListMacOrdersRequest>() { + @Override + public ListMacOrdersRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMacOrdersRequest.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 ListMacOrdersResponse apply(ListMacOrdersRequest request) { + return client.listMacOrders(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.mngdmac.model.MacOrderSummary} objects + * contained in responses from the listMacOrders 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.mngdmac.model.MacOrderSummary} objects + * contained in responses received from the service. + */ + public Iterable listMacOrdersRecordIterator( + final ListMacOrdersRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListMacOrdersRequest.Builder, ListMacOrdersRequest, ListMacOrdersResponse, + com.oracle.bmc.mngdmac.model.MacOrderSummary>( + new java.util.function.Supplier() { + @Override + public ListMacOrdersRequest.Builder get() { + return ListMacOrdersRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMacOrdersResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMacOrdersRequest.Builder>, + ListMacOrdersRequest>() { + @Override + public ListMacOrdersRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMacOrdersRequest.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 ListMacOrdersResponse apply(ListMacOrdersRequest request) { + return client.listMacOrders(request); + } + }, + new java.util.function.Function< + ListMacOrdersResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListMacOrdersResponse response) { + return response.getMacOrderCollection().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.mngdmac.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.mngdmac.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.mngdmac.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.mngdmac.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.mngdmac.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.mngdmac.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.mngdmac.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.mngdmac.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.mngdmac.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderWaiters.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderWaiters.java new file mode 100644 index 0000000000..adf23f7abe --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/MacOrderWaiters.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of MacOrder. + *

+ * 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: 20250320") +public class MacOrderWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final MacOrder client; + + public MacOrderWaiters(java.util.concurrent.ExecutorService executorService, MacOrder 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 forMacOrder( + GetMacOrderRequest request, + com.oracle.bmc.mngdmac.model.MacOrder.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 forMacOrder( + 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 forMacOrder( + GetMacOrderRequest request, + com.oracle.bmc.mngdmac.model.MacOrder.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 forMacOrder( + 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 forMacOrder( + GetMacOrderRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.mngdmac.model.MacOrder.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 forMacOrder( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for MacOrder. + private com.oracle.bmc.waiter.Waiter forMacOrder( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetMacOrderRequest request, + final com.oracle.bmc.mngdmac.model.MacOrder.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 GetMacOrderResponse apply(GetMacOrderRequest request) { + return client.getMacOrder(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetMacOrderResponse response) { + return targetStatesSet.contains( + response.getMacOrder().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.mngdmac.model.MacOrder.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/SdkClientsMetadata.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/SdkClientsMetadata.java new file mode 100644 index 0000000000..956519c245 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/SdkClientsMetadata.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac; + +import com.oracle.bmc.SdkClients; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +@SdkClients({ + MacDeviceAsyncClient.class, + MacDeviceClient.class, + MacOrderAsyncClient.class, + MacOrderClient.class +}) +public final class SdkClientsMetadata {} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/CancelMacOrderConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/CancelMacOrderConverter.java new file mode 100644 index 0000000000..09899f34c1 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/CancelMacOrderConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class CancelMacOrderConverter { + 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(CancelMacOrderConverter.class); + + public static com.oracle.bmc.mngdmac.requests.CancelMacOrderRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.CancelMacOrderRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.requests.CancelMacOrderRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMacOrderId(), "macOrderId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20250320") + .path("macOrders") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMacOrderId())) + .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.mngdmac.responses.CancelMacOrderResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.CancelMacOrderResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.CancelMacOrderResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.CancelMacOrderResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.CancelMacOrderResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.CancelMacOrderResponse"); + 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.mngdmac.responses.CancelMacOrderResponse.Builder + builder = + com.oracle.bmc.mngdmac.responses + .CancelMacOrderResponse.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.mngdmac.responses.CancelMacOrderResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/CancelWorkRequestConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/CancelWorkRequestConverter.java new file mode 100644 index 0000000000..8fa79948a2 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/CancelWorkRequestConverter.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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.mngdmac.requests.CancelWorkRequestRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.CancelWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.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("/20250320") + .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.mngdmac.responses.CancelWorkRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.CancelWorkRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.CancelWorkRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.CancelWorkRequestResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.CancelWorkRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.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.mngdmac.responses.CancelWorkRequestResponse.Builder + builder = + com.oracle.bmc.mngdmac.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.mngdmac.responses.CancelWorkRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ChangeMacOrderCompartmentConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ChangeMacOrderCompartmentConverter.java new file mode 100644 index 0000000000..e4a2c193fd --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ChangeMacOrderCompartmentConverter.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class ChangeMacOrderCompartmentConverter { + 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(ChangeMacOrderCompartmentConverter.class); + + public static com.oracle.bmc.mngdmac.requests.ChangeMacOrderCompartmentRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.ChangeMacOrderCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.requests.ChangeMacOrderCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMacOrderId(), "macOrderId must not be blank"); + Validate.notNull( + request.getChangeMacOrderCompartmentDetails(), + "changeMacOrderCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20250320") + .path("macOrders") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMacOrderId())) + .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.mngdmac.responses.ChangeMacOrderCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ChangeMacOrderCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ChangeMacOrderCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses + .ChangeMacOrderCompartmentResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses + .ChangeMacOrderCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.ChangeMacOrderCompartmentResponse"); + 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.mngdmac.responses.ChangeMacOrderCompartmentResponse + .Builder + builder = + com.oracle.bmc.mngdmac.responses + .ChangeMacOrderCompartmentResponse.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.mngdmac.responses.ChangeMacOrderCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/CreateMacOrderConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/CreateMacOrderConverter.java new file mode 100644 index 0000000000..bcf19ae915 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/CreateMacOrderConverter.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class CreateMacOrderConverter { + 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(CreateMacOrderConverter.class); + + public static com.oracle.bmc.mngdmac.requests.CreateMacOrderRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.CreateMacOrderRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.requests.CreateMacOrderRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCreateMacOrderDetails(), "createMacOrderDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20250320").path("macOrders"); + + 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.mngdmac.responses.CreateMacOrderResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.CreateMacOrderResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.CreateMacOrderResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.CreateMacOrderResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.CreateMacOrderResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.CreateMacOrderResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model.MacOrder>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model.MacOrder.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model.MacOrder.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model.MacOrder> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.mngdmac.responses.CreateMacOrderResponse.Builder + builder = + com.oracle.bmc.mngdmac.responses + .CreateMacOrderResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.macOrder(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.mngdmac.responses.CreateMacOrderResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/GetMacDeviceConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/GetMacDeviceConverter.java new file mode 100644 index 0000000000..4c4556fbaf --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/GetMacDeviceConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class GetMacDeviceConverter { + 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(GetMacDeviceConverter.class); + + public static com.oracle.bmc.mngdmac.requests.GetMacDeviceRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.GetMacDeviceRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.requests.GetMacDeviceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMacDeviceId(), "macDeviceId must not be blank"); + Validate.notBlank(request.getMacOrderId(), "macOrderId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20250320") + .path("macOrders") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMacOrderId())) + .path("macDevices") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMacDeviceId())); + + 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.mngdmac.responses.GetMacDeviceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.GetMacDeviceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.GetMacDeviceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.GetMacDeviceResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.GetMacDeviceResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.GetMacDeviceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model.MacDevice>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model.MacDevice.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model.MacDevice.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model.MacDevice> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.mngdmac.responses.GetMacDeviceResponse.Builder + builder = + com.oracle.bmc.mngdmac.responses + .GetMacDeviceResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.macDevice(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.mngdmac.responses.GetMacDeviceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/GetMacOrderConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/GetMacOrderConverter.java new file mode 100644 index 0000000000..291c4424a2 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/GetMacOrderConverter.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class GetMacOrderConverter { + 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(GetMacOrderConverter.class); + + public static com.oracle.bmc.mngdmac.requests.GetMacOrderRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.GetMacOrderRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.requests.GetMacOrderRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMacOrderId(), "macOrderId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20250320") + .path("macOrders") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMacOrderId())); + + 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.mngdmac.responses.GetMacOrderResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.mngdmac.responses.GetMacOrderResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.GetMacOrderResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.GetMacOrderResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.GetMacOrderResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.GetMacOrderResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model.MacOrder>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model.MacOrder.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model.MacOrder.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model.MacOrder> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.mngdmac.responses.GetMacOrderResponse.Builder + builder = + com.oracle.bmc.mngdmac.responses.GetMacOrderResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.macOrder(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.mngdmac.responses.GetMacOrderResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/GetWorkRequestConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/GetWorkRequestConverter.java new file mode 100644 index 0000000000..3b8beb8a4f --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/GetWorkRequestConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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.mngdmac.requests.GetWorkRequestRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.GetWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.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("/20250320") + .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.mngdmac.responses.GetWorkRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.GetWorkRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.GetWorkRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.GetWorkRequestResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.GetWorkRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.GetWorkRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model.WorkRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model.WorkRequest.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model.WorkRequest.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model.WorkRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.mngdmac.responses.GetWorkRequestResponse.Builder + builder = + com.oracle.bmc.mngdmac.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.mngdmac.responses.GetWorkRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListMacDevicesConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListMacDevicesConverter.java new file mode 100644 index 0000000000..a0b99704d3 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListMacDevicesConverter.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class ListMacDevicesConverter { + 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(ListMacDevicesConverter.class); + + public static com.oracle.bmc.mngdmac.requests.ListMacDevicesRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.ListMacDevicesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.requests.ListMacDevicesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMacOrderId(), "macOrderId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20250320") + .path("macOrders") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMacOrderId())) + .path("macDevices"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getSerialNumber() != null) { + target = + target.queryParam( + "serialNumber", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSerialNumber())); + } + + 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())); + } + + 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.mngdmac.responses.ListMacDevicesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListMacDevicesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListMacDevicesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListMacDevicesResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.ListMacDevicesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.ListMacDevicesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model + .MacDeviceCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model.MacDeviceCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model.MacDeviceCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model.MacDeviceCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.mngdmac.responses.ListMacDevicesResponse.Builder + builder = + com.oracle.bmc.mngdmac.responses + .ListMacDevicesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.macDeviceCollection(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.mngdmac.responses.ListMacDevicesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListMacOrdersConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListMacOrdersConverter.java new file mode 100644 index 0000000000..e440ebc961 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListMacOrdersConverter.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class ListMacOrdersConverter { + 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(ListMacOrdersConverter.class); + + public static com.oracle.bmc.mngdmac.requests.ListMacOrdersRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.ListMacOrdersRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.requests.ListMacOrdersRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20250320").path("macOrders"); + + 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.mngdmac.responses.ListMacOrdersResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListMacOrdersResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListMacOrdersResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListMacOrdersResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.ListMacOrdersResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.ListMacOrdersResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model + .MacOrderCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model.MacOrderCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model.MacOrderCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model.MacOrderCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.mngdmac.responses.ListMacOrdersResponse.Builder + builder = + com.oracle.bmc.mngdmac.responses + .ListMacOrdersResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.macOrderCollection(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.mngdmac.responses.ListMacOrdersResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListWorkRequestErrorsConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListWorkRequestErrorsConverter.java new file mode 100644 index 0000000000..6843cfe263 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListWorkRequestErrorsConverter.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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.mngdmac.requests.ListWorkRequestErrorsRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.ListWorkRequestErrorsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.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("/20250320") + .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.mngdmac.responses.ListWorkRequestErrorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListWorkRequestErrorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListWorkRequestErrorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListWorkRequestErrorsResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.ListWorkRequestErrorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.ListWorkRequestErrorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model + .WorkRequestErrorCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model + .WorkRequestErrorCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model + .WorkRequestErrorCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model + .WorkRequestErrorCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.mngdmac.responses.ListWorkRequestErrorsResponse + .Builder + builder = + com.oracle.bmc.mngdmac.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.mngdmac.responses.ListWorkRequestErrorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListWorkRequestLogsConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListWorkRequestLogsConverter.java new file mode 100644 index 0000000000..74080cd31f --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListWorkRequestLogsConverter.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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.mngdmac.requests.ListWorkRequestLogsRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.ListWorkRequestLogsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.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("/20250320") + .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.mngdmac.responses.ListWorkRequestLogsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListWorkRequestLogsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListWorkRequestLogsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListWorkRequestLogsResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.ListWorkRequestLogsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.ListWorkRequestLogsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model + .WorkRequestLogEntryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model + .WorkRequestLogEntryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model + .WorkRequestLogEntryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model + .WorkRequestLogEntryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.mngdmac.responses.ListWorkRequestLogsResponse.Builder + builder = + com.oracle.bmc.mngdmac.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.mngdmac.responses.ListWorkRequestLogsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListWorkRequestsConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListWorkRequestsConverter.java new file mode 100644 index 0000000000..31f6199ac7 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/ListWorkRequestsConverter.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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.mngdmac.requests.ListWorkRequestsRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.ListWorkRequestsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.requests.ListWorkRequestsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20250320").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.mngdmac.responses.ListWorkRequestsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListWorkRequestsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListWorkRequestsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.ListWorkRequestsResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.ListWorkRequestsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.ListWorkRequestsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model + .WorkRequestSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model + .WorkRequestSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.mngdmac.model + .WorkRequestSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.mngdmac.model + .WorkRequestSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.mngdmac.responses.ListWorkRequestsResponse.Builder + builder = + com.oracle.bmc.mngdmac.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.mngdmac.responses.ListWorkRequestsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/TerminateMacDeviceConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/TerminateMacDeviceConverter.java new file mode 100644 index 0000000000..443cde7c24 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/TerminateMacDeviceConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class TerminateMacDeviceConverter { + 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(TerminateMacDeviceConverter.class); + + public static com.oracle.bmc.mngdmac.requests.TerminateMacDeviceRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.TerminateMacDeviceRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.requests.TerminateMacDeviceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMacDeviceId(), "macDeviceId must not be blank"); + Validate.notBlank(request.getMacOrderId(), "macOrderId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20250320") + .path("macOrders") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMacOrderId())) + .path("macDevices") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMacDeviceId())) + .path("actions") + .path("terminate"); + + 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.mngdmac.responses.TerminateMacDeviceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.TerminateMacDeviceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.TerminateMacDeviceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.TerminateMacDeviceResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.TerminateMacDeviceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.TerminateMacDeviceResponse"); + 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.mngdmac.responses.TerminateMacDeviceResponse.Builder + builder = + com.oracle.bmc.mngdmac.responses + .TerminateMacDeviceResponse.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.mngdmac.responses.TerminateMacDeviceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/UpdateMacOrderConverter.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/UpdateMacOrderConverter.java new file mode 100644 index 0000000000..e89e8e905b --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/internal/http/UpdateMacOrderConverter.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.mngdmac.model.*; +import com.oracle.bmc.mngdmac.requests.*; +import com.oracle.bmc.mngdmac.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class UpdateMacOrderConverter { + 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(UpdateMacOrderConverter.class); + + public static com.oracle.bmc.mngdmac.requests.UpdateMacOrderRequest interceptRequest( + com.oracle.bmc.mngdmac.requests.UpdateMacOrderRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.mngdmac.requests.UpdateMacOrderRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMacOrderId(), "macOrderId must not be blank"); + Validate.notNull(request.getUpdateMacOrderDetails(), "updateMacOrderDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20250320") + .path("macOrders") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMacOrderId())); + + 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.mngdmac.responses.UpdateMacOrderResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.UpdateMacOrderResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.UpdateMacOrderResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.mngdmac.responses.UpdateMacOrderResponse>() { + @Override + public com.oracle.bmc.mngdmac.responses.UpdateMacOrderResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.mngdmac.responses.UpdateMacOrderResponse"); + 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.mngdmac.responses.UpdateMacOrderResponse.Builder + builder = + com.oracle.bmc.mngdmac.responses + .UpdateMacOrderResponse.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.mngdmac.responses.UpdateMacOrderResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/ActionType.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/ActionType.java new file mode 100644 index 0000000000..6d8056de89 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/ActionType.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * Possible types of actions. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/CancelMacOrderDetails.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/CancelMacOrderDetails.java new file mode 100644 index 0000000000..8417da13de --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/CancelMacOrderDetails.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * The data to cancel a MacOrder. + *
+ * 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CancelMacOrderDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CancelMacOrderDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"cancelReason"}) + public CancelMacOrderDetails(String cancelReason) { + super(); + this.cancelReason = cancelReason; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The reason for the MacOrder cancellation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cancelReason") + private String cancelReason; + + /** + * The reason for the MacOrder cancellation. + * @param cancelReason the value to set + * @return this builder + **/ + public Builder cancelReason(String cancelReason) { + this.cancelReason = cancelReason; + this.__explicitlySet__.add("cancelReason"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CancelMacOrderDetails build() { + CancelMacOrderDetails model = new CancelMacOrderDetails(this.cancelReason); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CancelMacOrderDetails model) { + if (model.wasPropertyExplicitlySet("cancelReason")) { + this.cancelReason(model.getCancelReason()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The reason for the MacOrder cancellation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cancelReason") + private final String cancelReason; + + /** + * The reason for the MacOrder cancellation. + * @return the value + **/ + public String getCancelReason() { + return cancelReason; + } + + @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("CancelMacOrderDetails("); + sb.append("super=").append(super.toString()); + sb.append("cancelReason=").append(String.valueOf(this.cancelReason)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CancelMacOrderDetails)) { + return false; + } + + CancelMacOrderDetails other = (CancelMacOrderDetails) o; + return java.util.Objects.equals(this.cancelReason, other.cancelReason) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.cancelReason == null ? 43 : this.cancelReason.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/ChangeMacOrderCompartmentDetails.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/ChangeMacOrderCompartmentDetails.java new file mode 100644 index 0000000000..8e82c246d6 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/ChangeMacOrderCompartmentDetails.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeMacOrderCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeMacOrderCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeMacOrderCompartmentDetails(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 MacOrder 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 MacOrder 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 ChangeMacOrderCompartmentDetails build() { + ChangeMacOrderCompartmentDetails model = + new ChangeMacOrderCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeMacOrderCompartmentDetails 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 MacOrder 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 MacOrder 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("ChangeMacOrderCompartmentDetails("); + 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 ChangeMacOrderCompartmentDetails)) { + return false; + } + + ChangeMacOrderCompartmentDetails other = (ChangeMacOrderCompartmentDetails) 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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/CreateMacOrderDetails.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/CreateMacOrderDetails.java new file mode 100644 index 0000000000..0cd106d14d --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/CreateMacOrderDetails.java @@ -0,0 +1,411 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * The data to create a new MacOrder. + *
+ * 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateMacOrderDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateMacOrderDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "orderDescription", + "orderSize", + "ipRange", + "shape", + "commitmentTerm" + }) + public CreateMacOrderDetails( + String compartmentId, + String displayName, + String orderDescription, + Integer orderSize, + String ipRange, + MacOrder.Shape shape, + MacOrder.CommitmentTerm commitmentTerm) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.orderDescription = orderDescription; + this.orderSize = orderSize; + this.ipRange = ipRange; + this.shape = shape; + this.commitmentTerm = commitmentTerm; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @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. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderDescription") + private String orderDescription; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param orderDescription the value to set + * @return this builder + **/ + public Builder orderDescription(String orderDescription) { + this.orderDescription = orderDescription; + this.__explicitlySet__.add("orderDescription"); + return this; + } + /** + * Number of macs requested in this MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderSize") + private Integer orderSize; + + /** + * Number of macs requested in this MacOrder. + * @param orderSize the value to set + * @return this builder + **/ + public Builder orderSize(Integer orderSize) { + this.orderSize = orderSize; + this.__explicitlySet__.add("orderSize"); + return this; + } + /** + * The IP Range specified by the customer for this order. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipRange") + private String ipRange; + + /** + * The IP Range specified by the customer for this order. + * @param ipRange the value to set + * @return this builder + **/ + public Builder ipRange(String ipRange) { + this.ipRange = ipRange; + this.__explicitlySet__.add("ipRange"); + return this; + } + /** + * The requested shape of the MacDevices in the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private MacOrder.Shape shape; + + /** + * The requested shape of the MacDevices in the MacOrder. + * @param shape the value to set + * @return this builder + **/ + public Builder shape(MacOrder.Shape shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * Enum that indicates the agreed commitment term for the MacDevices. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitmentTerm") + private MacOrder.CommitmentTerm commitmentTerm; + + /** + * Enum that indicates the agreed commitment term for the MacDevices. + * @param commitmentTerm the value to set + * @return this builder + **/ + public Builder commitmentTerm(MacOrder.CommitmentTerm commitmentTerm) { + this.commitmentTerm = commitmentTerm; + this.__explicitlySet__.add("commitmentTerm"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateMacOrderDetails build() { + CreateMacOrderDetails model = + new CreateMacOrderDetails( + this.compartmentId, + this.displayName, + this.orderDescription, + this.orderSize, + this.ipRange, + this.shape, + this.commitmentTerm); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateMacOrderDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("orderDescription")) { + this.orderDescription(model.getOrderDescription()); + } + if (model.wasPropertyExplicitlySet("orderSize")) { + this.orderSize(model.getOrderSize()); + } + if (model.wasPropertyExplicitlySet("ipRange")) { + this.ipRange(model.getIpRange()); + } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("commitmentTerm")) { + this.commitmentTerm(model.getCommitmentTerm()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @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. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderDescription") + private final String orderDescription; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getOrderDescription() { + return orderDescription; + } + + /** + * Number of macs requested in this MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderSize") + private final Integer orderSize; + + /** + * Number of macs requested in this MacOrder. + * @return the value + **/ + public Integer getOrderSize() { + return orderSize; + } + + /** + * The IP Range specified by the customer for this order. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipRange") + private final String ipRange; + + /** + * The IP Range specified by the customer for this order. + * @return the value + **/ + public String getIpRange() { + return ipRange; + } + + /** + * The requested shape of the MacDevices in the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final MacOrder.Shape shape; + + /** + * The requested shape of the MacDevices in the MacOrder. + * @return the value + **/ + public MacOrder.Shape getShape() { + return shape; + } + + /** + * Enum that indicates the agreed commitment term for the MacDevices. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitmentTerm") + private final MacOrder.CommitmentTerm commitmentTerm; + + /** + * Enum that indicates the agreed commitment term for the MacDevices. + * @return the value + **/ + public MacOrder.CommitmentTerm getCommitmentTerm() { + return commitmentTerm; + } + + @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("CreateMacOrderDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", orderDescription=").append(String.valueOf(this.orderDescription)); + sb.append(", orderSize=").append(String.valueOf(this.orderSize)); + sb.append(", ipRange=").append(String.valueOf(this.ipRange)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", commitmentTerm=").append(String.valueOf(this.commitmentTerm)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMacOrderDetails)) { + return false; + } + + CreateMacOrderDetails other = (CreateMacOrderDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.orderDescription, other.orderDescription) + && java.util.Objects.equals(this.orderSize, other.orderSize) + && java.util.Objects.equals(this.ipRange, other.ipRange) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.commitmentTerm, other.commitmentTerm) + && 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.orderDescription == null ? 43 : this.orderDescription.hashCode()); + result = (result * PRIME) + (this.orderSize == null ? 43 : this.orderSize.hashCode()); + result = (result * PRIME) + (this.ipRange == null ? 43 : this.ipRange.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = + (result * PRIME) + + (this.commitmentTerm == null ? 43 : this.commitmentTerm.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/CreateNodeConfigDetails.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/CreateNodeConfigDetails.java new file mode 100644 index 0000000000..ff490b8508 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/CreateNodeConfigDetails.java @@ -0,0 +1,793 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * The data to create a new NodeConfig. + *
+ * 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateNodeConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateNodeConfigDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "serialNumber", + "macAddress", + "macOrderId", + "switchHostname", + "switchEthPort", + "ipKvmHostname", + "ipKvmPortNumber", + "pduHostname", + "pduPort", + "buildVlanId", + "buildIpAddress", + "prodVlanId", + "prodIpAddress", + "rackLocation", + "chipSet", + "osVersion", + "tenancyId" + }) + public CreateNodeConfigDetails( + String serialNumber, + String macAddress, + String macOrderId, + String switchHostname, + String switchEthPort, + String ipKvmHostname, + Integer ipKvmPortNumber, + String pduHostname, + Integer pduPort, + Integer buildVlanId, + String buildIpAddress, + Integer prodVlanId, + String prodIpAddress, + String rackLocation, + String chipSet, + String osVersion, + String tenancyId) { + super(); + this.serialNumber = serialNumber; + this.macAddress = macAddress; + this.macOrderId = macOrderId; + this.switchHostname = switchHostname; + this.switchEthPort = switchEthPort; + this.ipKvmHostname = ipKvmHostname; + this.ipKvmPortNumber = ipKvmPortNumber; + this.pduHostname = pduHostname; + this.pduPort = pduPort; + this.buildVlanId = buildVlanId; + this.buildIpAddress = buildIpAddress; + this.prodVlanId = prodVlanId; + this.prodIpAddress = prodIpAddress; + this.rackLocation = rackLocation; + this.chipSet = chipSet; + this.osVersion = osVersion; + this.tenancyId = tenancyId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The serial number of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serialNumber") + private String serialNumber; + + /** + * The serial number of the MacDevice. + * @param serialNumber the value to set + * @return this builder + **/ + public Builder serialNumber(String serialNumber) { + this.serialNumber = serialNumber; + this.__explicitlySet__.add("serialNumber"); + return this; + } + /** + * The macAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macAddress") + private String macAddress; + + /** + * The macAddress. + * @param macAddress the value to set + * @return this builder + **/ + public Builder macAddress(String macAddress) { + this.macAddress = macAddress; + this.__explicitlySet__.add("macAddress"); + return this; + } + /** + * The macOrderId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macOrderId") + private String macOrderId; + + /** + * The macOrderId. + * @param macOrderId the value to set + * @return this builder + **/ + public Builder macOrderId(String macOrderId) { + this.macOrderId = macOrderId; + this.__explicitlySet__.add("macOrderId"); + return this; + } + /** + * The switchHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("switchHostname") + private String switchHostname; + + /** + * The switchHostname. + * @param switchHostname the value to set + * @return this builder + **/ + public Builder switchHostname(String switchHostname) { + this.switchHostname = switchHostname; + this.__explicitlySet__.add("switchHostname"); + return this; + } + /** + * The switchEthPort. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("switchEthPort") + private String switchEthPort; + + /** + * The switchEthPort. + * @param switchEthPort the value to set + * @return this builder + **/ + public Builder switchEthPort(String switchEthPort) { + this.switchEthPort = switchEthPort; + this.__explicitlySet__.add("switchEthPort"); + return this; + } + /** + * The ipKvmHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipKvmHostname") + private String ipKvmHostname; + + /** + * The ipKvmHostname. + * @param ipKvmHostname the value to set + * @return this builder + **/ + public Builder ipKvmHostname(String ipKvmHostname) { + this.ipKvmHostname = ipKvmHostname; + this.__explicitlySet__.add("ipKvmHostname"); + return this; + } + /** + * The ipKvmPortNumber. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipKvmPortNumber") + private Integer ipKvmPortNumber; + + /** + * The ipKvmPortNumber. + * @param ipKvmPortNumber the value to set + * @return this builder + **/ + public Builder ipKvmPortNumber(Integer ipKvmPortNumber) { + this.ipKvmPortNumber = ipKvmPortNumber; + this.__explicitlySet__.add("ipKvmPortNumber"); + return this; + } + /** + * The pduHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pduHostname") + private String pduHostname; + + /** + * The pduHostname. + * @param pduHostname the value to set + * @return this builder + **/ + public Builder pduHostname(String pduHostname) { + this.pduHostname = pduHostname; + this.__explicitlySet__.add("pduHostname"); + return this; + } + /** + * The pduPort. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pduPort") + private Integer pduPort; + + /** + * The pduPort. + * @param pduPort the value to set + * @return this builder + **/ + public Builder pduPort(Integer pduPort) { + this.pduPort = pduPort; + this.__explicitlySet__.add("pduPort"); + return this; + } + /** + * The buildVlanId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildVlanId") + private Integer buildVlanId; + + /** + * The buildVlanId. + * @param buildVlanId the value to set + * @return this builder + **/ + public Builder buildVlanId(Integer buildVlanId) { + this.buildVlanId = buildVlanId; + this.__explicitlySet__.add("buildVlanId"); + return this; + } + /** + * The buildIpAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildIpAddress") + private String buildIpAddress; + + /** + * The buildIpAddress. + * @param buildIpAddress the value to set + * @return this builder + **/ + public Builder buildIpAddress(String buildIpAddress) { + this.buildIpAddress = buildIpAddress; + this.__explicitlySet__.add("buildIpAddress"); + return this; + } + /** + * The prodVlanId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prodVlanId") + private Integer prodVlanId; + + /** + * The prodVlanId. + * @param prodVlanId the value to set + * @return this builder + **/ + public Builder prodVlanId(Integer prodVlanId) { + this.prodVlanId = prodVlanId; + this.__explicitlySet__.add("prodVlanId"); + return this; + } + /** + * The prodIpAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prodIpAddress") + private String prodIpAddress; + + /** + * The prodIpAddress. + * @param prodIpAddress the value to set + * @return this builder + **/ + public Builder prodIpAddress(String prodIpAddress) { + this.prodIpAddress = prodIpAddress; + this.__explicitlySet__.add("prodIpAddress"); + return this; + } + /** + * The rackLocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rackLocation") + private String rackLocation; + + /** + * The rackLocation. + * @param rackLocation the value to set + * @return this builder + **/ + public Builder rackLocation(String rackLocation) { + this.rackLocation = rackLocation; + this.__explicitlySet__.add("rackLocation"); + return this; + } + /** + * The chipSetn. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chipSet") + private String chipSet; + + /** + * The chipSetn. + * @param chipSet the value to set + * @return this builder + **/ + public Builder chipSet(String chipSet) { + this.chipSet = chipSet; + this.__explicitlySet__.add("chipSet"); + return this; + } + /** + * The osVersion. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osVersion") + private String osVersion; + + /** + * The osVersion. + * @param osVersion the value to set + * @return this builder + **/ + public Builder osVersion(String osVersion) { + this.osVersion = osVersion; + this.__explicitlySet__.add("osVersion"); + return this; + } + /** + * The tenancyId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * The tenancyId. + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateNodeConfigDetails build() { + CreateNodeConfigDetails model = + new CreateNodeConfigDetails( + this.serialNumber, + this.macAddress, + this.macOrderId, + this.switchHostname, + this.switchEthPort, + this.ipKvmHostname, + this.ipKvmPortNumber, + this.pduHostname, + this.pduPort, + this.buildVlanId, + this.buildIpAddress, + this.prodVlanId, + this.prodIpAddress, + this.rackLocation, + this.chipSet, + this.osVersion, + this.tenancyId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateNodeConfigDetails model) { + if (model.wasPropertyExplicitlySet("serialNumber")) { + this.serialNumber(model.getSerialNumber()); + } + if (model.wasPropertyExplicitlySet("macAddress")) { + this.macAddress(model.getMacAddress()); + } + if (model.wasPropertyExplicitlySet("macOrderId")) { + this.macOrderId(model.getMacOrderId()); + } + if (model.wasPropertyExplicitlySet("switchHostname")) { + this.switchHostname(model.getSwitchHostname()); + } + if (model.wasPropertyExplicitlySet("switchEthPort")) { + this.switchEthPort(model.getSwitchEthPort()); + } + if (model.wasPropertyExplicitlySet("ipKvmHostname")) { + this.ipKvmHostname(model.getIpKvmHostname()); + } + if (model.wasPropertyExplicitlySet("ipKvmPortNumber")) { + this.ipKvmPortNumber(model.getIpKvmPortNumber()); + } + if (model.wasPropertyExplicitlySet("pduHostname")) { + this.pduHostname(model.getPduHostname()); + } + if (model.wasPropertyExplicitlySet("pduPort")) { + this.pduPort(model.getPduPort()); + } + if (model.wasPropertyExplicitlySet("buildVlanId")) { + this.buildVlanId(model.getBuildVlanId()); + } + if (model.wasPropertyExplicitlySet("buildIpAddress")) { + this.buildIpAddress(model.getBuildIpAddress()); + } + if (model.wasPropertyExplicitlySet("prodVlanId")) { + this.prodVlanId(model.getProdVlanId()); + } + if (model.wasPropertyExplicitlySet("prodIpAddress")) { + this.prodIpAddress(model.getProdIpAddress()); + } + if (model.wasPropertyExplicitlySet("rackLocation")) { + this.rackLocation(model.getRackLocation()); + } + if (model.wasPropertyExplicitlySet("chipSet")) { + this.chipSet(model.getChipSet()); + } + if (model.wasPropertyExplicitlySet("osVersion")) { + this.osVersion(model.getOsVersion()); + } + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The serial number of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serialNumber") + private final String serialNumber; + + /** + * The serial number of the MacDevice. + * @return the value + **/ + public String getSerialNumber() { + return serialNumber; + } + + /** + * The macAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macAddress") + private final String macAddress; + + /** + * The macAddress. + * @return the value + **/ + public String getMacAddress() { + return macAddress; + } + + /** + * The macOrderId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macOrderId") + private final String macOrderId; + + /** + * The macOrderId. + * @return the value + **/ + public String getMacOrderId() { + return macOrderId; + } + + /** + * The switchHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("switchHostname") + private final String switchHostname; + + /** + * The switchHostname. + * @return the value + **/ + public String getSwitchHostname() { + return switchHostname; + } + + /** + * The switchEthPort. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("switchEthPort") + private final String switchEthPort; + + /** + * The switchEthPort. + * @return the value + **/ + public String getSwitchEthPort() { + return switchEthPort; + } + + /** + * The ipKvmHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipKvmHostname") + private final String ipKvmHostname; + + /** + * The ipKvmHostname. + * @return the value + **/ + public String getIpKvmHostname() { + return ipKvmHostname; + } + + /** + * The ipKvmPortNumber. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipKvmPortNumber") + private final Integer ipKvmPortNumber; + + /** + * The ipKvmPortNumber. + * @return the value + **/ + public Integer getIpKvmPortNumber() { + return ipKvmPortNumber; + } + + /** + * The pduHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pduHostname") + private final String pduHostname; + + /** + * The pduHostname. + * @return the value + **/ + public String getPduHostname() { + return pduHostname; + } + + /** + * The pduPort. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pduPort") + private final Integer pduPort; + + /** + * The pduPort. + * @return the value + **/ + public Integer getPduPort() { + return pduPort; + } + + /** + * The buildVlanId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildVlanId") + private final Integer buildVlanId; + + /** + * The buildVlanId. + * @return the value + **/ + public Integer getBuildVlanId() { + return buildVlanId; + } + + /** + * The buildIpAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildIpAddress") + private final String buildIpAddress; + + /** + * The buildIpAddress. + * @return the value + **/ + public String getBuildIpAddress() { + return buildIpAddress; + } + + /** + * The prodVlanId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prodVlanId") + private final Integer prodVlanId; + + /** + * The prodVlanId. + * @return the value + **/ + public Integer getProdVlanId() { + return prodVlanId; + } + + /** + * The prodIpAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prodIpAddress") + private final String prodIpAddress; + + /** + * The prodIpAddress. + * @return the value + **/ + public String getProdIpAddress() { + return prodIpAddress; + } + + /** + * The rackLocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rackLocation") + private final String rackLocation; + + /** + * The rackLocation. + * @return the value + **/ + public String getRackLocation() { + return rackLocation; + } + + /** + * The chipSetn. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chipSet") + private final String chipSet; + + /** + * The chipSetn. + * @return the value + **/ + public String getChipSet() { + return chipSet; + } + + /** + * The osVersion. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osVersion") + private final String osVersion; + + /** + * The osVersion. + * @return the value + **/ + public String getOsVersion() { + return osVersion; + } + + /** + * The tenancyId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * The tenancyId. + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + @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("CreateNodeConfigDetails("); + sb.append("super=").append(super.toString()); + sb.append("serialNumber=").append(String.valueOf(this.serialNumber)); + sb.append(", macAddress=").append(String.valueOf(this.macAddress)); + sb.append(", macOrderId=").append(String.valueOf(this.macOrderId)); + sb.append(", switchHostname=").append(String.valueOf(this.switchHostname)); + sb.append(", switchEthPort=").append(String.valueOf(this.switchEthPort)); + sb.append(", ipKvmHostname=").append(String.valueOf(this.ipKvmHostname)); + sb.append(", ipKvmPortNumber=").append(String.valueOf(this.ipKvmPortNumber)); + sb.append(", pduHostname=").append(String.valueOf(this.pduHostname)); + sb.append(", pduPort=").append(String.valueOf(this.pduPort)); + sb.append(", buildVlanId=").append(String.valueOf(this.buildVlanId)); + sb.append(", buildIpAddress=").append(String.valueOf(this.buildIpAddress)); + sb.append(", prodVlanId=").append(String.valueOf(this.prodVlanId)); + sb.append(", prodIpAddress=").append(String.valueOf(this.prodIpAddress)); + sb.append(", rackLocation=").append(String.valueOf(this.rackLocation)); + sb.append(", chipSet=").append(String.valueOf(this.chipSet)); + sb.append(", osVersion=").append(String.valueOf(this.osVersion)); + sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateNodeConfigDetails)) { + return false; + } + + CreateNodeConfigDetails other = (CreateNodeConfigDetails) o; + return java.util.Objects.equals(this.serialNumber, other.serialNumber) + && java.util.Objects.equals(this.macAddress, other.macAddress) + && java.util.Objects.equals(this.macOrderId, other.macOrderId) + && java.util.Objects.equals(this.switchHostname, other.switchHostname) + && java.util.Objects.equals(this.switchEthPort, other.switchEthPort) + && java.util.Objects.equals(this.ipKvmHostname, other.ipKvmHostname) + && java.util.Objects.equals(this.ipKvmPortNumber, other.ipKvmPortNumber) + && java.util.Objects.equals(this.pduHostname, other.pduHostname) + && java.util.Objects.equals(this.pduPort, other.pduPort) + && java.util.Objects.equals(this.buildVlanId, other.buildVlanId) + && java.util.Objects.equals(this.buildIpAddress, other.buildIpAddress) + && java.util.Objects.equals(this.prodVlanId, other.prodVlanId) + && java.util.Objects.equals(this.prodIpAddress, other.prodIpAddress) + && java.util.Objects.equals(this.rackLocation, other.rackLocation) + && java.util.Objects.equals(this.chipSet, other.chipSet) + && java.util.Objects.equals(this.osVersion, other.osVersion) + && java.util.Objects.equals(this.tenancyId, other.tenancyId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.serialNumber == null ? 43 : this.serialNumber.hashCode()); + result = (result * PRIME) + (this.macAddress == null ? 43 : this.macAddress.hashCode()); + result = (result * PRIME) + (this.macOrderId == null ? 43 : this.macOrderId.hashCode()); + result = + (result * PRIME) + + (this.switchHostname == null ? 43 : this.switchHostname.hashCode()); + result = + (result * PRIME) + + (this.switchEthPort == null ? 43 : this.switchEthPort.hashCode()); + result = + (result * PRIME) + + (this.ipKvmHostname == null ? 43 : this.ipKvmHostname.hashCode()); + result = + (result * PRIME) + + (this.ipKvmPortNumber == null ? 43 : this.ipKvmPortNumber.hashCode()); + result = (result * PRIME) + (this.pduHostname == null ? 43 : this.pduHostname.hashCode()); + result = (result * PRIME) + (this.pduPort == null ? 43 : this.pduPort.hashCode()); + result = (result * PRIME) + (this.buildVlanId == null ? 43 : this.buildVlanId.hashCode()); + result = + (result * PRIME) + + (this.buildIpAddress == null ? 43 : this.buildIpAddress.hashCode()); + result = (result * PRIME) + (this.prodVlanId == null ? 43 : this.prodVlanId.hashCode()); + result = + (result * PRIME) + + (this.prodIpAddress == null ? 43 : this.prodIpAddress.hashCode()); + result = (result * PRIME) + (this.rackLocation == null ? 43 : this.rackLocation.hashCode()); + result = (result * PRIME) + (this.chipSet == null ? 43 : this.chipSet.hashCode()); + result = (result * PRIME) + (this.osVersion == null ? 43 : this.osVersion.hashCode()); + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacDevice.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacDevice.java new file mode 100644 index 0000000000..45d72e8b6a --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacDevice.java @@ -0,0 +1,596 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * Represents a MacDevice 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = MacDevice.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacDevice extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "macOrderId", + "serialNumber", + "ipAddress", + "lifecycleState", + "shape", + "timeCreated", + "timeUpdated", + "isMarkedDecom", + "timeDecom" + }) + public MacDevice( + String id, + String compartmentId, + String macOrderId, + String serialNumber, + String ipAddress, + LifecycleState lifecycleState, + MacOrder.Shape shape, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Boolean isMarkedDecom, + java.util.Date timeDecom) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.macOrderId = macOrderId; + this.serialNumber = serialNumber; + this.ipAddress = ipAddress; + this.lifecycleState = lifecycleState; + this.shape = shape; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.isMarkedDecom = isMarkedDecom; + this.timeDecom = timeDecom; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique ID of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique ID of the MacDevice. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macOrderId") + private String macOrderId; + + /** + * The OCID of the resource. + * @param macOrderId the value to set + * @return this builder + **/ + public Builder macOrderId(String macOrderId) { + this.macOrderId = macOrderId; + this.__explicitlySet__.add("macOrderId"); + return this; + } + /** + * The serial number of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serialNumber") + private String serialNumber; + + /** + * The serial number of the MacDevice. + * @param serialNumber the value to set + * @return this builder + **/ + public Builder serialNumber(String serialNumber) { + this.serialNumber = serialNumber; + this.__explicitlySet__.add("serialNumber"); + return this; + } + /** + * The IP address assigned to the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") + private String ipAddress; + + /** + * The IP address assigned to the MacDevice. + * @param ipAddress the value to set + * @return this builder + **/ + public Builder ipAddress(String ipAddress) { + this.ipAddress = ipAddress; + this.__explicitlySet__.add("ipAddress"); + return this; + } + /** + * The current status of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current status of the MacDevice. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The shape of the Mac. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private MacOrder.Shape shape; + + /** + * The shape of the Mac. + * @param shape the value to set + * @return this builder + **/ + public Builder shape(MacOrder.Shape shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource 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 this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource 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; + } + /** + * A flag that indicates if this MacDevice is decommissioned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMarkedDecom") + private Boolean isMarkedDecom; + + /** + * A flag that indicates if this MacDevice is decommissioned. + * @param isMarkedDecom the value to set + * @return this builder + **/ + public Builder isMarkedDecom(Boolean isMarkedDecom) { + this.isMarkedDecom = isMarkedDecom; + this.__explicitlySet__.add("isMarkedDecom"); + return this; + } + /** + * An RFC3339-formatted datetime string containing the time this MacDevice was decommissioned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeDecom") + private java.util.Date timeDecom; + + /** + * An RFC3339-formatted datetime string containing the time this MacDevice was decommissioned. + * @param timeDecom the value to set + * @return this builder + **/ + public Builder timeDecom(java.util.Date timeDecom) { + this.timeDecom = timeDecom; + this.__explicitlySet__.add("timeDecom"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MacDevice build() { + MacDevice model = + new MacDevice( + this.id, + this.compartmentId, + this.macOrderId, + this.serialNumber, + this.ipAddress, + this.lifecycleState, + this.shape, + this.timeCreated, + this.timeUpdated, + this.isMarkedDecom, + this.timeDecom); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacDevice model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("macOrderId")) { + this.macOrderId(model.getMacOrderId()); + } + if (model.wasPropertyExplicitlySet("serialNumber")) { + this.serialNumber(model.getSerialNumber()); + } + if (model.wasPropertyExplicitlySet("ipAddress")) { + this.ipAddress(model.getIpAddress()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("isMarkedDecom")) { + this.isMarkedDecom(model.getIsMarkedDecom()); + } + if (model.wasPropertyExplicitlySet("timeDecom")) { + this.timeDecom(model.getTimeDecom()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique ID of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique ID of the MacDevice. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macOrderId") + private final String macOrderId; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getMacOrderId() { + return macOrderId; + } + + /** + * The serial number of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serialNumber") + private final String serialNumber; + + /** + * The serial number of the MacDevice. + * @return the value + **/ + public String getSerialNumber() { + return serialNumber; + } + + /** + * The IP address assigned to the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") + private final String ipAddress; + + /** + * The IP address assigned to the MacDevice. + * @return the value + **/ + public String getIpAddress() { + return ipAddress; + } + + /** + * The current status of the MacDevice. + **/ + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + NeedsAttention("NEEDS_ATTENTION"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current status of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current status of the MacDevice. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The shape of the Mac. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final MacOrder.Shape shape; + + /** + * The shape of the Mac. + * @return the value + **/ + public MacOrder.Shape getShape() { + return shape; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * A flag that indicates if this MacDevice is decommissioned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMarkedDecom") + private final Boolean isMarkedDecom; + + /** + * A flag that indicates if this MacDevice is decommissioned. + * @return the value + **/ + public Boolean getIsMarkedDecom() { + return isMarkedDecom; + } + + /** + * An RFC3339-formatted datetime string containing the time this MacDevice was decommissioned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeDecom") + private final java.util.Date timeDecom; + + /** + * An RFC3339-formatted datetime string containing the time this MacDevice was decommissioned. + * @return the value + **/ + public java.util.Date getTimeDecom() { + return timeDecom; + } + + @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("MacDevice("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", macOrderId=").append(String.valueOf(this.macOrderId)); + sb.append(", serialNumber=").append(String.valueOf(this.serialNumber)); + sb.append(", ipAddress=").append(String.valueOf(this.ipAddress)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", isMarkedDecom=").append(String.valueOf(this.isMarkedDecom)); + sb.append(", timeDecom=").append(String.valueOf(this.timeDecom)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MacDevice)) { + return false; + } + + MacDevice other = (MacDevice) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.macOrderId, other.macOrderId) + && java.util.Objects.equals(this.serialNumber, other.serialNumber) + && java.util.Objects.equals(this.ipAddress, other.ipAddress) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.isMarkedDecom, other.isMarkedDecom) + && java.util.Objects.equals(this.timeDecom, other.timeDecom) + && 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.macOrderId == null ? 43 : this.macOrderId.hashCode()); + result = (result * PRIME) + (this.serialNumber == null ? 43 : this.serialNumber.hashCode()); + result = (result * PRIME) + (this.ipAddress == null ? 43 : this.ipAddress.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.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.isMarkedDecom == null ? 43 : this.isMarkedDecom.hashCode()); + result = (result * PRIME) + (this.timeDecom == null ? 43 : this.timeDecom.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacDeviceCollection.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacDeviceCollection.java new file mode 100644 index 0000000000..f9437a2b02 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacDeviceCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * Results of a MacDevice search. Contains both MacDeviceSummary 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MacDeviceCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacDeviceCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public MacDeviceCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of MacDevices. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of MacDevices. + * @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 MacDeviceCollection build() { + MacDeviceCollection model = new MacDeviceCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacDeviceCollection 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 MacDevices. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of MacDevices. + * @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("MacDeviceCollection("); + 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 MacDeviceCollection)) { + return false; + } + + MacDeviceCollection other = (MacDeviceCollection) 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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacDeviceSummary.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacDeviceSummary.java new file mode 100644 index 0000000000..68ce642f6b --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacDeviceSummary.java @@ -0,0 +1,544 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * Summary information about a MacDevice. + *
+ * 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = MacDeviceSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacDeviceSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "macOrderId", + "serialNumber", + "ipAddress", + "shape", + "lifecycleState", + "timeCreated", + "timeUpdated", + "isMarkedDecom", + "timeDecom" + }) + public MacDeviceSummary( + String id, + String compartmentId, + String macOrderId, + String serialNumber, + String ipAddress, + MacOrder.Shape shape, + MacDevice.LifecycleState lifecycleState, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Boolean isMarkedDecom, + java.util.Date timeDecom) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.macOrderId = macOrderId; + this.serialNumber = serialNumber; + this.ipAddress = ipAddress; + this.shape = shape; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.isMarkedDecom = isMarkedDecom; + this.timeDecom = timeDecom; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique ID of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique ID of the MacDevice. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macOrderId") + private String macOrderId; + + /** + * The OCID of the resource. + * @param macOrderId the value to set + * @return this builder + **/ + public Builder macOrderId(String macOrderId) { + this.macOrderId = macOrderId; + this.__explicitlySet__.add("macOrderId"); + return this; + } + /** + * The serial number of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serialNumber") + private String serialNumber; + + /** + * The serial number of the MacDevice. + * @param serialNumber the value to set + * @return this builder + **/ + public Builder serialNumber(String serialNumber) { + this.serialNumber = serialNumber; + this.__explicitlySet__.add("serialNumber"); + return this; + } + /** + * The IP address assigned to the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") + private String ipAddress; + + /** + * The IP address assigned to the MacDevice. + * @param ipAddress the value to set + * @return this builder + **/ + public Builder ipAddress(String ipAddress) { + this.ipAddress = ipAddress; + this.__explicitlySet__.add("ipAddress"); + return this; + } + /** + * The shape of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private MacOrder.Shape shape; + + /** + * The shape of the MacDevice. + * @param shape the value to set + * @return this builder + **/ + public Builder shape(MacOrder.Shape shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * The current status of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private MacDevice.LifecycleState lifecycleState; + + /** + * The current status of the MacDevice. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(MacDevice.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource 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 this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource 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; + } + /** + * A flag that indicates if this MacDevice is decommissioned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMarkedDecom") + private Boolean isMarkedDecom; + + /** + * A flag that indicates if this MacDevice is decommissioned. + * @param isMarkedDecom the value to set + * @return this builder + **/ + public Builder isMarkedDecom(Boolean isMarkedDecom) { + this.isMarkedDecom = isMarkedDecom; + this.__explicitlySet__.add("isMarkedDecom"); + return this; + } + /** + * An RFC3339-formatted datetime string containing the time this MacDevice was decommissioned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeDecom") + private java.util.Date timeDecom; + + /** + * An RFC3339-formatted datetime string containing the time this MacDevice was decommissioned. + * @param timeDecom the value to set + * @return this builder + **/ + public Builder timeDecom(java.util.Date timeDecom) { + this.timeDecom = timeDecom; + this.__explicitlySet__.add("timeDecom"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MacDeviceSummary build() { + MacDeviceSummary model = + new MacDeviceSummary( + this.id, + this.compartmentId, + this.macOrderId, + this.serialNumber, + this.ipAddress, + this.shape, + this.lifecycleState, + this.timeCreated, + this.timeUpdated, + this.isMarkedDecom, + this.timeDecom); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacDeviceSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("macOrderId")) { + this.macOrderId(model.getMacOrderId()); + } + if (model.wasPropertyExplicitlySet("serialNumber")) { + this.serialNumber(model.getSerialNumber()); + } + if (model.wasPropertyExplicitlySet("ipAddress")) { + this.ipAddress(model.getIpAddress()); + } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("isMarkedDecom")) { + this.isMarkedDecom(model.getIsMarkedDecom()); + } + if (model.wasPropertyExplicitlySet("timeDecom")) { + this.timeDecom(model.getTimeDecom()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique ID of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique ID of the MacDevice. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macOrderId") + private final String macOrderId; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getMacOrderId() { + return macOrderId; + } + + /** + * The serial number of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serialNumber") + private final String serialNumber; + + /** + * The serial number of the MacDevice. + * @return the value + **/ + public String getSerialNumber() { + return serialNumber; + } + + /** + * The IP address assigned to the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") + private final String ipAddress; + + /** + * The IP address assigned to the MacDevice. + * @return the value + **/ + public String getIpAddress() { + return ipAddress; + } + + /** + * The shape of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final MacOrder.Shape shape; + + /** + * The shape of the MacDevice. + * @return the value + **/ + public MacOrder.Shape getShape() { + return shape; + } + + /** + * The current status of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final MacDevice.LifecycleState lifecycleState; + + /** + * The current status of the MacDevice. + * @return the value + **/ + public MacDevice.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * A flag that indicates if this MacDevice is decommissioned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMarkedDecom") + private final Boolean isMarkedDecom; + + /** + * A flag that indicates if this MacDevice is decommissioned. + * @return the value + **/ + public Boolean getIsMarkedDecom() { + return isMarkedDecom; + } + + /** + * An RFC3339-formatted datetime string containing the time this MacDevice was decommissioned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeDecom") + private final java.util.Date timeDecom; + + /** + * An RFC3339-formatted datetime string containing the time this MacDevice was decommissioned. + * @return the value + **/ + public java.util.Date getTimeDecom() { + return timeDecom; + } + + @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("MacDeviceSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", macOrderId=").append(String.valueOf(this.macOrderId)); + sb.append(", serialNumber=").append(String.valueOf(this.serialNumber)); + sb.append(", ipAddress=").append(String.valueOf(this.ipAddress)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", isMarkedDecom=").append(String.valueOf(this.isMarkedDecom)); + sb.append(", timeDecom=").append(String.valueOf(this.timeDecom)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MacDeviceSummary)) { + return false; + } + + MacDeviceSummary other = (MacDeviceSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.macOrderId, other.macOrderId) + && java.util.Objects.equals(this.serialNumber, other.serialNumber) + && java.util.Objects.equals(this.ipAddress, other.ipAddress) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.isMarkedDecom, other.isMarkedDecom) + && java.util.Objects.equals(this.timeDecom, other.timeDecom) + && 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.macOrderId == null ? 43 : this.macOrderId.hashCode()); + result = (result * PRIME) + (this.serialNumber == null ? 43 : this.serialNumber.hashCode()); + result = (result * PRIME) + (this.ipAddress == null ? 43 : this.ipAddress.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.isMarkedDecom == null ? 43 : this.isMarkedDecom.hashCode()); + result = (result * PRIME) + (this.timeDecom == null ? 43 : this.timeDecom.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacOrder.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacOrder.java new file mode 100644 index 0000000000..d904c81659 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacOrder.java @@ -0,0 +1,1069 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * A description of a MacOrder 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = MacOrder.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacOrder extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "orderDescription", + "orderSize", + "ipRange", + "isDocusigned", + "shape", + "timeCreated", + "timeUpdated", + "commitmentTerm", + "timeBillingStarted", + "timeBillingEnded", + "orderStatus", + "lifecycleState", + "lifecycleDetails", + "cancelReason", + "timeCanceled" + }) + public MacOrder( + String id, + String compartmentId, + String displayName, + String orderDescription, + Integer orderSize, + String ipRange, + Boolean isDocusigned, + Shape shape, + java.util.Date timeCreated, + java.util.Date timeUpdated, + CommitmentTerm commitmentTerm, + java.util.Date timeBillingStarted, + java.util.Date timeBillingEnded, + OrderStatus orderStatus, + LifecycleState lifecycleState, + String lifecycleDetails, + String cancelReason, + java.util.Date timeCanceled) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.orderDescription = orderDescription; + this.orderSize = orderSize; + this.ipRange = ipRange; + this.isDocusigned = isDocusigned; + this.shape = shape; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.commitmentTerm = commitmentTerm; + this.timeBillingStarted = timeBillingStarted; + this.timeBillingEnded = timeBillingEnded; + this.orderStatus = orderStatus; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.cancelReason = cancelReason; + this.timeCanceled = timeCanceled; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @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. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderDescription") + private String orderDescription; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param orderDescription the value to set + * @return this builder + **/ + public Builder orderDescription(String orderDescription) { + this.orderDescription = orderDescription; + this.__explicitlySet__.add("orderDescription"); + return this; + } + /** + * Number of macs requested in this MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderSize") + private Integer orderSize; + + /** + * Number of macs requested in this MacOrder. + * @param orderSize the value to set + * @return this builder + **/ + public Builder orderSize(Integer orderSize) { + this.orderSize = orderSize; + this.__explicitlySet__.add("orderSize"); + return this; + } + /** + * The IP Range specified by the customer for this order. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipRange") + private String ipRange; + + /** + * The IP Range specified by the customer for this order. + * @param ipRange the value to set + * @return this builder + **/ + public Builder ipRange(String ipRange) { + this.ipRange = ipRange; + this.__explicitlySet__.add("ipRange"); + return this; + } + /** + * Checkbox value that indicates whether the customer completed docusign process. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDocusigned") + private Boolean isDocusigned; + + /** + * Checkbox value that indicates whether the customer completed docusign process. + * @param isDocusigned the value to set + * @return this builder + **/ + public Builder isDocusigned(Boolean isDocusigned) { + this.isDocusigned = isDocusigned; + this.__explicitlySet__.add("isDocusigned"); + return this; + } + /** + * Enum indicating the requested shape for the MacDevices. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private Shape shape; + + /** + * Enum indicating the requested shape for the MacDevices. + * @param shape the value to set + * @return this builder + **/ + public Builder shape(Shape shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource 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 this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource 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; + } + /** + * Enum indicating the agreed commitment term for the requested MacDevices. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitmentTerm") + private CommitmentTerm commitmentTerm; + + /** + * Enum indicating the agreed commitment term for the requested MacDevices. + * @param commitmentTerm the value to set + * @return this builder + **/ + public Builder commitmentTerm(CommitmentTerm commitmentTerm) { + this.commitmentTerm = commitmentTerm; + this.__explicitlySet__.add("commitmentTerm"); + return this; + } + /** + * An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder begins. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingStarted") + private java.util.Date timeBillingStarted; + + /** + * An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder begins. + * @param timeBillingStarted the value to set + * @return this builder + **/ + public Builder timeBillingStarted(java.util.Date timeBillingStarted) { + this.timeBillingStarted = timeBillingStarted; + this.__explicitlySet__.add("timeBillingStarted"); + return this; + } + /** + * An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder ends. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingEnded") + private java.util.Date timeBillingEnded; + + /** + * An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder ends. + * @param timeBillingEnded the value to set + * @return this builder + **/ + public Builder timeBillingEnded(java.util.Date timeBillingEnded) { + this.timeBillingEnded = timeBillingEnded; + this.__explicitlySet__.add("timeBillingEnded"); + return this; + } + /** + * The current status of the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderStatus") + private OrderStatus orderStatus; + + /** + * The current status of the MacOrder. + * @param orderStatus the value to set + * @return this builder + **/ + public Builder orderStatus(OrderStatus orderStatus) { + this.orderStatus = orderStatus; + this.__explicitlySet__.add("orderStatus"); + return this; + } + /** + * The current state of the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the MacOrder. + * @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 MacOrder in more detail. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the MacOrder in more detail. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The reason for the MacOrder cancellation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cancelReason") + private String cancelReason; + + /** + * The reason for the MacOrder cancellation. + * @param cancelReason the value to set + * @return this builder + **/ + public Builder cancelReason(String cancelReason) { + this.cancelReason = cancelReason; + this.__explicitlySet__.add("cancelReason"); + return this; + } + /** + * An RFC3339-formatted datetime string containing the time this MacOrder was cancelled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCanceled") + private java.util.Date timeCanceled; + + /** + * An RFC3339-formatted datetime string containing the time this MacOrder was cancelled. + * @param timeCanceled the value to set + * @return this builder + **/ + public Builder timeCanceled(java.util.Date timeCanceled) { + this.timeCanceled = timeCanceled; + this.__explicitlySet__.add("timeCanceled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MacOrder build() { + MacOrder model = + new MacOrder( + this.id, + this.compartmentId, + this.displayName, + this.orderDescription, + this.orderSize, + this.ipRange, + this.isDocusigned, + this.shape, + this.timeCreated, + this.timeUpdated, + this.commitmentTerm, + this.timeBillingStarted, + this.timeBillingEnded, + this.orderStatus, + this.lifecycleState, + this.lifecycleDetails, + this.cancelReason, + this.timeCanceled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacOrder 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("orderDescription")) { + this.orderDescription(model.getOrderDescription()); + } + if (model.wasPropertyExplicitlySet("orderSize")) { + this.orderSize(model.getOrderSize()); + } + if (model.wasPropertyExplicitlySet("ipRange")) { + this.ipRange(model.getIpRange()); + } + if (model.wasPropertyExplicitlySet("isDocusigned")) { + this.isDocusigned(model.getIsDocusigned()); + } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("commitmentTerm")) { + this.commitmentTerm(model.getCommitmentTerm()); + } + if (model.wasPropertyExplicitlySet("timeBillingStarted")) { + this.timeBillingStarted(model.getTimeBillingStarted()); + } + if (model.wasPropertyExplicitlySet("timeBillingEnded")) { + this.timeBillingEnded(model.getTimeBillingEnded()); + } + if (model.wasPropertyExplicitlySet("orderStatus")) { + this.orderStatus(model.getOrderStatus()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("cancelReason")) { + this.cancelReason(model.getCancelReason()); + } + if (model.wasPropertyExplicitlySet("timeCanceled")) { + this.timeCanceled(model.getTimeCanceled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @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. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderDescription") + private final String orderDescription; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getOrderDescription() { + return orderDescription; + } + + /** + * Number of macs requested in this MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderSize") + private final Integer orderSize; + + /** + * Number of macs requested in this MacOrder. + * @return the value + **/ + public Integer getOrderSize() { + return orderSize; + } + + /** + * The IP Range specified by the customer for this order. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipRange") + private final String ipRange; + + /** + * The IP Range specified by the customer for this order. + * @return the value + **/ + public String getIpRange() { + return ipRange; + } + + /** + * Checkbox value that indicates whether the customer completed docusign process. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDocusigned") + private final Boolean isDocusigned; + + /** + * Checkbox value that indicates whether the customer completed docusign process. + * @return the value + **/ + public Boolean getIsDocusigned() { + return isDocusigned; + } + + /** + * Enum indicating the requested shape for the MacDevices. + **/ + public enum Shape { + M2ProMacMini32Gb1Tb("M2_PRO_MAC_MINI_32GB_1TB"), + M2UltraMacStudio64Gb4Tb("M2_ULTRA_MAC_STUDIO_64GB_4TB"), + M2UltraMacStudio192Gb4Tb("M2_ULTRA_MAC_STUDIO_192GB_4TB"), + M4ProMacMini64Gb2Tb("M4_PRO_MAC_MINI_64GB_2TB"), + M4ProMacMini64Gb4Tb("M4_PRO_MAC_MINI_64GB_4TB"), + + /** + * 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(Shape.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Shape v : Shape.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Shape(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Shape create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Shape', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Enum indicating the requested shape for the MacDevices. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final Shape shape; + + /** + * Enum indicating the requested shape for the MacDevices. + * @return the value + **/ + public Shape getShape() { + return shape; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Enum indicating the agreed commitment term for the requested MacDevices. + **/ + public enum CommitmentTerm { + Years3("YEARS_3"), + + /** + * 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(CommitmentTerm.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (CommitmentTerm v : CommitmentTerm.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + CommitmentTerm(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CommitmentTerm create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'CommitmentTerm', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Enum indicating the agreed commitment term for the requested MacDevices. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitmentTerm") + private final CommitmentTerm commitmentTerm; + + /** + * Enum indicating the agreed commitment term for the requested MacDevices. + * @return the value + **/ + public CommitmentTerm getCommitmentTerm() { + return commitmentTerm; + } + + /** + * An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder begins. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingStarted") + private final java.util.Date timeBillingStarted; + + /** + * An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder begins. + * @return the value + **/ + public java.util.Date getTimeBillingStarted() { + return timeBillingStarted; + } + + /** + * An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder ends. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingEnded") + private final java.util.Date timeBillingEnded; + + /** + * An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder ends. + * @return the value + **/ + public java.util.Date getTimeBillingEnded() { + return timeBillingEnded; + } + + /** + * The current status of the MacOrder. + **/ + public enum OrderStatus { + Submitted("SUBMITTED"), + PendingDocusign("PENDING_DOCUSIGN"), + OrderReview("ORDER_REVIEW"), + CustomerReview("CUSTOMER_REVIEW"), + CustomerApproved("CUSTOMER_APPROVED"), + FundingApproved("FUNDING_APPROVED"), + Provisioning("PROVISIONING"), + CustomerAccepted("CUSTOMER_ACCEPTED"), + Completed("COMPLETED"), + Canceled("CANCELED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(OrderStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OrderStatus v : OrderStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OrderStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OrderStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OrderStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current status of the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderStatus") + private final OrderStatus orderStatus; + + /** + * The current status of the MacOrder. + * @return the value + **/ + public OrderStatus getOrderStatus() { + return orderStatus; + } + + /** + * The current state of the MacOrder. + **/ + public enum LifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Active("ACTIVE"), + NeedsAttention("NEEDS_ATTENTION"), + 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 MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the MacOrder. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the MacOrder in more detail. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the MacOrder in more detail. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The reason for the MacOrder cancellation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cancelReason") + private final String cancelReason; + + /** + * The reason for the MacOrder cancellation. + * @return the value + **/ + public String getCancelReason() { + return cancelReason; + } + + /** + * An RFC3339-formatted datetime string containing the time this MacOrder was cancelled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCanceled") + private final java.util.Date timeCanceled; + + /** + * An RFC3339-formatted datetime string containing the time this MacOrder was cancelled. + * @return the value + **/ + public java.util.Date getTimeCanceled() { + return timeCanceled; + } + + @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("MacOrder("); + 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(", orderDescription=").append(String.valueOf(this.orderDescription)); + sb.append(", orderSize=").append(String.valueOf(this.orderSize)); + sb.append(", ipRange=").append(String.valueOf(this.ipRange)); + sb.append(", isDocusigned=").append(String.valueOf(this.isDocusigned)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", commitmentTerm=").append(String.valueOf(this.commitmentTerm)); + sb.append(", timeBillingStarted=").append(String.valueOf(this.timeBillingStarted)); + sb.append(", timeBillingEnded=").append(String.valueOf(this.timeBillingEnded)); + sb.append(", orderStatus=").append(String.valueOf(this.orderStatus)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", cancelReason=").append(String.valueOf(this.cancelReason)); + sb.append(", timeCanceled=").append(String.valueOf(this.timeCanceled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MacOrder)) { + return false; + } + + MacOrder other = (MacOrder) 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.orderDescription, other.orderDescription) + && java.util.Objects.equals(this.orderSize, other.orderSize) + && java.util.Objects.equals(this.ipRange, other.ipRange) + && java.util.Objects.equals(this.isDocusigned, other.isDocusigned) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.commitmentTerm, other.commitmentTerm) + && java.util.Objects.equals(this.timeBillingStarted, other.timeBillingStarted) + && java.util.Objects.equals(this.timeBillingEnded, other.timeBillingEnded) + && java.util.Objects.equals(this.orderStatus, other.orderStatus) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.cancelReason, other.cancelReason) + && java.util.Objects.equals(this.timeCanceled, other.timeCanceled) + && 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.orderDescription == null ? 43 : this.orderDescription.hashCode()); + result = (result * PRIME) + (this.orderSize == null ? 43 : this.orderSize.hashCode()); + result = (result * PRIME) + (this.ipRange == null ? 43 : this.ipRange.hashCode()); + result = (result * PRIME) + (this.isDocusigned == null ? 43 : this.isDocusigned.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.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.commitmentTerm == null ? 43 : this.commitmentTerm.hashCode()); + result = + (result * PRIME) + + (this.timeBillingStarted == null + ? 43 + : this.timeBillingStarted.hashCode()); + result = + (result * PRIME) + + (this.timeBillingEnded == null ? 43 : this.timeBillingEnded.hashCode()); + result = (result * PRIME) + (this.orderStatus == null ? 43 : this.orderStatus.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.cancelReason == null ? 43 : this.cancelReason.hashCode()); + result = (result * PRIME) + (this.timeCanceled == null ? 43 : this.timeCanceled.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacOrderCollection.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacOrderCollection.java new file mode 100644 index 0000000000..3a7755f966 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacOrderCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * Results of a MacOrder search. Contains both MacOrderSummary 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MacOrderCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacOrderCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public MacOrderCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of MacOrders. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of MacOrders. + * @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 MacOrderCollection build() { + MacOrderCollection model = new MacOrderCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacOrderCollection 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 MacOrders. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of MacOrders. + * @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("MacOrderCollection("); + 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 MacOrderCollection)) { + return false; + } + + MacOrderCollection other = (MacOrderCollection) 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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacOrderSummary.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacOrderSummary.java new file mode 100644 index 0000000000..f55f76071b --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/MacOrderSummary.java @@ -0,0 +1,782 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * Summary information about a MacOrder. + *
+ * 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = MacOrderSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacOrderSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "orderDescription", + "orderSize", + "ipRange", + "isDocusigned", + "shape", + "timeCreated", + "timeUpdated", + "commitmentTerm", + "timeBillingStarted", + "timeBillingEnded", + "orderStatus", + "lifecycleState", + "lifecycleDetails" + }) + public MacOrderSummary( + String id, + String compartmentId, + String displayName, + String orderDescription, + Integer orderSize, + String ipRange, + Boolean isDocusigned, + MacOrder.Shape shape, + java.util.Date timeCreated, + java.util.Date timeUpdated, + MacOrder.CommitmentTerm commitmentTerm, + java.util.Date timeBillingStarted, + java.util.Date timeBillingEnded, + MacOrder.OrderStatus orderStatus, + MacOrder.LifecycleState lifecycleState, + String lifecycleDetails) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.orderDescription = orderDescription; + this.orderSize = orderSize; + this.ipRange = ipRange; + this.isDocusigned = isDocusigned; + this.shape = shape; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.commitmentTerm = commitmentTerm; + this.timeBillingStarted = timeBillingStarted; + this.timeBillingEnded = timeBillingEnded; + this.orderStatus = orderStatus; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @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. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderDescription") + private String orderDescription; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param orderDescription the value to set + * @return this builder + **/ + public Builder orderDescription(String orderDescription) { + this.orderDescription = orderDescription; + this.__explicitlySet__.add("orderDescription"); + return this; + } + /** + * Number of macs requested in this MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderSize") + private Integer orderSize; + + /** + * Number of macs requested in this MacOrder. + * @param orderSize the value to set + * @return this builder + **/ + public Builder orderSize(Integer orderSize) { + this.orderSize = orderSize; + this.__explicitlySet__.add("orderSize"); + return this; + } + /** + * The IP Range specified by the customer for this order. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipRange") + private String ipRange; + + /** + * The IP Range specified by the customer for this order. + * @param ipRange the value to set + * @return this builder + **/ + public Builder ipRange(String ipRange) { + this.ipRange = ipRange; + this.__explicitlySet__.add("ipRange"); + return this; + } + /** + * Checkbox value that indicates whether the customer completed docusign process. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDocusigned") + private Boolean isDocusigned; + + /** + * Checkbox value that indicates whether the customer completed docusign process. + * @param isDocusigned the value to set + * @return this builder + **/ + public Builder isDocusigned(Boolean isDocusigned) { + this.isDocusigned = isDocusigned; + this.__explicitlySet__.add("isDocusigned"); + return this; + } + /** + * The requested shape for Macs in this MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private MacOrder.Shape shape; + + /** + * The requested shape for Macs in this MacOrder. + * @param shape the value to set + * @return this builder + **/ + public Builder shape(MacOrder.Shape shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource 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 this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource 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; + } + /** + * Enum indicating the agreed commitment term on the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitmentTerm") + private MacOrder.CommitmentTerm commitmentTerm; + + /** + * Enum indicating the agreed commitment term on the MacOrder. + * @param commitmentTerm the value to set + * @return this builder + **/ + public Builder commitmentTerm(MacOrder.CommitmentTerm commitmentTerm) { + this.commitmentTerm = commitmentTerm; + this.__explicitlySet__.add("commitmentTerm"); + return this; + } + /** + * An RFC3339-formatted datetime string containing the date and time this MacOrder begins. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingStarted") + private java.util.Date timeBillingStarted; + + /** + * An RFC3339-formatted datetime string containing the date and time this MacOrder begins. + * @param timeBillingStarted the value to set + * @return this builder + **/ + public Builder timeBillingStarted(java.util.Date timeBillingStarted) { + this.timeBillingStarted = timeBillingStarted; + this.__explicitlySet__.add("timeBillingStarted"); + return this; + } + /** + * An RFC3339-formatted datetime string containing the date and time this MacOrder begins. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingEnded") + private java.util.Date timeBillingEnded; + + /** + * An RFC3339-formatted datetime string containing the date and time this MacOrder begins. + * @param timeBillingEnded the value to set + * @return this builder + **/ + public Builder timeBillingEnded(java.util.Date timeBillingEnded) { + this.timeBillingEnded = timeBillingEnded; + this.__explicitlySet__.add("timeBillingEnded"); + return this; + } + /** + * The current status of the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderStatus") + private MacOrder.OrderStatus orderStatus; + + /** + * The current status of the MacOrder. + * @param orderStatus the value to set + * @return this builder + **/ + public Builder orderStatus(MacOrder.OrderStatus orderStatus) { + this.orderStatus = orderStatus; + this.__explicitlySet__.add("orderStatus"); + return this; + } + /** + * The current state of the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private MacOrder.LifecycleState lifecycleState; + + /** + * The current state of the MacOrder. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(MacOrder.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the MacOrder in more detail. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the MacOrder in more detail. + * + * @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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MacOrderSummary build() { + MacOrderSummary model = + new MacOrderSummary( + this.id, + this.compartmentId, + this.displayName, + this.orderDescription, + this.orderSize, + this.ipRange, + this.isDocusigned, + this.shape, + this.timeCreated, + this.timeUpdated, + this.commitmentTerm, + this.timeBillingStarted, + this.timeBillingEnded, + this.orderStatus, + this.lifecycleState, + this.lifecycleDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacOrderSummary 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("orderDescription")) { + this.orderDescription(model.getOrderDescription()); + } + if (model.wasPropertyExplicitlySet("orderSize")) { + this.orderSize(model.getOrderSize()); + } + if (model.wasPropertyExplicitlySet("ipRange")) { + this.ipRange(model.getIpRange()); + } + if (model.wasPropertyExplicitlySet("isDocusigned")) { + this.isDocusigned(model.getIsDocusigned()); + } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("commitmentTerm")) { + this.commitmentTerm(model.getCommitmentTerm()); + } + if (model.wasPropertyExplicitlySet("timeBillingStarted")) { + this.timeBillingStarted(model.getTimeBillingStarted()); + } + if (model.wasPropertyExplicitlySet("timeBillingEnded")) { + this.timeBillingEnded(model.getTimeBillingEnded()); + } + if (model.wasPropertyExplicitlySet("orderStatus")) { + this.orderStatus(model.getOrderStatus()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @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. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderDescription") + private final String orderDescription; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getOrderDescription() { + return orderDescription; + } + + /** + * Number of macs requested in this MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderSize") + private final Integer orderSize; + + /** + * Number of macs requested in this MacOrder. + * @return the value + **/ + public Integer getOrderSize() { + return orderSize; + } + + /** + * The IP Range specified by the customer for this order. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipRange") + private final String ipRange; + + /** + * The IP Range specified by the customer for this order. + * @return the value + **/ + public String getIpRange() { + return ipRange; + } + + /** + * Checkbox value that indicates whether the customer completed docusign process. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDocusigned") + private final Boolean isDocusigned; + + /** + * Checkbox value that indicates whether the customer completed docusign process. + * @return the value + **/ + public Boolean getIsDocusigned() { + return isDocusigned; + } + + /** + * The requested shape for Macs in this MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final MacOrder.Shape shape; + + /** + * The requested shape for Macs in this MacOrder. + * @return the value + **/ + public MacOrder.Shape getShape() { + return shape; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Enum indicating the agreed commitment term on the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitmentTerm") + private final MacOrder.CommitmentTerm commitmentTerm; + + /** + * Enum indicating the agreed commitment term on the MacOrder. + * @return the value + **/ + public MacOrder.CommitmentTerm getCommitmentTerm() { + return commitmentTerm; + } + + /** + * An RFC3339-formatted datetime string containing the date and time this MacOrder begins. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingStarted") + private final java.util.Date timeBillingStarted; + + /** + * An RFC3339-formatted datetime string containing the date and time this MacOrder begins. + * @return the value + **/ + public java.util.Date getTimeBillingStarted() { + return timeBillingStarted; + } + + /** + * An RFC3339-formatted datetime string containing the date and time this MacOrder begins. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingEnded") + private final java.util.Date timeBillingEnded; + + /** + * An RFC3339-formatted datetime string containing the date and time this MacOrder begins. + * @return the value + **/ + public java.util.Date getTimeBillingEnded() { + return timeBillingEnded; + } + + /** + * The current status of the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderStatus") + private final MacOrder.OrderStatus orderStatus; + + /** + * The current status of the MacOrder. + * @return the value + **/ + public MacOrder.OrderStatus getOrderStatus() { + return orderStatus; + } + + /** + * The current state of the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final MacOrder.LifecycleState lifecycleState; + + /** + * The current state of the MacOrder. + * @return the value + **/ + public MacOrder.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the MacOrder in more detail. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the MacOrder in more detail. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + @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("MacOrderSummary("); + 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(", orderDescription=").append(String.valueOf(this.orderDescription)); + sb.append(", orderSize=").append(String.valueOf(this.orderSize)); + sb.append(", ipRange=").append(String.valueOf(this.ipRange)); + sb.append(", isDocusigned=").append(String.valueOf(this.isDocusigned)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", commitmentTerm=").append(String.valueOf(this.commitmentTerm)); + sb.append(", timeBillingStarted=").append(String.valueOf(this.timeBillingStarted)); + sb.append(", timeBillingEnded=").append(String.valueOf(this.timeBillingEnded)); + sb.append(", orderStatus=").append(String.valueOf(this.orderStatus)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MacOrderSummary)) { + return false; + } + + MacOrderSummary other = (MacOrderSummary) 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.orderDescription, other.orderDescription) + && java.util.Objects.equals(this.orderSize, other.orderSize) + && java.util.Objects.equals(this.ipRange, other.ipRange) + && java.util.Objects.equals(this.isDocusigned, other.isDocusigned) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.commitmentTerm, other.commitmentTerm) + && java.util.Objects.equals(this.timeBillingStarted, other.timeBillingStarted) + && java.util.Objects.equals(this.timeBillingEnded, other.timeBillingEnded) + && java.util.Objects.equals(this.orderStatus, other.orderStatus) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && 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.orderDescription == null ? 43 : this.orderDescription.hashCode()); + result = (result * PRIME) + (this.orderSize == null ? 43 : this.orderSize.hashCode()); + result = (result * PRIME) + (this.ipRange == null ? 43 : this.ipRange.hashCode()); + result = (result * PRIME) + (this.isDocusigned == null ? 43 : this.isDocusigned.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.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.commitmentTerm == null ? 43 : this.commitmentTerm.hashCode()); + result = + (result * PRIME) + + (this.timeBillingStarted == null + ? 43 + : this.timeBillingStarted.hashCode()); + result = + (result * PRIME) + + (this.timeBillingEnded == null ? 43 : this.timeBillingEnded.hashCode()); + result = (result * PRIME) + (this.orderStatus == null ? 43 : this.orderStatus.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/NodeConfig.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/NodeConfig.java new file mode 100644 index 0000000000..2db6d8fceb --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/NodeConfig.java @@ -0,0 +1,790 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * Represents a MacDevice 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = NodeConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class NodeConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "serialNumber", + "macAddress", + "switchHostname", + "switchEthPort", + "ipKvmHostname", + "ipKvmPortNumber", + "pduHostname", + "pduPort", + "buildVlanId", + "buildIpAddress", + "prodVlanId", + "prodIpAddress", + "rackLocation", + "chipSet", + "osVersion", + "macOrderId", + "tenancyId" + }) + public NodeConfig( + String serialNumber, + String macAddress, + String switchHostname, + String switchEthPort, + String ipKvmHostname, + Integer ipKvmPortNumber, + String pduHostname, + Integer pduPort, + Integer buildVlanId, + String buildIpAddress, + Integer prodVlanId, + String prodIpAddress, + String rackLocation, + String chipSet, + String osVersion, + String macOrderId, + String tenancyId) { + super(); + this.serialNumber = serialNumber; + this.macAddress = macAddress; + this.switchHostname = switchHostname; + this.switchEthPort = switchEthPort; + this.ipKvmHostname = ipKvmHostname; + this.ipKvmPortNumber = ipKvmPortNumber; + this.pduHostname = pduHostname; + this.pduPort = pduPort; + this.buildVlanId = buildVlanId; + this.buildIpAddress = buildIpAddress; + this.prodVlanId = prodVlanId; + this.prodIpAddress = prodIpAddress; + this.rackLocation = rackLocation; + this.chipSet = chipSet; + this.osVersion = osVersion; + this.macOrderId = macOrderId; + this.tenancyId = tenancyId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The serial number of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serialNumber") + private String serialNumber; + + /** + * The serial number of the MacDevice. + * @param serialNumber the value to set + * @return this builder + **/ + public Builder serialNumber(String serialNumber) { + this.serialNumber = serialNumber; + this.__explicitlySet__.add("serialNumber"); + return this; + } + /** + * The macAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macAddress") + private String macAddress; + + /** + * The macAddress. + * @param macAddress the value to set + * @return this builder + **/ + public Builder macAddress(String macAddress) { + this.macAddress = macAddress; + this.__explicitlySet__.add("macAddress"); + return this; + } + /** + * The switchHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("switchHostname") + private String switchHostname; + + /** + * The switchHostname. + * @param switchHostname the value to set + * @return this builder + **/ + public Builder switchHostname(String switchHostname) { + this.switchHostname = switchHostname; + this.__explicitlySet__.add("switchHostname"); + return this; + } + /** + * The switchEthPort. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("switchEthPort") + private String switchEthPort; + + /** + * The switchEthPort. + * @param switchEthPort the value to set + * @return this builder + **/ + public Builder switchEthPort(String switchEthPort) { + this.switchEthPort = switchEthPort; + this.__explicitlySet__.add("switchEthPort"); + return this; + } + /** + * The ipKvmHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipKvmHostname") + private String ipKvmHostname; + + /** + * The ipKvmHostname. + * @param ipKvmHostname the value to set + * @return this builder + **/ + public Builder ipKvmHostname(String ipKvmHostname) { + this.ipKvmHostname = ipKvmHostname; + this.__explicitlySet__.add("ipKvmHostname"); + return this; + } + /** + * The ipKvmPortNumber. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipKvmPortNumber") + private Integer ipKvmPortNumber; + + /** + * The ipKvmPortNumber. + * @param ipKvmPortNumber the value to set + * @return this builder + **/ + public Builder ipKvmPortNumber(Integer ipKvmPortNumber) { + this.ipKvmPortNumber = ipKvmPortNumber; + this.__explicitlySet__.add("ipKvmPortNumber"); + return this; + } + /** + * The pduHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pduHostname") + private String pduHostname; + + /** + * The pduHostname. + * @param pduHostname the value to set + * @return this builder + **/ + public Builder pduHostname(String pduHostname) { + this.pduHostname = pduHostname; + this.__explicitlySet__.add("pduHostname"); + return this; + } + /** + * The pduPort. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pduPort") + private Integer pduPort; + + /** + * The pduPort. + * @param pduPort the value to set + * @return this builder + **/ + public Builder pduPort(Integer pduPort) { + this.pduPort = pduPort; + this.__explicitlySet__.add("pduPort"); + return this; + } + /** + * The buildVlanId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildVlanId") + private Integer buildVlanId; + + /** + * The buildVlanId. + * @param buildVlanId the value to set + * @return this builder + **/ + public Builder buildVlanId(Integer buildVlanId) { + this.buildVlanId = buildVlanId; + this.__explicitlySet__.add("buildVlanId"); + return this; + } + /** + * The buildIpAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildIpAddress") + private String buildIpAddress; + + /** + * The buildIpAddress. + * @param buildIpAddress the value to set + * @return this builder + **/ + public Builder buildIpAddress(String buildIpAddress) { + this.buildIpAddress = buildIpAddress; + this.__explicitlySet__.add("buildIpAddress"); + return this; + } + /** + * The prodVlanId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prodVlanId") + private Integer prodVlanId; + + /** + * The prodVlanId. + * @param prodVlanId the value to set + * @return this builder + **/ + public Builder prodVlanId(Integer prodVlanId) { + this.prodVlanId = prodVlanId; + this.__explicitlySet__.add("prodVlanId"); + return this; + } + /** + * The prodIpAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prodIpAddress") + private String prodIpAddress; + + /** + * The prodIpAddress. + * @param prodIpAddress the value to set + * @return this builder + **/ + public Builder prodIpAddress(String prodIpAddress) { + this.prodIpAddress = prodIpAddress; + this.__explicitlySet__.add("prodIpAddress"); + return this; + } + /** + * The rackLocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rackLocation") + private String rackLocation; + + /** + * The rackLocation. + * @param rackLocation the value to set + * @return this builder + **/ + public Builder rackLocation(String rackLocation) { + this.rackLocation = rackLocation; + this.__explicitlySet__.add("rackLocation"); + return this; + } + /** + * The chipSetn. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chipSet") + private String chipSet; + + /** + * The chipSetn. + * @param chipSet the value to set + * @return this builder + **/ + public Builder chipSet(String chipSet) { + this.chipSet = chipSet; + this.__explicitlySet__.add("chipSet"); + return this; + } + /** + * The osVersion. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osVersion") + private String osVersion; + + /** + * The osVersion. + * @param osVersion the value to set + * @return this builder + **/ + public Builder osVersion(String osVersion) { + this.osVersion = osVersion; + this.__explicitlySet__.add("osVersion"); + return this; + } + /** + * The macOrderId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macOrderId") + private String macOrderId; + + /** + * The macOrderId. + * @param macOrderId the value to set + * @return this builder + **/ + public Builder macOrderId(String macOrderId) { + this.macOrderId = macOrderId; + this.__explicitlySet__.add("macOrderId"); + return this; + } + /** + * The tenancyId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * The tenancyId. + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public NodeConfig build() { + NodeConfig model = + new NodeConfig( + this.serialNumber, + this.macAddress, + this.switchHostname, + this.switchEthPort, + this.ipKvmHostname, + this.ipKvmPortNumber, + this.pduHostname, + this.pduPort, + this.buildVlanId, + this.buildIpAddress, + this.prodVlanId, + this.prodIpAddress, + this.rackLocation, + this.chipSet, + this.osVersion, + this.macOrderId, + this.tenancyId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(NodeConfig model) { + if (model.wasPropertyExplicitlySet("serialNumber")) { + this.serialNumber(model.getSerialNumber()); + } + if (model.wasPropertyExplicitlySet("macAddress")) { + this.macAddress(model.getMacAddress()); + } + if (model.wasPropertyExplicitlySet("switchHostname")) { + this.switchHostname(model.getSwitchHostname()); + } + if (model.wasPropertyExplicitlySet("switchEthPort")) { + this.switchEthPort(model.getSwitchEthPort()); + } + if (model.wasPropertyExplicitlySet("ipKvmHostname")) { + this.ipKvmHostname(model.getIpKvmHostname()); + } + if (model.wasPropertyExplicitlySet("ipKvmPortNumber")) { + this.ipKvmPortNumber(model.getIpKvmPortNumber()); + } + if (model.wasPropertyExplicitlySet("pduHostname")) { + this.pduHostname(model.getPduHostname()); + } + if (model.wasPropertyExplicitlySet("pduPort")) { + this.pduPort(model.getPduPort()); + } + if (model.wasPropertyExplicitlySet("buildVlanId")) { + this.buildVlanId(model.getBuildVlanId()); + } + if (model.wasPropertyExplicitlySet("buildIpAddress")) { + this.buildIpAddress(model.getBuildIpAddress()); + } + if (model.wasPropertyExplicitlySet("prodVlanId")) { + this.prodVlanId(model.getProdVlanId()); + } + if (model.wasPropertyExplicitlySet("prodIpAddress")) { + this.prodIpAddress(model.getProdIpAddress()); + } + if (model.wasPropertyExplicitlySet("rackLocation")) { + this.rackLocation(model.getRackLocation()); + } + if (model.wasPropertyExplicitlySet("chipSet")) { + this.chipSet(model.getChipSet()); + } + if (model.wasPropertyExplicitlySet("osVersion")) { + this.osVersion(model.getOsVersion()); + } + if (model.wasPropertyExplicitlySet("macOrderId")) { + this.macOrderId(model.getMacOrderId()); + } + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The serial number of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serialNumber") + private final String serialNumber; + + /** + * The serial number of the MacDevice. + * @return the value + **/ + public String getSerialNumber() { + return serialNumber; + } + + /** + * The macAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macAddress") + private final String macAddress; + + /** + * The macAddress. + * @return the value + **/ + public String getMacAddress() { + return macAddress; + } + + /** + * The switchHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("switchHostname") + private final String switchHostname; + + /** + * The switchHostname. + * @return the value + **/ + public String getSwitchHostname() { + return switchHostname; + } + + /** + * The switchEthPort. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("switchEthPort") + private final String switchEthPort; + + /** + * The switchEthPort. + * @return the value + **/ + public String getSwitchEthPort() { + return switchEthPort; + } + + /** + * The ipKvmHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipKvmHostname") + private final String ipKvmHostname; + + /** + * The ipKvmHostname. + * @return the value + **/ + public String getIpKvmHostname() { + return ipKvmHostname; + } + + /** + * The ipKvmPortNumber. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipKvmPortNumber") + private final Integer ipKvmPortNumber; + + /** + * The ipKvmPortNumber. + * @return the value + **/ + public Integer getIpKvmPortNumber() { + return ipKvmPortNumber; + } + + /** + * The pduHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pduHostname") + private final String pduHostname; + + /** + * The pduHostname. + * @return the value + **/ + public String getPduHostname() { + return pduHostname; + } + + /** + * The pduPort. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pduPort") + private final Integer pduPort; + + /** + * The pduPort. + * @return the value + **/ + public Integer getPduPort() { + return pduPort; + } + + /** + * The buildVlanId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildVlanId") + private final Integer buildVlanId; + + /** + * The buildVlanId. + * @return the value + **/ + public Integer getBuildVlanId() { + return buildVlanId; + } + + /** + * The buildIpAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildIpAddress") + private final String buildIpAddress; + + /** + * The buildIpAddress. + * @return the value + **/ + public String getBuildIpAddress() { + return buildIpAddress; + } + + /** + * The prodVlanId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prodVlanId") + private final Integer prodVlanId; + + /** + * The prodVlanId. + * @return the value + **/ + public Integer getProdVlanId() { + return prodVlanId; + } + + /** + * The prodIpAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prodIpAddress") + private final String prodIpAddress; + + /** + * The prodIpAddress. + * @return the value + **/ + public String getProdIpAddress() { + return prodIpAddress; + } + + /** + * The rackLocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rackLocation") + private final String rackLocation; + + /** + * The rackLocation. + * @return the value + **/ + public String getRackLocation() { + return rackLocation; + } + + /** + * The chipSetn. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chipSet") + private final String chipSet; + + /** + * The chipSetn. + * @return the value + **/ + public String getChipSet() { + return chipSet; + } + + /** + * The osVersion. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osVersion") + private final String osVersion; + + /** + * The osVersion. + * @return the value + **/ + public String getOsVersion() { + return osVersion; + } + + /** + * The macOrderId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macOrderId") + private final String macOrderId; + + /** + * The macOrderId. + * @return the value + **/ + public String getMacOrderId() { + return macOrderId; + } + + /** + * The tenancyId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * The tenancyId. + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + @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("NodeConfig("); + sb.append("super=").append(super.toString()); + sb.append("serialNumber=").append(String.valueOf(this.serialNumber)); + sb.append(", macAddress=").append(String.valueOf(this.macAddress)); + sb.append(", switchHostname=").append(String.valueOf(this.switchHostname)); + sb.append(", switchEthPort=").append(String.valueOf(this.switchEthPort)); + sb.append(", ipKvmHostname=").append(String.valueOf(this.ipKvmHostname)); + sb.append(", ipKvmPortNumber=").append(String.valueOf(this.ipKvmPortNumber)); + sb.append(", pduHostname=").append(String.valueOf(this.pduHostname)); + sb.append(", pduPort=").append(String.valueOf(this.pduPort)); + sb.append(", buildVlanId=").append(String.valueOf(this.buildVlanId)); + sb.append(", buildIpAddress=").append(String.valueOf(this.buildIpAddress)); + sb.append(", prodVlanId=").append(String.valueOf(this.prodVlanId)); + sb.append(", prodIpAddress=").append(String.valueOf(this.prodIpAddress)); + sb.append(", rackLocation=").append(String.valueOf(this.rackLocation)); + sb.append(", chipSet=").append(String.valueOf(this.chipSet)); + sb.append(", osVersion=").append(String.valueOf(this.osVersion)); + sb.append(", macOrderId=").append(String.valueOf(this.macOrderId)); + sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof NodeConfig)) { + return false; + } + + NodeConfig other = (NodeConfig) o; + return java.util.Objects.equals(this.serialNumber, other.serialNumber) + && java.util.Objects.equals(this.macAddress, other.macAddress) + && java.util.Objects.equals(this.switchHostname, other.switchHostname) + && java.util.Objects.equals(this.switchEthPort, other.switchEthPort) + && java.util.Objects.equals(this.ipKvmHostname, other.ipKvmHostname) + && java.util.Objects.equals(this.ipKvmPortNumber, other.ipKvmPortNumber) + && java.util.Objects.equals(this.pduHostname, other.pduHostname) + && java.util.Objects.equals(this.pduPort, other.pduPort) + && java.util.Objects.equals(this.buildVlanId, other.buildVlanId) + && java.util.Objects.equals(this.buildIpAddress, other.buildIpAddress) + && java.util.Objects.equals(this.prodVlanId, other.prodVlanId) + && java.util.Objects.equals(this.prodIpAddress, other.prodIpAddress) + && java.util.Objects.equals(this.rackLocation, other.rackLocation) + && java.util.Objects.equals(this.chipSet, other.chipSet) + && java.util.Objects.equals(this.osVersion, other.osVersion) + && java.util.Objects.equals(this.macOrderId, other.macOrderId) + && java.util.Objects.equals(this.tenancyId, other.tenancyId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.serialNumber == null ? 43 : this.serialNumber.hashCode()); + result = (result * PRIME) + (this.macAddress == null ? 43 : this.macAddress.hashCode()); + result = + (result * PRIME) + + (this.switchHostname == null ? 43 : this.switchHostname.hashCode()); + result = + (result * PRIME) + + (this.switchEthPort == null ? 43 : this.switchEthPort.hashCode()); + result = + (result * PRIME) + + (this.ipKvmHostname == null ? 43 : this.ipKvmHostname.hashCode()); + result = + (result * PRIME) + + (this.ipKvmPortNumber == null ? 43 : this.ipKvmPortNumber.hashCode()); + result = (result * PRIME) + (this.pduHostname == null ? 43 : this.pduHostname.hashCode()); + result = (result * PRIME) + (this.pduPort == null ? 43 : this.pduPort.hashCode()); + result = (result * PRIME) + (this.buildVlanId == null ? 43 : this.buildVlanId.hashCode()); + result = + (result * PRIME) + + (this.buildIpAddress == null ? 43 : this.buildIpAddress.hashCode()); + result = (result * PRIME) + (this.prodVlanId == null ? 43 : this.prodVlanId.hashCode()); + result = + (result * PRIME) + + (this.prodIpAddress == null ? 43 : this.prodIpAddress.hashCode()); + result = (result * PRIME) + (this.rackLocation == null ? 43 : this.rackLocation.hashCode()); + result = (result * PRIME) + (this.chipSet == null ? 43 : this.chipSet.hashCode()); + result = (result * PRIME) + (this.osVersion == null ? 43 : this.osVersion.hashCode()); + result = (result * PRIME) + (this.macOrderId == null ? 43 : this.macOrderId.hashCode()); + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OperationStatus.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OperationStatus.java new file mode 100644 index 0000000000..06d12575a7 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OperationStatus.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * The status of the work request. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public enum OperationStatus { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Waiting("WAITING"), + NeedsAttention("NEEDS_ATTENTION"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OperationType.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OperationType.java new file mode 100644 index 0000000000..8381af7fbd --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OperationType.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * The asynchronous operation tracked by the work request. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public enum OperationType { + CreateMacOrder("CREATE_MAC_ORDER"), + UpdateMacOrder("UPDATE_MAC_ORDER"), + CancelMacOrder("CANCEL_MAC_ORDER"), + DeleteMacOrder("DELETE_MAC_ORDER"), + MoveMacOrder("MOVE_MAC_ORDER"), + DeleteMacDevice("DELETE_MAC_DEVICE"), + + /** + * 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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OpsActionCreateMacDeviceDetails.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OpsActionCreateMacDeviceDetails.java new file mode 100644 index 0000000000..a938e60a21 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OpsActionCreateMacDeviceDetails.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * The data to create a MacDevice in MAC_DEVICE bucket. + *
+ * 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OpsActionCreateMacDeviceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OpsActionCreateMacDeviceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"serialNumber", "ipAddress"}) + public OpsActionCreateMacDeviceDetails(String serialNumber, String ipAddress) { + super(); + this.serialNumber = serialNumber; + this.ipAddress = ipAddress; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The serial number of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serialNumber") + private String serialNumber; + + /** + * The serial number of the MacDevice. + * @param serialNumber the value to set + * @return this builder + **/ + public Builder serialNumber(String serialNumber) { + this.serialNumber = serialNumber; + this.__explicitlySet__.add("serialNumber"); + return this; + } + /** + * The IP address assigned to the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") + private String ipAddress; + + /** + * The IP address assigned to the MacDevice. + * @param ipAddress the value to set + * @return this builder + **/ + public Builder ipAddress(String ipAddress) { + this.ipAddress = ipAddress; + this.__explicitlySet__.add("ipAddress"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OpsActionCreateMacDeviceDetails build() { + OpsActionCreateMacDeviceDetails model = + new OpsActionCreateMacDeviceDetails(this.serialNumber, this.ipAddress); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OpsActionCreateMacDeviceDetails model) { + if (model.wasPropertyExplicitlySet("serialNumber")) { + this.serialNumber(model.getSerialNumber()); + } + if (model.wasPropertyExplicitlySet("ipAddress")) { + this.ipAddress(model.getIpAddress()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The serial number of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serialNumber") + private final String serialNumber; + + /** + * The serial number of the MacDevice. + * @return the value + **/ + public String getSerialNumber() { + return serialNumber; + } + + /** + * The IP address assigned to the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") + private final String ipAddress; + + /** + * The IP address assigned to the MacDevice. + * @return the value + **/ + public String getIpAddress() { + return ipAddress; + } + + @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("OpsActionCreateMacDeviceDetails("); + sb.append("super=").append(super.toString()); + sb.append("serialNumber=").append(String.valueOf(this.serialNumber)); + sb.append(", ipAddress=").append(String.valueOf(this.ipAddress)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OpsActionCreateMacDeviceDetails)) { + return false; + } + + OpsActionCreateMacDeviceDetails other = (OpsActionCreateMacDeviceDetails) o; + return java.util.Objects.equals(this.serialNumber, other.serialNumber) + && java.util.Objects.equals(this.ipAddress, other.ipAddress) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.serialNumber == null ? 43 : this.serialNumber.hashCode()); + result = (result * PRIME) + (this.ipAddress == null ? 43 : this.ipAddress.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OpsActionUpdateMacDeviceDetails.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OpsActionUpdateMacDeviceDetails.java new file mode 100644 index 0000000000..c57e9c97fd --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OpsActionUpdateMacDeviceDetails.java @@ -0,0 +1,214 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * The data to update a MacDevice in MAC_DEVICE bucket. + *
+ * 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OpsActionUpdateMacDeviceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OpsActionUpdateMacDeviceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"ipAddress", "lifecycleState"}) + public OpsActionUpdateMacDeviceDetails(String ipAddress, LifecycleState lifecycleState) { + super(); + this.ipAddress = ipAddress; + this.lifecycleState = lifecycleState; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The IP address assigned to the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") + private String ipAddress; + + /** + * The IP address assigned to the MacDevice. + * @param ipAddress the value to set + * @return this builder + **/ + public Builder ipAddress(String ipAddress) { + this.ipAddress = ipAddress; + this.__explicitlySet__.add("ipAddress"); + return this; + } + /** + * The current status of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current status of the MacDevice. + * @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 OpsActionUpdateMacDeviceDetails build() { + OpsActionUpdateMacDeviceDetails model = + new OpsActionUpdateMacDeviceDetails(this.ipAddress, this.lifecycleState); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OpsActionUpdateMacDeviceDetails model) { + if (model.wasPropertyExplicitlySet("ipAddress")) { + this.ipAddress(model.getIpAddress()); + } + 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 IP address assigned to the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") + private final String ipAddress; + + /** + * The IP address assigned to the MacDevice. + * @return the value + **/ + public String getIpAddress() { + return ipAddress; + } + + /** + * The current status of the MacDevice. + **/ + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + NeedsAttention("NEEDS_ATTENTION"), + Deleting("DELETING"), + 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 status of the MacDevice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current status of the MacDevice. + * @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("OpsActionUpdateMacDeviceDetails("); + sb.append("super=").append(super.toString()); + sb.append("ipAddress=").append(String.valueOf(this.ipAddress)); + 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 OpsActionUpdateMacDeviceDetails)) { + return false; + } + + OpsActionUpdateMacDeviceDetails other = (OpsActionUpdateMacDeviceDetails) o; + return java.util.Objects.equals(this.ipAddress, other.ipAddress) + && 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.ipAddress == null ? 43 : this.ipAddress.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OpsActionUpdateMacOrderDetails.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OpsActionUpdateMacOrderDetails.java new file mode 100644 index 0000000000..e81e44cdfa --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/OpsActionUpdateMacOrderDetails.java @@ -0,0 +1,267 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * The data to update an order in MAC_ORDER bucket. + *
+ * 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OpsActionUpdateMacOrderDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OpsActionUpdateMacOrderDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "orderStatus", + "ipRange", + "timeBillingStarted", + "timeBillingEnded" + }) + public OpsActionUpdateMacOrderDetails( + MacOrder.OrderStatus orderStatus, + String ipRange, + java.util.Date timeBillingStarted, + java.util.Date timeBillingEnded) { + super(); + this.orderStatus = orderStatus; + this.ipRange = ipRange; + this.timeBillingStarted = timeBillingStarted; + this.timeBillingEnded = timeBillingEnded; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The new status of the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderStatus") + private MacOrder.OrderStatus orderStatus; + + /** + * The new status of the MacOrder. + * @param orderStatus the value to set + * @return this builder + **/ + public Builder orderStatus(MacOrder.OrderStatus orderStatus) { + this.orderStatus = orderStatus; + this.__explicitlySet__.add("orderStatus"); + return this; + } + /** + * The IP Range specified by the customer for this order. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipRange") + private String ipRange; + + /** + * The IP Range specified by the customer for this order. + * @param ipRange the value to set + * @return this builder + **/ + public Builder ipRange(String ipRange) { + this.ipRange = ipRange; + this.__explicitlySet__.add("ipRange"); + return this; + } + /** + * The date and time this mac order is Active from. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingStarted") + private java.util.Date timeBillingStarted; + + /** + * The date and time this mac order is Active from. An RFC3339 formatted datetime string. + * @param timeBillingStarted the value to set + * @return this builder + **/ + public Builder timeBillingStarted(java.util.Date timeBillingStarted) { + this.timeBillingStarted = timeBillingStarted; + this.__explicitlySet__.add("timeBillingStarted"); + return this; + } + /** + * The date and time this mac order until which this mac is Active. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingEnded") + private java.util.Date timeBillingEnded; + + /** + * The date and time this mac order until which this mac is Active. An RFC3339 formatted datetime string. + * @param timeBillingEnded the value to set + * @return this builder + **/ + public Builder timeBillingEnded(java.util.Date timeBillingEnded) { + this.timeBillingEnded = timeBillingEnded; + this.__explicitlySet__.add("timeBillingEnded"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OpsActionUpdateMacOrderDetails build() { + OpsActionUpdateMacOrderDetails model = + new OpsActionUpdateMacOrderDetails( + this.orderStatus, + this.ipRange, + this.timeBillingStarted, + this.timeBillingEnded); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OpsActionUpdateMacOrderDetails model) { + if (model.wasPropertyExplicitlySet("orderStatus")) { + this.orderStatus(model.getOrderStatus()); + } + if (model.wasPropertyExplicitlySet("ipRange")) { + this.ipRange(model.getIpRange()); + } + if (model.wasPropertyExplicitlySet("timeBillingStarted")) { + this.timeBillingStarted(model.getTimeBillingStarted()); + } + if (model.wasPropertyExplicitlySet("timeBillingEnded")) { + this.timeBillingEnded(model.getTimeBillingEnded()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The new status of the MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderStatus") + private final MacOrder.OrderStatus orderStatus; + + /** + * The new status of the MacOrder. + * @return the value + **/ + public MacOrder.OrderStatus getOrderStatus() { + return orderStatus; + } + + /** + * The IP Range specified by the customer for this order. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipRange") + private final String ipRange; + + /** + * The IP Range specified by the customer for this order. + * @return the value + **/ + public String getIpRange() { + return ipRange; + } + + /** + * The date and time this mac order is Active from. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingStarted") + private final java.util.Date timeBillingStarted; + + /** + * The date and time this mac order is Active from. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeBillingStarted() { + return timeBillingStarted; + } + + /** + * The date and time this mac order until which this mac is Active. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingEnded") + private final java.util.Date timeBillingEnded; + + /** + * The date and time this mac order until which this mac is Active. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeBillingEnded() { + return timeBillingEnded; + } + + @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("OpsActionUpdateMacOrderDetails("); + sb.append("super=").append(super.toString()); + sb.append("orderStatus=").append(String.valueOf(this.orderStatus)); + sb.append(", ipRange=").append(String.valueOf(this.ipRange)); + sb.append(", timeBillingStarted=").append(String.valueOf(this.timeBillingStarted)); + sb.append(", timeBillingEnded=").append(String.valueOf(this.timeBillingEnded)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OpsActionUpdateMacOrderDetails)) { + return false; + } + + OpsActionUpdateMacOrderDetails other = (OpsActionUpdateMacOrderDetails) o; + return java.util.Objects.equals(this.orderStatus, other.orderStatus) + && java.util.Objects.equals(this.ipRange, other.ipRange) + && java.util.Objects.equals(this.timeBillingStarted, other.timeBillingStarted) + && java.util.Objects.equals(this.timeBillingEnded, other.timeBillingEnded) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.orderStatus == null ? 43 : this.orderStatus.hashCode()); + result = (result * PRIME) + (this.ipRange == null ? 43 : this.ipRange.hashCode()); + result = + (result * PRIME) + + (this.timeBillingStarted == null + ? 43 + : this.timeBillingStarted.hashCode()); + result = + (result * PRIME) + + (this.timeBillingEnded == null ? 43 : this.timeBillingEnded.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/SortOrder.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/SortOrder.java new file mode 100644 index 0000000000..9696374f8c --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/SortOrder.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.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: 20250320") +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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/UpdateMacOrderDetails.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/UpdateMacOrderDetails.java new file mode 100644 index 0000000000..5d781b9ed6 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/UpdateMacOrderDetails.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * The data to update a MacOrder. + *
+ * 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateMacOrderDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateMacOrderDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "orderDescription", + "orderSize", + "shape", + "ipRange" + }) + public UpdateMacOrderDetails( + String displayName, + String orderDescription, + Integer orderSize, + MacOrder.Shape shape, + String ipRange) { + super(); + this.displayName = displayName; + this.orderDescription = orderDescription; + this.orderSize = orderSize; + this.shape = shape; + this.ipRange = ipRange; + } + + @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. + *

+ * Example: {@code My new resource} + * + **/ + @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. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderDescription") + private String orderDescription; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param orderDescription the value to set + * @return this builder + **/ + public Builder orderDescription(String orderDescription) { + this.orderDescription = orderDescription; + this.__explicitlySet__.add("orderDescription"); + return this; + } + /** + * Number of macs requested in this MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderSize") + private Integer orderSize; + + /** + * Number of macs requested in this MacOrder. + * @param orderSize the value to set + * @return this builder + **/ + public Builder orderSize(Integer orderSize) { + this.orderSize = orderSize; + this.__explicitlySet__.add("orderSize"); + return this; + } + /** + * The shape of the Mac. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private MacOrder.Shape shape; + + /** + * The shape of the Mac. + * @param shape the value to set + * @return this builder + **/ + public Builder shape(MacOrder.Shape shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * The IP Range specified by the customer for this order. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipRange") + private String ipRange; + + /** + * The IP Range specified by the customer for this order. + * @param ipRange the value to set + * @return this builder + **/ + public Builder ipRange(String ipRange) { + this.ipRange = ipRange; + this.__explicitlySet__.add("ipRange"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateMacOrderDetails build() { + UpdateMacOrderDetails model = + new UpdateMacOrderDetails( + this.displayName, + this.orderDescription, + this.orderSize, + this.shape, + this.ipRange); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateMacOrderDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("orderDescription")) { + this.orderDescription(model.getOrderDescription()); + } + if (model.wasPropertyExplicitlySet("orderSize")) { + this.orderSize(model.getOrderSize()); + } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("ipRange")) { + this.ipRange(model.getIpRange()); + } + 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. + *

+ * Example: {@code My new resource} + * + **/ + @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. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderDescription") + private final String orderDescription; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getOrderDescription() { + return orderDescription; + } + + /** + * Number of macs requested in this MacOrder. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("orderSize") + private final Integer orderSize; + + /** + * Number of macs requested in this MacOrder. + * @return the value + **/ + public Integer getOrderSize() { + return orderSize; + } + + /** + * The shape of the Mac. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final MacOrder.Shape shape; + + /** + * The shape of the Mac. + * @return the value + **/ + public MacOrder.Shape getShape() { + return shape; + } + + /** + * The IP Range specified by the customer for this order. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipRange") + private final String ipRange; + + /** + * The IP Range specified by the customer for this order. + * @return the value + **/ + public String getIpRange() { + return ipRange; + } + + @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("UpdateMacOrderDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", orderDescription=").append(String.valueOf(this.orderDescription)); + sb.append(", orderSize=").append(String.valueOf(this.orderSize)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", ipRange=").append(String.valueOf(this.ipRange)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateMacOrderDetails)) { + return false; + } + + UpdateMacOrderDetails other = (UpdateMacOrderDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.orderDescription, other.orderDescription) + && java.util.Objects.equals(this.orderSize, other.orderSize) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.ipRange, other.ipRange) + && 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.orderDescription == null ? 43 : this.orderDescription.hashCode()); + result = (result * PRIME) + (this.orderSize == null ? 43 : this.orderSize.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.ipRange == null ? 43 : this.ipRange.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/UpdateNodeConfigDetails.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/UpdateNodeConfigDetails.java new file mode 100644 index 0000000000..aabfcc7796 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/UpdateNodeConfigDetails.java @@ -0,0 +1,753 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * The data to update a new NodeConfig. + *
+ * 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: 20250320") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateNodeConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateNodeConfigDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "macAddress", + "macOrderId", + "switchHostname", + "switchEthPort", + "ipKvmHostname", + "ipKvmPortNumber", + "pduHostname", + "pduPort", + "buildVlanId", + "buildIpAddress", + "prodVlanId", + "prodIpAddress", + "rackLocation", + "chipSet", + "osVersion", + "tenancyId" + }) + public UpdateNodeConfigDetails( + String macAddress, + String macOrderId, + String switchHostname, + String switchEthPort, + String ipKvmHostname, + Integer ipKvmPortNumber, + String pduHostname, + Integer pduPort, + Integer buildVlanId, + String buildIpAddress, + Integer prodVlanId, + String prodIpAddress, + String rackLocation, + String chipSet, + String osVersion, + String tenancyId) { + super(); + this.macAddress = macAddress; + this.macOrderId = macOrderId; + this.switchHostname = switchHostname; + this.switchEthPort = switchEthPort; + this.ipKvmHostname = ipKvmHostname; + this.ipKvmPortNumber = ipKvmPortNumber; + this.pduHostname = pduHostname; + this.pduPort = pduPort; + this.buildVlanId = buildVlanId; + this.buildIpAddress = buildIpAddress; + this.prodVlanId = prodVlanId; + this.prodIpAddress = prodIpAddress; + this.rackLocation = rackLocation; + this.chipSet = chipSet; + this.osVersion = osVersion; + this.tenancyId = tenancyId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The macAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macAddress") + private String macAddress; + + /** + * The macAddress. + * @param macAddress the value to set + * @return this builder + **/ + public Builder macAddress(String macAddress) { + this.macAddress = macAddress; + this.__explicitlySet__.add("macAddress"); + return this; + } + /** + * The macOrderId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macOrderId") + private String macOrderId; + + /** + * The macOrderId. + * @param macOrderId the value to set + * @return this builder + **/ + public Builder macOrderId(String macOrderId) { + this.macOrderId = macOrderId; + this.__explicitlySet__.add("macOrderId"); + return this; + } + /** + * The switchHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("switchHostname") + private String switchHostname; + + /** + * The switchHostname. + * @param switchHostname the value to set + * @return this builder + **/ + public Builder switchHostname(String switchHostname) { + this.switchHostname = switchHostname; + this.__explicitlySet__.add("switchHostname"); + return this; + } + /** + * The switchEthPort. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("switchEthPort") + private String switchEthPort; + + /** + * The switchEthPort. + * @param switchEthPort the value to set + * @return this builder + **/ + public Builder switchEthPort(String switchEthPort) { + this.switchEthPort = switchEthPort; + this.__explicitlySet__.add("switchEthPort"); + return this; + } + /** + * The ipKvmHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipKvmHostname") + private String ipKvmHostname; + + /** + * The ipKvmHostname. + * @param ipKvmHostname the value to set + * @return this builder + **/ + public Builder ipKvmHostname(String ipKvmHostname) { + this.ipKvmHostname = ipKvmHostname; + this.__explicitlySet__.add("ipKvmHostname"); + return this; + } + /** + * The ipKvmPortNumber. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipKvmPortNumber") + private Integer ipKvmPortNumber; + + /** + * The ipKvmPortNumber. + * @param ipKvmPortNumber the value to set + * @return this builder + **/ + public Builder ipKvmPortNumber(Integer ipKvmPortNumber) { + this.ipKvmPortNumber = ipKvmPortNumber; + this.__explicitlySet__.add("ipKvmPortNumber"); + return this; + } + /** + * The pduHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pduHostname") + private String pduHostname; + + /** + * The pduHostname. + * @param pduHostname the value to set + * @return this builder + **/ + public Builder pduHostname(String pduHostname) { + this.pduHostname = pduHostname; + this.__explicitlySet__.add("pduHostname"); + return this; + } + /** + * The pduPort. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pduPort") + private Integer pduPort; + + /** + * The pduPort. + * @param pduPort the value to set + * @return this builder + **/ + public Builder pduPort(Integer pduPort) { + this.pduPort = pduPort; + this.__explicitlySet__.add("pduPort"); + return this; + } + /** + * The buildVlanId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildVlanId") + private Integer buildVlanId; + + /** + * The buildVlanId. + * @param buildVlanId the value to set + * @return this builder + **/ + public Builder buildVlanId(Integer buildVlanId) { + this.buildVlanId = buildVlanId; + this.__explicitlySet__.add("buildVlanId"); + return this; + } + /** + * The buildIpAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildIpAddress") + private String buildIpAddress; + + /** + * The buildIpAddress. + * @param buildIpAddress the value to set + * @return this builder + **/ + public Builder buildIpAddress(String buildIpAddress) { + this.buildIpAddress = buildIpAddress; + this.__explicitlySet__.add("buildIpAddress"); + return this; + } + /** + * The prodVlanId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prodVlanId") + private Integer prodVlanId; + + /** + * The prodVlanId. + * @param prodVlanId the value to set + * @return this builder + **/ + public Builder prodVlanId(Integer prodVlanId) { + this.prodVlanId = prodVlanId; + this.__explicitlySet__.add("prodVlanId"); + return this; + } + /** + * The prodIpAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prodIpAddress") + private String prodIpAddress; + + /** + * The prodIpAddress. + * @param prodIpAddress the value to set + * @return this builder + **/ + public Builder prodIpAddress(String prodIpAddress) { + this.prodIpAddress = prodIpAddress; + this.__explicitlySet__.add("prodIpAddress"); + return this; + } + /** + * The rackLocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rackLocation") + private String rackLocation; + + /** + * The rackLocation. + * @param rackLocation the value to set + * @return this builder + **/ + public Builder rackLocation(String rackLocation) { + this.rackLocation = rackLocation; + this.__explicitlySet__.add("rackLocation"); + return this; + } + /** + * The chipSetn. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chipSet") + private String chipSet; + + /** + * The chipSetn. + * @param chipSet the value to set + * @return this builder + **/ + public Builder chipSet(String chipSet) { + this.chipSet = chipSet; + this.__explicitlySet__.add("chipSet"); + return this; + } + /** + * The osVersion. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osVersion") + private String osVersion; + + /** + * The osVersion. + * @param osVersion the value to set + * @return this builder + **/ + public Builder osVersion(String osVersion) { + this.osVersion = osVersion; + this.__explicitlySet__.add("osVersion"); + return this; + } + /** + * The tenancyId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * The tenancyId. + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateNodeConfigDetails build() { + UpdateNodeConfigDetails model = + new UpdateNodeConfigDetails( + this.macAddress, + this.macOrderId, + this.switchHostname, + this.switchEthPort, + this.ipKvmHostname, + this.ipKvmPortNumber, + this.pduHostname, + this.pduPort, + this.buildVlanId, + this.buildIpAddress, + this.prodVlanId, + this.prodIpAddress, + this.rackLocation, + this.chipSet, + this.osVersion, + this.tenancyId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateNodeConfigDetails model) { + if (model.wasPropertyExplicitlySet("macAddress")) { + this.macAddress(model.getMacAddress()); + } + if (model.wasPropertyExplicitlySet("macOrderId")) { + this.macOrderId(model.getMacOrderId()); + } + if (model.wasPropertyExplicitlySet("switchHostname")) { + this.switchHostname(model.getSwitchHostname()); + } + if (model.wasPropertyExplicitlySet("switchEthPort")) { + this.switchEthPort(model.getSwitchEthPort()); + } + if (model.wasPropertyExplicitlySet("ipKvmHostname")) { + this.ipKvmHostname(model.getIpKvmHostname()); + } + if (model.wasPropertyExplicitlySet("ipKvmPortNumber")) { + this.ipKvmPortNumber(model.getIpKvmPortNumber()); + } + if (model.wasPropertyExplicitlySet("pduHostname")) { + this.pduHostname(model.getPduHostname()); + } + if (model.wasPropertyExplicitlySet("pduPort")) { + this.pduPort(model.getPduPort()); + } + if (model.wasPropertyExplicitlySet("buildVlanId")) { + this.buildVlanId(model.getBuildVlanId()); + } + if (model.wasPropertyExplicitlySet("buildIpAddress")) { + this.buildIpAddress(model.getBuildIpAddress()); + } + if (model.wasPropertyExplicitlySet("prodVlanId")) { + this.prodVlanId(model.getProdVlanId()); + } + if (model.wasPropertyExplicitlySet("prodIpAddress")) { + this.prodIpAddress(model.getProdIpAddress()); + } + if (model.wasPropertyExplicitlySet("rackLocation")) { + this.rackLocation(model.getRackLocation()); + } + if (model.wasPropertyExplicitlySet("chipSet")) { + this.chipSet(model.getChipSet()); + } + if (model.wasPropertyExplicitlySet("osVersion")) { + this.osVersion(model.getOsVersion()); + } + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The macAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macAddress") + private final String macAddress; + + /** + * The macAddress. + * @return the value + **/ + public String getMacAddress() { + return macAddress; + } + + /** + * The macOrderId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macOrderId") + private final String macOrderId; + + /** + * The macOrderId. + * @return the value + **/ + public String getMacOrderId() { + return macOrderId; + } + + /** + * The switchHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("switchHostname") + private final String switchHostname; + + /** + * The switchHostname. + * @return the value + **/ + public String getSwitchHostname() { + return switchHostname; + } + + /** + * The switchEthPort. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("switchEthPort") + private final String switchEthPort; + + /** + * The switchEthPort. + * @return the value + **/ + public String getSwitchEthPort() { + return switchEthPort; + } + + /** + * The ipKvmHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipKvmHostname") + private final String ipKvmHostname; + + /** + * The ipKvmHostname. + * @return the value + **/ + public String getIpKvmHostname() { + return ipKvmHostname; + } + + /** + * The ipKvmPortNumber. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipKvmPortNumber") + private final Integer ipKvmPortNumber; + + /** + * The ipKvmPortNumber. + * @return the value + **/ + public Integer getIpKvmPortNumber() { + return ipKvmPortNumber; + } + + /** + * The pduHostname. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pduHostname") + private final String pduHostname; + + /** + * The pduHostname. + * @return the value + **/ + public String getPduHostname() { + return pduHostname; + } + + /** + * The pduPort. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pduPort") + private final Integer pduPort; + + /** + * The pduPort. + * @return the value + **/ + public Integer getPduPort() { + return pduPort; + } + + /** + * The buildVlanId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildVlanId") + private final Integer buildVlanId; + + /** + * The buildVlanId. + * @return the value + **/ + public Integer getBuildVlanId() { + return buildVlanId; + } + + /** + * The buildIpAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildIpAddress") + private final String buildIpAddress; + + /** + * The buildIpAddress. + * @return the value + **/ + public String getBuildIpAddress() { + return buildIpAddress; + } + + /** + * The prodVlanId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prodVlanId") + private final Integer prodVlanId; + + /** + * The prodVlanId. + * @return the value + **/ + public Integer getProdVlanId() { + return prodVlanId; + } + + /** + * The prodIpAddress. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prodIpAddress") + private final String prodIpAddress; + + /** + * The prodIpAddress. + * @return the value + **/ + public String getProdIpAddress() { + return prodIpAddress; + } + + /** + * The rackLocation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rackLocation") + private final String rackLocation; + + /** + * The rackLocation. + * @return the value + **/ + public String getRackLocation() { + return rackLocation; + } + + /** + * The chipSetn. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("chipSet") + private final String chipSet; + + /** + * The chipSetn. + * @return the value + **/ + public String getChipSet() { + return chipSet; + } + + /** + * The osVersion. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osVersion") + private final String osVersion; + + /** + * The osVersion. + * @return the value + **/ + public String getOsVersion() { + return osVersion; + } + + /** + * The tenancyId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * The tenancyId. + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + @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("UpdateNodeConfigDetails("); + sb.append("super=").append(super.toString()); + sb.append("macAddress=").append(String.valueOf(this.macAddress)); + sb.append(", macOrderId=").append(String.valueOf(this.macOrderId)); + sb.append(", switchHostname=").append(String.valueOf(this.switchHostname)); + sb.append(", switchEthPort=").append(String.valueOf(this.switchEthPort)); + sb.append(", ipKvmHostname=").append(String.valueOf(this.ipKvmHostname)); + sb.append(", ipKvmPortNumber=").append(String.valueOf(this.ipKvmPortNumber)); + sb.append(", pduHostname=").append(String.valueOf(this.pduHostname)); + sb.append(", pduPort=").append(String.valueOf(this.pduPort)); + sb.append(", buildVlanId=").append(String.valueOf(this.buildVlanId)); + sb.append(", buildIpAddress=").append(String.valueOf(this.buildIpAddress)); + sb.append(", prodVlanId=").append(String.valueOf(this.prodVlanId)); + sb.append(", prodIpAddress=").append(String.valueOf(this.prodIpAddress)); + sb.append(", rackLocation=").append(String.valueOf(this.rackLocation)); + sb.append(", chipSet=").append(String.valueOf(this.chipSet)); + sb.append(", osVersion=").append(String.valueOf(this.osVersion)); + sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateNodeConfigDetails)) { + return false; + } + + UpdateNodeConfigDetails other = (UpdateNodeConfigDetails) o; + return java.util.Objects.equals(this.macAddress, other.macAddress) + && java.util.Objects.equals(this.macOrderId, other.macOrderId) + && java.util.Objects.equals(this.switchHostname, other.switchHostname) + && java.util.Objects.equals(this.switchEthPort, other.switchEthPort) + && java.util.Objects.equals(this.ipKvmHostname, other.ipKvmHostname) + && java.util.Objects.equals(this.ipKvmPortNumber, other.ipKvmPortNumber) + && java.util.Objects.equals(this.pduHostname, other.pduHostname) + && java.util.Objects.equals(this.pduPort, other.pduPort) + && java.util.Objects.equals(this.buildVlanId, other.buildVlanId) + && java.util.Objects.equals(this.buildIpAddress, other.buildIpAddress) + && java.util.Objects.equals(this.prodVlanId, other.prodVlanId) + && java.util.Objects.equals(this.prodIpAddress, other.prodIpAddress) + && java.util.Objects.equals(this.rackLocation, other.rackLocation) + && java.util.Objects.equals(this.chipSet, other.chipSet) + && java.util.Objects.equals(this.osVersion, other.osVersion) + && java.util.Objects.equals(this.tenancyId, other.tenancyId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.macAddress == null ? 43 : this.macAddress.hashCode()); + result = (result * PRIME) + (this.macOrderId == null ? 43 : this.macOrderId.hashCode()); + result = + (result * PRIME) + + (this.switchHostname == null ? 43 : this.switchHostname.hashCode()); + result = + (result * PRIME) + + (this.switchEthPort == null ? 43 : this.switchEthPort.hashCode()); + result = + (result * PRIME) + + (this.ipKvmHostname == null ? 43 : this.ipKvmHostname.hashCode()); + result = + (result * PRIME) + + (this.ipKvmPortNumber == null ? 43 : this.ipKvmPortNumber.hashCode()); + result = (result * PRIME) + (this.pduHostname == null ? 43 : this.pduHostname.hashCode()); + result = (result * PRIME) + (this.pduPort == null ? 43 : this.pduPort.hashCode()); + result = (result * PRIME) + (this.buildVlanId == null ? 43 : this.buildVlanId.hashCode()); + result = + (result * PRIME) + + (this.buildIpAddress == null ? 43 : this.buildIpAddress.hashCode()); + result = (result * PRIME) + (this.prodVlanId == null ? 43 : this.prodVlanId.hashCode()); + result = + (result * PRIME) + + (this.prodIpAddress == null ? 43 : this.prodIpAddress.hashCode()); + result = (result * PRIME) + (this.rackLocation == null ? 43 : this.rackLocation.hashCode()); + result = (result * PRIME) + (this.chipSet == null ? 43 : this.chipSet.hashCode()); + result = (result * PRIME) + (this.osVersion == null ? 43 : this.osVersion.hashCode()); + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequest.java new file mode 100644 index 0000000000..10dc208671 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequest.java @@ -0,0 +1,551 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.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: 20250320") +@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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestError.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestError.java new file mode 100644 index 0000000000..d8126cff34 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestError.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.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: 20250320") +@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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestErrorCollection.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestErrorCollection.java new file mode 100644 index 0000000000..a47e95b05d --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestErrorCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.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: 20250320") +@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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestLogEntry.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestLogEntry.java new file mode 100644 index 0000000000..1acd808d49 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestLogEntry.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.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: 20250320") +@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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestLogEntryCollection.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestLogEntryCollection.java new file mode 100644 index 0000000000..24351aaf99 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestLogEntryCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.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: 20250320") +@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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestResource.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestResource.java new file mode 100644 index 0000000000..f254baf26d --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestResource.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.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: 20250320") +@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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestResourceMetadataKey.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestResourceMetadataKey.java new file mode 100644 index 0000000000..d798e64b00 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestResourceMetadataKey.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.model; + +/** + * Possible metadata keys for work request resource metadata. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestSummary.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestSummary.java new file mode 100644 index 0000000000..565f2bd24e --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestSummary.java @@ -0,0 +1,550 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.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: 20250320") +@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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestSummaryCollection.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestSummaryCollection.java new file mode 100644 index 0000000000..bcfcab41b5 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/model/WorkRequestSummaryCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.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: 20250320") +@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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/CancelMacOrderRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/CancelMacOrderRequest.java new file mode 100644 index 0000000000..926d4782bf --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/CancelMacOrderRequest.java @@ -0,0 +1,373 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use CancelMacOrderRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class CancelMacOrderRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.mngdmac.model.CancelMacOrderDetails> { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + private String macOrderId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + public String getMacOrderId() { + return macOrderId; + } + /** + * The information to cancel a MacOrder. + */ + private com.oracle.bmc.mngdmac.model.CancelMacOrderDetails cancelMacOrderDetails; + + /** + * The information to cancel a MacOrder. + */ + public com.oracle.bmc.mngdmac.model.CancelMacOrderDetails getCancelMacOrderDetails() { + return cancelMacOrderDetails; + } + /** + * 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.mngdmac.model.CancelMacOrderDetails getBody$() { + return cancelMacOrderDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CancelMacOrderRequest, com.oracle.bmc.mngdmac.model.CancelMacOrderDetails> { + 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 MacOrder. + */ + private String macOrderId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + * @param macOrderId the value to set + * @return this builder instance + */ + public Builder macOrderId(String macOrderId) { + this.macOrderId = macOrderId; + return this; + } + + /** + * The information to cancel a MacOrder. + */ + private com.oracle.bmc.mngdmac.model.CancelMacOrderDetails cancelMacOrderDetails = null; + + /** + * The information to cancel a MacOrder. + * @param cancelMacOrderDetails the value to set + * @return this builder instance + */ + public Builder cancelMacOrderDetails( + com.oracle.bmc.mngdmac.model.CancelMacOrderDetails cancelMacOrderDetails) { + this.cancelMacOrderDetails = cancelMacOrderDetails; + 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(CancelMacOrderRequest o) { + macOrderId(o.getMacOrderId()); + cancelMacOrderDetails(o.getCancelMacOrderDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CancelMacOrderRequest 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 CancelMacOrderRequest + */ + public CancelMacOrderRequest build() { + CancelMacOrderRequest 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.mngdmac.model.CancelMacOrderDetails body) { + cancelMacOrderDetails(body); + return this; + } + + /** + * Build the instance of CancelMacOrderRequest 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 CancelMacOrderRequest + */ + public CancelMacOrderRequest buildWithoutInvocationCallback() { + CancelMacOrderRequest request = new CancelMacOrderRequest(); + request.macOrderId = macOrderId; + request.cancelMacOrderDetails = cancelMacOrderDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new CancelMacOrderRequest(macOrderId, cancelMacOrderDetails, 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() + .macOrderId(macOrderId) + .cancelMacOrderDetails(cancelMacOrderDetails) + .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(",macOrderId=").append(String.valueOf(this.macOrderId)); + sb.append(",cancelMacOrderDetails=").append(String.valueOf(this.cancelMacOrderDetails)); + 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 CancelMacOrderRequest)) { + return false; + } + + CancelMacOrderRequest other = (CancelMacOrderRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.macOrderId, other.macOrderId) + && java.util.Objects.equals(this.cancelMacOrderDetails, other.cancelMacOrderDetails) + && 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.macOrderId == null ? 43 : this.macOrderId.hashCode()); + result = + (result * PRIME) + + (this.cancelMacOrderDetails == null + ? 43 + : this.cancelMacOrderDetails.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/CancelWorkRequestRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/CancelWorkRequestRequest.java new file mode 100644 index 0000000000..828b8d238a --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/CancelWorkRequestRequest.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use CancelWorkRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ChangeMacOrderCompartmentRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ChangeMacOrderCompartmentRequest.java new file mode 100644 index 0000000000..f83ccb425a --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ChangeMacOrderCompartmentRequest.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use ChangeMacOrderCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class ChangeMacOrderCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.mngdmac.model.ChangeMacOrderCompartmentDetails> { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + private String macOrderId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + public String getMacOrderId() { + return macOrderId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.mngdmac.model.ChangeMacOrderCompartmentDetails + changeMacOrderCompartmentDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.mngdmac.model.ChangeMacOrderCompartmentDetails + getChangeMacOrderCompartmentDetails() { + return changeMacOrderCompartmentDetails; + } + /** + * 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.mngdmac.model.ChangeMacOrderCompartmentDetails getBody$() { + return changeMacOrderCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeMacOrderCompartmentRequest, + com.oracle.bmc.mngdmac.model.ChangeMacOrderCompartmentDetails> { + 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 MacOrder. + */ + private String macOrderId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + * @param macOrderId the value to set + * @return this builder instance + */ + public Builder macOrderId(String macOrderId) { + this.macOrderId = macOrderId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.mngdmac.model.ChangeMacOrderCompartmentDetails + changeMacOrderCompartmentDetails = null; + + /** + * The information to be updated. + * @param changeMacOrderCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeMacOrderCompartmentDetails( + com.oracle.bmc.mngdmac.model.ChangeMacOrderCompartmentDetails + changeMacOrderCompartmentDetails) { + this.changeMacOrderCompartmentDetails = changeMacOrderCompartmentDetails; + 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(ChangeMacOrderCompartmentRequest o) { + macOrderId(o.getMacOrderId()); + changeMacOrderCompartmentDetails(o.getChangeMacOrderCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeMacOrderCompartmentRequest 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 ChangeMacOrderCompartmentRequest + */ + public ChangeMacOrderCompartmentRequest build() { + ChangeMacOrderCompartmentRequest 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.mngdmac.model.ChangeMacOrderCompartmentDetails body) { + changeMacOrderCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeMacOrderCompartmentRequest 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 ChangeMacOrderCompartmentRequest + */ + public ChangeMacOrderCompartmentRequest buildWithoutInvocationCallback() { + ChangeMacOrderCompartmentRequest request = new ChangeMacOrderCompartmentRequest(); + request.macOrderId = macOrderId; + request.changeMacOrderCompartmentDetails = changeMacOrderCompartmentDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ChangeMacOrderCompartmentRequest(macOrderId, changeMacOrderCompartmentDetails, 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() + .macOrderId(macOrderId) + .changeMacOrderCompartmentDetails(changeMacOrderCompartmentDetails) + .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(",macOrderId=").append(String.valueOf(this.macOrderId)); + sb.append(",changeMacOrderCompartmentDetails=") + .append(String.valueOf(this.changeMacOrderCompartmentDetails)); + 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 ChangeMacOrderCompartmentRequest)) { + return false; + } + + ChangeMacOrderCompartmentRequest other = (ChangeMacOrderCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.macOrderId, other.macOrderId) + && java.util.Objects.equals( + this.changeMacOrderCompartmentDetails, + other.changeMacOrderCompartmentDetails) + && 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.macOrderId == null ? 43 : this.macOrderId.hashCode()); + result = + (result * PRIME) + + (this.changeMacOrderCompartmentDetails == null + ? 43 + : this.changeMacOrderCompartmentDetails.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/CreateMacOrderRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/CreateMacOrderRequest.java new file mode 100644 index 0000000000..485a6e43bc --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/CreateMacOrderRequest.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use CreateMacOrderRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class CreateMacOrderRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.mngdmac.model.CreateMacOrderDetails> { + + /** + * Details for the new MacOrder. + */ + private com.oracle.bmc.mngdmac.model.CreateMacOrderDetails createMacOrderDetails; + + /** + * Details for the new MacOrder. + */ + public com.oracle.bmc.mngdmac.model.CreateMacOrderDetails getCreateMacOrderDetails() { + return createMacOrderDetails; + } + /** + * 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.mngdmac.model.CreateMacOrderDetails getBody$() { + return createMacOrderDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateMacOrderRequest, com.oracle.bmc.mngdmac.model.CreateMacOrderDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new MacOrder. + */ + private com.oracle.bmc.mngdmac.model.CreateMacOrderDetails createMacOrderDetails = null; + + /** + * Details for the new MacOrder. + * @param createMacOrderDetails the value to set + * @return this builder instance + */ + public Builder createMacOrderDetails( + com.oracle.bmc.mngdmac.model.CreateMacOrderDetails createMacOrderDetails) { + this.createMacOrderDetails = createMacOrderDetails; + 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(CreateMacOrderRequest o) { + createMacOrderDetails(o.getCreateMacOrderDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateMacOrderRequest 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 CreateMacOrderRequest + */ + public CreateMacOrderRequest build() { + CreateMacOrderRequest 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.mngdmac.model.CreateMacOrderDetails body) { + createMacOrderDetails(body); + return this; + } + + /** + * Build the instance of CreateMacOrderRequest 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 CreateMacOrderRequest + */ + public CreateMacOrderRequest buildWithoutInvocationCallback() { + CreateMacOrderRequest request = new CreateMacOrderRequest(); + request.createMacOrderDetails = createMacOrderDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateMacOrderRequest(createMacOrderDetails, 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() + .createMacOrderDetails(createMacOrderDetails) + .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(",createMacOrderDetails=").append(String.valueOf(this.createMacOrderDetails)); + 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 CreateMacOrderRequest)) { + return false; + } + + CreateMacOrderRequest other = (CreateMacOrderRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.createMacOrderDetails, other.createMacOrderDetails) + && 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.createMacOrderDetails == null + ? 43 + : this.createMacOrderDetails.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/GetMacDeviceRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/GetMacDeviceRequest.java new file mode 100644 index 0000000000..78e9ab25f9 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/GetMacDeviceRequest.java @@ -0,0 +1,243 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use GetMacDeviceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class GetMacDeviceRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The UUID of the MacDevice. + */ + private String macDeviceId; + + /** + * The UUID of the MacDevice. + */ + public String getMacDeviceId() { + return macDeviceId; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + private String macOrderId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + public String getMacOrderId() { + return macOrderId; + } + /** + * 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< + GetMacDeviceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The UUID of the MacDevice. + */ + private String macDeviceId = null; + + /** + * The UUID of the MacDevice. + * @param macDeviceId the value to set + * @return this builder instance + */ + public Builder macDeviceId(String macDeviceId) { + this.macDeviceId = macDeviceId; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + private String macOrderId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + * @param macOrderId the value to set + * @return this builder instance + */ + public Builder macOrderId(String macOrderId) { + this.macOrderId = macOrderId; + 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(GetMacDeviceRequest o) { + macDeviceId(o.getMacDeviceId()); + macOrderId(o.getMacOrderId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetMacDeviceRequest 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 GetMacDeviceRequest + */ + public GetMacDeviceRequest build() { + GetMacDeviceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetMacDeviceRequest 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 GetMacDeviceRequest + */ + public GetMacDeviceRequest buildWithoutInvocationCallback() { + GetMacDeviceRequest request = new GetMacDeviceRequest(); + request.macDeviceId = macDeviceId; + request.macOrderId = macOrderId; + request.opcRequestId = opcRequestId; + return request; + // new GetMacDeviceRequest(macDeviceId, macOrderId, 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() + .macDeviceId(macDeviceId) + .macOrderId(macOrderId) + .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(",macDeviceId=").append(String.valueOf(this.macDeviceId)); + sb.append(",macOrderId=").append(String.valueOf(this.macOrderId)); + 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 GetMacDeviceRequest)) { + return false; + } + + GetMacDeviceRequest other = (GetMacDeviceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.macDeviceId, other.macDeviceId) + && java.util.Objects.equals(this.macOrderId, other.macOrderId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.macDeviceId == null ? 43 : this.macDeviceId.hashCode()); + result = (result * PRIME) + (this.macOrderId == null ? 43 : this.macOrderId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/GetMacOrderRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/GetMacOrderRequest.java new file mode 100644 index 0000000000..91cdf3971d --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/GetMacOrderRequest.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use GetMacOrderRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class GetMacOrderRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + private String macOrderId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + public String getMacOrderId() { + return macOrderId; + } + /** + * 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< + GetMacOrderRequest, 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 MacOrder. + */ + private String macOrderId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + * @param macOrderId the value to set + * @return this builder instance + */ + public Builder macOrderId(String macOrderId) { + this.macOrderId = macOrderId; + 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(GetMacOrderRequest o) { + macOrderId(o.getMacOrderId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetMacOrderRequest 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 GetMacOrderRequest + */ + public GetMacOrderRequest build() { + GetMacOrderRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetMacOrderRequest 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 GetMacOrderRequest + */ + public GetMacOrderRequest buildWithoutInvocationCallback() { + GetMacOrderRequest request = new GetMacOrderRequest(); + request.macOrderId = macOrderId; + request.opcRequestId = opcRequestId; + return request; + // new GetMacOrderRequest(macOrderId, 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().macOrderId(macOrderId).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(",macOrderId=").append(String.valueOf(this.macOrderId)); + 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 GetMacOrderRequest)) { + return false; + } + + GetMacOrderRequest other = (GetMacOrderRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.macOrderId, other.macOrderId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.macOrderId == null ? 43 : this.macOrderId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/GetWorkRequestRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/GetWorkRequestRequest.java new file mode 100644 index 0000000000..41daed4e4a --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/GetWorkRequestRequest.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use GetWorkRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListMacDevicesRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListMacDevicesRequest.java new file mode 100644 index 0000000000..3d98c5bda8 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListMacDevicesRequest.java @@ -0,0 +1,550 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use ListMacDevicesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class ListMacDevicesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + private String macOrderId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + public String getMacOrderId() { + return macOrderId; + } + /** + * 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 UUID of the MacDevice. + */ + private String id; + + /** + * The UUID of the MacDevice. + */ + public String getId() { + return id; + } + /** + * The serial number of the MacDevice. + */ + private String serialNumber; + + /** + * The serial number of the MacDevice. + */ + public String getSerialNumber() { + return serialNumber; + } + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.mngdmac.model.MacDevice.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + public com.oracle.bmc.mngdmac.model.MacDevice.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * 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.mngdmac.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.mngdmac.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 SerialNumber} 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 SerialNumber} is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + SerialNumber("SerialNumber"), + ; + + 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 SerialNumber} 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< + ListMacDevicesRequest, 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 MacOrder. + */ + private String macOrderId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + * @param macOrderId the value to set + * @return this builder instance + */ + public Builder macOrderId(String macOrderId) { + this.macOrderId = macOrderId; + return this; + } + + /** + * 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 UUID of the MacDevice. + */ + private String id = null; + + /** + * The UUID of the MacDevice. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The serial number of the MacDevice. + */ + private String serialNumber = null; + + /** + * The serial number of the MacDevice. + * @param serialNumber the value to set + * @return this builder instance + */ + public Builder serialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.mngdmac.model.MacDevice.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.mngdmac.model.MacDevice.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + 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.mngdmac.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.mngdmac.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 SerialNumber} 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 SerialNumber} 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(ListMacDevicesRequest o) { + macOrderId(o.getMacOrderId()); + compartmentId(o.getCompartmentId()); + id(o.getId()); + serialNumber(o.getSerialNumber()); + lifecycleState(o.getLifecycleState()); + 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 ListMacDevicesRequest 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 ListMacDevicesRequest + */ + public ListMacDevicesRequest build() { + ListMacDevicesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListMacDevicesRequest 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 ListMacDevicesRequest + */ + public ListMacDevicesRequest buildWithoutInvocationCallback() { + ListMacDevicesRequest request = new ListMacDevicesRequest(); + request.macOrderId = macOrderId; + request.compartmentId = compartmentId; + request.id = id; + request.serialNumber = serialNumber; + request.lifecycleState = lifecycleState; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListMacDevicesRequest(macOrderId, compartmentId, id, serialNumber, lifecycleState, 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() + .macOrderId(macOrderId) + .compartmentId(compartmentId) + .id(id) + .serialNumber(serialNumber) + .lifecycleState(lifecycleState) + .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(",macOrderId=").append(String.valueOf(this.macOrderId)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",serialNumber=").append(String.valueOf(this.serialNumber)); + 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(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListMacDevicesRequest)) { + return false; + } + + ListMacDevicesRequest other = (ListMacDevicesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.macOrderId, other.macOrderId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.serialNumber, other.serialNumber) + && 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); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.macOrderId == null ? 43 : this.macOrderId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.serialNumber == null ? 43 : this.serialNumber.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()); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListMacOrdersRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListMacOrdersRequest.java new file mode 100644 index 0000000000..2c73cf0e0d --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListMacOrdersRequest.java @@ -0,0 +1,518 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use ListMacOrdersRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class ListMacOrdersRequest 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.mngdmac.model.MacOrder.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + public com.oracle.bmc.mngdmac.model.MacOrder.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 MacOrder. + */ + private String id; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + 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.mngdmac.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.mngdmac.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< + ListMacOrdersRequest, 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.mngdmac.model.MacOrder.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.mngdmac.model.MacOrder.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 MacOrder. + */ + private String id = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + * @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.mngdmac.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.mngdmac.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(ListMacOrdersRequest 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 ListMacOrdersRequest 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 ListMacOrdersRequest + */ + public ListMacOrdersRequest build() { + ListMacOrdersRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListMacOrdersRequest 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 ListMacOrdersRequest + */ + public ListMacOrdersRequest buildWithoutInvocationCallback() { + ListMacOrdersRequest request = new ListMacOrdersRequest(); + 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 ListMacOrdersRequest(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 ListMacOrdersRequest)) { + return false; + } + + ListMacOrdersRequest other = (ListMacOrdersRequest) 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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListWorkRequestErrorsRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListWorkRequestErrorsRequest.java new file mode 100644 index 0000000000..b05930ab00 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListWorkRequestErrorsRequest.java @@ -0,0 +1,406 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use ListWorkRequestErrorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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 timestamp} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.mngdmac.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.mngdmac.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 timestamp} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.mngdmac.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.mngdmac.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListWorkRequestLogsRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListWorkRequestLogsRequest.java new file mode 100644 index 0000000000..47bc22e711 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListWorkRequestLogsRequest.java @@ -0,0 +1,405 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use ListWorkRequestLogsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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 timestamp} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.mngdmac.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.mngdmac.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 timestamp} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.mngdmac.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.mngdmac.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListWorkRequestsRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListWorkRequestsRequest.java new file mode 100644 index 0000000000..5838808637 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/ListWorkRequestsRequest.java @@ -0,0 +1,503 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use ListWorkRequestsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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 the resources that match the given lifecycle state. + */ + private com.oracle.bmc.mngdmac.model.OperationStatus status; + + /** + * A filter to return only the resources that match the given lifecycle state. + */ + public com.oracle.bmc.mngdmac.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.mngdmac.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.mngdmac.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 the resources that match the given lifecycle state. + */ + private com.oracle.bmc.mngdmac.model.OperationStatus status = null; + + /** + * A filter to return only the resources that match the given lifecycle state. + * @param status the value to set + * @return this builder instance + */ + public Builder status(com.oracle.bmc.mngdmac.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.mngdmac.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.mngdmac.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/TerminateMacDeviceRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/TerminateMacDeviceRequest.java new file mode 100644 index 0000000000..2a15eaab73 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/TerminateMacDeviceRequest.java @@ -0,0 +1,345 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use TerminateMacDeviceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class TerminateMacDeviceRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The UUID of the MacDevice. + */ + private String macDeviceId; + + /** + * The UUID of the MacDevice. + */ + public String getMacDeviceId() { + return macDeviceId; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + private String macOrderId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + public String getMacOrderId() { + return macOrderId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + TerminateMacDeviceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The UUID of the MacDevice. + */ + private String macDeviceId = null; + + /** + * The UUID of the MacDevice. + * @param macDeviceId the value to set + * @return this builder instance + */ + public Builder macDeviceId(String macDeviceId) { + this.macDeviceId = macDeviceId; + return this; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + private String macOrderId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + * @param macOrderId the value to set + * @return this builder instance + */ + public Builder macOrderId(String macOrderId) { + this.macOrderId = macOrderId; + 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(TerminateMacDeviceRequest o) { + macDeviceId(o.getMacDeviceId()); + macOrderId(o.getMacOrderId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of TerminateMacDeviceRequest 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 TerminateMacDeviceRequest + */ + public TerminateMacDeviceRequest build() { + TerminateMacDeviceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of TerminateMacDeviceRequest 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 TerminateMacDeviceRequest + */ + public TerminateMacDeviceRequest buildWithoutInvocationCallback() { + TerminateMacDeviceRequest request = new TerminateMacDeviceRequest(); + request.macDeviceId = macDeviceId; + request.macOrderId = macOrderId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new TerminateMacDeviceRequest(macDeviceId, macOrderId, 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() + .macDeviceId(macDeviceId) + .macOrderId(macOrderId) + .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(",macDeviceId=").append(String.valueOf(this.macDeviceId)); + sb.append(",macOrderId=").append(String.valueOf(this.macOrderId)); + 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 TerminateMacDeviceRequest)) { + return false; + } + + TerminateMacDeviceRequest other = (TerminateMacDeviceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.macDeviceId, other.macDeviceId) + && java.util.Objects.equals(this.macOrderId, other.macOrderId) + && 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.macDeviceId == null ? 43 : this.macDeviceId.hashCode()); + result = (result * PRIME) + (this.macOrderId == null ? 43 : this.macOrderId.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/UpdateMacOrderRequest.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/UpdateMacOrderRequest.java new file mode 100644 index 0000000000..82375617d3 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/requests/UpdateMacOrderRequest.java @@ -0,0 +1,319 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.requests; + +import com.oracle.bmc.mngdmac.model.*; +/** + * Example: Click here to see how to use UpdateMacOrderRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class UpdateMacOrderRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.mngdmac.model.UpdateMacOrderDetails> { + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + private String macOrderId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + */ + public String getMacOrderId() { + return macOrderId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.mngdmac.model.UpdateMacOrderDetails updateMacOrderDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.mngdmac.model.UpdateMacOrderDetails getUpdateMacOrderDetails() { + return updateMacOrderDetails; + } + /** + * 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.mngdmac.model.UpdateMacOrderDetails getBody$() { + return updateMacOrderDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateMacOrderRequest, com.oracle.bmc.mngdmac.model.UpdateMacOrderDetails> { + 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 MacOrder. + */ + private String macOrderId = null; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the MacOrder. + * @param macOrderId the value to set + * @return this builder instance + */ + public Builder macOrderId(String macOrderId) { + this.macOrderId = macOrderId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.mngdmac.model.UpdateMacOrderDetails updateMacOrderDetails = null; + + /** + * The information to be updated. + * @param updateMacOrderDetails the value to set + * @return this builder instance + */ + public Builder updateMacOrderDetails( + com.oracle.bmc.mngdmac.model.UpdateMacOrderDetails updateMacOrderDetails) { + this.updateMacOrderDetails = updateMacOrderDetails; + 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(UpdateMacOrderRequest o) { + macOrderId(o.getMacOrderId()); + updateMacOrderDetails(o.getUpdateMacOrderDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateMacOrderRequest 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 UpdateMacOrderRequest + */ + public UpdateMacOrderRequest build() { + UpdateMacOrderRequest 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.mngdmac.model.UpdateMacOrderDetails body) { + updateMacOrderDetails(body); + return this; + } + + /** + * Build the instance of UpdateMacOrderRequest 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 UpdateMacOrderRequest + */ + public UpdateMacOrderRequest buildWithoutInvocationCallback() { + UpdateMacOrderRequest request = new UpdateMacOrderRequest(); + request.macOrderId = macOrderId; + request.updateMacOrderDetails = updateMacOrderDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateMacOrderRequest(macOrderId, updateMacOrderDetails, 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() + .macOrderId(macOrderId) + .updateMacOrderDetails(updateMacOrderDetails) + .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(",macOrderId=").append(String.valueOf(this.macOrderId)); + sb.append(",updateMacOrderDetails=").append(String.valueOf(this.updateMacOrderDetails)); + 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 UpdateMacOrderRequest)) { + return false; + } + + UpdateMacOrderRequest other = (UpdateMacOrderRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.macOrderId, other.macOrderId) + && java.util.Objects.equals(this.updateMacOrderDetails, other.updateMacOrderDetails) + && 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.macOrderId == null ? 43 : this.macOrderId.hashCode()); + result = + (result * PRIME) + + (this.updateMacOrderDetails == null + ? 43 + : this.updateMacOrderDetails.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/CancelMacOrderResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/CancelMacOrderResponse.java new file mode 100644 index 0000000000..ab2ef16e48 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/CancelMacOrderResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class CancelMacOrderResponse 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 CancelMacOrderResponse( + 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(CancelMacOrderResponse 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 CancelMacOrderResponse build() { + return new CancelMacOrderResponse( + __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 CancelMacOrderResponse)) { + return false; + } + + CancelMacOrderResponse other = (CancelMacOrderResponse) 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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/CancelWorkRequestResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/CancelWorkRequestResponse.java new file mode 100644 index 0000000000..049281af93 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/CancelWorkRequestResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ChangeMacOrderCompartmentResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ChangeMacOrderCompartmentResponse.java new file mode 100644 index 0000000000..57d42a77b1 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ChangeMacOrderCompartmentResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class ChangeMacOrderCompartmentResponse 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 ChangeMacOrderCompartmentResponse( + 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(ChangeMacOrderCompartmentResponse 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 ChangeMacOrderCompartmentResponse build() { + return new ChangeMacOrderCompartmentResponse( + __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 ChangeMacOrderCompartmentResponse)) { + return false; + } + + ChangeMacOrderCompartmentResponse other = (ChangeMacOrderCompartmentResponse) 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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/CreateMacOrderResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/CreateMacOrderResponse.java new file mode 100644 index 0000000000..a72b371753 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/CreateMacOrderResponse.java @@ -0,0 +1,334 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class CreateMacOrderResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created MacOrder. The MacOrder OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created MacOrder. The MacOrder 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 MacOrder instance. + */ + private com.oracle.bmc.mngdmac.model.MacOrder macOrder; + + /** + * The returned MacOrder instance. + * @return the value + */ + public com.oracle.bmc.mngdmac.model.MacOrder getMacOrder() { + return macOrder; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "macOrder" + }) + private CreateMacOrderResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.mngdmac.model.MacOrder macOrder) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.macOrder = macOrder; + } + + 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 MacOrder. The MacOrder OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created MacOrder. The MacOrder 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 MacOrder instance. + */ + private com.oracle.bmc.mngdmac.model.MacOrder macOrder; + + /** + * The returned MacOrder instance. + * @param macOrder the value to set + * @return this builder + */ + public Builder macOrder(com.oracle.bmc.mngdmac.model.MacOrder macOrder) { + this.macOrder = macOrder; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateMacOrderResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + macOrder(o.getMacOrder()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateMacOrderResponse build() { + return new CreateMacOrderResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + macOrder); + } + } + + /** + * 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(",macOrder=").append(String.valueOf(macOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMacOrderResponse)) { + return false; + } + + CreateMacOrderResponse other = (CreateMacOrderResponse) 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.macOrder, other.macOrder); + } + + @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.macOrder == null ? 43 : this.macOrder.hashCode()); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/GetMacDeviceResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/GetMacDeviceResponse.java new file mode 100644 index 0000000000..1bc263d2c6 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/GetMacDeviceResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class GetMacDeviceResponse 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 MacDevice instance. + */ + private com.oracle.bmc.mngdmac.model.MacDevice macDevice; + + /** + * The returned MacDevice instance. + * @return the value + */ + public com.oracle.bmc.mngdmac.model.MacDevice getMacDevice() { + return macDevice; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "macDevice" + }) + private GetMacDeviceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.mngdmac.model.MacDevice macDevice) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.macDevice = macDevice; + } + + 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 MacDevice instance. + */ + private com.oracle.bmc.mngdmac.model.MacDevice macDevice; + + /** + * The returned MacDevice instance. + * @param macDevice the value to set + * @return this builder + */ + public Builder macDevice(com.oracle.bmc.mngdmac.model.MacDevice macDevice) { + this.macDevice = macDevice; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetMacDeviceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + macDevice(o.getMacDevice()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetMacDeviceResponse build() { + return new GetMacDeviceResponse( + __httpStatusCode__, headers, etag, opcRequestId, macDevice); + } + } + + /** + * 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(",macDevice=").append(String.valueOf(macDevice)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetMacDeviceResponse)) { + return false; + } + + GetMacDeviceResponse other = (GetMacDeviceResponse) 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.macDevice, other.macDevice); + } + + @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.macDevice == null ? 43 : this.macDevice.hashCode()); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/GetMacOrderResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/GetMacOrderResponse.java new file mode 100644 index 0000000000..b43876dfad --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/GetMacOrderResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class GetMacOrderResponse 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 MacOrder instance. + */ + private com.oracle.bmc.mngdmac.model.MacOrder macOrder; + + /** + * The returned MacOrder instance. + * @return the value + */ + public com.oracle.bmc.mngdmac.model.MacOrder getMacOrder() { + return macOrder; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "macOrder" + }) + private GetMacOrderResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.mngdmac.model.MacOrder macOrder) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.macOrder = macOrder; + } + + 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 MacOrder instance. + */ + private com.oracle.bmc.mngdmac.model.MacOrder macOrder; + + /** + * The returned MacOrder instance. + * @param macOrder the value to set + * @return this builder + */ + public Builder macOrder(com.oracle.bmc.mngdmac.model.MacOrder macOrder) { + this.macOrder = macOrder; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetMacOrderResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + macOrder(o.getMacOrder()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetMacOrderResponse build() { + return new GetMacOrderResponse( + __httpStatusCode__, headers, etag, opcRequestId, macOrder); + } + } + + /** + * 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(",macOrder=").append(String.valueOf(macOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetMacOrderResponse)) { + return false; + } + + GetMacOrderResponse other = (GetMacOrderResponse) 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.macOrder, other.macOrder); + } + + @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.macOrder == null ? 43 : this.macOrder.hashCode()); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/GetWorkRequestResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/GetWorkRequestResponse.java new file mode 100644 index 0000000000..b7eee02699 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/GetWorkRequestResponse.java @@ -0,0 +1,245 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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.mngdmac.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @return the value + */ + public com.oracle.bmc.mngdmac.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.mngdmac.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.mngdmac.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @param workRequest the value to set + * @return this builder + */ + public Builder workRequest(com.oracle.bmc.mngdmac.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListMacDevicesResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListMacDevicesResponse.java new file mode 100644 index 0000000000..e25bcd1399 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListMacDevicesResponse.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class ListMacDevicesResponse 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 MacDeviceCollection instance. + */ + private com.oracle.bmc.mngdmac.model.MacDeviceCollection macDeviceCollection; + + /** + * The returned MacDeviceCollection instance. + * @return the value + */ + public com.oracle.bmc.mngdmac.model.MacDeviceCollection getMacDeviceCollection() { + return macDeviceCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "macDeviceCollection" + }) + private ListMacDevicesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.mngdmac.model.MacDeviceCollection macDeviceCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.macDeviceCollection = macDeviceCollection; + } + + 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 MacDeviceCollection instance. + */ + private com.oracle.bmc.mngdmac.model.MacDeviceCollection macDeviceCollection; + + /** + * The returned MacDeviceCollection instance. + * @param macDeviceCollection the value to set + * @return this builder + */ + public Builder macDeviceCollection( + com.oracle.bmc.mngdmac.model.MacDeviceCollection macDeviceCollection) { + this.macDeviceCollection = macDeviceCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListMacDevicesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + macDeviceCollection(o.getMacDeviceCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListMacDevicesResponse build() { + return new ListMacDevicesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, macDeviceCollection); + } + } + + /** + * 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(",macDeviceCollection=").append(String.valueOf(macDeviceCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListMacDevicesResponse)) { + return false; + } + + ListMacDevicesResponse other = (ListMacDevicesResponse) 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.macDeviceCollection, other.macDeviceCollection); + } + + @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.macDeviceCollection == null + ? 43 + : this.macDeviceCollection.hashCode()); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListMacOrdersResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListMacOrdersResponse.java new file mode 100644 index 0000000000..e5a7adde25 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListMacOrdersResponse.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class ListMacOrdersResponse 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 MacOrderCollection instance. + */ + private com.oracle.bmc.mngdmac.model.MacOrderCollection macOrderCollection; + + /** + * The returned MacOrderCollection instance. + * @return the value + */ + public com.oracle.bmc.mngdmac.model.MacOrderCollection getMacOrderCollection() { + return macOrderCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "macOrderCollection" + }) + private ListMacOrdersResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.mngdmac.model.MacOrderCollection macOrderCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.macOrderCollection = macOrderCollection; + } + + 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 MacOrderCollection instance. + */ + private com.oracle.bmc.mngdmac.model.MacOrderCollection macOrderCollection; + + /** + * The returned MacOrderCollection instance. + * @param macOrderCollection the value to set + * @return this builder + */ + public Builder macOrderCollection( + com.oracle.bmc.mngdmac.model.MacOrderCollection macOrderCollection) { + this.macOrderCollection = macOrderCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListMacOrdersResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + macOrderCollection(o.getMacOrderCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListMacOrdersResponse build() { + return new ListMacOrdersResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, macOrderCollection); + } + } + + /** + * 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(",macOrderCollection=").append(String.valueOf(macOrderCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListMacOrdersResponse)) { + return false; + } + + ListMacOrdersResponse other = (ListMacOrdersResponse) 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.macOrderCollection, other.macOrderCollection); + } + + @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.macOrderCollection == null + ? 43 + : this.macOrderCollection.hashCode()); + return result; + } +} diff --git a/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListWorkRequestErrorsResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListWorkRequestErrorsResponse.java new file mode 100644 index 0000000000..a3aaffae27 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListWorkRequestErrorsResponse.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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.mngdmac.model.WorkRequestErrorCollection workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @return the value + */ + public com.oracle.bmc.mngdmac.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.mngdmac.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.mngdmac.model.WorkRequestErrorCollection workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @param workRequestErrorCollection the value to set + * @return this builder + */ + public Builder workRequestErrorCollection( + com.oracle.bmc.mngdmac.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListWorkRequestLogsResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListWorkRequestLogsResponse.java new file mode 100644 index 0000000000..75e8908d43 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListWorkRequestLogsResponse.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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.mngdmac.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @return the value + */ + public com.oracle.bmc.mngdmac.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.mngdmac.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.mngdmac.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @param workRequestLogEntryCollection the value to set + * @return this builder + */ + public Builder workRequestLogEntryCollection( + com.oracle.bmc.mngdmac.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListWorkRequestsResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListWorkRequestsResponse.java new file mode 100644 index 0000000000..34f7081859 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/ListWorkRequestsResponse.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +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.mngdmac.model.WorkRequestSummaryCollection workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.mngdmac.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.mngdmac.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.mngdmac.model.WorkRequestSummaryCollection + workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @param workRequestSummaryCollection the value to set + * @return this builder + */ + public Builder workRequestSummaryCollection( + com.oracle.bmc.mngdmac.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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/TerminateMacDeviceResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/TerminateMacDeviceResponse.java new file mode 100644 index 0000000000..d084a6aab7 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/TerminateMacDeviceResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class TerminateMacDeviceResponse 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 TerminateMacDeviceResponse( + 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(TerminateMacDeviceResponse 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 TerminateMacDeviceResponse build() { + return new TerminateMacDeviceResponse( + __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 TerminateMacDeviceResponse)) { + return false; + } + + TerminateMacDeviceResponse other = (TerminateMacDeviceResponse) 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-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/UpdateMacOrderResponse.java b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/UpdateMacOrderResponse.java new file mode 100644 index 0000000000..a3326d30d1 --- /dev/null +++ b/bmc-mngdmac/src/main/java/com/oracle/bmc/mngdmac/responses/UpdateMacOrderResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mngdmac.responses; + +import com.oracle.bmc.mngdmac.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20250320") +public class UpdateMacOrderResponse 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 UpdateMacOrderResponse( + 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(UpdateMacOrderResponse 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 UpdateMacOrderResponse build() { + return new UpdateMacOrderResponse( + __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 UpdateMacOrderResponse)) { + return false; + } + + UpdateMacOrderResponse other = (UpdateMacOrderResponse) 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-monitoring/pom.xml b/bmc-monitoring/pom.xml index 6ae4a67bca..19b279a971 100644 --- a/bmc-monitoring/pom.xml +++ b/bmc-monitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-monitoring @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-mysql/pom.xml b/bmc-mysql/pom.xml index f24fda5271..4e238f887c 100644 --- a/bmc-mysql/pom.xml +++ b/bmc-mysql/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-mysql @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/BackupPolicy.java b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/BackupPolicy.java index 123f4716d6..7b09fc1200 100644 --- a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/BackupPolicy.java +++ b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/BackupPolicy.java @@ -21,6 +21,7 @@ public final class BackupPolicy extends com.oracle.bmc.http.internal.ExplicitlyS @Deprecated @java.beans.ConstructorProperties({ "isEnabled", + "copyPolicies", "windowStartTime", "retentionInDays", "freeformTags", @@ -29,6 +30,7 @@ public final class BackupPolicy extends com.oracle.bmc.http.internal.ExplicitlyS }) public BackupPolicy( Boolean isEnabled, + java.util.List copyPolicies, String windowStartTime, Integer retentionInDays, java.util.Map freeformTags, @@ -36,6 +38,7 @@ public BackupPolicy( PitrPolicy pitrPolicy) { super(); this.isEnabled = isEnabled; + this.copyPolicies = copyPolicies; this.windowStartTime = windowStartTime; this.retentionInDays = retentionInDays; this.freeformTags = freeformTags; @@ -61,6 +64,34 @@ public Builder isEnabled(Boolean isEnabled) { this.__explicitlySet__.add("isEnabled"); return this; } + /** + * List of policies of a DB system to schedule cross-region DB system backup copy. + *

+ * The policy includes the name of the destination region to which the DB system backup will be copied, and + * an optional parameter which specifies the retention period of the copied DB system backup in days. + *

+ **Note:** Currently, only one policy can be specified in the list. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("copyPolicies") + private java.util.List copyPolicies; + + /** + * List of policies of a DB system to schedule cross-region DB system backup copy. + *

+ * The policy includes the name of the destination region to which the DB system backup will be copied, and + * an optional parameter which specifies the retention period of the copied DB system backup in days. + *

+ **Note:** Currently, only one policy can be specified in the list. + * + * @param copyPolicies the value to set + * @return this builder + **/ + public Builder copyPolicies(java.util.List copyPolicies) { + this.copyPolicies = copyPolicies; + this.__explicitlySet__.add("copyPolicies"); + return this; + } /** * The start of a 30-minute window of time in which daily, automated backups occur. *

@@ -189,6 +220,7 @@ public BackupPolicy build() { BackupPolicy model = new BackupPolicy( this.isEnabled, + this.copyPolicies, this.windowStartTime, this.retentionInDays, this.freeformTags, @@ -205,6 +237,9 @@ public Builder copy(BackupPolicy model) { if (model.wasPropertyExplicitlySet("isEnabled")) { this.isEnabled(model.getIsEnabled()); } + if (model.wasPropertyExplicitlySet("copyPolicies")) { + this.copyPolicies(model.getCopyPolicies()); + } if (model.wasPropertyExplicitlySet("windowStartTime")) { this.windowStartTime(model.getWindowStartTime()); } @@ -249,6 +284,32 @@ public Boolean getIsEnabled() { return isEnabled; } + /** + * List of policies of a DB system to schedule cross-region DB system backup copy. + *

+ * The policy includes the name of the destination region to which the DB system backup will be copied, and + * an optional parameter which specifies the retention period of the copied DB system backup in days. + *

+ **Note:** Currently, only one policy can be specified in the list. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("copyPolicies") + private final java.util.List copyPolicies; + + /** + * List of policies of a DB system to schedule cross-region DB system backup copy. + *

+ * The policy includes the name of the destination region to which the DB system backup will be copied, and + * an optional parameter which specifies the retention period of the copied DB system backup in days. + *

+ **Note:** Currently, only one policy can be specified in the list. + * + * @return the value + **/ + public java.util.List getCopyPolicies() { + return copyPolicies; + } + /** * The start of a 30-minute window of time in which daily, automated backups occur. *

@@ -373,6 +434,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("BackupPolicy("); sb.append("super=").append(super.toString()); sb.append("isEnabled=").append(String.valueOf(this.isEnabled)); + sb.append(", copyPolicies=").append(String.valueOf(this.copyPolicies)); sb.append(", windowStartTime=").append(String.valueOf(this.windowStartTime)); sb.append(", retentionInDays=").append(String.valueOf(this.retentionInDays)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); @@ -393,6 +455,7 @@ public boolean equals(Object o) { BackupPolicy other = (BackupPolicy) o; return java.util.Objects.equals(this.isEnabled, other.isEnabled) + && java.util.Objects.equals(this.copyPolicies, other.copyPolicies) && java.util.Objects.equals(this.windowStartTime, other.windowStartTime) && java.util.Objects.equals(this.retentionInDays, other.retentionInDays) && java.util.Objects.equals(this.freeformTags, other.freeformTags) @@ -406,6 +469,7 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); + result = (result * PRIME) + (this.copyPolicies == null ? 43 : this.copyPolicies.hashCode()); result = (result * PRIME) + (this.windowStartTime == null ? 43 : this.windowStartTime.hashCode()); diff --git a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CopyBackupDetails.java b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CopyBackupDetails.java index 9d7918dc65..14550dae7a 100644 --- a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CopyBackupDetails.java +++ b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CopyBackupDetails.java @@ -25,6 +25,7 @@ public final class CopyBackupDetails extends com.oracle.bmc.http.internal.Explic "compartmentId", "description", "displayName", + "backupCopyRetentionInDays", "sourceBackupId", "sourceRegion" }) @@ -32,12 +33,14 @@ public CopyBackupDetails( String compartmentId, String description, String displayName, + Integer backupCopyRetentionInDays, String sourceBackupId, String sourceRegion) { super(); this.compartmentId = compartmentId; this.description = description; this.displayName = displayName; + this.backupCopyRetentionInDays = backupCopyRetentionInDays; this.sourceBackupId = sourceBackupId; this.sourceRegion = sourceRegion; } @@ -106,6 +109,28 @@ public Builder displayName(String displayName) { this.__explicitlySet__.add("displayName"); return this; } + /** + * Number of days to retain the copied DB system backup. + *

+ **Note:** The maximum value for an automatic backup is 35, and the maximum value for a manual backup is 365. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupCopyRetentionInDays") + private Integer backupCopyRetentionInDays; + + /** + * Number of days to retain the copied DB system backup. + *

+ **Note:** The maximum value for an automatic backup is 35, and the maximum value for a manual backup is 365. + * + * @param backupCopyRetentionInDays the value to set + * @return this builder + **/ + public Builder backupCopyRetentionInDays(Integer backupCopyRetentionInDays) { + this.backupCopyRetentionInDays = backupCopyRetentionInDays; + this.__explicitlySet__.add("backupCopyRetentionInDays"); + return this; + } /** * The OCID of DB system backup to be copied. * @@ -154,6 +179,7 @@ public CopyBackupDetails build() { this.compartmentId, this.description, this.displayName, + this.backupCopyRetentionInDays, this.sourceBackupId, this.sourceRegion); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -173,6 +199,9 @@ public Builder copy(CopyBackupDetails model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } + if (model.wasPropertyExplicitlySet("backupCopyRetentionInDays")) { + this.backupCopyRetentionInDays(model.getBackupCopyRetentionInDays()); + } if (model.wasPropertyExplicitlySet("sourceBackupId")) { this.sourceBackupId(model.getSourceBackupId()); } @@ -250,6 +279,26 @@ public String getDisplayName() { return displayName; } + /** + * Number of days to retain the copied DB system backup. + *

+ **Note:** The maximum value for an automatic backup is 35, and the maximum value for a manual backup is 365. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupCopyRetentionInDays") + private final Integer backupCopyRetentionInDays; + + /** + * Number of days to retain the copied DB system backup. + *

+ **Note:** The maximum value for an automatic backup is 35, and the maximum value for a manual backup is 365. + * + * @return the value + **/ + public Integer getBackupCopyRetentionInDays() { + return backupCopyRetentionInDays; + } + /** * The OCID of DB system backup to be copied. * @@ -301,6 +350,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", backupCopyRetentionInDays=") + .append(String.valueOf(this.backupCopyRetentionInDays)); sb.append(", sourceBackupId=").append(String.valueOf(this.sourceBackupId)); sb.append(", sourceRegion=").append(String.valueOf(this.sourceRegion)); sb.append(")"); @@ -320,6 +371,8 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals( + this.backupCopyRetentionInDays, other.backupCopyRetentionInDays) && java.util.Objects.equals(this.sourceBackupId, other.sourceBackupId) && java.util.Objects.equals(this.sourceRegion, other.sourceRegion) && super.equals(other); @@ -334,6 +387,11 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.backupCopyRetentionInDays == null + ? 43 + : this.backupCopyRetentionInDays.hashCode()); result = (result * PRIME) + (this.sourceBackupId == null ? 43 : this.sourceBackupId.hashCode()); diff --git a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CopyPolicy.java b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CopyPolicy.java new file mode 100644 index 0000000000..8afec51d14 --- /dev/null +++ b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CopyPolicy.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mysql.model; + +/** + * A policy of a DB system to schedule cross-region DB system backup copy. + * + *
+ * 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: 20190415") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = CopyPolicy.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CopyPolicy extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"copyToRegion", "backupCopyRetentionInDays"}) + public CopyPolicy(String copyToRegion, Integer backupCopyRetentionInDays) { + super(); + this.copyToRegion = copyToRegion; + this.backupCopyRetentionInDays = backupCopyRetentionInDays; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The destination region name to which the DB system backup will be copied. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("copyToRegion") + private String copyToRegion; + + /** + * The destination region name to which the DB system backup will be copied. + * @param copyToRegion the value to set + * @return this builder + **/ + public Builder copyToRegion(String copyToRegion) { + this.copyToRegion = copyToRegion; + this.__explicitlySet__.add("copyToRegion"); + return this; + } + /** + * Number of days to retain the copied DB system backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupCopyRetentionInDays") + private Integer backupCopyRetentionInDays; + + /** + * Number of days to retain the copied DB system backup. + * @param backupCopyRetentionInDays the value to set + * @return this builder + **/ + public Builder backupCopyRetentionInDays(Integer backupCopyRetentionInDays) { + this.backupCopyRetentionInDays = backupCopyRetentionInDays; + this.__explicitlySet__.add("backupCopyRetentionInDays"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CopyPolicy build() { + CopyPolicy model = new CopyPolicy(this.copyToRegion, this.backupCopyRetentionInDays); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CopyPolicy model) { + if (model.wasPropertyExplicitlySet("copyToRegion")) { + this.copyToRegion(model.getCopyToRegion()); + } + if (model.wasPropertyExplicitlySet("backupCopyRetentionInDays")) { + this.backupCopyRetentionInDays(model.getBackupCopyRetentionInDays()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The destination region name to which the DB system backup will be copied. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("copyToRegion") + private final String copyToRegion; + + /** + * The destination region name to which the DB system backup will be copied. + * @return the value + **/ + public String getCopyToRegion() { + return copyToRegion; + } + + /** + * Number of days to retain the copied DB system backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupCopyRetentionInDays") + private final Integer backupCopyRetentionInDays; + + /** + * Number of days to retain the copied DB system backup. + * @return the value + **/ + public Integer getBackupCopyRetentionInDays() { + return backupCopyRetentionInDays; + } + + @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("CopyPolicy("); + sb.append("super=").append(super.toString()); + sb.append("copyToRegion=").append(String.valueOf(this.copyToRegion)); + sb.append(", backupCopyRetentionInDays=") + .append(String.valueOf(this.backupCopyRetentionInDays)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CopyPolicy)) { + return false; + } + + CopyPolicy other = (CopyPolicy) o; + return java.util.Objects.equals(this.copyToRegion, other.copyToRegion) + && java.util.Objects.equals( + this.backupCopyRetentionInDays, other.backupCopyRetentionInDays) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.copyToRegion == null ? 43 : this.copyToRegion.hashCode()); + result = + (result * PRIME) + + (this.backupCopyRetentionInDays == null + ? 43 + : this.backupCopyRetentionInDays.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CreateBackupPolicyDetails.java b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CreateBackupPolicyDetails.java index 2842a9992e..db47080ed6 100644 --- a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CreateBackupPolicyDetails.java +++ b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CreateBackupPolicyDetails.java @@ -25,6 +25,7 @@ public final class CreateBackupPolicyDetails @Deprecated @java.beans.ConstructorProperties({ "isEnabled", + "copyPolicies", "windowStartTime", "retentionInDays", "freeformTags", @@ -33,6 +34,7 @@ public final class CreateBackupPolicyDetails }) public CreateBackupPolicyDetails( Boolean isEnabled, + java.util.List copyPolicies, String windowStartTime, Integer retentionInDays, java.util.Map freeformTags, @@ -40,6 +42,7 @@ public CreateBackupPolicyDetails( PitrPolicy pitrPolicy) { super(); this.isEnabled = isEnabled; + this.copyPolicies = copyPolicies; this.windowStartTime = windowStartTime; this.retentionInDays = retentionInDays; this.freeformTags = freeformTags; @@ -67,6 +70,34 @@ public Builder isEnabled(Boolean isEnabled) { this.__explicitlySet__.add("isEnabled"); return this; } + /** + * List of policies of a DB system to schedule cross-region DB system backup copy. + *

+ * The policy includes the name of the destination region to which the DB system backup will be copied, and + * an optional parameter which specifies the retention period of the copied DB system backup in days. + *

+ **Note:** Currently, only one policy can be specified in the list. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("copyPolicies") + private java.util.List copyPolicies; + + /** + * List of policies of a DB system to schedule cross-region DB system backup copy. + *

+ * The policy includes the name of the destination region to which the DB system backup will be copied, and + * an optional parameter which specifies the retention period of the copied DB system backup in days. + *

+ **Note:** Currently, only one policy can be specified in the list. + * + * @param copyPolicies the value to set + * @return this builder + **/ + public Builder copyPolicies(java.util.List copyPolicies) { + this.copyPolicies = copyPolicies; + this.__explicitlySet__.add("copyPolicies"); + return this; + } /** * The start of a 30-minute window of time in which daily, automated backups occur. *

@@ -179,6 +210,7 @@ public CreateBackupPolicyDetails build() { CreateBackupPolicyDetails model = new CreateBackupPolicyDetails( this.isEnabled, + this.copyPolicies, this.windowStartTime, this.retentionInDays, this.freeformTags, @@ -195,6 +227,9 @@ public Builder copy(CreateBackupPolicyDetails model) { if (model.wasPropertyExplicitlySet("isEnabled")) { this.isEnabled(model.getIsEnabled()); } + if (model.wasPropertyExplicitlySet("copyPolicies")) { + this.copyPolicies(model.getCopyPolicies()); + } if (model.wasPropertyExplicitlySet("windowStartTime")) { this.windowStartTime(model.getWindowStartTime()); } @@ -241,6 +276,32 @@ public Boolean getIsEnabled() { return isEnabled; } + /** + * List of policies of a DB system to schedule cross-region DB system backup copy. + *

+ * The policy includes the name of the destination region to which the DB system backup will be copied, and + * an optional parameter which specifies the retention period of the copied DB system backup in days. + *

+ **Note:** Currently, only one policy can be specified in the list. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("copyPolicies") + private final java.util.List copyPolicies; + + /** + * List of policies of a DB system to schedule cross-region DB system backup copy. + *

+ * The policy includes the name of the destination region to which the DB system backup will be copied, and + * an optional parameter which specifies the retention period of the copied DB system backup in days. + *

+ **Note:** Currently, only one policy can be specified in the list. + * + * @return the value + **/ + public java.util.List getCopyPolicies() { + return copyPolicies; + } + /** * The start of a 30-minute window of time in which daily, automated backups occur. *

@@ -349,6 +410,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("CreateBackupPolicyDetails("); sb.append("super=").append(super.toString()); sb.append("isEnabled=").append(String.valueOf(this.isEnabled)); + sb.append(", copyPolicies=").append(String.valueOf(this.copyPolicies)); sb.append(", windowStartTime=").append(String.valueOf(this.windowStartTime)); sb.append(", retentionInDays=").append(String.valueOf(this.retentionInDays)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); @@ -369,6 +431,7 @@ public boolean equals(Object o) { CreateBackupPolicyDetails other = (CreateBackupPolicyDetails) o; return java.util.Objects.equals(this.isEnabled, other.isEnabled) + && java.util.Objects.equals(this.copyPolicies, other.copyPolicies) && java.util.Objects.equals(this.windowStartTime, other.windowStartTime) && java.util.Objects.equals(this.retentionInDays, other.retentionInDays) && java.util.Objects.equals(this.freeformTags, other.freeformTags) @@ -382,6 +445,7 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); + result = (result * PRIME) + (this.copyPolicies == null ? 43 : this.copyPolicies.hashCode()); result = (result * PRIME) + (this.windowStartTime == null ? 43 : this.windowStartTime.hashCode()); diff --git a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/UpdateBackupPolicyDetails.java b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/UpdateBackupPolicyDetails.java index badc737896..530377a9b9 100644 --- a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/UpdateBackupPolicyDetails.java +++ b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/UpdateBackupPolicyDetails.java @@ -25,6 +25,7 @@ public final class UpdateBackupPolicyDetails @Deprecated @java.beans.ConstructorProperties({ "isEnabled", + "copyPolicies", "windowStartTime", "retentionInDays", "freeformTags", @@ -33,6 +34,7 @@ public final class UpdateBackupPolicyDetails }) public UpdateBackupPolicyDetails( Boolean isEnabled, + java.util.List copyPolicies, String windowStartTime, Integer retentionInDays, java.util.Map freeformTags, @@ -40,6 +42,7 @@ public UpdateBackupPolicyDetails( PitrPolicy pitrPolicy) { super(); this.isEnabled = isEnabled; + this.copyPolicies = copyPolicies; this.windowStartTime = windowStartTime; this.retentionInDays = retentionInDays; this.freeformTags = freeformTags; @@ -67,6 +70,34 @@ public Builder isEnabled(Boolean isEnabled) { this.__explicitlySet__.add("isEnabled"); return this; } + /** + * List of policies of a DB system to schedule cross-region DB system backup copy. + *

+ * The policy includes the name of the destination region to which the DB system backup will be copied, and + * an optional parameter which specifies the retention period of the copied DB system backup in days. + *

+ **Note:** Currently, only one policy can be specified in the list. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("copyPolicies") + private java.util.List copyPolicies; + + /** + * List of policies of a DB system to schedule cross-region DB system backup copy. + *

+ * The policy includes the name of the destination region to which the DB system backup will be copied, and + * an optional parameter which specifies the retention period of the copied DB system backup in days. + *

+ **Note:** Currently, only one policy can be specified in the list. + * + * @param copyPolicies the value to set + * @return this builder + **/ + public Builder copyPolicies(java.util.List copyPolicies) { + this.copyPolicies = copyPolicies; + this.__explicitlySet__.add("copyPolicies"); + return this; + } /** * The start of a 30-minute window of time in which daily, automated backups occur. *

@@ -179,6 +210,7 @@ public UpdateBackupPolicyDetails build() { UpdateBackupPolicyDetails model = new UpdateBackupPolicyDetails( this.isEnabled, + this.copyPolicies, this.windowStartTime, this.retentionInDays, this.freeformTags, @@ -195,6 +227,9 @@ public Builder copy(UpdateBackupPolicyDetails model) { if (model.wasPropertyExplicitlySet("isEnabled")) { this.isEnabled(model.getIsEnabled()); } + if (model.wasPropertyExplicitlySet("copyPolicies")) { + this.copyPolicies(model.getCopyPolicies()); + } if (model.wasPropertyExplicitlySet("windowStartTime")) { this.windowStartTime(model.getWindowStartTime()); } @@ -241,6 +276,32 @@ public Boolean getIsEnabled() { return isEnabled; } + /** + * List of policies of a DB system to schedule cross-region DB system backup copy. + *

+ * The policy includes the name of the destination region to which the DB system backup will be copied, and + * an optional parameter which specifies the retention period of the copied DB system backup in days. + *

+ **Note:** Currently, only one policy can be specified in the list. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("copyPolicies") + private final java.util.List copyPolicies; + + /** + * List of policies of a DB system to schedule cross-region DB system backup copy. + *

+ * The policy includes the name of the destination region to which the DB system backup will be copied, and + * an optional parameter which specifies the retention period of the copied DB system backup in days. + *

+ **Note:** Currently, only one policy can be specified in the list. + * + * @return the value + **/ + public java.util.List getCopyPolicies() { + return copyPolicies; + } + /** * The start of a 30-minute window of time in which daily, automated backups occur. *

@@ -349,6 +410,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("UpdateBackupPolicyDetails("); sb.append("super=").append(super.toString()); sb.append("isEnabled=").append(String.valueOf(this.isEnabled)); + sb.append(", copyPolicies=").append(String.valueOf(this.copyPolicies)); sb.append(", windowStartTime=").append(String.valueOf(this.windowStartTime)); sb.append(", retentionInDays=").append(String.valueOf(this.retentionInDays)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); @@ -369,6 +431,7 @@ public boolean equals(Object o) { UpdateBackupPolicyDetails other = (UpdateBackupPolicyDetails) o; return java.util.Objects.equals(this.isEnabled, other.isEnabled) + && java.util.Objects.equals(this.copyPolicies, other.copyPolicies) && java.util.Objects.equals(this.windowStartTime, other.windowStartTime) && java.util.Objects.equals(this.retentionInDays, other.retentionInDays) && java.util.Objects.equals(this.freeformTags, other.freeformTags) @@ -382,6 +445,7 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); + result = (result * PRIME) + (this.copyPolicies == null ? 43 : this.copyPolicies.hashCode()); result = (result * PRIME) + (this.windowStartTime == null ? 43 : this.windowStartTime.hashCode()); diff --git a/bmc-networkfirewall/pom.xml b/bmc-networkfirewall/pom.xml index 11446bec49..edd3a46b9f 100644 --- a/bmc-networkfirewall/pom.xml +++ b/bmc-networkfirewall/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-networkfirewall @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-networkloadbalancer/pom.xml b/bmc-networkloadbalancer/pom.xml index e658241c2e..07bff4dc95 100644 --- a/bmc-networkloadbalancer/pom.xml +++ b/bmc-networkloadbalancer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-networkloadbalancer @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-nosql/pom.xml b/bmc-nosql/pom.xml index c08c1bde96..11f81d8fc2 100644 --- a/bmc-nosql/pom.xml +++ b/bmc-nosql/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-nosql @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-objectstorage/bmc-objectstorage-combined/pom.xml b/bmc-objectstorage/bmc-objectstorage-combined/pom.xml index 4e755121b4..b5c524deb0 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.81.0 + 2.82.0 ../pom.xml @@ -18,12 +18,12 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 2.81.0 + 2.82.0 com.oracle.oci.sdk oci-java-sdk-objectstorage-extensions - 2.81.0 + 2.82.0 diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml b/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml index bc8fac67ec..065e275344 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.81.0 + 2.82.0 ../pom.xml @@ -28,12 +28,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 2.81.0 + 2.82.0 diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32C.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32C.java index efaf7646ed..3f3c88c32b 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32C.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32C.java @@ -4,6 +4,7 @@ */ package com.oracle.bmc.objectstorage.transfer.internal; +import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.zip.Checksum; @@ -129,7 +130,9 @@ public void update(ByteBuffer buffer) { update(b, 0, length); } } - buffer.position(limit); + // cast is necessary to avoid NoSuchMethodError in Java 8 + // see https://stackoverflow.com/questions/48693695/java-nio-buffer-not-loading-clear-method-on-runtime + ((Buffer) buffer).position(limit); } /** Resets CRC-32C to initial value. */ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/pom.xml b/bmc-objectstorage/bmc-objectstorage-generated/pom.xml index 7053ed83cd..ca62c1bd3e 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.81.0 + 2.82.0 ../pom.xml @@ -20,7 +20,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-objectstorage/pom.xml b/bmc-objectstorage/pom.xml index 6b50661fb5..6c5135cdaa 100644 --- a/bmc-objectstorage/pom.xml +++ b/bmc-objectstorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml diff --git a/bmc-oce/pom.xml b/bmc-oce/pom.xml index 2bd2acd76c..1457de67ad 100644 --- a/bmc-oce/pom.xml +++ b/bmc-oce/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-oce @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-ocicontrolcenter/pom.xml b/bmc-ocicontrolcenter/pom.xml index deb66e5636..6fba68b0b1 100644 --- a/bmc-ocicontrolcenter/pom.xml +++ b/bmc-ocicontrolcenter/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-ocicontrolcenter @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-ocvp/pom.xml b/bmc-ocvp/pom.xml index e1f92e89dc..c778098379 100644 --- a/bmc-ocvp/pom.xml +++ b/bmc-ocvp/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-ocvp @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-oda/pom.xml b/bmc-oda/pom.xml index 7fe0ab4d05..a1650568f5 100644 --- a/bmc-oda/pom.xml +++ b/bmc-oda/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-oda @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-onesubscription/pom.xml b/bmc-onesubscription/pom.xml index 33a561022b..559ca824c6 100644 --- a/bmc-onesubscription/pom.xml +++ b/bmc-onesubscription/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-onesubscription @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-ons/pom.xml b/bmc-ons/pom.xml index df9a8fb1fa..0c1e704854 100644 --- a/bmc-ons/pom.xml +++ b/bmc-ons/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-ons @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-opa/pom.xml b/bmc-opa/pom.xml index 600cea0818..5729f7d796 100644 --- a/bmc-opa/pom.xml +++ b/bmc-opa/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-opa @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-opensearch/pom.xml b/bmc-opensearch/pom.xml index 76a11c11c9..f5c5012ea7 100644 --- a/bmc-opensearch/pom.xml +++ b/bmc-opensearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-opensearch @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipeline.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipeline.java new file mode 100644 index 0000000000..b1ce8d5024 --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipeline.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch; + +import com.oracle.bmc.opensearch.requests.*; +import com.oracle.bmc.opensearch.responses.*; + +/** + * The OpenSearch service API provides access to OCI Search Service with OpenSearch. + * 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: 20180828") +public interface OpensearchClusterPipeline 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 OpensearchCluster Pipeline. + * + * @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 CreateOpensearchClusterPipeline API. + */ + CreateOpensearchClusterPipelineResponse createOpensearchClusterPipeline( + CreateOpensearchClusterPipelineRequest request); + + /** + * Deletes a OpensearchCluster Pipeline 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 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 DeleteOpensearchClusterPipeline API. + */ + DeleteOpensearchClusterPipelineResponse deleteOpensearchClusterPipeline( + DeleteOpensearchClusterPipelineRequest request); + + /** + * Gets a OpensearchCluster Pipeline 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 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 GetOpensearchClusterPipeline API. + */ + GetOpensearchClusterPipelineResponse getOpensearchClusterPipeline( + GetOpensearchClusterPipelineRequest request); + + /** + * Returns a list of OpensearchClusterPipelines. + * + * @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 ListOpensearchClusterPipelines API. + */ + ListOpensearchClusterPipelinesResponse listOpensearchClusterPipelines( + ListOpensearchClusterPipelinesRequest request); + + /** + * Updates the OpensearchCluster Pipeline + * @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 UpdateOpensearchClusterPipeline API. + */ + UpdateOpensearchClusterPipelineResponse updateOpensearchClusterPipeline( + UpdateOpensearchClusterPipelineRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + OpensearchClusterPipelineWaiters 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. + */ + OpensearchClusterPipelinePaginators getPaginators(); +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelineAsync.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelineAsync.java new file mode 100644 index 0000000000..f52a5032fe --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelineAsync.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch; + +import com.oracle.bmc.opensearch.requests.*; +import com.oracle.bmc.opensearch.responses.*; + +/** + * The OpenSearch service API provides access to OCI Search Service with OpenSearch. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public interface OpensearchClusterPipelineAsync 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 OpensearchCluster Pipeline. + * + * + * @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 + createOpensearchClusterPipeline( + CreateOpensearchClusterPipelineRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateOpensearchClusterPipelineRequest, + CreateOpensearchClusterPipelineResponse> + handler); + + /** + * Deletes a OpensearchCluster Pipeline 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 + deleteOpensearchClusterPipeline( + DeleteOpensearchClusterPipelineRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteOpensearchClusterPipelineRequest, + DeleteOpensearchClusterPipelineResponse> + handler); + + /** + * Gets a OpensearchCluster Pipeline 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 getOpensearchClusterPipeline( + GetOpensearchClusterPipelineRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetOpensearchClusterPipelineRequest, + GetOpensearchClusterPipelineResponse> + handler); + + /** + * Returns a list of OpensearchClusterPipelines. + * + * + * @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 + listOpensearchClusterPipelines( + ListOpensearchClusterPipelinesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListOpensearchClusterPipelinesRequest, + ListOpensearchClusterPipelinesResponse> + handler); + + /** + * Updates the OpensearchCluster Pipeline + * + * @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 + updateOpensearchClusterPipeline( + UpdateOpensearchClusterPipelineRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateOpensearchClusterPipelineRequest, + UpdateOpensearchClusterPipelineResponse> + handler); +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelineAsyncClient.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelineAsyncClient.java new file mode 100644 index 0000000000..3769a4f399 --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelineAsyncClient.java @@ -0,0 +1,734 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch; + +import com.oracle.bmc.opensearch.internal.http.*; +import com.oracle.bmc.opensearch.requests.*; +import com.oracle.bmc.opensearch.responses.*; + +/** + * Async client implementation for OpensearchClusterPipeline 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: 20180828") +public class OpensearchClusterPipelineAsyncClient implements OpensearchClusterPipelineAsync { + /** + * Service instance for OpensearchClusterPipeline. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("OPENSEARCHCLUSTERPIPELINE") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://search-indexing.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(OpensearchClusterPipelineAsyncClient.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; + + /** + * 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 OpensearchClusterPipelineAsyncClient( + 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 OpensearchClusterPipelineAsyncClient( + 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 OpensearchClusterPipelineAsyncClient( + 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 OpensearchClusterPipelineAsyncClient( + 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 OpensearchClusterPipelineAsyncClient( + 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 OpensearchClusterPipelineAsyncClient( + 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 OpensearchClusterPipelineAsyncClient( + 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 OpensearchClusterPipelineAsyncClient( + 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); + 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, OpensearchClusterPipelineAsyncClient> { + 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 OpensearchClusterPipelineAsyncClient 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 OpensearchClusterPipelineAsyncClient( + 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 endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @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); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + 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 + createOpensearchClusterPipeline( + CreateOpensearchClusterPipelineRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateOpensearchClusterPipelineRequest, + CreateOpensearchClusterPipelineResponse> + handler) { + LOG.trace("Called async createOpensearchClusterPipeline"); + final CreateOpensearchClusterPipelineRequest interceptedRequest = + CreateOpensearchClusterPipelineConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOpensearchClusterPipelineConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OpensearchClusterPipeline", + "CreateOpensearchClusterPipeline", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/opensearch/20180828/OpensearchClusterPipeline/CreateOpensearchClusterPipeline"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateOpensearchClusterPipelineResponse> + transformer = + CreateOpensearchClusterPipelineConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateOpensearchClusterPipelineRequest, + CreateOpensearchClusterPipelineResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateOpensearchClusterPipelineRequest, + CreateOpensearchClusterPipelineResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateOpensearchClusterPipelineDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateOpensearchClusterPipelineRequest, + CreateOpensearchClusterPipelineResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deleteOpensearchClusterPipeline( + DeleteOpensearchClusterPipelineRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteOpensearchClusterPipelineRequest, + DeleteOpensearchClusterPipelineResponse> + handler) { + LOG.trace("Called async deleteOpensearchClusterPipeline"); + final DeleteOpensearchClusterPipelineRequest interceptedRequest = + DeleteOpensearchClusterPipelineConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteOpensearchClusterPipelineConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OpensearchClusterPipeline", + "DeleteOpensearchClusterPipeline", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/opensearch/20180828/OpensearchClusterPipeline/DeleteOpensearchClusterPipeline"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteOpensearchClusterPipelineResponse> + transformer = + DeleteOpensearchClusterPipelineConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteOpensearchClusterPipelineRequest, + DeleteOpensearchClusterPipelineResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteOpensearchClusterPipelineRequest, + DeleteOpensearchClusterPipelineResponse>, + 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< + DeleteOpensearchClusterPipelineRequest, + DeleteOpensearchClusterPipelineResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getOpensearchClusterPipeline( + GetOpensearchClusterPipelineRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetOpensearchClusterPipelineRequest, + GetOpensearchClusterPipelineResponse> + handler) { + LOG.trace("Called async getOpensearchClusterPipeline"); + final GetOpensearchClusterPipelineRequest interceptedRequest = + GetOpensearchClusterPipelineConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetOpensearchClusterPipelineConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OpensearchClusterPipeline", + "GetOpensearchClusterPipeline", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/opensearch/20180828/OpensearchClusterPipeline/GetOpensearchClusterPipeline"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetOpensearchClusterPipelineResponse> + transformer = + GetOpensearchClusterPipelineConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetOpensearchClusterPipelineRequest, GetOpensearchClusterPipelineResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetOpensearchClusterPipelineRequest, + GetOpensearchClusterPipelineResponse>, + 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< + GetOpensearchClusterPipelineRequest, GetOpensearchClusterPipelineResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listOpensearchClusterPipelines( + ListOpensearchClusterPipelinesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListOpensearchClusterPipelinesRequest, + ListOpensearchClusterPipelinesResponse> + handler) { + LOG.trace("Called async listOpensearchClusterPipelines"); + final ListOpensearchClusterPipelinesRequest interceptedRequest = + ListOpensearchClusterPipelinesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOpensearchClusterPipelinesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OpensearchClusterPipeline", + "ListOpensearchClusterPipelines", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/opensearch/20180828/OpensearchClusterPipelineCollection/ListOpensearchClusterPipelines"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListOpensearchClusterPipelinesResponse> + transformer = + ListOpensearchClusterPipelinesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListOpensearchClusterPipelinesRequest, + ListOpensearchClusterPipelinesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListOpensearchClusterPipelinesRequest, + ListOpensearchClusterPipelinesResponse>, + 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< + ListOpensearchClusterPipelinesRequest, ListOpensearchClusterPipelinesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + updateOpensearchClusterPipeline( + UpdateOpensearchClusterPipelineRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateOpensearchClusterPipelineRequest, + UpdateOpensearchClusterPipelineResponse> + handler) { + LOG.trace("Called async updateOpensearchClusterPipeline"); + final UpdateOpensearchClusterPipelineRequest interceptedRequest = + UpdateOpensearchClusterPipelineConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateOpensearchClusterPipelineConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OpensearchClusterPipeline", + "UpdateOpensearchClusterPipeline", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/opensearch/20180828/OpensearchClusterPipeline/UpdateOpensearchClusterPipeline"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateOpensearchClusterPipelineResponse> + transformer = + UpdateOpensearchClusterPipelineConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateOpensearchClusterPipelineRequest, + UpdateOpensearchClusterPipelineResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateOpensearchClusterPipelineRequest, + UpdateOpensearchClusterPipelineResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateOpensearchClusterPipelineDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateOpensearchClusterPipelineRequest, + UpdateOpensearchClusterPipelineResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelineClient.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelineClient.java new file mode 100644 index 0000000000..81b8839193 --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelineClient.java @@ -0,0 +1,767 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch; + +import com.oracle.bmc.opensearch.internal.http.*; +import com.oracle.bmc.opensearch.requests.*; +import com.oracle.bmc.opensearch.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class OpensearchClusterPipelineClient implements OpensearchClusterPipeline { + /** + * Service instance for OpensearchClusterPipeline. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("OPENSEARCHCLUSTERPIPELINE") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://search-indexing.{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(OpensearchClusterPipelineClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final OpensearchClusterPipelineWaiters waiters; + + private final OpensearchClusterPipelinePaginators 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; + + /** + * 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 OpensearchClusterPipelineClient( + 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 OpensearchClusterPipelineClient( + 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 OpensearchClusterPipelineClient( + 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 OpensearchClusterPipelineClient( + 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 OpensearchClusterPipelineClient( + 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 OpensearchClusterPipelineClient( + 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 OpensearchClusterPipelineClient( + 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 OpensearchClusterPipelineClient( + 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 OpensearchClusterPipelineClient( + 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); + 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("OpensearchClusterPipeline-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new OpensearchClusterPipelineWaiters(executorService, this); + + this.paginators = new OpensearchClusterPipelinePaginators(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, OpensearchClusterPipelineClient> { + 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 OpensearchClusterPipelineClient 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 OpensearchClusterPipelineClient( + 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 endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @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); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + 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 CreateOpensearchClusterPipelineResponse createOpensearchClusterPipeline( + CreateOpensearchClusterPipelineRequest request) { + LOG.trace("Called createOpensearchClusterPipeline"); + final CreateOpensearchClusterPipelineRequest interceptedRequest = + CreateOpensearchClusterPipelineConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOpensearchClusterPipelineConverter.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.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OpensearchClusterPipeline", + "CreateOpensearchClusterPipeline", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/opensearch/20180828/OpensearchClusterPipeline/CreateOpensearchClusterPipeline"); + java.util.function.Function< + javax.ws.rs.core.Response, CreateOpensearchClusterPipelineResponse> + transformer = + CreateOpensearchClusterPipelineConverter.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 + .getCreateOpensearchClusterPipelineDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteOpensearchClusterPipelineResponse deleteOpensearchClusterPipeline( + DeleteOpensearchClusterPipelineRequest request) { + LOG.trace("Called deleteOpensearchClusterPipeline"); + final DeleteOpensearchClusterPipelineRequest interceptedRequest = + DeleteOpensearchClusterPipelineConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteOpensearchClusterPipelineConverter.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( + "OpensearchClusterPipeline", + "DeleteOpensearchClusterPipeline", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/opensearch/20180828/OpensearchClusterPipeline/DeleteOpensearchClusterPipeline"); + java.util.function.Function< + javax.ws.rs.core.Response, DeleteOpensearchClusterPipelineResponse> + transformer = + DeleteOpensearchClusterPipelineConverter.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 GetOpensearchClusterPipelineResponse getOpensearchClusterPipeline( + GetOpensearchClusterPipelineRequest request) { + LOG.trace("Called getOpensearchClusterPipeline"); + final GetOpensearchClusterPipelineRequest interceptedRequest = + GetOpensearchClusterPipelineConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetOpensearchClusterPipelineConverter.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( + "OpensearchClusterPipeline", + "GetOpensearchClusterPipeline", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/opensearch/20180828/OpensearchClusterPipeline/GetOpensearchClusterPipeline"); + java.util.function.Function + transformer = + GetOpensearchClusterPipelineConverter.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 ListOpensearchClusterPipelinesResponse listOpensearchClusterPipelines( + ListOpensearchClusterPipelinesRequest request) { + LOG.trace("Called listOpensearchClusterPipelines"); + final ListOpensearchClusterPipelinesRequest interceptedRequest = + ListOpensearchClusterPipelinesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOpensearchClusterPipelinesConverter.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( + "OpensearchClusterPipeline", + "ListOpensearchClusterPipelines", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/opensearch/20180828/OpensearchClusterPipelineCollection/ListOpensearchClusterPipelines"); + java.util.function.Function< + javax.ws.rs.core.Response, ListOpensearchClusterPipelinesResponse> + transformer = + ListOpensearchClusterPipelinesConverter.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 UpdateOpensearchClusterPipelineResponse updateOpensearchClusterPipeline( + UpdateOpensearchClusterPipelineRequest request) { + LOG.trace("Called updateOpensearchClusterPipeline"); + final UpdateOpensearchClusterPipelineRequest interceptedRequest = + UpdateOpensearchClusterPipelineConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateOpensearchClusterPipelineConverter.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( + "OpensearchClusterPipeline", + "UpdateOpensearchClusterPipeline", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/opensearch/20180828/OpensearchClusterPipeline/UpdateOpensearchClusterPipeline"); + java.util.function.Function< + javax.ws.rs.core.Response, UpdateOpensearchClusterPipelineResponse> + transformer = + UpdateOpensearchClusterPipelineConverter.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 + .getUpdateOpensearchClusterPipelineDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public OpensearchClusterPipelineWaiters getWaiters() { + return waiters; + } + + @Override + public OpensearchClusterPipelinePaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelinePaginators.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelinePaginators.java new file mode 100644 index 0000000000..b7e9aa096d --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelinePaginators.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch; + +import com.oracle.bmc.opensearch.requests.*; +import com.oracle.bmc.opensearch.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of OpensearchClusterPipeline 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: 20180828") +public class OpensearchClusterPipelinePaginators { + private final OpensearchClusterPipeline client; + + public OpensearchClusterPipelinePaginators(OpensearchClusterPipeline client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listOpensearchClusterPipelines 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 + listOpensearchClusterPipelinesResponseIterator( + final ListOpensearchClusterPipelinesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListOpensearchClusterPipelinesRequest.Builder, + ListOpensearchClusterPipelinesRequest, ListOpensearchClusterPipelinesResponse>( + new java.util.function.Supplier() { + @Override + public ListOpensearchClusterPipelinesRequest.Builder get() { + return ListOpensearchClusterPipelinesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListOpensearchClusterPipelinesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOpensearchClusterPipelinesRequest.Builder>, + ListOpensearchClusterPipelinesRequest>() { + @Override + public ListOpensearchClusterPipelinesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOpensearchClusterPipelinesRequest.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< + ListOpensearchClusterPipelinesRequest, + ListOpensearchClusterPipelinesResponse>() { + @Override + public ListOpensearchClusterPipelinesResponse apply( + ListOpensearchClusterPipelinesRequest request) { + return client.listOpensearchClusterPipelines(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.opensearch.model.OpensearchClusterPipelineSummary} objects + * contained in responses from the listOpensearchClusterPipelines 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.opensearch.model.OpensearchClusterPipelineSummary} objects + * contained in responses received from the service. + */ + public Iterable + listOpensearchClusterPipelinesRecordIterator( + final ListOpensearchClusterPipelinesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListOpensearchClusterPipelinesRequest.Builder, + ListOpensearchClusterPipelinesRequest, ListOpensearchClusterPipelinesResponse, + com.oracle.bmc.opensearch.model.OpensearchClusterPipelineSummary>( + new java.util.function.Supplier() { + @Override + public ListOpensearchClusterPipelinesRequest.Builder get() { + return ListOpensearchClusterPipelinesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListOpensearchClusterPipelinesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOpensearchClusterPipelinesRequest.Builder>, + ListOpensearchClusterPipelinesRequest>() { + @Override + public ListOpensearchClusterPipelinesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOpensearchClusterPipelinesRequest.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< + ListOpensearchClusterPipelinesRequest, + ListOpensearchClusterPipelinesResponse>() { + @Override + public ListOpensearchClusterPipelinesResponse apply( + ListOpensearchClusterPipelinesRequest request) { + return client.listOpensearchClusterPipelines(request); + } + }, + new java.util.function.Function< + ListOpensearchClusterPipelinesResponse, + java.util.List< + com.oracle.bmc.opensearch.model + .OpensearchClusterPipelineSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.opensearch.model + .OpensearchClusterPipelineSummary> + apply(ListOpensearchClusterPipelinesResponse response) { + return response.getOpensearchClusterPipelineCollection().getItems(); + } + }); + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelineWaiters.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelineWaiters.java new file mode 100644 index 0000000000..e7885452cd --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/OpensearchClusterPipelineWaiters.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch; + +import com.oracle.bmc.opensearch.requests.*; +import com.oracle.bmc.opensearch.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of OpensearchClusterPipeline. + *

+ * 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: 20180828") +public class OpensearchClusterPipelineWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final OpensearchClusterPipeline client; + + public OpensearchClusterPipelineWaiters( + java.util.concurrent.ExecutorService executorService, + OpensearchClusterPipeline 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< + GetOpensearchClusterPipelineRequest, GetOpensearchClusterPipelineResponse> + forOpensearchClusterPipeline( + GetOpensearchClusterPipelineRequest request, + com.oracle.bmc.opensearch.model.OpensearchClusterPipeline.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 forOpensearchClusterPipeline( + 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< + GetOpensearchClusterPipelineRequest, GetOpensearchClusterPipelineResponse> + forOpensearchClusterPipeline( + GetOpensearchClusterPipelineRequest request, + com.oracle.bmc.opensearch.model.OpensearchClusterPipeline.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 forOpensearchClusterPipeline( + 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< + GetOpensearchClusterPipelineRequest, GetOpensearchClusterPipelineResponse> + forOpensearchClusterPipeline( + GetOpensearchClusterPipelineRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.opensearch.model.OpensearchClusterPipeline.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 forOpensearchClusterPipeline( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for OpensearchClusterPipeline. + private com.oracle.bmc.waiter.Waiter< + GetOpensearchClusterPipelineRequest, GetOpensearchClusterPipelineResponse> + forOpensearchClusterPipeline( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetOpensearchClusterPipelineRequest request, + final com.oracle.bmc.opensearch.model.OpensearchClusterPipeline + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.opensearch.model.OpensearchClusterPipeline.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< + GetOpensearchClusterPipelineRequest, + GetOpensearchClusterPipelineResponse>() { + @Override + public GetOpensearchClusterPipelineResponse apply( + GetOpensearchClusterPipelineRequest request) { + return client.getOpensearchClusterPipeline(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetOpensearchClusterPipelineResponse response) { + return targetStatesSet.contains( + response.getOpensearchClusterPipeline() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.opensearch.model.OpensearchClusterPipeline + .LifecycleState.Deleted)), + request); + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/SdkClientsMetadata.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/SdkClientsMetadata.java index 910503dedf..b62f3e59fe 100644 --- a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/SdkClientsMetadata.java +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/SdkClientsMetadata.java @@ -11,6 +11,8 @@ OpensearchClusterAsyncClient.class, OpensearchClusterBackupAsyncClient.class, OpensearchClusterBackupClient.class, - OpensearchClusterClient.class + OpensearchClusterClient.class, + OpensearchClusterPipelineAsyncClient.class, + OpensearchClusterPipelineClient.class }) public final class SdkClientsMetadata {} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/CreateOpensearchClusterPipelineConverter.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/CreateOpensearchClusterPipelineConverter.java new file mode 100644 index 0000000000..5144903ce0 --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/CreateOpensearchClusterPipelineConverter.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.opensearch.model.*; +import com.oracle.bmc.opensearch.requests.*; +import com.oracle.bmc.opensearch.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class CreateOpensearchClusterPipelineConverter { + 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(CreateOpensearchClusterPipelineConverter.class); + + public static com.oracle.bmc.opensearch.requests.CreateOpensearchClusterPipelineRequest + interceptRequest( + com.oracle.bmc.opensearch.requests.CreateOpensearchClusterPipelineRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.opensearch.requests.CreateOpensearchClusterPipelineRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateOpensearchClusterPipelineDetails(), + "createOpensearchClusterPipelineDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20180828").path("opensearchClusterPipelines"); + + 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.getOpcDryRun() != null) { + ib.header("opc-dry-run", request.getOpcDryRun()); + } + + 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.opensearch.responses.CreateOpensearchClusterPipelineResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses.CreateOpensearchClusterPipelineResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses.CreateOpensearchClusterPipelineResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses + .CreateOpensearchClusterPipelineResponse>() { + @Override + public com.oracle.bmc.opensearch.responses + .CreateOpensearchClusterPipelineResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.opensearch.responses.CreateOpensearchClusterPipelineResponse"); + 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.opensearch.responses + .CreateOpensearchClusterPipelineResponse.Builder + builder = + com.oracle.bmc.opensearch.responses + .CreateOpensearchClusterPipelineResponse + .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.opensearch.responses + .CreateOpensearchClusterPipelineResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/DeleteOpensearchClusterPipelineConverter.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/DeleteOpensearchClusterPipelineConverter.java new file mode 100644 index 0000000000..541c5c4a83 --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/DeleteOpensearchClusterPipelineConverter.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.opensearch.model.*; +import com.oracle.bmc.opensearch.requests.*; +import com.oracle.bmc.opensearch.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class DeleteOpensearchClusterPipelineConverter { + 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(DeleteOpensearchClusterPipelineConverter.class); + + public static com.oracle.bmc.opensearch.requests.DeleteOpensearchClusterPipelineRequest + interceptRequest( + com.oracle.bmc.opensearch.requests.DeleteOpensearchClusterPipelineRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.opensearch.requests.DeleteOpensearchClusterPipelineRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getOpensearchClusterPipelineId(), + "opensearchClusterPipelineId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180828") + .path("opensearchClusterPipelines") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOpensearchClusterPipelineId())); + + 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.opensearch.responses.DeleteOpensearchClusterPipelineResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses.DeleteOpensearchClusterPipelineResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses.DeleteOpensearchClusterPipelineResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses + .DeleteOpensearchClusterPipelineResponse>() { + @Override + public com.oracle.bmc.opensearch.responses + .DeleteOpensearchClusterPipelineResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.opensearch.responses.DeleteOpensearchClusterPipelineResponse"); + 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.opensearch.responses + .DeleteOpensearchClusterPipelineResponse.Builder + builder = + com.oracle.bmc.opensearch.responses + .DeleteOpensearchClusterPipelineResponse + .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.opensearch.responses + .DeleteOpensearchClusterPipelineResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/GetOpensearchClusterPipelineConverter.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/GetOpensearchClusterPipelineConverter.java new file mode 100644 index 0000000000..07eb9ce8af --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/GetOpensearchClusterPipelineConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.opensearch.model.*; +import com.oracle.bmc.opensearch.requests.*; +import com.oracle.bmc.opensearch.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class GetOpensearchClusterPipelineConverter { + 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(GetOpensearchClusterPipelineConverter.class); + + public static com.oracle.bmc.opensearch.requests.GetOpensearchClusterPipelineRequest + interceptRequest( + com.oracle.bmc.opensearch.requests.GetOpensearchClusterPipelineRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.opensearch.requests.GetOpensearchClusterPipelineRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getOpensearchClusterPipelineId(), + "opensearchClusterPipelineId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180828") + .path("opensearchClusterPipelines") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOpensearchClusterPipelineId())); + + 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.opensearch.responses.GetOpensearchClusterPipelineResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses.GetOpensearchClusterPipelineResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses.GetOpensearchClusterPipelineResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses + .GetOpensearchClusterPipelineResponse>() { + @Override + public com.oracle.bmc.opensearch.responses + .GetOpensearchClusterPipelineResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.opensearch.responses.GetOpensearchClusterPipelineResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.opensearch.model + .OpensearchClusterPipeline>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.opensearch.model + .OpensearchClusterPipeline + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.opensearch.model + .OpensearchClusterPipeline + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.opensearch.model + .OpensearchClusterPipeline> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.opensearch.responses + .GetOpensearchClusterPipelineResponse.Builder + builder = + com.oracle.bmc.opensearch.responses + .GetOpensearchClusterPipelineResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.opensearchClusterPipeline(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.opensearch.responses + .GetOpensearchClusterPipelineResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/ListOpensearchClusterPipelinesConverter.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/ListOpensearchClusterPipelinesConverter.java new file mode 100644 index 0000000000..3d1aa0fcdb --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/ListOpensearchClusterPipelinesConverter.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.opensearch.model.*; +import com.oracle.bmc.opensearch.requests.*; +import com.oracle.bmc.opensearch.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class ListOpensearchClusterPipelinesConverter { + 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(ListOpensearchClusterPipelinesConverter.class); + + public static com.oracle.bmc.opensearch.requests.ListOpensearchClusterPipelinesRequest + interceptRequest( + com.oracle.bmc.opensearch.requests.ListOpensearchClusterPipelinesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.opensearch.requests.ListOpensearchClusterPipelinesRequest 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("/20180828").path("opensearchClusterPipelines"); + + 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.getPipelineComponentId() != null) { + target = + target.queryParam( + "pipelineComponentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPipelineComponentId())); + } + + 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.opensearch.responses.ListOpensearchClusterPipelinesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses.ListOpensearchClusterPipelinesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses.ListOpensearchClusterPipelinesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses + .ListOpensearchClusterPipelinesResponse>() { + @Override + public com.oracle.bmc.opensearch.responses + .ListOpensearchClusterPipelinesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.opensearch.responses.ListOpensearchClusterPipelinesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.opensearch.model + .OpensearchClusterPipelineCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.opensearch.model + .OpensearchClusterPipelineCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.opensearch.model + .OpensearchClusterPipelineCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.opensearch.model + .OpensearchClusterPipelineCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.opensearch.responses + .ListOpensearchClusterPipelinesResponse.Builder + builder = + com.oracle.bmc.opensearch.responses + .ListOpensearchClusterPipelinesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.opensearchClusterPipelineCollection(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.opensearch.responses + .ListOpensearchClusterPipelinesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/UpdateOpensearchClusterPipelineConverter.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/UpdateOpensearchClusterPipelineConverter.java new file mode 100644 index 0000000000..090227e4a1 --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/internal/http/UpdateOpensearchClusterPipelineConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.opensearch.model.*; +import com.oracle.bmc.opensearch.requests.*; +import com.oracle.bmc.opensearch.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class UpdateOpensearchClusterPipelineConverter { + 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(UpdateOpensearchClusterPipelineConverter.class); + + public static com.oracle.bmc.opensearch.requests.UpdateOpensearchClusterPipelineRequest + interceptRequest( + com.oracle.bmc.opensearch.requests.UpdateOpensearchClusterPipelineRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.opensearch.requests.UpdateOpensearchClusterPipelineRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getOpensearchClusterPipelineId(), + "opensearchClusterPipelineId must not be blank"); + Validate.notNull( + request.getUpdateOpensearchClusterPipelineDetails(), + "updateOpensearchClusterPipelineDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180828") + .path("opensearchClusterPipelines") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOpensearchClusterPipelineId())); + + 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.getOpcDryRun() != null) { + ib.header("opc-dry-run", request.getOpcDryRun()); + } + + 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.opensearch.responses.UpdateOpensearchClusterPipelineResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses.UpdateOpensearchClusterPipelineResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses.UpdateOpensearchClusterPipelineResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opensearch.responses + .UpdateOpensearchClusterPipelineResponse>() { + @Override + public com.oracle.bmc.opensearch.responses + .UpdateOpensearchClusterPipelineResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.opensearch.responses.UpdateOpensearchClusterPipelineResponse"); + 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.opensearch.responses + .UpdateOpensearchClusterPipelineResponse.Builder + builder = + com.oracle.bmc.opensearch.responses + .UpdateOpensearchClusterPipelineResponse + .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.opensearch.responses + .UpdateOpensearchClusterPipelineResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/CreateOpensearchClusterPipelineDetails.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/CreateOpensearchClusterPipelineDetails.java index 77ad8c26d6..1c3eadd9b8 100644 --- a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/CreateOpensearchClusterPipelineDetails.java +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/CreateOpensearchClusterPipelineDetails.java @@ -24,50 +24,53 @@ public final class CreateOpensearchClusterPipelineDetails @Deprecated @java.beans.ConstructorProperties({ "displayName", - "maxOcpuCount", - "minOcpuCount", - "maxMemoryGB", - "minMemoryGB", + "ocpuCount", + "memoryGB", + "nodeCount", "pipelineConfigurationBody", + "dataPrepperConfigurationBody", "compartmentId", "vcnId", "subnetId", "vcnCompartmentId", "subnetCompartmentId", + "nsgId", + "reverseConnectionEndpoints", "freeformTags", - "definedTags", - "systemTags" + "definedTags" }) public CreateOpensearchClusterPipelineDetails( String displayName, - Integer maxOcpuCount, - Integer minOcpuCount, - Integer maxMemoryGB, - Integer minMemoryGB, + Integer ocpuCount, + Integer memoryGB, + Integer nodeCount, String pipelineConfigurationBody, + String dataPrepperConfigurationBody, String compartmentId, String vcnId, String subnetId, String vcnCompartmentId, String subnetCompartmentId, + String nsgId, + java.util.List reverseConnectionEndpoints, java.util.Map freeformTags, - java.util.Map> definedTags, - java.util.Map> systemTags) { + java.util.Map> definedTags) { super(); this.displayName = displayName; - this.maxOcpuCount = maxOcpuCount; - this.minOcpuCount = minOcpuCount; - this.maxMemoryGB = maxMemoryGB; - this.minMemoryGB = minMemoryGB; + this.ocpuCount = ocpuCount; + this.memoryGB = memoryGB; + this.nodeCount = nodeCount; this.pipelineConfigurationBody = pipelineConfigurationBody; + this.dataPrepperConfigurationBody = dataPrepperConfigurationBody; this.compartmentId = compartmentId; this.vcnId = vcnId; this.subnetId = subnetId; this.vcnCompartmentId = vcnCompartmentId; this.subnetCompartmentId = subnetCompartmentId; + this.nsgId = nsgId; + this.reverseConnectionEndpoints = reverseConnectionEndpoints; this.freeformTags = freeformTags; this.definedTags = definedTags; - this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -89,67 +92,51 @@ public Builder displayName(String displayName) { return this; } /** - * The maximum pipeline capacity, in OCPUs. + * The number of OCPUs configured for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxOcpuCount") - private Integer maxOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("ocpuCount") + private Integer ocpuCount; /** - * The maximum pipeline capacity, in OCPUs. - * @param maxOcpuCount the value to set + * The number of OCPUs configured for each pipeline node. + * @param ocpuCount the value to set * @return this builder **/ - public Builder maxOcpuCount(Integer maxOcpuCount) { - this.maxOcpuCount = maxOcpuCount; - this.__explicitlySet__.add("maxOcpuCount"); + public Builder ocpuCount(Integer ocpuCount) { + this.ocpuCount = ocpuCount; + this.__explicitlySet__.add("ocpuCount"); return this; } /** - * The minimum pipeline capacity, in OCPUs. + * The amount of memory in GB, for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("minOcpuCount") - private Integer minOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("memoryGB") + private Integer memoryGB; /** - * The minimum pipeline capacity, in OCPUs. - * @param minOcpuCount the value to set + * The amount of memory in GB, for each pipeline node. + * @param memoryGB the value to set * @return this builder **/ - public Builder minOcpuCount(Integer minOcpuCount) { - this.minOcpuCount = minOcpuCount; - this.__explicitlySet__.add("minOcpuCount"); + public Builder memoryGB(Integer memoryGB) { + this.memoryGB = memoryGB; + this.__explicitlySet__.add("memoryGB"); return this; } /** - * The maximum amount of memory in GB, for the pipeline. + * The number of nodes configured for the pipeline. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxMemoryGB") - private Integer maxMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private Integer nodeCount; /** - * The maximum amount of memory in GB, for the pipeline. - * @param maxMemoryGB the value to set + * The number of nodes configured for the pipeline. + * @param nodeCount the value to set * @return this builder **/ - public Builder maxMemoryGB(Integer maxMemoryGB) { - this.maxMemoryGB = maxMemoryGB; - this.__explicitlySet__.add("maxMemoryGB"); - return this; - } - /** - * The minimum amount of memory in GB, for the pipeline. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("minMemoryGB") - private Integer minMemoryGB; - - /** - * The minimum amount of memory in GB, for the pipeline. - * @param minMemoryGB the value to set - * @return this builder - **/ - public Builder minMemoryGB(Integer minMemoryGB) { - this.minMemoryGB = minMemoryGB; - this.__explicitlySet__.add("minMemoryGB"); + public Builder nodeCount(Integer nodeCount) { + this.nodeCount = nodeCount; + this.__explicitlySet__.add("nodeCount"); return this; } /** @@ -170,6 +157,24 @@ public Builder pipelineConfigurationBody(String pipelineConfigurationBody) { this.__explicitlySet__.add("pipelineConfigurationBody"); return this; } + /** + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataPrepperConfigurationBody") + private String dataPrepperConfigurationBody; + + /** + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * + * @param dataPrepperConfigurationBody the value to set + * @return this builder + **/ + public Builder dataPrepperConfigurationBody(String dataPrepperConfigurationBody) { + this.dataPrepperConfigurationBody = dataPrepperConfigurationBody; + this.__explicitlySet__.add("dataPrepperConfigurationBody"); + return this; + } /** * The OCID of the compartment to create the pipeline in. **/ @@ -235,13 +240,13 @@ public Builder vcnCompartmentId(String vcnCompartmentId) { return this; } /** - * The OCID for the compartment where the pipwline's subnet is located. + * The OCID for the compartment where the pipeline's subnet is located. **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetCompartmentId") private String subnetCompartmentId; /** - * The OCID for the compartment where the pipwline's subnet is located. + * The OCID for the compartment where the pipeline's subnet is located. * @param subnetCompartmentId the value to set * @return this builder **/ @@ -250,6 +255,41 @@ public Builder subnetCompartmentId(String subnetCompartmentId) { this.__explicitlySet__.add("subnetCompartmentId"); return this; } + /** + * The OCID of the NSG where the pipeline private endpoint vnic will be attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgId") + private String nsgId; + + /** + * The OCID of the NSG where the pipeline 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 and the corresponding fully qualified domain name that the pipeline will connect to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reverseConnectionEndpoints") + private java.util.List + reverseConnectionEndpoints; + + /** + * The customer IP and the corresponding fully qualified domain name that the pipeline will connect to. + * @param reverseConnectionEndpoints the value to set + * @return this builder + **/ + public Builder reverseConnectionEndpoints( + java.util.List + reverseConnectionEndpoints) { + this.reverseConnectionEndpoints = reverseConnectionEndpoints; + this.__explicitlySet__.add("reverseConnectionEndpoints"); + 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"}} @@ -291,26 +331,6 @@ public Builder 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(); @@ -319,19 +339,20 @@ public CreateOpensearchClusterPipelineDetails build() { CreateOpensearchClusterPipelineDetails model = new CreateOpensearchClusterPipelineDetails( this.displayName, - this.maxOcpuCount, - this.minOcpuCount, - this.maxMemoryGB, - this.minMemoryGB, + this.ocpuCount, + this.memoryGB, + this.nodeCount, this.pipelineConfigurationBody, + this.dataPrepperConfigurationBody, this.compartmentId, this.vcnId, this.subnetId, this.vcnCompartmentId, this.subnetCompartmentId, + this.nsgId, + this.reverseConnectionEndpoints, this.freeformTags, - this.definedTags, - this.systemTags); + this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -343,21 +364,21 @@ public Builder copy(CreateOpensearchClusterPipelineDetails model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } - if (model.wasPropertyExplicitlySet("maxOcpuCount")) { - this.maxOcpuCount(model.getMaxOcpuCount()); - } - if (model.wasPropertyExplicitlySet("minOcpuCount")) { - this.minOcpuCount(model.getMinOcpuCount()); + if (model.wasPropertyExplicitlySet("ocpuCount")) { + this.ocpuCount(model.getOcpuCount()); } - if (model.wasPropertyExplicitlySet("maxMemoryGB")) { - this.maxMemoryGB(model.getMaxMemoryGB()); + if (model.wasPropertyExplicitlySet("memoryGB")) { + this.memoryGB(model.getMemoryGB()); } - if (model.wasPropertyExplicitlySet("minMemoryGB")) { - this.minMemoryGB(model.getMinMemoryGB()); + if (model.wasPropertyExplicitlySet("nodeCount")) { + this.nodeCount(model.getNodeCount()); } if (model.wasPropertyExplicitlySet("pipelineConfigurationBody")) { this.pipelineConfigurationBody(model.getPipelineConfigurationBody()); } + if (model.wasPropertyExplicitlySet("dataPrepperConfigurationBody")) { + this.dataPrepperConfigurationBody(model.getDataPrepperConfigurationBody()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -373,15 +394,18 @@ public Builder copy(CreateOpensearchClusterPipelineDetails model) { if (model.wasPropertyExplicitlySet("subnetCompartmentId")) { this.subnetCompartmentId(model.getSubnetCompartmentId()); } + if (model.wasPropertyExplicitlySet("nsgId")) { + this.nsgId(model.getNsgId()); + } + if (model.wasPropertyExplicitlySet("reverseConnectionEndpoints")) { + this.reverseConnectionEndpoints(model.getReverseConnectionEndpoints()); + } 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; } } @@ -412,75 +436,77 @@ public String getDisplayName() { } /** - * The maximum pipeline capacity, in OCPUs. + * The number of OCPUs configured for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxOcpuCount") - private final Integer maxOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("ocpuCount") + private final Integer ocpuCount; /** - * The maximum pipeline capacity, in OCPUs. + * The number of OCPUs configured for each pipeline node. * @return the value **/ - public Integer getMaxOcpuCount() { - return maxOcpuCount; + public Integer getOcpuCount() { + return ocpuCount; } /** - * The minimum pipeline capacity, in OCPUs. + * The amount of memory in GB, for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("minOcpuCount") - private final Integer minOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("memoryGB") + private final Integer memoryGB; /** - * The minimum pipeline capacity, in OCPUs. + * The amount of memory in GB, for each pipeline node. * @return the value **/ - public Integer getMinOcpuCount() { - return minOcpuCount; + public Integer getMemoryGB() { + return memoryGB; } /** - * The maximum amount of memory in GB, for the pipeline. + * The number of nodes configured for the pipeline. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxMemoryGB") - private final Integer maxMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private final Integer nodeCount; /** - * The maximum amount of memory in GB, for the pipeline. + * The number of nodes configured for the pipeline. * @return the value **/ - public Integer getMaxMemoryGB() { - return maxMemoryGB; + public Integer getNodeCount() { + return nodeCount; } /** - * The minimum amount of memory in GB, for the pipeline. + * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * **/ - @com.fasterxml.jackson.annotation.JsonProperty("minMemoryGB") - private final Integer minMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("pipelineConfigurationBody") + private final String pipelineConfigurationBody; /** - * The minimum amount of memory in GB, for the pipeline. + * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * * @return the value **/ - public Integer getMinMemoryGB() { - return minMemoryGB; + public String getPipelineConfigurationBody() { + return pipelineConfigurationBody; } /** - * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. * **/ - @com.fasterxml.jackson.annotation.JsonProperty("pipelineConfigurationBody") - private final String pipelineConfigurationBody; + @com.fasterxml.jackson.annotation.JsonProperty("dataPrepperConfigurationBody") + private final String dataPrepperConfigurationBody; /** - * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. * * @return the value **/ - public String getPipelineConfigurationBody() { - return pipelineConfigurationBody; + public String getDataPrepperConfigurationBody() { + return dataPrepperConfigurationBody; } /** @@ -540,19 +566,49 @@ public String getVcnCompartmentId() { } /** - * The OCID for the compartment where the pipwline's subnet is located. + * The OCID for the compartment where the pipeline's subnet is located. **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetCompartmentId") private final String subnetCompartmentId; /** - * The OCID for the compartment where the pipwline's subnet is located. + * The OCID for the compartment where the pipeline's subnet is located. * @return the value **/ public String getSubnetCompartmentId() { return subnetCompartmentId; } + /** + * The OCID of the NSG where the pipeline private endpoint vnic will be attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgId") + private final String nsgId; + + /** + * The OCID of the NSG where the pipeline private endpoint vnic will be attached. + * @return the value + **/ + public String getNsgId() { + return nsgId; + } + + /** + * The customer IP and the corresponding fully qualified domain name that the pipeline will connect to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reverseConnectionEndpoints") + private final java.util.List + reverseConnectionEndpoints; + + /** + * The customer IP and the corresponding fully qualified domain name that the pipeline will connect to. + * @return the value + **/ + public java.util.List + getReverseConnectionEndpoints() { + return reverseConnectionEndpoints; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -589,24 +645,6 @@ 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); @@ -622,20 +660,23 @@ public String toString(boolean includeByteArrayContents) { sb.append("CreateOpensearchClusterPipelineDetails("); sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); - sb.append(", maxOcpuCount=").append(String.valueOf(this.maxOcpuCount)); - sb.append(", minOcpuCount=").append(String.valueOf(this.minOcpuCount)); - sb.append(", maxMemoryGB=").append(String.valueOf(this.maxMemoryGB)); - sb.append(", minMemoryGB=").append(String.valueOf(this.minMemoryGB)); + sb.append(", ocpuCount=").append(String.valueOf(this.ocpuCount)); + sb.append(", memoryGB=").append(String.valueOf(this.memoryGB)); + sb.append(", nodeCount=").append(String.valueOf(this.nodeCount)); sb.append(", pipelineConfigurationBody=") .append(String.valueOf(this.pipelineConfigurationBody)); + sb.append(", dataPrepperConfigurationBody=") + .append(String.valueOf(this.dataPrepperConfigurationBody)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", vcnId=").append(String.valueOf(this.vcnId)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", vcnCompartmentId=").append(String.valueOf(this.vcnCompartmentId)); sb.append(", subnetCompartmentId=").append(String.valueOf(this.subnetCompartmentId)); + sb.append(", nsgId=").append(String.valueOf(this.nsgId)); + sb.append(", reverseConnectionEndpoints=") + .append(String.valueOf(this.reverseConnectionEndpoints)); 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(); } @@ -651,20 +692,23 @@ public boolean equals(Object o) { CreateOpensearchClusterPipelineDetails other = (CreateOpensearchClusterPipelineDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) - && java.util.Objects.equals(this.maxOcpuCount, other.maxOcpuCount) - && java.util.Objects.equals(this.minOcpuCount, other.minOcpuCount) - && java.util.Objects.equals(this.maxMemoryGB, other.maxMemoryGB) - && java.util.Objects.equals(this.minMemoryGB, other.minMemoryGB) + && java.util.Objects.equals(this.ocpuCount, other.ocpuCount) + && java.util.Objects.equals(this.memoryGB, other.memoryGB) + && java.util.Objects.equals(this.nodeCount, other.nodeCount) && java.util.Objects.equals( this.pipelineConfigurationBody, other.pipelineConfigurationBody) + && java.util.Objects.equals( + this.dataPrepperConfigurationBody, other.dataPrepperConfigurationBody) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.vcnId, other.vcnId) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.vcnCompartmentId, other.vcnCompartmentId) && java.util.Objects.equals(this.subnetCompartmentId, other.subnetCompartmentId) + && java.util.Objects.equals(this.nsgId, other.nsgId) + && java.util.Objects.equals( + this.reverseConnectionEndpoints, other.reverseConnectionEndpoints) && 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); } @@ -673,15 +717,19 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); - result = (result * PRIME) + (this.maxOcpuCount == null ? 43 : this.maxOcpuCount.hashCode()); - result = (result * PRIME) + (this.minOcpuCount == null ? 43 : this.minOcpuCount.hashCode()); - result = (result * PRIME) + (this.maxMemoryGB == null ? 43 : this.maxMemoryGB.hashCode()); - result = (result * PRIME) + (this.minMemoryGB == null ? 43 : this.minMemoryGB.hashCode()); + result = (result * PRIME) + (this.ocpuCount == null ? 43 : this.ocpuCount.hashCode()); + result = (result * PRIME) + (this.memoryGB == null ? 43 : this.memoryGB.hashCode()); + result = (result * PRIME) + (this.nodeCount == null ? 43 : this.nodeCount.hashCode()); result = (result * PRIME) + (this.pipelineConfigurationBody == null ? 43 : this.pipelineConfigurationBody.hashCode()); + result = + (result * PRIME) + + (this.dataPrepperConfigurationBody == null + ? 43 + : this.dataPrepperConfigurationBody.hashCode()); result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); @@ -695,9 +743,14 @@ public int hashCode() { + (this.subnetCompartmentId == null ? 43 : this.subnetCompartmentId.hashCode()); + result = (result * PRIME) + (this.nsgId == null ? 43 : this.nsgId.hashCode()); + result = + (result * PRIME) + + (this.reverseConnectionEndpoints == null + ? 43 + : this.reverseConnectionEndpoints.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-opensearch/src/main/java/com/oracle/bmc/opensearch/model/ForcePatchPipelineDetails.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/ForcePatchPipelineDetails.java new file mode 100644 index 0000000000..b75905fa44 --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/ForcePatchPipelineDetails.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.model; + +/** + * force patching a pipeline. + *
+ * 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: 20180828") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ForcePatchPipelineDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ForcePatchPipelineDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"pipelineId", "flexShape"}) + public ForcePatchPipelineDetails(String pipelineId, String flexShape) { + super(); + this.pipelineId = pipelineId; + this.flexShape = flexShape; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * OCID of the Opensearch Pipeline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pipelineId") + private String pipelineId; + + /** + * OCID of the Opensearch Pipeline. + * @param pipelineId the value to set + * @return this builder + **/ + public Builder pipelineId(String pipelineId) { + this.pipelineId = pipelineId; + this.__explicitlySet__.add("pipelineId"); + return this; + } + /** + * flex shape name for the instances in the pipeline + **/ + @com.fasterxml.jackson.annotation.JsonProperty("flexShape") + private String flexShape; + + /** + * flex shape name for the instances in the pipeline + * @param flexShape the value to set + * @return this builder + **/ + public Builder flexShape(String flexShape) { + this.flexShape = flexShape; + this.__explicitlySet__.add("flexShape"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ForcePatchPipelineDetails build() { + ForcePatchPipelineDetails model = + new ForcePatchPipelineDetails(this.pipelineId, this.flexShape); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ForcePatchPipelineDetails model) { + if (model.wasPropertyExplicitlySet("pipelineId")) { + this.pipelineId(model.getPipelineId()); + } + if (model.wasPropertyExplicitlySet("flexShape")) { + this.flexShape(model.getFlexShape()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * OCID of the Opensearch Pipeline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pipelineId") + private final String pipelineId; + + /** + * OCID of the Opensearch Pipeline. + * @return the value + **/ + public String getPipelineId() { + return pipelineId; + } + + /** + * flex shape name for the instances in the pipeline + **/ + @com.fasterxml.jackson.annotation.JsonProperty("flexShape") + private final String flexShape; + + /** + * flex shape name for the instances in the pipeline + * @return the value + **/ + public String getFlexShape() { + return flexShape; + } + + @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("ForcePatchPipelineDetails("); + sb.append("super=").append(super.toString()); + sb.append("pipelineId=").append(String.valueOf(this.pipelineId)); + sb.append(", flexShape=").append(String.valueOf(this.flexShape)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ForcePatchPipelineDetails)) { + return false; + } + + ForcePatchPipelineDetails other = (ForcePatchPipelineDetails) o; + return java.util.Objects.equals(this.pipelineId, other.pipelineId) + && java.util.Objects.equals(this.flexShape, other.flexShape) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.pipelineId == null ? 43 : this.pipelineId.hashCode()); + result = (result * PRIME) + (this.flexShape == null ? 43 : this.flexShape.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchClusterPipeline.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchClusterPipeline.java index fcddfcd8eb..be41d073db 100644 --- a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchClusterPipeline.java +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchClusterPipeline.java @@ -32,16 +32,19 @@ public final class OpensearchClusterPipeline "subnetId", "vcnCompartmentId", "subnetCompartmentId", - "maxOcpuCount", - "minOcpuCount", - "maxMemoryGB", - "minMemoryGB", + "ocpuCount", + "memoryGB", + "nodeCount", "pipelineConfigurationBody", + "dataPrepperConfigurationBody", "opensearchPipelineFqdn", "opensearchPipelinePrivateIp", "lifecycleState", + "pipelineMode", "timeCreated", "timeUpdated", + "reverseConnectionEndpoints", + "nsgId", "freeformTags", "definedTags", "systemTags" @@ -54,16 +57,19 @@ public OpensearchClusterPipeline( String subnetId, String vcnCompartmentId, String subnetCompartmentId, - Integer maxOcpuCount, - Integer minOcpuCount, - Integer maxMemoryGB, - Integer minMemoryGB, + Integer ocpuCount, + Integer memoryGB, + Integer nodeCount, String pipelineConfigurationBody, + String dataPrepperConfigurationBody, String opensearchPipelineFqdn, String opensearchPipelinePrivateIp, LifecycleState lifecycleState, + PipelineMode pipelineMode, java.util.Date timeCreated, java.util.Date timeUpdated, + java.util.List reverseConnectionEndpoints, + String nsgId, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -75,16 +81,19 @@ public OpensearchClusterPipeline( this.subnetId = subnetId; this.vcnCompartmentId = vcnCompartmentId; this.subnetCompartmentId = subnetCompartmentId; - this.maxOcpuCount = maxOcpuCount; - this.minOcpuCount = minOcpuCount; - this.maxMemoryGB = maxMemoryGB; - this.minMemoryGB = minMemoryGB; + this.ocpuCount = ocpuCount; + this.memoryGB = memoryGB; + this.nodeCount = nodeCount; this.pipelineConfigurationBody = pipelineConfigurationBody; + this.dataPrepperConfigurationBody = dataPrepperConfigurationBody; this.opensearchPipelineFqdn = opensearchPipelineFqdn; this.opensearchPipelinePrivateIp = opensearchPipelinePrivateIp; this.lifecycleState = lifecycleState; + this.pipelineMode = pipelineMode; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; + this.reverseConnectionEndpoints = reverseConnectionEndpoints; + this.nsgId = nsgId; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -189,13 +198,13 @@ public Builder vcnCompartmentId(String vcnCompartmentId) { return this; } /** - * The OCID for the compartment where the pipwline's subnet is located. + * The OCID for the compartment where the pipeline's subnet is located. **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetCompartmentId") private String subnetCompartmentId; /** - * The OCID for the compartment where the pipwline's subnet is located. + * The OCID for the compartment where the pipeline's subnet is located. * @param subnetCompartmentId the value to set * @return this builder **/ @@ -205,67 +214,51 @@ public Builder subnetCompartmentId(String subnetCompartmentId) { return this; } /** - * The maximum pipeline capacity, in OCPUs. + * The number of OCPUs configured for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxOcpuCount") - private Integer maxOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("ocpuCount") + private Integer ocpuCount; /** - * The maximum pipeline capacity, in OCPUs. - * @param maxOcpuCount the value to set + * The number of OCPUs configured for each pipeline node. + * @param ocpuCount the value to set * @return this builder **/ - public Builder maxOcpuCount(Integer maxOcpuCount) { - this.maxOcpuCount = maxOcpuCount; - this.__explicitlySet__.add("maxOcpuCount"); + public Builder ocpuCount(Integer ocpuCount) { + this.ocpuCount = ocpuCount; + this.__explicitlySet__.add("ocpuCount"); return this; } /** - * The maximum pipeline capacity, in OCPUs. + * The amount of memory in GB, for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("minOcpuCount") - private Integer minOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("memoryGB") + private Integer memoryGB; /** - * The maximum pipeline capacity, in OCPUs. - * @param minOcpuCount the value to set + * The amount of memory in GB, for each pipeline node. + * @param memoryGB the value to set * @return this builder **/ - public Builder minOcpuCount(Integer minOcpuCount) { - this.minOcpuCount = minOcpuCount; - this.__explicitlySet__.add("minOcpuCount"); + public Builder memoryGB(Integer memoryGB) { + this.memoryGB = memoryGB; + this.__explicitlySet__.add("memoryGB"); return this; } /** - * The maximum amount of memory in GB, for the pipeline. + * The number of nodes configured for the pipeline. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxMemoryGB") - private Integer maxMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private Integer nodeCount; /** - * The maximum amount of memory in GB, for the pipeline. - * @param maxMemoryGB the value to set + * The number of nodes configured for the pipeline. + * @param nodeCount the value to set * @return this builder **/ - public Builder maxMemoryGB(Integer maxMemoryGB) { - this.maxMemoryGB = maxMemoryGB; - this.__explicitlySet__.add("maxMemoryGB"); - return this; - } - /** - * The minimum amount of memory in GB, for the pipeline. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("minMemoryGB") - private Integer minMemoryGB; - - /** - * The minimum amount of memory in GB, for the pipeline. - * @param minMemoryGB the value to set - * @return this builder - **/ - public Builder minMemoryGB(Integer minMemoryGB) { - this.minMemoryGB = minMemoryGB; - this.__explicitlySet__.add("minMemoryGB"); + public Builder nodeCount(Integer nodeCount) { + this.nodeCount = nodeCount; + this.__explicitlySet__.add("nodeCount"); return this; } /** @@ -286,6 +279,24 @@ public Builder pipelineConfigurationBody(String pipelineConfigurationBody) { this.__explicitlySet__.add("pipelineConfigurationBody"); return this; } + /** + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataPrepperConfigurationBody") + private String dataPrepperConfigurationBody; + + /** + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * + * @param dataPrepperConfigurationBody the value to set + * @return this builder + **/ + public Builder dataPrepperConfigurationBody(String dataPrepperConfigurationBody) { + this.dataPrepperConfigurationBody = dataPrepperConfigurationBody; + this.__explicitlySet__.add("dataPrepperConfigurationBody"); + return this; + } /** * The fully qualified domain name (FQDN) for the cluster's API endpoint. **/ @@ -334,6 +345,22 @@ public Builder lifecycleState(LifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * The current state of the pipeline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pipelineMode") + private PipelineMode pipelineMode; + + /** + * The current state of the pipeline. + * @param pipelineMode the value to set + * @return this builder + **/ + public Builder pipelineMode(PipelineMode pipelineMode) { + this.pipelineMode = pipelineMode; + this.__explicitlySet__.add("pipelineMode"); + return this; + } /** * The date and time the cluster pipeline was created. Format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). **/ @@ -366,6 +393,41 @@ public Builder timeUpdated(java.util.Date timeUpdated) { this.__explicitlySet__.add("timeUpdated"); return this; } + /** + * The customer IP and the corresponding fully qualified domain name that the pipeline will connect to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reverseConnectionEndpoints") + private java.util.List + reverseConnectionEndpoints; + + /** + * The customer IP and the corresponding fully qualified domain name that the pipeline will connect to. + * @param reverseConnectionEndpoints the value to set + * @return this builder + **/ + public Builder reverseConnectionEndpoints( + java.util.List + reverseConnectionEndpoints) { + this.reverseConnectionEndpoints = reverseConnectionEndpoints; + this.__explicitlySet__.add("reverseConnectionEndpoints"); + return this; + } + /** + * The OCID of the NSG where the pipeline private endpoint vnic will be attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgId") + private String nsgId; + + /** + * The OCID of the NSG where the pipeline 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; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -441,16 +503,19 @@ public OpensearchClusterPipeline build() { this.subnetId, this.vcnCompartmentId, this.subnetCompartmentId, - this.maxOcpuCount, - this.minOcpuCount, - this.maxMemoryGB, - this.minMemoryGB, + this.ocpuCount, + this.memoryGB, + this.nodeCount, this.pipelineConfigurationBody, + this.dataPrepperConfigurationBody, this.opensearchPipelineFqdn, this.opensearchPipelinePrivateIp, this.lifecycleState, + this.pipelineMode, this.timeCreated, this.timeUpdated, + this.reverseConnectionEndpoints, + this.nsgId, this.freeformTags, this.definedTags, this.systemTags); @@ -483,21 +548,21 @@ public Builder copy(OpensearchClusterPipeline model) { if (model.wasPropertyExplicitlySet("subnetCompartmentId")) { this.subnetCompartmentId(model.getSubnetCompartmentId()); } - if (model.wasPropertyExplicitlySet("maxOcpuCount")) { - this.maxOcpuCount(model.getMaxOcpuCount()); - } - if (model.wasPropertyExplicitlySet("minOcpuCount")) { - this.minOcpuCount(model.getMinOcpuCount()); + if (model.wasPropertyExplicitlySet("ocpuCount")) { + this.ocpuCount(model.getOcpuCount()); } - if (model.wasPropertyExplicitlySet("maxMemoryGB")) { - this.maxMemoryGB(model.getMaxMemoryGB()); + if (model.wasPropertyExplicitlySet("memoryGB")) { + this.memoryGB(model.getMemoryGB()); } - if (model.wasPropertyExplicitlySet("minMemoryGB")) { - this.minMemoryGB(model.getMinMemoryGB()); + if (model.wasPropertyExplicitlySet("nodeCount")) { + this.nodeCount(model.getNodeCount()); } if (model.wasPropertyExplicitlySet("pipelineConfigurationBody")) { this.pipelineConfigurationBody(model.getPipelineConfigurationBody()); } + if (model.wasPropertyExplicitlySet("dataPrepperConfigurationBody")) { + this.dataPrepperConfigurationBody(model.getDataPrepperConfigurationBody()); + } if (model.wasPropertyExplicitlySet("opensearchPipelineFqdn")) { this.opensearchPipelineFqdn(model.getOpensearchPipelineFqdn()); } @@ -507,12 +572,21 @@ public Builder copy(OpensearchClusterPipeline model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("pipelineMode")) { + this.pipelineMode(model.getPipelineMode()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } if (model.wasPropertyExplicitlySet("timeUpdated")) { this.timeUpdated(model.getTimeUpdated()); } + if (model.wasPropertyExplicitlySet("reverseConnectionEndpoints")) { + this.reverseConnectionEndpoints(model.getReverseConnectionEndpoints()); + } + if (model.wasPropertyExplicitlySet("nsgId")) { + this.nsgId(model.getNsgId()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -622,13 +696,13 @@ public String getVcnCompartmentId() { } /** - * The OCID for the compartment where the pipwline's subnet is located. + * The OCID for the compartment where the pipeline's subnet is located. **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetCompartmentId") private final String subnetCompartmentId; /** - * The OCID for the compartment where the pipwline's subnet is located. + * The OCID for the compartment where the pipeline's subnet is located. * @return the value **/ public String getSubnetCompartmentId() { @@ -636,75 +710,77 @@ public String getSubnetCompartmentId() { } /** - * The maximum pipeline capacity, in OCPUs. + * The number of OCPUs configured for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxOcpuCount") - private final Integer maxOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("ocpuCount") + private final Integer ocpuCount; /** - * The maximum pipeline capacity, in OCPUs. + * The number of OCPUs configured for each pipeline node. * @return the value **/ - public Integer getMaxOcpuCount() { - return maxOcpuCount; + public Integer getOcpuCount() { + return ocpuCount; } /** - * The maximum pipeline capacity, in OCPUs. + * The amount of memory in GB, for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("minOcpuCount") - private final Integer minOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("memoryGB") + private final Integer memoryGB; /** - * The maximum pipeline capacity, in OCPUs. + * The amount of memory in GB, for each pipeline node. * @return the value **/ - public Integer getMinOcpuCount() { - return minOcpuCount; + public Integer getMemoryGB() { + return memoryGB; } /** - * The maximum amount of memory in GB, for the pipeline. + * The number of nodes configured for the pipeline. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxMemoryGB") - private final Integer maxMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private final Integer nodeCount; /** - * The maximum amount of memory in GB, for the pipeline. + * The number of nodes configured for the pipeline. * @return the value **/ - public Integer getMaxMemoryGB() { - return maxMemoryGB; + public Integer getNodeCount() { + return nodeCount; } /** - * The minimum amount of memory in GB, for the pipeline. + * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * **/ - @com.fasterxml.jackson.annotation.JsonProperty("minMemoryGB") - private final Integer minMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("pipelineConfigurationBody") + private final String pipelineConfigurationBody; /** - * The minimum amount of memory in GB, for the pipeline. + * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * * @return the value **/ - public Integer getMinMemoryGB() { - return minMemoryGB; + public String getPipelineConfigurationBody() { + return pipelineConfigurationBody; } /** - * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. * **/ - @com.fasterxml.jackson.annotation.JsonProperty("pipelineConfigurationBody") - private final String pipelineConfigurationBody; + @com.fasterxml.jackson.annotation.JsonProperty("dataPrepperConfigurationBody") + private final String dataPrepperConfigurationBody; /** - * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. * * @return the value **/ - public String getPipelineConfigurationBody() { - return pipelineConfigurationBody; + public String getDataPrepperConfigurationBody() { + return dataPrepperConfigurationBody; } /** @@ -745,7 +821,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; @@ -753,7 +837,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); + } } } @@ -771,7 +857,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; } }; /** @@ -788,6 +877,68 @@ public LifecycleState getLifecycleState() { return lifecycleState; } + /** + * The current state of the pipeline. + **/ + public enum PipelineMode { + Running("RUNNING"), + Stopped("STOPPED"), + + /** + * 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(PipelineMode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PipelineMode v : PipelineMode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PipelineMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PipelineMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PipelineMode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the pipeline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pipelineMode") + private final PipelineMode pipelineMode; + + /** + * The current state of the pipeline. + * @return the value + **/ + public PipelineMode getPipelineMode() { + return pipelineMode; + } + /** * The date and time the cluster pipeline was created. Format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). **/ @@ -816,6 +967,36 @@ public java.util.Date getTimeUpdated() { return timeUpdated; } + /** + * The customer IP and the corresponding fully qualified domain name that the pipeline will connect to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reverseConnectionEndpoints") + private final java.util.List + reverseConnectionEndpoints; + + /** + * The customer IP and the corresponding fully qualified domain name that the pipeline will connect to. + * @return the value + **/ + public java.util.List + getReverseConnectionEndpoints() { + return reverseConnectionEndpoints; + } + + /** + * The OCID of the NSG where the pipeline private endpoint vnic will be attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgId") + private final String nsgId; + + /** + * The OCID of the NSG where the pipeline private endpoint vnic will be attached. + * @return the value + **/ + public String getNsgId() { + return nsgId; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -891,18 +1072,23 @@ public String toString(boolean includeByteArrayContents) { sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", vcnCompartmentId=").append(String.valueOf(this.vcnCompartmentId)); sb.append(", subnetCompartmentId=").append(String.valueOf(this.subnetCompartmentId)); - sb.append(", maxOcpuCount=").append(String.valueOf(this.maxOcpuCount)); - sb.append(", minOcpuCount=").append(String.valueOf(this.minOcpuCount)); - sb.append(", maxMemoryGB=").append(String.valueOf(this.maxMemoryGB)); - sb.append(", minMemoryGB=").append(String.valueOf(this.minMemoryGB)); + sb.append(", ocpuCount=").append(String.valueOf(this.ocpuCount)); + sb.append(", memoryGB=").append(String.valueOf(this.memoryGB)); + sb.append(", nodeCount=").append(String.valueOf(this.nodeCount)); sb.append(", pipelineConfigurationBody=") .append(String.valueOf(this.pipelineConfigurationBody)); + sb.append(", dataPrepperConfigurationBody=") + .append(String.valueOf(this.dataPrepperConfigurationBody)); sb.append(", opensearchPipelineFqdn=").append(String.valueOf(this.opensearchPipelineFqdn)); sb.append(", opensearchPipelinePrivateIp=") .append(String.valueOf(this.opensearchPipelinePrivateIp)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", pipelineMode=").append(String.valueOf(this.pipelineMode)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", reverseConnectionEndpoints=") + .append(String.valueOf(this.reverseConnectionEndpoints)); + sb.append(", nsgId=").append(String.valueOf(this.nsgId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -927,19 +1113,24 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.vcnCompartmentId, other.vcnCompartmentId) && java.util.Objects.equals(this.subnetCompartmentId, other.subnetCompartmentId) - && java.util.Objects.equals(this.maxOcpuCount, other.maxOcpuCount) - && java.util.Objects.equals(this.minOcpuCount, other.minOcpuCount) - && java.util.Objects.equals(this.maxMemoryGB, other.maxMemoryGB) - && java.util.Objects.equals(this.minMemoryGB, other.minMemoryGB) + && java.util.Objects.equals(this.ocpuCount, other.ocpuCount) + && java.util.Objects.equals(this.memoryGB, other.memoryGB) + && java.util.Objects.equals(this.nodeCount, other.nodeCount) && java.util.Objects.equals( this.pipelineConfigurationBody, other.pipelineConfigurationBody) + && java.util.Objects.equals( + this.dataPrepperConfigurationBody, other.dataPrepperConfigurationBody) && java.util.Objects.equals( this.opensearchPipelineFqdn, other.opensearchPipelineFqdn) && java.util.Objects.equals( this.opensearchPipelinePrivateIp, other.opensearchPipelinePrivateIp) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.pipelineMode, other.pipelineMode) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals( + this.reverseConnectionEndpoints, other.reverseConnectionEndpoints) + && java.util.Objects.equals(this.nsgId, other.nsgId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -965,15 +1156,19 @@ public int hashCode() { + (this.subnetCompartmentId == null ? 43 : this.subnetCompartmentId.hashCode()); - result = (result * PRIME) + (this.maxOcpuCount == null ? 43 : this.maxOcpuCount.hashCode()); - result = (result * PRIME) + (this.minOcpuCount == null ? 43 : this.minOcpuCount.hashCode()); - result = (result * PRIME) + (this.maxMemoryGB == null ? 43 : this.maxMemoryGB.hashCode()); - result = (result * PRIME) + (this.minMemoryGB == null ? 43 : this.minMemoryGB.hashCode()); + result = (result * PRIME) + (this.ocpuCount == null ? 43 : this.ocpuCount.hashCode()); + result = (result * PRIME) + (this.memoryGB == null ? 43 : this.memoryGB.hashCode()); + result = (result * PRIME) + (this.nodeCount == null ? 43 : this.nodeCount.hashCode()); result = (result * PRIME) + (this.pipelineConfigurationBody == null ? 43 : this.pipelineConfigurationBody.hashCode()); + result = + (result * PRIME) + + (this.dataPrepperConfigurationBody == null + ? 43 + : this.dataPrepperConfigurationBody.hashCode()); result = (result * PRIME) + (this.opensearchPipelineFqdn == null @@ -987,8 +1182,15 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.pipelineMode == null ? 43 : this.pipelineMode.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.reverseConnectionEndpoints == null + ? 43 + : this.reverseConnectionEndpoints.hashCode()); + result = (result * PRIME) + (this.nsgId == null ? 43 : this.nsgId.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()); diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchClusterPipelineCollection.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchClusterPipelineCollection.java index c502b7719c..b55396ca8e 100644 --- a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchClusterPipelineCollection.java +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchClusterPipelineCollection.java @@ -5,7 +5,7 @@ package com.oracle.bmc.opensearch.model; /** - * The list of cluster pieplines returned in a cluster pipeline search. + * The list of cluster pipelines returned in a cluster pipeline search. *
* 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 diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchClusterPipelineSummary.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchClusterPipelineSummary.java index d4bc17e773..ad3401b8ac 100644 --- a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchClusterPipelineSummary.java +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchClusterPipelineSummary.java @@ -26,14 +26,17 @@ public final class OpensearchClusterPipelineSummary "id", "displayName", "compartmentId", - "maxOcpuCount", - "minOcpuCount", - "maxMemoryGB", - "minMemoryGB", + "vcnId", + "subnetId", + "ocpuCount", + "memoryGB", + "nodeCount", "pipelineConfigurationBody", + "dataPrepperConfigurationBody", + "lifecycleState", + "pipelineMode", "timeCreated", "timeUpdated", - "lifecycleState", "freeformTags", "definedTags", "systemTags" @@ -42,14 +45,17 @@ public OpensearchClusterPipelineSummary( String id, String displayName, String compartmentId, - Integer maxOcpuCount, - Integer minOcpuCount, - Integer maxMemoryGB, - Integer minMemoryGB, + String vcnId, + String subnetId, + Integer ocpuCount, + Integer memoryGB, + Integer nodeCount, String pipelineConfigurationBody, + String dataPrepperConfigurationBody, + OpensearchClusterPipeline.LifecycleState lifecycleState, + OpensearchClusterPipeline.PipelineMode pipelineMode, java.util.Date timeCreated, java.util.Date timeUpdated, - OpensearchClusterPipeline.LifecycleState lifecycleState, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -57,14 +63,17 @@ public OpensearchClusterPipelineSummary( this.id = id; this.displayName = displayName; this.compartmentId = compartmentId; - this.maxOcpuCount = maxOcpuCount; - this.minOcpuCount = minOcpuCount; - this.maxMemoryGB = maxMemoryGB; - this.minMemoryGB = minMemoryGB; + this.vcnId = vcnId; + this.subnetId = subnetId; + this.ocpuCount = ocpuCount; + this.memoryGB = memoryGB; + this.nodeCount = nodeCount; this.pipelineConfigurationBody = pipelineConfigurationBody; + this.dataPrepperConfigurationBody = dataPrepperConfigurationBody; + this.lifecycleState = lifecycleState; + this.pipelineMode = pipelineMode; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; - this.lifecycleState = lifecycleState; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -121,67 +130,83 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * The maximum pipeline capacity, in OCPUs. + * The OCID of the pipeline's VCN. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxOcpuCount") - private Integer maxOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private String vcnId; /** - * The maximum pipeline capacity, in OCPUs. - * @param maxOcpuCount the value to set + * The OCID of the pipeline's VCN. + * @param vcnId the value to set * @return this builder **/ - public Builder maxOcpuCount(Integer maxOcpuCount) { - this.maxOcpuCount = maxOcpuCount; - this.__explicitlySet__.add("maxOcpuCount"); + public Builder vcnId(String vcnId) { + this.vcnId = vcnId; + this.__explicitlySet__.add("vcnId"); return this; } /** - * The maximum pipeline capacity, in OCPUs. + * The OCID of the pipeline's subnet. **/ - @com.fasterxml.jackson.annotation.JsonProperty("minOcpuCount") - private Integer minOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; /** - * The maximum pipeline capacity, in OCPUs. - * @param minOcpuCount the value to set + * The OCID of the pipeline's subnet. + * @param subnetId the value to set * @return this builder **/ - public Builder minOcpuCount(Integer minOcpuCount) { - this.minOcpuCount = minOcpuCount; - this.__explicitlySet__.add("minOcpuCount"); + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); return this; } /** - * The maximum amount of memory in GB, for the pipeline. + * The number of OCPUs configured for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxMemoryGB") - private Integer maxMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("ocpuCount") + private Integer ocpuCount; /** - * The maximum amount of memory in GB, for the pipeline. - * @param maxMemoryGB the value to set + * The number of OCPUs configured for each pipeline node. + * @param ocpuCount the value to set * @return this builder **/ - public Builder maxMemoryGB(Integer maxMemoryGB) { - this.maxMemoryGB = maxMemoryGB; - this.__explicitlySet__.add("maxMemoryGB"); + public Builder ocpuCount(Integer ocpuCount) { + this.ocpuCount = ocpuCount; + this.__explicitlySet__.add("ocpuCount"); return this; } /** - * The minimum amount of memory in GB, for the pipeline. + * The amount of memory in GB, for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("minMemoryGB") - private Integer minMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("memoryGB") + private Integer memoryGB; /** - * The minimum amount of memory in GB, for the pipeline. - * @param minMemoryGB the value to set + * The amount of memory in GB, for each pipeline node. + * @param memoryGB the value to set * @return this builder **/ - public Builder minMemoryGB(Integer minMemoryGB) { - this.minMemoryGB = minMemoryGB; - this.__explicitlySet__.add("minMemoryGB"); + public Builder memoryGB(Integer memoryGB) { + this.memoryGB = memoryGB; + this.__explicitlySet__.add("memoryGB"); + return this; + } + /** + * The number of nodes configured for the pipeline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private Integer nodeCount; + + /** + * The number of nodes configured for the pipeline. + * @param nodeCount the value to set + * @return this builder + **/ + public Builder nodeCount(Integer nodeCount) { + this.nodeCount = nodeCount; + this.__explicitlySet__.add("nodeCount"); return this; } /** @@ -202,6 +227,56 @@ public Builder pipelineConfigurationBody(String pipelineConfigurationBody) { this.__explicitlySet__.add("pipelineConfigurationBody"); return this; } + /** + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataPrepperConfigurationBody") + private String dataPrepperConfigurationBody; + + /** + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * + * @param dataPrepperConfigurationBody the value to set + * @return this builder + **/ + public Builder dataPrepperConfigurationBody(String dataPrepperConfigurationBody) { + this.dataPrepperConfigurationBody = dataPrepperConfigurationBody; + this.__explicitlySet__.add("dataPrepperConfigurationBody"); + return this; + } + /** + * The current state of the cluster pipeline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private OpensearchClusterPipeline.LifecycleState lifecycleState; + + /** + * The current state of the cluster pipeline. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(OpensearchClusterPipeline.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The current state of the pipeline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pipelineMode") + private OpensearchClusterPipeline.PipelineMode pipelineMode; + + /** + * The current state of the pipeline. + * @param pipelineMode the value to set + * @return this builder + **/ + public Builder pipelineMode(OpensearchClusterPipeline.PipelineMode pipelineMode) { + this.pipelineMode = pipelineMode; + this.__explicitlySet__.add("pipelineMode"); + return this; + } /** * The date and time the cluster pipeline was created. Format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). **/ @@ -234,22 +309,6 @@ public Builder timeUpdated(java.util.Date timeUpdated) { this.__explicitlySet__.add("timeUpdated"); return this; } - /** - * The current state of the cluster backup. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") - private OpensearchClusterPipeline.LifecycleState lifecycleState; - - /** - * The current state of the cluster backup. - * @param lifecycleState the value to set - * @return this builder - **/ - public Builder lifecycleState(OpensearchClusterPipeline.LifecycleState lifecycleState) { - this.lifecycleState = lifecycleState; - this.__explicitlySet__.add("lifecycleState"); - 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"}} @@ -321,14 +380,17 @@ public OpensearchClusterPipelineSummary build() { this.id, this.displayName, this.compartmentId, - this.maxOcpuCount, - this.minOcpuCount, - this.maxMemoryGB, - this.minMemoryGB, + this.vcnId, + this.subnetId, + this.ocpuCount, + this.memoryGB, + this.nodeCount, this.pipelineConfigurationBody, + this.dataPrepperConfigurationBody, + this.lifecycleState, + this.pipelineMode, this.timeCreated, this.timeUpdated, - this.lifecycleState, this.freeformTags, this.definedTags, this.systemTags); @@ -349,30 +411,39 @@ public Builder copy(OpensearchClusterPipelineSummary model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } - if (model.wasPropertyExplicitlySet("maxOcpuCount")) { - this.maxOcpuCount(model.getMaxOcpuCount()); + if (model.wasPropertyExplicitlySet("vcnId")) { + this.vcnId(model.getVcnId()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); } - if (model.wasPropertyExplicitlySet("minOcpuCount")) { - this.minOcpuCount(model.getMinOcpuCount()); + if (model.wasPropertyExplicitlySet("ocpuCount")) { + this.ocpuCount(model.getOcpuCount()); } - if (model.wasPropertyExplicitlySet("maxMemoryGB")) { - this.maxMemoryGB(model.getMaxMemoryGB()); + if (model.wasPropertyExplicitlySet("memoryGB")) { + this.memoryGB(model.getMemoryGB()); } - if (model.wasPropertyExplicitlySet("minMemoryGB")) { - this.minMemoryGB(model.getMinMemoryGB()); + if (model.wasPropertyExplicitlySet("nodeCount")) { + this.nodeCount(model.getNodeCount()); } if (model.wasPropertyExplicitlySet("pipelineConfigurationBody")) { this.pipelineConfigurationBody(model.getPipelineConfigurationBody()); } + if (model.wasPropertyExplicitlySet("dataPrepperConfigurationBody")) { + this.dataPrepperConfigurationBody(model.getDataPrepperConfigurationBody()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("pipelineMode")) { + this.pipelineMode(model.getPipelineMode()); + } 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("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -440,59 +511,73 @@ public String getCompartmentId() { } /** - * The maximum pipeline capacity, in OCPUs. + * The OCID of the pipeline's VCN. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxOcpuCount") - private final Integer maxOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private final String vcnId; /** - * The maximum pipeline capacity, in OCPUs. + * The OCID of the pipeline's VCN. * @return the value **/ - public Integer getMaxOcpuCount() { - return maxOcpuCount; + public String getVcnId() { + return vcnId; } /** - * The maximum pipeline capacity, in OCPUs. + * The OCID of the pipeline's subnet. **/ - @com.fasterxml.jackson.annotation.JsonProperty("minOcpuCount") - private final Integer minOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; /** - * The maximum pipeline capacity, in OCPUs. + * The OCID of the pipeline's subnet. * @return the value **/ - public Integer getMinOcpuCount() { - return minOcpuCount; + public String getSubnetId() { + return subnetId; } /** - * The maximum amount of memory in GB, for the pipeline. + * The number of OCPUs configured for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxMemoryGB") - private final Integer maxMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("ocpuCount") + private final Integer ocpuCount; /** - * The maximum amount of memory in GB, for the pipeline. + * The number of OCPUs configured for each pipeline node. * @return the value **/ - public Integer getMaxMemoryGB() { - return maxMemoryGB; + public Integer getOcpuCount() { + return ocpuCount; } /** - * The minimum amount of memory in GB, for the pipeline. + * The amount of memory in GB, for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("minMemoryGB") - private final Integer minMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("memoryGB") + private final Integer memoryGB; /** - * The minimum amount of memory in GB, for the pipeline. + * The amount of memory in GB, for each pipeline node. * @return the value **/ - public Integer getMinMemoryGB() { - return minMemoryGB; + public Integer getMemoryGB() { + return memoryGB; + } + + /** + * The number of nodes configured for the pipeline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private final Integer nodeCount; + + /** + * The number of nodes configured for the pipeline. + * @return the value + **/ + public Integer getNodeCount() { + return nodeCount; } /** @@ -511,6 +596,50 @@ public String getPipelineConfigurationBody() { return pipelineConfigurationBody; } + /** + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataPrepperConfigurationBody") + private final String dataPrepperConfigurationBody; + + /** + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * + * @return the value + **/ + public String getDataPrepperConfigurationBody() { + return dataPrepperConfigurationBody; + } + + /** + * The current state of the cluster pipeline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final OpensearchClusterPipeline.LifecycleState lifecycleState; + + /** + * The current state of the cluster pipeline. + * @return the value + **/ + public OpensearchClusterPipeline.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The current state of the pipeline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pipelineMode") + private final OpensearchClusterPipeline.PipelineMode pipelineMode; + + /** + * The current state of the pipeline. + * @return the value + **/ + public OpensearchClusterPipeline.PipelineMode getPipelineMode() { + return pipelineMode; + } + /** * The date and time the cluster pipeline was created. Format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). **/ @@ -539,20 +668,6 @@ public java.util.Date getTimeUpdated() { return timeUpdated; } - /** - * The current state of the cluster backup. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") - private final OpensearchClusterPipeline.LifecycleState lifecycleState; - - /** - * The current state of the cluster backup. - * @return the value - **/ - public OpensearchClusterPipeline.LifecycleState getLifecycleState() { - return lifecycleState; - } - /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -624,15 +739,19 @@ public String toString(boolean includeByteArrayContents) { 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(", maxOcpuCount=").append(String.valueOf(this.maxOcpuCount)); - sb.append(", minOcpuCount=").append(String.valueOf(this.minOcpuCount)); - sb.append(", maxMemoryGB=").append(String.valueOf(this.maxMemoryGB)); - sb.append(", minMemoryGB=").append(String.valueOf(this.minMemoryGB)); + sb.append(", vcnId=").append(String.valueOf(this.vcnId)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", ocpuCount=").append(String.valueOf(this.ocpuCount)); + sb.append(", memoryGB=").append(String.valueOf(this.memoryGB)); + sb.append(", nodeCount=").append(String.valueOf(this.nodeCount)); sb.append(", pipelineConfigurationBody=") .append(String.valueOf(this.pipelineConfigurationBody)); + sb.append(", dataPrepperConfigurationBody=") + .append(String.valueOf(this.dataPrepperConfigurationBody)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", pipelineMode=").append(String.valueOf(this.pipelineMode)); 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(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -653,15 +772,19 @@ public boolean equals(Object 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.maxOcpuCount, other.maxOcpuCount) - && java.util.Objects.equals(this.minOcpuCount, other.minOcpuCount) - && java.util.Objects.equals(this.maxMemoryGB, other.maxMemoryGB) - && java.util.Objects.equals(this.minMemoryGB, other.minMemoryGB) + && java.util.Objects.equals(this.vcnId, other.vcnId) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.ocpuCount, other.ocpuCount) + && java.util.Objects.equals(this.memoryGB, other.memoryGB) + && java.util.Objects.equals(this.nodeCount, other.nodeCount) && java.util.Objects.equals( this.pipelineConfigurationBody, other.pipelineConfigurationBody) + && java.util.Objects.equals( + this.dataPrepperConfigurationBody, other.dataPrepperConfigurationBody) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.pipelineMode, other.pipelineMode) && 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.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -677,20 +800,27 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); - result = (result * PRIME) + (this.maxOcpuCount == null ? 43 : this.maxOcpuCount.hashCode()); - result = (result * PRIME) + (this.minOcpuCount == null ? 43 : this.minOcpuCount.hashCode()); - result = (result * PRIME) + (this.maxMemoryGB == null ? 43 : this.maxMemoryGB.hashCode()); - result = (result * PRIME) + (this.minMemoryGB == null ? 43 : this.minMemoryGB.hashCode()); + result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = (result * PRIME) + (this.ocpuCount == null ? 43 : this.ocpuCount.hashCode()); + result = (result * PRIME) + (this.memoryGB == null ? 43 : this.memoryGB.hashCode()); + result = (result * PRIME) + (this.nodeCount == null ? 43 : this.nodeCount.hashCode()); result = (result * PRIME) + (this.pipelineConfigurationBody == null ? 43 : this.pipelineConfigurationBody.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.dataPrepperConfigurationBody == null + ? 43 + : this.dataPrepperConfigurationBody.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.pipelineMode == null ? 43 : this.pipelineMode.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.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()); diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchPipelineReverseConnectionEndpoint.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchPipelineReverseConnectionEndpoint.java new file mode 100644 index 0000000000..fe92867cda --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchPipelineReverseConnectionEndpoint.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.model; + +/** + * The customer IP and the corresponding fully qualified domain name that the pipeline will connect to. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__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: 20180828") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OpensearchPipelineReverseConnectionEndpoint.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OpensearchPipelineReverseConnectionEndpoint + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"customerFqdn", "customerIp"}) + public OpensearchPipelineReverseConnectionEndpoint(String customerFqdn, String customerIp) { + super(); + this.customerFqdn = customerFqdn; + this.customerIp = customerIp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The fully qualified domain name of the customerIp in the customer VCN + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerFqdn") + private String customerFqdn; + + /** + * The fully qualified domain name of the customerIp in the customer VCN + * @param customerFqdn the value to set + * @return this builder + **/ + public Builder customerFqdn(String customerFqdn) { + this.customerFqdn = customerFqdn; + this.__explicitlySet__.add("customerFqdn"); + return this; + } + /** + * The IPv4 address in the customer VCN + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerIp") + private String customerIp; + + /** + * The IPv4 address in the customer VCN + * @param customerIp the value to set + * @return this builder + **/ + public Builder customerIp(String customerIp) { + this.customerIp = customerIp; + this.__explicitlySet__.add("customerIp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OpensearchPipelineReverseConnectionEndpoint build() { + OpensearchPipelineReverseConnectionEndpoint model = + new OpensearchPipelineReverseConnectionEndpoint( + this.customerFqdn, this.customerIp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OpensearchPipelineReverseConnectionEndpoint model) { + if (model.wasPropertyExplicitlySet("customerFqdn")) { + this.customerFqdn(model.getCustomerFqdn()); + } + if (model.wasPropertyExplicitlySet("customerIp")) { + this.customerIp(model.getCustomerIp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The fully qualified domain name of the customerIp in the customer VCN + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerFqdn") + private final String customerFqdn; + + /** + * The fully qualified domain name of the customerIp in the customer VCN + * @return the value + **/ + public String getCustomerFqdn() { + return customerFqdn; + } + + /** + * The IPv4 address in the customer VCN + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerIp") + private final String customerIp; + + /** + * The IPv4 address in the customer VCN + * @return the value + **/ + public String getCustomerIp() { + return customerIp; + } + + @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("OpensearchPipelineReverseConnectionEndpoint("); + sb.append("super=").append(super.toString()); + sb.append("customerFqdn=").append(String.valueOf(this.customerFqdn)); + sb.append(", customerIp=").append(String.valueOf(this.customerIp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OpensearchPipelineReverseConnectionEndpoint)) { + return false; + } + + OpensearchPipelineReverseConnectionEndpoint other = + (OpensearchPipelineReverseConnectionEndpoint) o; + return java.util.Objects.equals(this.customerFqdn, other.customerFqdn) + && java.util.Objects.equals(this.customerIp, other.customerIp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.customerFqdn == null ? 43 : this.customerFqdn.hashCode()); + result = (result * PRIME) + (this.customerIp == null ? 43 : this.customerIp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/UpdateOpensearchClusterPipelineDetails.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/UpdateOpensearchClusterPipelineDetails.java index 55a356512e..126dbd9f40 100644 --- a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/UpdateOpensearchClusterPipelineDetails.java +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/UpdateOpensearchClusterPipelineDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.opensearch.model; /** - * The configuration to update on an existing OpenSearch cluster pipeline. You can only edit capaccity limits and pipeline configuration. You can't edit its name or network settings. + * The configuration to update on an existing OpenSearch cluster pipeline. You can only edit capacity limits and pipeline configurations. You can't edit its network settings. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -25,26 +25,50 @@ public final class UpdateOpensearchClusterPipelineDetails @Deprecated @java.beans.ConstructorProperties({ "displayName", - "maxOcpuCount", - "minOcpuCount", - "maxMemoryGB", - "minMemoryGB", - "pipelineConfigurationBody" + "ocpuCount", + "memoryGB", + "nodeCount", + "pipelineConfigurationBody", + "dataPrepperConfigurationBody", + "vcnId", + "subnetId", + "vcnCompartmentId", + "subnetCompartmentId", + "nsgId", + "reverseConnectionEndpoints", + "freeformTags", + "definedTags" }) public UpdateOpensearchClusterPipelineDetails( String displayName, - Integer maxOcpuCount, - Integer minOcpuCount, - Integer maxMemoryGB, - Integer minMemoryGB, - String pipelineConfigurationBody) { + Integer ocpuCount, + Integer memoryGB, + Integer nodeCount, + String pipelineConfigurationBody, + String dataPrepperConfigurationBody, + String vcnId, + String subnetId, + String vcnCompartmentId, + String subnetCompartmentId, + String nsgId, + java.util.List reverseConnectionEndpoints, + java.util.Map freeformTags, + java.util.Map> definedTags) { super(); this.displayName = displayName; - this.maxOcpuCount = maxOcpuCount; - this.minOcpuCount = minOcpuCount; - this.maxMemoryGB = maxMemoryGB; - this.minMemoryGB = minMemoryGB; + this.ocpuCount = ocpuCount; + this.memoryGB = memoryGB; + this.nodeCount = nodeCount; this.pipelineConfigurationBody = pipelineConfigurationBody; + this.dataPrepperConfigurationBody = dataPrepperConfigurationBody; + this.vcnId = vcnId; + this.subnetId = subnetId; + this.vcnCompartmentId = vcnCompartmentId; + this.subnetCompartmentId = subnetCompartmentId; + this.nsgId = nsgId; + this.reverseConnectionEndpoints = reverseConnectionEndpoints; + this.freeformTags = freeformTags; + this.definedTags = definedTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -66,67 +90,51 @@ public Builder displayName(String displayName) { return this; } /** - * The maximum pipeline capacity, in OCPUs. + * The number of OCPUs configured for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxOcpuCount") - private Integer maxOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("ocpuCount") + private Integer ocpuCount; /** - * The maximum pipeline capacity, in OCPUs. - * @param maxOcpuCount the value to set + * The number of OCPUs configured for each pipeline node. + * @param ocpuCount the value to set * @return this builder **/ - public Builder maxOcpuCount(Integer maxOcpuCount) { - this.maxOcpuCount = maxOcpuCount; - this.__explicitlySet__.add("maxOcpuCount"); + public Builder ocpuCount(Integer ocpuCount) { + this.ocpuCount = ocpuCount; + this.__explicitlySet__.add("ocpuCount"); return this; } /** - * The minimum pipeline capacity, in OCPUs. + * The amount of memory in GB, for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("minOcpuCount") - private Integer minOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("memoryGB") + private Integer memoryGB; /** - * The minimum pipeline capacity, in OCPUs. - * @param minOcpuCount the value to set + * The amount of memory in GB, for each pipeline node. + * @param memoryGB the value to set * @return this builder **/ - public Builder minOcpuCount(Integer minOcpuCount) { - this.minOcpuCount = minOcpuCount; - this.__explicitlySet__.add("minOcpuCount"); + public Builder memoryGB(Integer memoryGB) { + this.memoryGB = memoryGB; + this.__explicitlySet__.add("memoryGB"); return this; } /** - * The maximum amount of memory in GB, for the pipeline. + * The number of nodes configured for the pipeline. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxMemoryGB") - private Integer maxMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private Integer nodeCount; /** - * The maximum amount of memory in GB, for the pipeline. - * @param maxMemoryGB the value to set + * The number of nodes configured for the pipeline. + * @param nodeCount the value to set * @return this builder **/ - public Builder maxMemoryGB(Integer maxMemoryGB) { - this.maxMemoryGB = maxMemoryGB; - this.__explicitlySet__.add("maxMemoryGB"); - return this; - } - /** - * The minimum amount of memory in GB, for the pipeline. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("minMemoryGB") - private Integer minMemoryGB; - - /** - * The minimum amount of memory in GB, for the pipeline. - * @param minMemoryGB the value to set - * @return this builder - **/ - public Builder minMemoryGB(Integer minMemoryGB) { - this.minMemoryGB = minMemoryGB; - this.__explicitlySet__.add("minMemoryGB"); + public Builder nodeCount(Integer nodeCount) { + this.nodeCount = nodeCount; + this.__explicitlySet__.add("nodeCount"); return this; } /** @@ -147,6 +155,164 @@ public Builder pipelineConfigurationBody(String pipelineConfigurationBody) { this.__explicitlySet__.add("pipelineConfigurationBody"); return this; } + /** + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataPrepperConfigurationBody") + private String dataPrepperConfigurationBody; + + /** + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * + * @param dataPrepperConfigurationBody the value to set + * @return this builder + **/ + public Builder dataPrepperConfigurationBody(String dataPrepperConfigurationBody) { + this.dataPrepperConfigurationBody = dataPrepperConfigurationBody; + this.__explicitlySet__.add("dataPrepperConfigurationBody"); + return this; + } + /** + * The OCID of the pipeline's VCN. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private String vcnId; + + /** + * The OCID of the pipeline's VCN. + * @param vcnId the value to set + * @return this builder + **/ + public Builder vcnId(String vcnId) { + this.vcnId = vcnId; + this.__explicitlySet__.add("vcnId"); + return this; + } + /** + * The OCID of the pipeline's subnet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The OCID of the pipeline's subnet. + * @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 for the compartment where the pipeline's VCN is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnCompartmentId") + private String vcnCompartmentId; + + /** + * The OCID for the compartment where the pipeline's VCN is located. + * @param vcnCompartmentId the value to set + * @return this builder + **/ + public Builder vcnCompartmentId(String vcnCompartmentId) { + this.vcnCompartmentId = vcnCompartmentId; + this.__explicitlySet__.add("vcnCompartmentId"); + return this; + } + /** + * The OCID for the compartment where the pipeline's subnet is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetCompartmentId") + private String subnetCompartmentId; + + /** + * The OCID for the compartment where the pipeline's subnet is located. + * @param subnetCompartmentId the value to set + * @return this builder + **/ + public Builder subnetCompartmentId(String subnetCompartmentId) { + this.subnetCompartmentId = subnetCompartmentId; + this.__explicitlySet__.add("subnetCompartmentId"); + return this; + } + /** + * The OCID of the NSG where the pipeline private endpoint vnic will be attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgId") + private String nsgId; + + /** + * The OCID of the NSG where the pipeline 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 and the corresponding fully qualified domain name that the pipeline will connect to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reverseConnectionEndpoints") + private java.util.List + reverseConnectionEndpoints; + + /** + * The customer IP and the corresponding fully qualified domain name that the pipeline will connect to. + * @param reverseConnectionEndpoints the value to set + * @return this builder + **/ + public Builder reverseConnectionEndpoints( + java.util.List + reverseConnectionEndpoints) { + this.reverseConnectionEndpoints = reverseConnectionEndpoints; + this.__explicitlySet__.add("reverseConnectionEndpoints"); + 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(); @@ -155,11 +321,19 @@ public UpdateOpensearchClusterPipelineDetails build() { UpdateOpensearchClusterPipelineDetails model = new UpdateOpensearchClusterPipelineDetails( this.displayName, - this.maxOcpuCount, - this.minOcpuCount, - this.maxMemoryGB, - this.minMemoryGB, - this.pipelineConfigurationBody); + this.ocpuCount, + this.memoryGB, + this.nodeCount, + this.pipelineConfigurationBody, + this.dataPrepperConfigurationBody, + this.vcnId, + this.subnetId, + this.vcnCompartmentId, + this.subnetCompartmentId, + this.nsgId, + this.reverseConnectionEndpoints, + this.freeformTags, + this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -171,21 +345,45 @@ public Builder copy(UpdateOpensearchClusterPipelineDetails model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } - if (model.wasPropertyExplicitlySet("maxOcpuCount")) { - this.maxOcpuCount(model.getMaxOcpuCount()); - } - if (model.wasPropertyExplicitlySet("minOcpuCount")) { - this.minOcpuCount(model.getMinOcpuCount()); + if (model.wasPropertyExplicitlySet("ocpuCount")) { + this.ocpuCount(model.getOcpuCount()); } - if (model.wasPropertyExplicitlySet("maxMemoryGB")) { - this.maxMemoryGB(model.getMaxMemoryGB()); + if (model.wasPropertyExplicitlySet("memoryGB")) { + this.memoryGB(model.getMemoryGB()); } - if (model.wasPropertyExplicitlySet("minMemoryGB")) { - this.minMemoryGB(model.getMinMemoryGB()); + if (model.wasPropertyExplicitlySet("nodeCount")) { + this.nodeCount(model.getNodeCount()); } if (model.wasPropertyExplicitlySet("pipelineConfigurationBody")) { this.pipelineConfigurationBody(model.getPipelineConfigurationBody()); } + if (model.wasPropertyExplicitlySet("dataPrepperConfigurationBody")) { + this.dataPrepperConfigurationBody(model.getDataPrepperConfigurationBody()); + } + if (model.wasPropertyExplicitlySet("vcnId")) { + this.vcnId(model.getVcnId()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("vcnCompartmentId")) { + this.vcnCompartmentId(model.getVcnCompartmentId()); + } + if (model.wasPropertyExplicitlySet("subnetCompartmentId")) { + this.subnetCompartmentId(model.getSubnetCompartmentId()); + } + if (model.wasPropertyExplicitlySet("nsgId")) { + this.nsgId(model.getNsgId()); + } + if (model.wasPropertyExplicitlySet("reverseConnectionEndpoints")) { + this.reverseConnectionEndpoints(model.getReverseConnectionEndpoints()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } return this; } } @@ -216,75 +414,199 @@ public String getDisplayName() { } /** - * The maximum pipeline capacity, in OCPUs. + * The number of OCPUs configured for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxOcpuCount") - private final Integer maxOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("ocpuCount") + private final Integer ocpuCount; /** - * The maximum pipeline capacity, in OCPUs. + * The number of OCPUs configured for each pipeline node. * @return the value **/ - public Integer getMaxOcpuCount() { - return maxOcpuCount; + public Integer getOcpuCount() { + return ocpuCount; } /** - * The minimum pipeline capacity, in OCPUs. + * The amount of memory in GB, for each pipeline node. **/ - @com.fasterxml.jackson.annotation.JsonProperty("minOcpuCount") - private final Integer minOcpuCount; + @com.fasterxml.jackson.annotation.JsonProperty("memoryGB") + private final Integer memoryGB; /** - * The minimum pipeline capacity, in OCPUs. + * The amount of memory in GB, for each pipeline node. * @return the value **/ - public Integer getMinOcpuCount() { - return minOcpuCount; + public Integer getMemoryGB() { + return memoryGB; } /** - * The maximum amount of memory in GB, for the pipeline. + * The number of nodes configured for the pipeline. **/ - @com.fasterxml.jackson.annotation.JsonProperty("maxMemoryGB") - private final Integer maxMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private final Integer nodeCount; /** - * The maximum amount of memory in GB, for the pipeline. + * The number of nodes configured for the pipeline. * @return the value **/ - public Integer getMaxMemoryGB() { - return maxMemoryGB; + public Integer getNodeCount() { + return nodeCount; } /** - * The minimum amount of memory in GB, for the pipeline. + * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * **/ - @com.fasterxml.jackson.annotation.JsonProperty("minMemoryGB") - private final Integer minMemoryGB; + @com.fasterxml.jackson.annotation.JsonProperty("pipelineConfigurationBody") + private final String pipelineConfigurationBody; /** - * The minimum amount of memory in GB, for the pipeline. + * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * * @return the value **/ - public Integer getMinMemoryGB() { - return minMemoryGB; + public String getPipelineConfigurationBody() { + return pipelineConfigurationBody; } /** - * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. * **/ - @com.fasterxml.jackson.annotation.JsonProperty("pipelineConfigurationBody") - private final String pipelineConfigurationBody; + @com.fasterxml.jackson.annotation.JsonProperty("dataPrepperConfigurationBody") + private final String dataPrepperConfigurationBody; /** - * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. + * The data prepper config in YAML format. The command accepts the data prepper config as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. * * @return the value **/ - public String getPipelineConfigurationBody() { - return pipelineConfigurationBody; + public String getDataPrepperConfigurationBody() { + return dataPrepperConfigurationBody; + } + + /** + * The OCID of the pipeline's VCN. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private final String vcnId; + + /** + * The OCID of the pipeline's VCN. + * @return the value + **/ + public String getVcnId() { + return vcnId; + } + + /** + * The OCID of the pipeline's subnet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The OCID of the pipeline's subnet. + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * The OCID for the compartment where the pipeline's VCN is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnCompartmentId") + private final String vcnCompartmentId; + + /** + * The OCID for the compartment where the pipeline's VCN is located. + * @return the value + **/ + public String getVcnCompartmentId() { + return vcnCompartmentId; + } + + /** + * The OCID for the compartment where the pipeline's subnet is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetCompartmentId") + private final String subnetCompartmentId; + + /** + * The OCID for the compartment where the pipeline's subnet is located. + * @return the value + **/ + public String getSubnetCompartmentId() { + return subnetCompartmentId; + } + + /** + * The OCID of the NSG where the pipeline private endpoint vnic will be attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgId") + private final String nsgId; + + /** + * The OCID of the NSG where the pipeline private endpoint vnic will be attached. + * @return the value + **/ + public String getNsgId() { + return nsgId; + } + + /** + * The customer IP and the corresponding fully qualified domain name that the pipeline will connect to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reverseConnectionEndpoints") + private final java.util.List + reverseConnectionEndpoints; + + /** + * The customer IP and the corresponding fully qualified domain name that the pipeline will connect to. + * @return the value + **/ + public java.util.List + getReverseConnectionEndpoints() { + return reverseConnectionEndpoints; + } + + /** + * 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 @@ -302,12 +624,22 @@ public String toString(boolean includeByteArrayContents) { sb.append("UpdateOpensearchClusterPipelineDetails("); sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); - sb.append(", maxOcpuCount=").append(String.valueOf(this.maxOcpuCount)); - sb.append(", minOcpuCount=").append(String.valueOf(this.minOcpuCount)); - sb.append(", maxMemoryGB=").append(String.valueOf(this.maxMemoryGB)); - sb.append(", minMemoryGB=").append(String.valueOf(this.minMemoryGB)); + sb.append(", ocpuCount=").append(String.valueOf(this.ocpuCount)); + sb.append(", memoryGB=").append(String.valueOf(this.memoryGB)); + sb.append(", nodeCount=").append(String.valueOf(this.nodeCount)); sb.append(", pipelineConfigurationBody=") .append(String.valueOf(this.pipelineConfigurationBody)); + sb.append(", dataPrepperConfigurationBody=") + .append(String.valueOf(this.dataPrepperConfigurationBody)); + sb.append(", vcnId=").append(String.valueOf(this.vcnId)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", vcnCompartmentId=").append(String.valueOf(this.vcnCompartmentId)); + sb.append(", subnetCompartmentId=").append(String.valueOf(this.subnetCompartmentId)); + sb.append(", nsgId=").append(String.valueOf(this.nsgId)); + sb.append(", reverseConnectionEndpoints=") + .append(String.valueOf(this.reverseConnectionEndpoints)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); return sb.toString(); } @@ -323,12 +655,22 @@ public boolean equals(Object o) { UpdateOpensearchClusterPipelineDetails other = (UpdateOpensearchClusterPipelineDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) - && java.util.Objects.equals(this.maxOcpuCount, other.maxOcpuCount) - && java.util.Objects.equals(this.minOcpuCount, other.minOcpuCount) - && java.util.Objects.equals(this.maxMemoryGB, other.maxMemoryGB) - && java.util.Objects.equals(this.minMemoryGB, other.minMemoryGB) + && java.util.Objects.equals(this.ocpuCount, other.ocpuCount) + && java.util.Objects.equals(this.memoryGB, other.memoryGB) + && java.util.Objects.equals(this.nodeCount, other.nodeCount) && java.util.Objects.equals( this.pipelineConfigurationBody, other.pipelineConfigurationBody) + && java.util.Objects.equals( + this.dataPrepperConfigurationBody, other.dataPrepperConfigurationBody) + && java.util.Objects.equals(this.vcnId, other.vcnId) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.vcnCompartmentId, other.vcnCompartmentId) + && java.util.Objects.equals(this.subnetCompartmentId, other.subnetCompartmentId) + && java.util.Objects.equals(this.nsgId, other.nsgId) + && java.util.Objects.equals( + this.reverseConnectionEndpoints, other.reverseConnectionEndpoints) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); } @@ -337,15 +679,37 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); - result = (result * PRIME) + (this.maxOcpuCount == null ? 43 : this.maxOcpuCount.hashCode()); - result = (result * PRIME) + (this.minOcpuCount == null ? 43 : this.minOcpuCount.hashCode()); - result = (result * PRIME) + (this.maxMemoryGB == null ? 43 : this.maxMemoryGB.hashCode()); - result = (result * PRIME) + (this.minMemoryGB == null ? 43 : this.minMemoryGB.hashCode()); + result = (result * PRIME) + (this.ocpuCount == null ? 43 : this.ocpuCount.hashCode()); + result = (result * PRIME) + (this.memoryGB == null ? 43 : this.memoryGB.hashCode()); + result = (result * PRIME) + (this.nodeCount == null ? 43 : this.nodeCount.hashCode()); result = (result * PRIME) + (this.pipelineConfigurationBody == null ? 43 : this.pipelineConfigurationBody.hashCode()); + result = + (result * PRIME) + + (this.dataPrepperConfigurationBody == null + ? 43 + : this.dataPrepperConfigurationBody.hashCode()); + result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = + (result * PRIME) + + (this.vcnCompartmentId == null ? 43 : this.vcnCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.subnetCompartmentId == null + ? 43 + : this.subnetCompartmentId.hashCode()); + result = (result * PRIME) + (this.nsgId == null ? 43 : this.nsgId.hashCode()); + result = + (result * PRIME) + + (this.reverseConnectionEndpoints == null + ? 43 + : this.reverseConnectionEndpoints.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-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchPipelineValidationResponse.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/UpdatePipelineStatusDetails.java similarity index 50% rename from bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchPipelineValidationResponse.java rename to bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/UpdatePipelineStatusDetails.java index b45f7beb09..5d828e294f 100644 --- a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/OpensearchPipelineValidationResponse.java +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/UpdatePipelineStatusDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.opensearch.model; /** - * Details for validation of customer input pipeline configuration. + * update pipeline 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 @@ -16,61 +16,60 @@ **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") @com.fasterxml.jackson.databind.annotation.JsonDeserialize( - builder = OpensearchPipelineValidationResponse.Builder.class + builder = UpdatePipelineStatusDetails.Builder.class ) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) -public final class OpensearchPipelineValidationResponse +public final class UpdatePipelineStatusDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"errors", "isValid"}) - public OpensearchPipelineValidationResponse( - java.util.List errors, Boolean isValid) { + @java.beans.ConstructorProperties({"pipelineId", "lifecycleState"}) + public UpdatePipelineStatusDetails(String pipelineId, String lifecycleState) { super(); - this.errors = errors; - this.isValid = isValid; + this.pipelineId = pipelineId; + this.lifecycleState = lifecycleState; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * An array of errors in the pipeline configuration which is given for validation. + * OCID of the OpenSearch Pipeline. **/ - @com.fasterxml.jackson.annotation.JsonProperty("errors") - private java.util.List errors; + @com.fasterxml.jackson.annotation.JsonProperty("pipelineId") + private String pipelineId; /** - * An array of errors in the pipeline configuration which is given for validation. - * @param errors the value to set + * OCID of the OpenSearch Pipeline. + * @param pipelineId the value to set * @return this builder **/ - public Builder errors(java.util.List errors) { - this.errors = errors; - this.__explicitlySet__.add("errors"); + public Builder pipelineId(String pipelineId) { + this.pipelineId = pipelineId; + this.__explicitlySet__.add("pipelineId"); return this; } /** - * Boolean value which tells us if the pipeline configuration given by user is valid or not. + * the new status of the OpenSearch Pipeline **/ - @com.fasterxml.jackson.annotation.JsonProperty("isValid") - private Boolean isValid; + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private String lifecycleState; /** - * Boolean value which tells us if the pipeline configuration given by user is valid or not. - * @param isValid the value to set + * the new status of the OpenSearch Pipeline + * @param lifecycleState the value to set * @return this builder **/ - public Builder isValid(Boolean isValid) { - this.isValid = isValid; - this.__explicitlySet__.add("isValid"); + public Builder lifecycleState(String 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 OpensearchPipelineValidationResponse build() { - OpensearchPipelineValidationResponse model = - new OpensearchPipelineValidationResponse(this.errors, this.isValid); + public UpdatePipelineStatusDetails build() { + UpdatePipelineStatusDetails model = + new UpdatePipelineStatusDetails(this.pipelineId, this.lifecycleState); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -78,12 +77,12 @@ public OpensearchPipelineValidationResponse build() { } @com.fasterxml.jackson.annotation.JsonIgnore - public Builder copy(OpensearchPipelineValidationResponse model) { - if (model.wasPropertyExplicitlySet("errors")) { - this.errors(model.getErrors()); + public Builder copy(UpdatePipelineStatusDetails model) { + if (model.wasPropertyExplicitlySet("pipelineId")) { + this.pipelineId(model.getPipelineId()); } - if (model.wasPropertyExplicitlySet("isValid")) { - this.isValid(model.getIsValid()); + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); } return this; } @@ -101,31 +100,31 @@ public Builder toBuilder() { } /** - * An array of errors in the pipeline configuration which is given for validation. + * OCID of the OpenSearch Pipeline. **/ - @com.fasterxml.jackson.annotation.JsonProperty("errors") - private final java.util.List errors; + @com.fasterxml.jackson.annotation.JsonProperty("pipelineId") + private final String pipelineId; /** - * An array of errors in the pipeline configuration which is given for validation. + * OCID of the OpenSearch Pipeline. * @return the value **/ - public java.util.List getErrors() { - return errors; + public String getPipelineId() { + return pipelineId; } /** - * Boolean value which tells us if the pipeline configuration given by user is valid or not. + * the new status of the OpenSearch Pipeline **/ - @com.fasterxml.jackson.annotation.JsonProperty("isValid") - private final Boolean isValid; + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final String lifecycleState; /** - * Boolean value which tells us if the pipeline configuration given by user is valid or not. + * the new status of the OpenSearch Pipeline * @return the value **/ - public Boolean getIsValid() { - return isValid; + public String getLifecycleState() { + return lifecycleState; } @Override @@ -140,10 +139,10 @@ public String toString() { */ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); - sb.append("OpensearchPipelineValidationResponse("); + sb.append("UpdatePipelineStatusDetails("); sb.append("super=").append(super.toString()); - sb.append("errors=").append(String.valueOf(this.errors)); - sb.append(", isValid=").append(String.valueOf(this.isValid)); + sb.append("pipelineId=").append(String.valueOf(this.pipelineId)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(")"); return sb.toString(); } @@ -153,13 +152,13 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof OpensearchPipelineValidationResponse)) { + if (!(o instanceof UpdatePipelineStatusDetails)) { return false; } - OpensearchPipelineValidationResponse other = (OpensearchPipelineValidationResponse) o; - return java.util.Objects.equals(this.errors, other.errors) - && java.util.Objects.equals(this.isValid, other.isValid) + UpdatePipelineStatusDetails other = (UpdatePipelineStatusDetails) o; + return java.util.Objects.equals(this.pipelineId, other.pipelineId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && super.equals(other); } @@ -167,8 +166,10 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; - result = (result * PRIME) + (this.errors == null ? 43 : this.errors.hashCode()); - result = (result * PRIME) + (this.isValid == null ? 43 : this.isValid.hashCode()); + result = (result * PRIME) + (this.pipelineId == null ? 43 : this.pipelineId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/CreateOpensearchClusterPipelineRequest.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/CreateOpensearchClusterPipelineRequest.java new file mode 100644 index 0000000000..d3385d20df --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/CreateOpensearchClusterPipelineRequest.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.requests; + +import com.oracle.bmc.opensearch.model.*; +/** + * Example: Click here to see how to use CreateOpensearchClusterPipelineRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class CreateOpensearchClusterPipelineRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.opensearch.model.CreateOpensearchClusterPipelineDetails> { + + /** + * Details for the new OpensearchCluster Pipeline. + */ + private com.oracle.bmc.opensearch.model.CreateOpensearchClusterPipelineDetails + createOpensearchClusterPipelineDetails; + + /** + * Details for the new OpensearchCluster Pipeline. + */ + public com.oracle.bmc.opensearch.model.CreateOpensearchClusterPipelineDetails + getCreateOpensearchClusterPipelineDetails() { + return createOpensearchClusterPipelineDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. 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; + } + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + private Boolean opcDryRun; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + public Boolean getOpcDryRun() { + return opcDryRun; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.opensearch.model.CreateOpensearchClusterPipelineDetails getBody$() { + return createOpensearchClusterPipelineDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateOpensearchClusterPipelineRequest, + com.oracle.bmc.opensearch.model.CreateOpensearchClusterPipelineDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new OpensearchCluster Pipeline. + */ + private com.oracle.bmc.opensearch.model.CreateOpensearchClusterPipelineDetails + createOpensearchClusterPipelineDetails = null; + + /** + * Details for the new OpensearchCluster Pipeline. + * @param createOpensearchClusterPipelineDetails the value to set + * @return this builder instance + */ + public Builder createOpensearchClusterPipelineDetails( + com.oracle.bmc.opensearch.model.CreateOpensearchClusterPipelineDetails + createOpensearchClusterPipelineDetails) { + this.createOpensearchClusterPipelineDetails = createOpensearchClusterPipelineDetails; + 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; + } + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + private Boolean opcDryRun = null; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + * @param opcDryRun the value to set + * @return this builder instance + */ + public Builder opcDryRun(Boolean opcDryRun) { + this.opcDryRun = opcDryRun; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.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(CreateOpensearchClusterPipelineRequest o) { + createOpensearchClusterPipelineDetails(o.getCreateOpensearchClusterPipelineDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + opcDryRun(o.getOpcDryRun()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateOpensearchClusterPipelineRequest 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 CreateOpensearchClusterPipelineRequest + */ + public CreateOpensearchClusterPipelineRequest build() { + CreateOpensearchClusterPipelineRequest 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.opensearch.model.CreateOpensearchClusterPipelineDetails body) { + createOpensearchClusterPipelineDetails(body); + return this; + } + + /** + * Build the instance of CreateOpensearchClusterPipelineRequest 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 CreateOpensearchClusterPipelineRequest + */ + public CreateOpensearchClusterPipelineRequest buildWithoutInvocationCallback() { + CreateOpensearchClusterPipelineRequest request = + new CreateOpensearchClusterPipelineRequest(); + request.createOpensearchClusterPipelineDetails = createOpensearchClusterPipelineDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.opcDryRun = opcDryRun; + return request; + // new CreateOpensearchClusterPipelineRequest(createOpensearchClusterPipelineDetails, opcRetryToken, opcRequestId, opcDryRun); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createOpensearchClusterPipelineDetails(createOpensearchClusterPipelineDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .opcDryRun(opcDryRun); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createOpensearchClusterPipelineDetails=") + .append(String.valueOf(this.createOpensearchClusterPipelineDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcDryRun=").append(String.valueOf(this.opcDryRun)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOpensearchClusterPipelineRequest)) { + return false; + } + + CreateOpensearchClusterPipelineRequest other = (CreateOpensearchClusterPipelineRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createOpensearchClusterPipelineDetails, + other.createOpensearchClusterPipelineDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcDryRun, other.opcDryRun); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createOpensearchClusterPipelineDetails == null + ? 43 + : this.createOpensearchClusterPipelineDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcDryRun == null ? 43 : this.opcDryRun.hashCode()); + return result; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/DeleteOpensearchClusterPipelineRequest.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/DeleteOpensearchClusterPipelineRequest.java new file mode 100644 index 0000000000..f6f3181d9e --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/DeleteOpensearchClusterPipelineRequest.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.requests; + +import com.oracle.bmc.opensearch.model.*; +/** + * Example: Click here to see how to use DeleteOpensearchClusterPipelineRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class DeleteOpensearchClusterPipelineRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique OpensearchClusterPipeline identifier + */ + private String opensearchClusterPipelineId; + + /** + * unique OpensearchClusterPipeline identifier + */ + public String getOpensearchClusterPipelineId() { + return opensearchClusterPipelineId; + } + /** + * 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< + DeleteOpensearchClusterPipelineRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique OpensearchClusterPipeline identifier + */ + private String opensearchClusterPipelineId = null; + + /** + * unique OpensearchClusterPipeline identifier + * @param opensearchClusterPipelineId the value to set + * @return this builder instance + */ + public Builder opensearchClusterPipelineId(String opensearchClusterPipelineId) { + this.opensearchClusterPipelineId = opensearchClusterPipelineId; + 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(DeleteOpensearchClusterPipelineRequest o) { + opensearchClusterPipelineId(o.getOpensearchClusterPipelineId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteOpensearchClusterPipelineRequest 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 DeleteOpensearchClusterPipelineRequest + */ + public DeleteOpensearchClusterPipelineRequest build() { + DeleteOpensearchClusterPipelineRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteOpensearchClusterPipelineRequest 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 DeleteOpensearchClusterPipelineRequest + */ + public DeleteOpensearchClusterPipelineRequest buildWithoutInvocationCallback() { + DeleteOpensearchClusterPipelineRequest request = + new DeleteOpensearchClusterPipelineRequest(); + request.opensearchClusterPipelineId = opensearchClusterPipelineId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteOpensearchClusterPipelineRequest(opensearchClusterPipelineId, 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() + .opensearchClusterPipelineId(opensearchClusterPipelineId) + .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(",opensearchClusterPipelineId=") + .append(String.valueOf(this.opensearchClusterPipelineId)); + 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 DeleteOpensearchClusterPipelineRequest)) { + return false; + } + + DeleteOpensearchClusterPipelineRequest other = (DeleteOpensearchClusterPipelineRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.opensearchClusterPipelineId, other.opensearchClusterPipelineId) + && 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.opensearchClusterPipelineId == null + ? 43 + : this.opensearchClusterPipelineId.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-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/GetOpensearchClusterPipelineRequest.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/GetOpensearchClusterPipelineRequest.java new file mode 100644 index 0000000000..c3a6b39f4c --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/GetOpensearchClusterPipelineRequest.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.requests; + +import com.oracle.bmc.opensearch.model.*; +/** + * Example: Click here to see how to use GetOpensearchClusterPipelineRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class GetOpensearchClusterPipelineRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique OpensearchClusterPipeline identifier + */ + private String opensearchClusterPipelineId; + + /** + * unique OpensearchClusterPipeline identifier + */ + public String getOpensearchClusterPipelineId() { + return opensearchClusterPipelineId; + } + /** + * 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< + GetOpensearchClusterPipelineRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique OpensearchClusterPipeline identifier + */ + private String opensearchClusterPipelineId = null; + + /** + * unique OpensearchClusterPipeline identifier + * @param opensearchClusterPipelineId the value to set + * @return this builder instance + */ + public Builder opensearchClusterPipelineId(String opensearchClusterPipelineId) { + this.opensearchClusterPipelineId = opensearchClusterPipelineId; + 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(GetOpensearchClusterPipelineRequest o) { + opensearchClusterPipelineId(o.getOpensearchClusterPipelineId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetOpensearchClusterPipelineRequest 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 GetOpensearchClusterPipelineRequest + */ + public GetOpensearchClusterPipelineRequest build() { + GetOpensearchClusterPipelineRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetOpensearchClusterPipelineRequest 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 GetOpensearchClusterPipelineRequest + */ + public GetOpensearchClusterPipelineRequest buildWithoutInvocationCallback() { + GetOpensearchClusterPipelineRequest request = new GetOpensearchClusterPipelineRequest(); + request.opensearchClusterPipelineId = opensearchClusterPipelineId; + request.opcRequestId = opcRequestId; + return request; + // new GetOpensearchClusterPipelineRequest(opensearchClusterPipelineId, 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() + .opensearchClusterPipelineId(opensearchClusterPipelineId) + .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(",opensearchClusterPipelineId=") + .append(String.valueOf(this.opensearchClusterPipelineId)); + 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 GetOpensearchClusterPipelineRequest)) { + return false; + } + + GetOpensearchClusterPipelineRequest other = (GetOpensearchClusterPipelineRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.opensearchClusterPipelineId, other.opensearchClusterPipelineId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opensearchClusterPipelineId == null + ? 43 + : this.opensearchClusterPipelineId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/ListOpensearchClusterPipelinesRequest.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/ListOpensearchClusterPipelinesRequest.java new file mode 100644 index 0000000000..ec2e203e30 --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/ListOpensearchClusterPipelinesRequest.java @@ -0,0 +1,506 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.requests; + +import com.oracle.bmc.opensearch.model.*; +/** + * Example: Click here to see how to use ListOpensearchClusterPipelinesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class ListOpensearchClusterPipelinesRequest + 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; + } + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.opensearch.model.OpensearchClusterPipeline.LifecycleState lifecycleState; + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.opensearch.model.OpensearchClusterPipeline.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return pipelines whose any component has the given pipelineComponentId. + */ + private String pipelineComponentId; + + /** + * A filter to return pipelines whose any component has the given pipelineComponentId. + */ + public String getPipelineComponentId() { + return pipelineComponentId; + } + /** + * 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 OpensearchClusterPipeline identifier + */ + private String id; + + /** + * unique OpensearchClusterPipeline 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; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.opensearch.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + public com.oracle.bmc.opensearch.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. If no value is specified timeCreated is default. + * + */ + 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. If no value is specified timeCreated is default. + * + **/ + 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. If no value is specified timeCreated is default. + * + */ + 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< + ListOpensearchClusterPipelinesRequest, 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; + } + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.opensearch.model.OpensearchClusterPipeline.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.opensearch.model.OpensearchClusterPipeline.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return pipelines whose any component has the given pipelineComponentId. + */ + private String pipelineComponentId = null; + + /** + * A filter to return pipelines whose any component has the given pipelineComponentId. + * @param pipelineComponentId the value to set + * @return this builder instance + */ + public Builder pipelineComponentId(String pipelineComponentId) { + this.pipelineComponentId = pipelineComponentId; + 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 OpensearchClusterPipeline identifier + */ + private String id = null; + + /** + * unique OpensearchClusterPipeline 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; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @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.opensearch.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.opensearch.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. If no value is specified timeCreated is default. + * + */ + 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. If no value is specified timeCreated is default. + * + * @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(ListOpensearchClusterPipelinesRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + pipelineComponentId(o.getPipelineComponentId()); + 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 ListOpensearchClusterPipelinesRequest 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 ListOpensearchClusterPipelinesRequest + */ + public ListOpensearchClusterPipelinesRequest build() { + ListOpensearchClusterPipelinesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListOpensearchClusterPipelinesRequest 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 ListOpensearchClusterPipelinesRequest + */ + public ListOpensearchClusterPipelinesRequest buildWithoutInvocationCallback() { + ListOpensearchClusterPipelinesRequest request = + new ListOpensearchClusterPipelinesRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.pipelineComponentId = pipelineComponentId; + request.displayName = displayName; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListOpensearchClusterPipelinesRequest(compartmentId, lifecycleState, pipelineComponentId, 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) + .pipelineComponentId(pipelineComponentId) + .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(",pipelineComponentId=").append(String.valueOf(this.pipelineComponentId)); + 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 ListOpensearchClusterPipelinesRequest)) { + return false; + } + + ListOpensearchClusterPipelinesRequest other = (ListOpensearchClusterPipelinesRequest) 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.pipelineComponentId, other.pipelineComponentId) + && 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.pipelineComponentId == null + ? 43 + : this.pipelineComponentId.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-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/UpdateOpensearchClusterPipelineRequest.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/UpdateOpensearchClusterPipelineRequest.java new file mode 100644 index 0000000000..491435b340 --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/requests/UpdateOpensearchClusterPipelineRequest.java @@ -0,0 +1,363 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.requests; + +import com.oracle.bmc.opensearch.model.*; +/** + * Example: Click here to see how to use UpdateOpensearchClusterPipelineRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class UpdateOpensearchClusterPipelineRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.opensearch.model.UpdateOpensearchClusterPipelineDetails> { + + /** + * unique OpensearchClusterPipeline identifier + */ + private String opensearchClusterPipelineId; + + /** + * unique OpensearchClusterPipeline identifier + */ + public String getOpensearchClusterPipelineId() { + return opensearchClusterPipelineId; + } + /** + * Update the opensearch cluster pipeline details. + */ + private com.oracle.bmc.opensearch.model.UpdateOpensearchClusterPipelineDetails + updateOpensearchClusterPipelineDetails; + + /** + * Update the opensearch cluster pipeline details. + */ + public com.oracle.bmc.opensearch.model.UpdateOpensearchClusterPipelineDetails + getUpdateOpensearchClusterPipelineDetails() { + return updateOpensearchClusterPipelineDetails; + } + /** + * 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; + } + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + private Boolean opcDryRun; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + public Boolean getOpcDryRun() { + return opcDryRun; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.opensearch.model.UpdateOpensearchClusterPipelineDetails getBody$() { + return updateOpensearchClusterPipelineDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateOpensearchClusterPipelineRequest, + com.oracle.bmc.opensearch.model.UpdateOpensearchClusterPipelineDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique OpensearchClusterPipeline identifier + */ + private String opensearchClusterPipelineId = null; + + /** + * unique OpensearchClusterPipeline identifier + * @param opensearchClusterPipelineId the value to set + * @return this builder instance + */ + public Builder opensearchClusterPipelineId(String opensearchClusterPipelineId) { + this.opensearchClusterPipelineId = opensearchClusterPipelineId; + return this; + } + + /** + * Update the opensearch cluster pipeline details. + */ + private com.oracle.bmc.opensearch.model.UpdateOpensearchClusterPipelineDetails + updateOpensearchClusterPipelineDetails = null; + + /** + * Update the opensearch cluster pipeline details. + * @param updateOpensearchClusterPipelineDetails the value to set + * @return this builder instance + */ + public Builder updateOpensearchClusterPipelineDetails( + com.oracle.bmc.opensearch.model.UpdateOpensearchClusterPipelineDetails + updateOpensearchClusterPipelineDetails) { + this.updateOpensearchClusterPipelineDetails = updateOpensearchClusterPipelineDetails; + 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; + } + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + private Boolean opcDryRun = null; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + * @param opcDryRun the value to set + * @return this builder instance + */ + public Builder opcDryRun(Boolean opcDryRun) { + this.opcDryRun = opcDryRun; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.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(UpdateOpensearchClusterPipelineRequest o) { + opensearchClusterPipelineId(o.getOpensearchClusterPipelineId()); + updateOpensearchClusterPipelineDetails(o.getUpdateOpensearchClusterPipelineDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcDryRun(o.getOpcDryRun()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateOpensearchClusterPipelineRequest 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 UpdateOpensearchClusterPipelineRequest + */ + public UpdateOpensearchClusterPipelineRequest build() { + UpdateOpensearchClusterPipelineRequest 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.opensearch.model.UpdateOpensearchClusterPipelineDetails body) { + updateOpensearchClusterPipelineDetails(body); + return this; + } + + /** + * Build the instance of UpdateOpensearchClusterPipelineRequest 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 UpdateOpensearchClusterPipelineRequest + */ + public UpdateOpensearchClusterPipelineRequest buildWithoutInvocationCallback() { + UpdateOpensearchClusterPipelineRequest request = + new UpdateOpensearchClusterPipelineRequest(); + request.opensearchClusterPipelineId = opensearchClusterPipelineId; + request.updateOpensearchClusterPipelineDetails = updateOpensearchClusterPipelineDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcDryRun = opcDryRun; + return request; + // new UpdateOpensearchClusterPipelineRequest(opensearchClusterPipelineId, updateOpensearchClusterPipelineDetails, ifMatch, opcRequestId, opcDryRun); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .opensearchClusterPipelineId(opensearchClusterPipelineId) + .updateOpensearchClusterPipelineDetails(updateOpensearchClusterPipelineDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcDryRun(opcDryRun); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opensearchClusterPipelineId=") + .append(String.valueOf(this.opensearchClusterPipelineId)); + sb.append(",updateOpensearchClusterPipelineDetails=") + .append(String.valueOf(this.updateOpensearchClusterPipelineDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcDryRun=").append(String.valueOf(this.opcDryRun)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateOpensearchClusterPipelineRequest)) { + return false; + } + + UpdateOpensearchClusterPipelineRequest other = (UpdateOpensearchClusterPipelineRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.opensearchClusterPipelineId, other.opensearchClusterPipelineId) + && java.util.Objects.equals( + this.updateOpensearchClusterPipelineDetails, + other.updateOpensearchClusterPipelineDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcDryRun, other.opcDryRun); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opensearchClusterPipelineId == null + ? 43 + : this.opensearchClusterPipelineId.hashCode()); + result = + (result * PRIME) + + (this.updateOpensearchClusterPipelineDetails == null + ? 43 + : this.updateOpensearchClusterPipelineDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcDryRun == null ? 43 : this.opcDryRun.hashCode()); + return result; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/CreateOpensearchClusterPipelineResponse.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/CreateOpensearchClusterPipelineResponse.java new file mode 100644 index 0000000000..b34897dfcf --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/CreateOpensearchClusterPipelineResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.responses; + +import com.oracle.bmc.opensearch.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class CreateOpensearchClusterPipelineResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private CreateOpensearchClusterPipelineResponse( + 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 request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateOpensearchClusterPipelineResponse 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 CreateOpensearchClusterPipelineResponse build() { + return new CreateOpensearchClusterPipelineResponse( + __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 CreateOpensearchClusterPipelineResponse)) { + return false; + } + + CreateOpensearchClusterPipelineResponse other = (CreateOpensearchClusterPipelineResponse) 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-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/DeleteOpensearchClusterPipelineResponse.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/DeleteOpensearchClusterPipelineResponse.java new file mode 100644 index 0000000000..5316e7230c --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/DeleteOpensearchClusterPipelineResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.responses; + +import com.oracle.bmc.opensearch.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class DeleteOpensearchClusterPipelineResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteOpensearchClusterPipelineResponse( + 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 request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteOpensearchClusterPipelineResponse 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 DeleteOpensearchClusterPipelineResponse build() { + return new DeleteOpensearchClusterPipelineResponse( + __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 DeleteOpensearchClusterPipelineResponse)) { + return false; + } + + DeleteOpensearchClusterPipelineResponse other = (DeleteOpensearchClusterPipelineResponse) 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-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/GetOpensearchClusterPipelineResponse.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/GetOpensearchClusterPipelineResponse.java new file mode 100644 index 0000000000..92e6c22d3a --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/GetOpensearchClusterPipelineResponse.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.responses; + +import com.oracle.bmc.opensearch.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class GetOpensearchClusterPipelineResponse 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 OpensearchClusterPipeline instance. + */ + private com.oracle.bmc.opensearch.model.OpensearchClusterPipeline opensearchClusterPipeline; + + /** + * The returned OpensearchClusterPipeline instance. + * @return the value + */ + public com.oracle.bmc.opensearch.model.OpensearchClusterPipeline + getOpensearchClusterPipeline() { + return opensearchClusterPipeline; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "opensearchClusterPipeline" + }) + private GetOpensearchClusterPipelineResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.opensearch.model.OpensearchClusterPipeline opensearchClusterPipeline) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.opensearchClusterPipeline = opensearchClusterPipeline; + } + + 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 OpensearchClusterPipeline instance. + */ + private com.oracle.bmc.opensearch.model.OpensearchClusterPipeline opensearchClusterPipeline; + + /** + * The returned OpensearchClusterPipeline instance. + * @param opensearchClusterPipeline the value to set + * @return this builder + */ + public Builder opensearchClusterPipeline( + com.oracle.bmc.opensearch.model.OpensearchClusterPipeline + opensearchClusterPipeline) { + this.opensearchClusterPipeline = opensearchClusterPipeline; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetOpensearchClusterPipelineResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + opensearchClusterPipeline(o.getOpensearchClusterPipeline()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetOpensearchClusterPipelineResponse build() { + return new GetOpensearchClusterPipelineResponse( + __httpStatusCode__, headers, etag, opcRequestId, opensearchClusterPipeline); + } + } + + /** + * 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(",opensearchClusterPipeline=").append(String.valueOf(opensearchClusterPipeline)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetOpensearchClusterPipelineResponse)) { + return false; + } + + GetOpensearchClusterPipelineResponse other = (GetOpensearchClusterPipelineResponse) 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.opensearchClusterPipeline, other.opensearchClusterPipeline); + } + + @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.opensearchClusterPipeline == null + ? 43 + : this.opensearchClusterPipeline.hashCode()); + return result; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/ListOpensearchClusterPipelinesResponse.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/ListOpensearchClusterPipelinesResponse.java new file mode 100644 index 0000000000..99cda76800 --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/ListOpensearchClusterPipelinesResponse.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.responses; + +import com.oracle.bmc.opensearch.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class ListOpensearchClusterPipelinesResponse 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 OpensearchClusterPipelineCollection instance. + */ + private com.oracle.bmc.opensearch.model.OpensearchClusterPipelineCollection + opensearchClusterPipelineCollection; + + /** + * The returned OpensearchClusterPipelineCollection instance. + * @return the value + */ + public com.oracle.bmc.opensearch.model.OpensearchClusterPipelineCollection + getOpensearchClusterPipelineCollection() { + return opensearchClusterPipelineCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "opensearchClusterPipelineCollection" + }) + private ListOpensearchClusterPipelinesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.opensearch.model.OpensearchClusterPipelineCollection + opensearchClusterPipelineCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opensearchClusterPipelineCollection = opensearchClusterPipelineCollection; + } + + 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 OpensearchClusterPipelineCollection instance. + */ + private com.oracle.bmc.opensearch.model.OpensearchClusterPipelineCollection + opensearchClusterPipelineCollection; + + /** + * The returned OpensearchClusterPipelineCollection instance. + * @param opensearchClusterPipelineCollection the value to set + * @return this builder + */ + public Builder opensearchClusterPipelineCollection( + com.oracle.bmc.opensearch.model.OpensearchClusterPipelineCollection + opensearchClusterPipelineCollection) { + this.opensearchClusterPipelineCollection = opensearchClusterPipelineCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListOpensearchClusterPipelinesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opensearchClusterPipelineCollection(o.getOpensearchClusterPipelineCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListOpensearchClusterPipelinesResponse build() { + return new ListOpensearchClusterPipelinesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + opensearchClusterPipelineCollection); + } + } + + /** + * 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(",opensearchClusterPipelineCollection=") + .append(String.valueOf(opensearchClusterPipelineCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListOpensearchClusterPipelinesResponse)) { + return false; + } + + ListOpensearchClusterPipelinesResponse other = (ListOpensearchClusterPipelinesResponse) 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.opensearchClusterPipelineCollection, + other.opensearchClusterPipelineCollection); + } + + @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.opensearchClusterPipelineCollection == null + ? 43 + : this.opensearchClusterPipelineCollection.hashCode()); + return result; + } +} diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/UpdateOpensearchClusterPipelineResponse.java b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/UpdateOpensearchClusterPipelineResponse.java new file mode 100644 index 0000000000..c1d469b90d --- /dev/null +++ b/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/responses/UpdateOpensearchClusterPipelineResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opensearch.responses; + +import com.oracle.bmc.opensearch.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180828") +public class UpdateOpensearchClusterPipelineResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateOpensearchClusterPipelineResponse( + 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 request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateOpensearchClusterPipelineResponse 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 UpdateOpensearchClusterPipelineResponse build() { + return new UpdateOpensearchClusterPipelineResponse( + __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 UpdateOpensearchClusterPipelineResponse)) { + return false; + } + + UpdateOpensearchClusterPipelineResponse other = (UpdateOpensearchClusterPipelineResponse) 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-operatoraccesscontrol/pom.xml b/bmc-operatoraccesscontrol/pom.xml index b9f5b7fb7d..d97b80a264 100644 --- a/bmc-operatoraccesscontrol/pom.xml +++ b/bmc-operatoraccesscontrol/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-operatoraccesscontrol @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-opsi/pom.xml b/bmc-opsi/pom.xml index dca203a8de..13f0c5f660 100644 --- a/bmc-opsi/pom.xml +++ b/bmc-opsi/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-opsi @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-optimizer/pom.xml b/bmc-optimizer/pom.xml index 7aa5202465..bd6683fdd8 100644 --- a/bmc-optimizer/pom.xml +++ b/bmc-optimizer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-optimizer @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-osmanagement/pom.xml b/bmc-osmanagement/pom.xml index 15dd43d086..c54f446591 100644 --- a/bmc-osmanagement/pom.xml +++ b/bmc-osmanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-osmanagement @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-osmanagementhub/pom.xml b/bmc-osmanagementhub/pom.xml index ae4e2237f7..273f562463 100644 --- a/bmc-osmanagementhub/pom.xml +++ b/bmc-osmanagementhub/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-osmanagementhub @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-ospgateway/pom.xml b/bmc-ospgateway/pom.xml index a9b1529ad0..a600b66ad5 100644 --- a/bmc-ospgateway/pom.xml +++ b/bmc-ospgateway/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-ospgateway @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-osubbillingschedule/pom.xml b/bmc-osubbillingschedule/pom.xml index b5b38d1b1e..69bad46d7b 100644 --- a/bmc-osubbillingschedule/pom.xml +++ b/bmc-osubbillingschedule/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-osubbillingschedule @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-osuborganizationsubscription/pom.xml b/bmc-osuborganizationsubscription/pom.xml index 6fd00ec987..ca4e3b289e 100644 --- a/bmc-osuborganizationsubscription/pom.xml +++ b/bmc-osuborganizationsubscription/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-osuborganizationsubscription @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-osubsubscription/pom.xml b/bmc-osubsubscription/pom.xml index 03da46ea41..c9395c0e25 100644 --- a/bmc-osubsubscription/pom.xml +++ b/bmc-osubsubscription/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-osubsubscription @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-osubusage/pom.xml b/bmc-osubusage/pom.xml index 0893aa3dea..296a2547eb 100644 --- a/bmc-osubusage/pom.xml +++ b/bmc-osubusage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-osubusage @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-psql/pom.xml b/bmc-psql/pom.xml index c095a7562b..5c8cbf654f 100644 --- a/bmc-psql/pom.xml +++ b/bmc-psql/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-psql @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/Postgresql.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/Postgresql.java index 3222949084..e6a2a96246 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/Postgresql.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/Postgresql.java @@ -61,6 +61,18 @@ public interface Postgresql extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Backup Copy Request to copy back up in remote region. When provided, If-Match is checked against ETag values of the 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 BackupCopy API. + */ + BackupCopyResponse backupCopy(BackupCopyRequest request); + /** * Moves a backup from one compartment to another. When provided, If-Match is checked against ETag values of the resource. * @param request The request object containing the details to send diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/PostgresqlAsync.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/PostgresqlAsync.java index 1c9e06594d..8c5c96529e 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/PostgresqlAsync.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/PostgresqlAsync.java @@ -60,6 +60,20 @@ public interface PostgresqlAsync extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Backup Copy Request to copy back up in remote region. When provided, If-Match is checked against ETag values of the 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 backupCopy( + BackupCopyRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + /** * Moves a backup from one compartment to another. When provided, If-Match is checked against ETag values of the resource. * diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/PostgresqlAsyncClient.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/PostgresqlAsyncClient.java index ea0e43f58f..50935101ac 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/PostgresqlAsyncClient.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/PostgresqlAsyncClient.java @@ -457,6 +457,55 @@ public void close() { client.close(); } + @Override + public java.util.concurrent.Future backupCopy( + BackupCopyRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async backupCopy"); + final BackupCopyRequest interceptedRequest = BackupCopyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + BackupCopyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Postgresql", + "BackupCopy", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/postgresql/20220915/Backup/BackupCopy"); + final java.util.function.Function + transformer = + BackupCopyConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + BackupCopyRequest, BackupCopyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getBackupCopyDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + BackupCopyRequest, BackupCopyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeBackupCompartment( ChangeBackupCompartmentRequest request, diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/PostgresqlClient.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/PostgresqlClient.java index f682f972e2..c828161939 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/PostgresqlClient.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/PostgresqlClient.java @@ -547,6 +547,45 @@ public void close() { client.close(); } + @Override + public BackupCopyResponse backupCopy(BackupCopyRequest request) { + LOG.trace("Called backupCopy"); + final BackupCopyRequest interceptedRequest = BackupCopyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + BackupCopyConverter.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( + "Postgresql", + "BackupCopy", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/postgresql/20220915/Backup/BackupCopy"); + java.util.function.Function transformer = + BackupCopyConverter.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.getBackupCopyDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeBackupCompartmentResponse changeBackupCompartment( ChangeBackupCompartmentRequest request) { diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/internal/http/BackupCopyConverter.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/internal/http/BackupCopyConverter.java new file mode 100644 index 0000000000..67e8ef827d --- /dev/null +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/internal/http/BackupCopyConverter.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.psql.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.psql.model.*; +import com.oracle.bmc.psql.requests.*; +import com.oracle.bmc.psql.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220915") +public class BackupCopyConverter { + 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(BackupCopyConverter.class); + + public static com.oracle.bmc.psql.requests.BackupCopyRequest interceptRequest( + com.oracle.bmc.psql.requests.BackupCopyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.psql.requests.BackupCopyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getBackupId(), "backupId must not be blank"); + Validate.notNull(request.getBackupCopyDetails(), "backupCopyDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220915") + .path("backups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBackupId())) + .path("actions") + .path("copy"); + + 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.psql.responses.BackupCopyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.psql.responses.BackupCopyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.psql.responses.BackupCopyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.psql.responses.BackupCopyResponse>() { + @Override + public com.oracle.bmc.psql.responses.BackupCopyResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.psql.responses.BackupCopyResponse"); + 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.psql.responses.BackupCopyResponse.Builder builder = + com.oracle.bmc.psql.responses.BackupCopyResponse.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.psql.responses.BackupCopyResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/internal/http/ListConfigurationsConverter.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/internal/http/ListConfigurationsConverter.java index 3c36d0aa0f..3048e1596d 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/internal/http/ListConfigurationsConverter.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/internal/http/ListConfigurationsConverter.java @@ -49,6 +49,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getLifecycleState().getValue())); } + if (request.getConfigType() != null) { + target = + target.queryParam( + "configType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getConfigType().getValue())); + } + if (request.getDisplayName() != null) { target = target.queryParam( diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Backup.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Backup.java index b970afe1c5..bfa7081f07 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Backup.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Backup.java @@ -26,6 +26,7 @@ public final class Backup extends com.oracle.bmc.http.internal.ExplicitlySetBmcM "compartmentId", "sourceType", "timeCreated", + "timeCreatedPrecise", "timeUpdated", "lifecycleState", "lifecycleDetails", @@ -33,8 +34,10 @@ public final class Backup extends com.oracle.bmc.http.internal.ExplicitlySetBmcM "backupSize", "dbSystemId", "dbSystemDetails", + "sourceBackupDetails", "lastAcceptedRequestToken", "lastCompletedRequestToken", + "copyStatus", "freeformTags", "definedTags", "systemTags" @@ -46,6 +49,7 @@ public Backup( String compartmentId, SourceType sourceType, java.util.Date timeCreated, + java.util.Date timeCreatedPrecise, java.util.Date timeUpdated, LifecycleState lifecycleState, String lifecycleDetails, @@ -53,8 +57,10 @@ public Backup( Integer backupSize, String dbSystemId, DbSystemDetails dbSystemDetails, + SourceBackupDetails sourceBackupDetails, String lastAcceptedRequestToken, String lastCompletedRequestToken, + java.util.List copyStatus, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -65,6 +71,7 @@ public Backup( this.compartmentId = compartmentId; this.sourceType = sourceType; this.timeCreated = timeCreated; + this.timeCreatedPrecise = timeCreatedPrecise; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; @@ -72,8 +79,10 @@ public Backup( this.backupSize = backupSize; this.dbSystemId = dbSystemId; this.dbSystemDetails = dbSystemDetails; + this.sourceBackupDetails = sourceBackupDetails; this.lastAcceptedRequestToken = lastAcceptedRequestToken; this.lastCompletedRequestToken = lastCompletedRequestToken; + this.copyStatus = copyStatus; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -146,13 +155,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * Specifies whether the backup was created manually, or by a management policy. + * Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location. **/ @com.fasterxml.jackson.annotation.JsonProperty("sourceType") private SourceType sourceType; /** - * Specifies whether the backup was created manually, or by a management policy. + * Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location. * @param sourceType the value to set * @return this builder **/ @@ -185,6 +194,32 @@ public Builder timeCreated(java.util.Date timeCreated) { this.__explicitlySet__.add("timeCreated"); return this; } + /** + * The date and time the backup was created. + * This is the time the actual point-in-time data snapshot was taken, + * expressed in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreatedPrecise") + private java.util.Date timeCreatedPrecise; + + /** + * The date and time the backup was created. + * This is the time the actual point-in-time data snapshot was taken, + * expressed in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreatedPrecise the value to set + * @return this builder + **/ + public Builder timeCreatedPrecise(java.util.Date timeCreatedPrecise) { + this.timeCreatedPrecise = timeCreatedPrecise; + this.__explicitlySet__.add("timeCreatedPrecise"); + return this; + } /** * The date and time the backup was updated, expressed in * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. @@ -298,6 +333,15 @@ public Builder dbSystemDetails(DbSystemDetails dbSystemDetails) { this.__explicitlySet__.add("dbSystemDetails"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("sourceBackupDetails") + private SourceBackupDetails sourceBackupDetails; + + public Builder sourceBackupDetails(SourceBackupDetails sourceBackupDetails) { + this.sourceBackupDetails = sourceBackupDetails; + this.__explicitlySet__.add("sourceBackupDetails"); + return this; + } /** * lastAcceptedRequestToken from MP. **/ @@ -330,6 +374,22 @@ public Builder lastCompletedRequestToken(String lastCompletedRequestToken) { this.__explicitlySet__.add("lastCompletedRequestToken"); return this; } + /** + * List of status for Backup Copy + **/ + @com.fasterxml.jackson.annotation.JsonProperty("copyStatus") + private java.util.List copyStatus; + + /** + * List of status for Backup Copy + * @param copyStatus the value to set + * @return this builder + **/ + public Builder copyStatus(java.util.List copyStatus) { + this.copyStatus = copyStatus; + this.__explicitlySet__.add("copyStatus"); + 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"}} @@ -404,6 +464,7 @@ public Backup build() { this.compartmentId, this.sourceType, this.timeCreated, + this.timeCreatedPrecise, this.timeUpdated, this.lifecycleState, this.lifecycleDetails, @@ -411,8 +472,10 @@ public Backup build() { this.backupSize, this.dbSystemId, this.dbSystemDetails, + this.sourceBackupDetails, this.lastAcceptedRequestToken, this.lastCompletedRequestToken, + this.copyStatus, this.freeformTags, this.definedTags, this.systemTags); @@ -442,6 +505,9 @@ public Builder copy(Backup model) { if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("timeCreatedPrecise")) { + this.timeCreatedPrecise(model.getTimeCreatedPrecise()); + } if (model.wasPropertyExplicitlySet("timeUpdated")) { this.timeUpdated(model.getTimeUpdated()); } @@ -463,12 +529,18 @@ public Builder copy(Backup model) { if (model.wasPropertyExplicitlySet("dbSystemDetails")) { this.dbSystemDetails(model.getDbSystemDetails()); } + if (model.wasPropertyExplicitlySet("sourceBackupDetails")) { + this.sourceBackupDetails(model.getSourceBackupDetails()); + } if (model.wasPropertyExplicitlySet("lastAcceptedRequestToken")) { this.lastAcceptedRequestToken(model.getLastAcceptedRequestToken()); } if (model.wasPropertyExplicitlySet("lastCompletedRequestToken")) { this.lastCompletedRequestToken(model.getLastCompletedRequestToken()); } + if (model.wasPropertyExplicitlySet("copyStatus")) { + this.copyStatus(model.getCopyStatus()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -550,11 +622,12 @@ public String getCompartmentId() { } /** - * Specifies whether the backup was created manually, or by a management policy. + * Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location. **/ public enum SourceType { Scheduled("SCHEDULED"), Manual("MANUAL"), + Copied("COPIED"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -598,13 +671,13 @@ public static SourceType create(String key) { } }; /** - * Specifies whether the backup was created manually, or by a management policy. + * Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location. **/ @com.fasterxml.jackson.annotation.JsonProperty("sourceType") private final SourceType sourceType; /** - * Specifies whether the backup was created manually, or by a management policy. + * Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location. * @return the value **/ public SourceType getSourceType() { @@ -633,6 +706,30 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * The date and time the backup was created. + * This is the time the actual point-in-time data snapshot was taken, + * expressed in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreatedPrecise") + private final java.util.Date timeCreatedPrecise; + + /** + * The date and time the backup was created. + * This is the time the actual point-in-time data snapshot was taken, + * expressed in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreatedPrecise() { + return timeCreatedPrecise; + } + /** * The date and time the backup was updated, expressed in * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. @@ -783,6 +880,13 @@ public DbSystemDetails getDbSystemDetails() { return dbSystemDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("sourceBackupDetails") + private final SourceBackupDetails sourceBackupDetails; + + public SourceBackupDetails getSourceBackupDetails() { + return sourceBackupDetails; + } + /** * lastAcceptedRequestToken from MP. **/ @@ -811,6 +915,20 @@ public String getLastCompletedRequestToken() { return lastCompletedRequestToken; } + /** + * List of status for Backup Copy + **/ + @com.fasterxml.jackson.annotation.JsonProperty("copyStatus") + private final java.util.List copyStatus; + + /** + * List of status for Backup Copy + * @return the value + **/ + public java.util.List getCopyStatus() { + return copyStatus; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -885,6 +1003,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", sourceType=").append(String.valueOf(this.sourceType)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeCreatedPrecise=").append(String.valueOf(this.timeCreatedPrecise)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); @@ -892,10 +1011,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", backupSize=").append(String.valueOf(this.backupSize)); sb.append(", dbSystemId=").append(String.valueOf(this.dbSystemId)); sb.append(", dbSystemDetails=").append(String.valueOf(this.dbSystemDetails)); + sb.append(", sourceBackupDetails=").append(String.valueOf(this.sourceBackupDetails)); sb.append(", lastAcceptedRequestToken=") .append(String.valueOf(this.lastAcceptedRequestToken)); sb.append(", lastCompletedRequestToken=") .append(String.valueOf(this.lastCompletedRequestToken)); + sb.append(", copyStatus=").append(String.valueOf(this.copyStatus)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -919,6 +1040,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.sourceType, other.sourceType) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeCreatedPrecise, other.timeCreatedPrecise) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) @@ -926,10 +1048,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.backupSize, other.backupSize) && java.util.Objects.equals(this.dbSystemId, other.dbSystemId) && java.util.Objects.equals(this.dbSystemDetails, other.dbSystemDetails) + && java.util.Objects.equals(this.sourceBackupDetails, other.sourceBackupDetails) && java.util.Objects.equals( this.lastAcceptedRequestToken, other.lastAcceptedRequestToken) && java.util.Objects.equals( this.lastCompletedRequestToken, other.lastCompletedRequestToken) + && java.util.Objects.equals(this.copyStatus, other.copyStatus) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -948,6 +1072,11 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.sourceType == null ? 43 : this.sourceType.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = + (result * PRIME) + + (this.timeCreatedPrecise == null + ? 43 + : this.timeCreatedPrecise.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); result = (result * PRIME) @@ -963,6 +1092,11 @@ public int hashCode() { result = (result * PRIME) + (this.dbSystemDetails == null ? 43 : this.dbSystemDetails.hashCode()); + result = + (result * PRIME) + + (this.sourceBackupDetails == null + ? 43 + : this.sourceBackupDetails.hashCode()); result = (result * PRIME) + (this.lastAcceptedRequestToken == null @@ -973,6 +1107,7 @@ public int hashCode() { + (this.lastCompletedRequestToken == null ? 43 : this.lastCompletedRequestToken.hashCode()); + result = (result * PRIME) + (this.copyStatus == null ? 43 : this.copyStatus.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()); diff --git a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/ValidateOpensearchPipelineDetails.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupCopyDetails.java similarity index 54% rename from bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/ValidateOpensearchPipelineDetails.java rename to bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupCopyDetails.java index 724b446d4b..4b3f3f1bb7 100644 --- a/bmc-opensearch/src/main/java/com/oracle/bmc/opensearch/model/ValidateOpensearchPipelineDetails.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupCopyDetails.java @@ -2,10 +2,10 @@ * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ -package com.oracle.bmc.opensearch.model; +package com.oracle.bmc.psql.model; /** - * The configuration details for validating pipeline configuration provided as input. + * Backup Copy 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 @@ -14,32 +14,32 @@ * {@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: 20180828") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220915") @com.fasterxml.jackson.databind.annotation.JsonDeserialize( - builder = ValidateOpensearchPipelineDetails.Builder.class + builder = BackupCopyDetails.Builder.class ) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) -public final class ValidateOpensearchPipelineDetails - extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { +public final class BackupCopyDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"compartmentId", "pipelineConfigurationBody"}) - public ValidateOpensearchPipelineDetails( - String compartmentId, String pipelineConfigurationBody) { + @java.beans.ConstructorProperties({"compartmentId", "retentionPeriod", "regions"}) + public BackupCopyDetails( + String compartmentId, Integer retentionPeriod, java.util.List regions) { super(); this.compartmentId = compartmentId; - this.pipelineConfigurationBody = pipelineConfigurationBody; + this.retentionPeriod = retentionPeriod; + this.regions = regions; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The OCID of the compartment where the pipeline will be created. + * target compartment to place a new backup **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** - * The OCID of the compartment where the pipeline will be created. + * target compartment to place a new backup * @param compartmentId the value to set * @return this builder **/ @@ -49,31 +49,44 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. - * + * Retention period in days of the backup copy. **/ - @com.fasterxml.jackson.annotation.JsonProperty("pipelineConfigurationBody") - private String pipelineConfigurationBody; + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriod") + private Integer retentionPeriod; /** - * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. - * - * @param pipelineConfigurationBody the value to set + * Retention period in days of the backup copy. + * @param retentionPeriod the value to set * @return this builder **/ - public Builder pipelineConfigurationBody(String pipelineConfigurationBody) { - this.pipelineConfigurationBody = pipelineConfigurationBody; - this.__explicitlySet__.add("pipelineConfigurationBody"); + public Builder retentionPeriod(Integer retentionPeriod) { + this.retentionPeriod = retentionPeriod; + this.__explicitlySet__.add("retentionPeriod"); + return this; + } + /** + * List of region names of the remote region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("regions") + private java.util.List regions; + + /** + * List of region names of the remote region + * @param regions the value to set + * @return this builder + **/ + public Builder regions(java.util.List regions) { + this.regions = regions; + this.__explicitlySet__.add("regions"); return this; } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); - public ValidateOpensearchPipelineDetails build() { - ValidateOpensearchPipelineDetails model = - new ValidateOpensearchPipelineDetails( - this.compartmentId, this.pipelineConfigurationBody); + public BackupCopyDetails build() { + BackupCopyDetails model = + new BackupCopyDetails(this.compartmentId, this.retentionPeriod, this.regions); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -81,12 +94,15 @@ public ValidateOpensearchPipelineDetails build() { } @com.fasterxml.jackson.annotation.JsonIgnore - public Builder copy(ValidateOpensearchPipelineDetails model) { + public Builder copy(BackupCopyDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } - if (model.wasPropertyExplicitlySet("pipelineConfigurationBody")) { - this.pipelineConfigurationBody(model.getPipelineConfigurationBody()); + if (model.wasPropertyExplicitlySet("retentionPeriod")) { + this.retentionPeriod(model.getRetentionPeriod()); + } + if (model.wasPropertyExplicitlySet("regions")) { + this.regions(model.getRegions()); } return this; } @@ -104,13 +120,13 @@ public Builder toBuilder() { } /** - * The OCID of the compartment where the pipeline will be created. + * target compartment to place a new backup **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** - * The OCID of the compartment where the pipeline will be created. + * target compartment to place a new backup * @return the value **/ public String getCompartmentId() { @@ -118,19 +134,31 @@ public String getCompartmentId() { } /** - * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. - * + * Retention period in days of the backup copy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriod") + private final Integer retentionPeriod; + + /** + * Retention period in days of the backup copy. + * @return the value + **/ + public Integer getRetentionPeriod() { + return retentionPeriod; + } + + /** + * List of region names of the remote region **/ - @com.fasterxml.jackson.annotation.JsonProperty("pipelineConfigurationBody") - private final String pipelineConfigurationBody; + @com.fasterxml.jackson.annotation.JsonProperty("regions") + private final java.util.List regions; /** - * The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\. - * + * List of region names of the remote region * @return the value **/ - public String getPipelineConfigurationBody() { - return pipelineConfigurationBody; + public java.util.List getRegions() { + return regions; } @Override @@ -145,11 +173,11 @@ public String toString() { */ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); - sb.append("ValidateOpensearchPipelineDetails("); + sb.append("BackupCopyDetails("); sb.append("super=").append(super.toString()); sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); - sb.append(", pipelineConfigurationBody=") - .append(String.valueOf(this.pipelineConfigurationBody)); + sb.append(", retentionPeriod=").append(String.valueOf(this.retentionPeriod)); + sb.append(", regions=").append(String.valueOf(this.regions)); sb.append(")"); return sb.toString(); } @@ -159,14 +187,14 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof ValidateOpensearchPipelineDetails)) { + if (!(o instanceof BackupCopyDetails)) { return false; } - ValidateOpensearchPipelineDetails other = (ValidateOpensearchPipelineDetails) o; + BackupCopyDetails other = (BackupCopyDetails) o; return java.util.Objects.equals(this.compartmentId, other.compartmentId) - && java.util.Objects.equals( - this.pipelineConfigurationBody, other.pipelineConfigurationBody) + && java.util.Objects.equals(this.retentionPeriod, other.retentionPeriod) + && java.util.Objects.equals(this.regions, other.regions) && super.equals(other); } @@ -179,9 +207,8 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) - + (this.pipelineConfigurationBody == null - ? 43 - : this.pipelineConfigurationBody.hashCode()); + + (this.retentionPeriod == null ? 43 : this.retentionPeriod.hashCode()); + result = (result * PRIME) + (this.regions == null ? 43 : this.regions.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupCopyPolicy.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupCopyPolicy.java new file mode 100644 index 0000000000..1b419f1789 --- /dev/null +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupCopyPolicy.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.psql.model; + +/** + * Backup copy 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: 20220915") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = BackupCopyPolicy.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BackupCopyPolicy extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId", "retentionPeriod", "regions"}) + public BackupCopyPolicy( + String compartmentId, Integer retentionPeriod, java.util.List regions) { + super(); + this.compartmentId = compartmentId; + this.retentionPeriod = retentionPeriod; + this.regions = regions; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * target compartment to place a new backup + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * target compartment to place a new backup + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Retention period in days of the backup copy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriod") + private Integer retentionPeriod; + + /** + * Retention period in days of the backup copy. + * @param retentionPeriod the value to set + * @return this builder + **/ + public Builder retentionPeriod(Integer retentionPeriod) { + this.retentionPeriod = retentionPeriod; + this.__explicitlySet__.add("retentionPeriod"); + return this; + } + /** + * List of region names of the remote region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("regions") + private java.util.List regions; + + /** + * List of region names of the remote region + * @param regions the value to set + * @return this builder + **/ + public Builder regions(java.util.List regions) { + this.regions = regions; + this.__explicitlySet__.add("regions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BackupCopyPolicy build() { + BackupCopyPolicy model = + new BackupCopyPolicy(this.compartmentId, this.retentionPeriod, this.regions); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BackupCopyPolicy model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("retentionPeriod")) { + this.retentionPeriod(model.getRetentionPeriod()); + } + if (model.wasPropertyExplicitlySet("regions")) { + this.regions(model.getRegions()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * target compartment to place a new backup + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * target compartment to place a new backup + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Retention period in days of the backup copy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriod") + private final Integer retentionPeriod; + + /** + * Retention period in days of the backup copy. + * @return the value + **/ + public Integer getRetentionPeriod() { + return retentionPeriod; + } + + /** + * List of region names of the remote region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("regions") + private final java.util.List regions; + + /** + * List of region names of the remote region + * @return the value + **/ + public java.util.List getRegions() { + return regions; + } + + @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("BackupCopyPolicy("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", retentionPeriod=").append(String.valueOf(this.retentionPeriod)); + sb.append(", regions=").append(String.valueOf(this.regions)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BackupCopyPolicy)) { + return false; + } + + BackupCopyPolicy other = (BackupCopyPolicy) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.retentionPeriod, other.retentionPeriod) + && java.util.Objects.equals(this.regions, other.regions) + && 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.retentionPeriod == null ? 43 : this.retentionPeriod.hashCode()); + result = (result * PRIME) + (this.regions == null ? 43 : this.regions.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupCopyStatusDetails.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupCopyStatusDetails.java new file mode 100644 index 0000000000..75941f490b --- /dev/null +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupCopyStatusDetails.java @@ -0,0 +1,299 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.psql.model; + +/** + * Backup Copy Status 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: 20220915") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BackupCopyStatusDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BackupCopyStatusDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"state", "stateDetails", "backupId", "region"}) + public BackupCopyStatusDetails( + State state, String stateDetails, String backupId, String region) { + super(); + this.state = state; + this.stateDetails = stateDetails; + this.backupId = backupId; + this.region = region; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Copy States + **/ + @com.fasterxml.jackson.annotation.JsonProperty("state") + private State state; + + /** + * Copy States + * @param state the value to set + * @return this builder + **/ + public Builder state(State state) { + this.state = state; + this.__explicitlySet__.add("state"); + return this; + } + /** + * A message describing the current state of copy in more detail + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stateDetails") + private String stateDetails; + + /** + * A message describing the current state of copy in more detail + * @param stateDetails the value to set + * @return this builder + **/ + public Builder stateDetails(String stateDetails) { + this.stateDetails = stateDetails; + this.__explicitlySet__.add("stateDetails"); + return this; + } + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup in the source region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupId") + private String backupId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup in the source region + * @param backupId the value to set + * @return this builder + **/ + public Builder backupId(String backupId) { + this.backupId = backupId; + this.__explicitlySet__.add("backupId"); + return this; + } + /** + * Region name of the remote region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("region") + private String region; + + /** + * Region name of the remote region + * @param region the value to set + * @return this builder + **/ + public Builder region(String region) { + this.region = region; + this.__explicitlySet__.add("region"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BackupCopyStatusDetails build() { + BackupCopyStatusDetails model = + new BackupCopyStatusDetails( + this.state, this.stateDetails, this.backupId, this.region); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BackupCopyStatusDetails model) { + if (model.wasPropertyExplicitlySet("state")) { + this.state(model.getState()); + } + if (model.wasPropertyExplicitlySet("stateDetails")) { + this.stateDetails(model.getStateDetails()); + } + if (model.wasPropertyExplicitlySet("backupId")) { + this.backupId(model.getBackupId()); + } + if (model.wasPropertyExplicitlySet("region")) { + this.region(model.getRegion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Copy States + **/ + public enum State { + NotStarted("NOT_STARTED"), + Copying("COPYING"), + Copied("COPIED"), + 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(State.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (State v : State.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + State(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static State create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'State', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Copy States + **/ + @com.fasterxml.jackson.annotation.JsonProperty("state") + private final State state; + + /** + * Copy States + * @return the value + **/ + public State getState() { + return state; + } + + /** + * A message describing the current state of copy in more detail + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stateDetails") + private final String stateDetails; + + /** + * A message describing the current state of copy in more detail + * @return the value + **/ + public String getStateDetails() { + return stateDetails; + } + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup in the source region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupId") + private final String backupId; + + /** + * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup in the source region + * @return the value + **/ + public String getBackupId() { + return backupId; + } + + /** + * Region name of the remote region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("region") + private final String region; + + /** + * Region name of the remote region + * @return the value + **/ + public String getRegion() { + return region; + } + + @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("BackupCopyStatusDetails("); + sb.append("super=").append(super.toString()); + sb.append("state=").append(String.valueOf(this.state)); + sb.append(", stateDetails=").append(String.valueOf(this.stateDetails)); + sb.append(", backupId=").append(String.valueOf(this.backupId)); + sb.append(", region=").append(String.valueOf(this.region)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BackupCopyStatusDetails)) { + return false; + } + + BackupCopyStatusDetails other = (BackupCopyStatusDetails) o; + return java.util.Objects.equals(this.state, other.state) + && java.util.Objects.equals(this.stateDetails, other.stateDetails) + && java.util.Objects.equals(this.backupId, other.backupId) + && java.util.Objects.equals(this.region, other.region) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.state == null ? 43 : this.state.hashCode()); + result = (result * PRIME) + (this.stateDetails == null ? 43 : this.stateDetails.hashCode()); + result = (result * PRIME) + (this.backupId == null ? 43 : this.backupId.hashCode()); + result = (result * PRIME) + (this.region == null ? 43 : this.region.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupPolicy.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupPolicy.java index 331298f510..f47f4e7d81 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupPolicy.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupPolicy.java @@ -42,10 +42,11 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public class BackupPolicy extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"retentionDays"}) - protected BackupPolicy(Integer retentionDays) { + @java.beans.ConstructorProperties({"retentionDays", "copyPolicy"}) + protected BackupPolicy(Integer retentionDays, BackupCopyPolicy copyPolicy) { super(); this.retentionDays = retentionDays; + this.copyPolicy = copyPolicy; } /** @@ -62,6 +63,13 @@ public Integer getRetentionDays() { return retentionDays; } + @com.fasterxml.jackson.annotation.JsonProperty("copyPolicy") + private final BackupCopyPolicy copyPolicy; + + public BackupCopyPolicy getCopyPolicy() { + return copyPolicy; + } + @Override public String toString() { return this.toString(true); @@ -77,6 +85,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("BackupPolicy("); sb.append("super=").append(super.toString()); sb.append("retentionDays=").append(String.valueOf(this.retentionDays)); + sb.append(", copyPolicy=").append(String.valueOf(this.copyPolicy)); sb.append(")"); return sb.toString(); } @@ -92,6 +101,7 @@ public boolean equals(Object o) { BackupPolicy other = (BackupPolicy) o; return java.util.Objects.equals(this.retentionDays, other.retentionDays) + && java.util.Objects.equals(this.copyPolicy, other.copyPolicy) && super.equals(other); } @@ -102,6 +112,7 @@ public int hashCode() { result = (result * PRIME) + (this.retentionDays == null ? 43 : this.retentionDays.hashCode()); + result = (result * PRIME) + (this.copyPolicy == null ? 43 : this.copyPolicy.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupSummary.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupSummary.java index e6b8ec1b41..48e13def27 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupSummary.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupSummary.java @@ -28,9 +28,11 @@ public final class BackupSummary extends com.oracle.bmc.http.internal.Explicitly "lifecycleState", "lifecycleDetails", "sourceType", + "timeCreatedPrecise", "backupSize", "dbSystemId", "retentionPeriod", + "copyStatus", "freeformTags", "definedTags", "systemTags" @@ -44,9 +46,11 @@ public BackupSummary( Backup.LifecycleState lifecycleState, String lifecycleDetails, Backup.SourceType sourceType, + java.util.Date timeCreatedPrecise, Integer backupSize, String dbSystemId, Integer retentionPeriod, + java.util.List copyStatus, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -59,9 +63,11 @@ public BackupSummary( this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; this.sourceType = sourceType; + this.timeCreatedPrecise = timeCreatedPrecise; this.backupSize = backupSize; this.dbSystemId = dbSystemId; this.retentionPeriod = retentionPeriod; + this.copyStatus = copyStatus; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -213,6 +219,32 @@ public Builder sourceType(Backup.SourceType sourceType) { this.__explicitlySet__.add("sourceType"); return this; } + /** + * The date and time the backup was created. + * This is the time the actual point-in-time data snapshot was taken, + * expressed in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreatedPrecise") + private java.util.Date timeCreatedPrecise; + + /** + * The date and time the backup was created. + * This is the time the actual point-in-time data snapshot was taken, + * expressed in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreatedPrecise the value to set + * @return this builder + **/ + public Builder timeCreatedPrecise(java.util.Date timeCreatedPrecise) { + this.timeCreatedPrecise = timeCreatedPrecise; + this.__explicitlySet__.add("timeCreatedPrecise"); + return this; + } /** * The size of the backup, in gigabytes. **/ @@ -261,6 +293,22 @@ public Builder retentionPeriod(Integer retentionPeriod) { this.__explicitlySet__.add("retentionPeriod"); return this; } + /** + * List of status for Backup Copy + **/ + @com.fasterxml.jackson.annotation.JsonProperty("copyStatus") + private java.util.List copyStatus; + + /** + * List of status for Backup Copy + * @param copyStatus the value to set + * @return this builder + **/ + public Builder copyStatus(java.util.List copyStatus) { + this.copyStatus = copyStatus; + this.__explicitlySet__.add("copyStatus"); + 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"}} @@ -337,9 +385,11 @@ public BackupSummary build() { this.lifecycleState, this.lifecycleDetails, this.sourceType, + this.timeCreatedPrecise, this.backupSize, this.dbSystemId, this.retentionPeriod, + this.copyStatus, this.freeformTags, this.definedTags, this.systemTags); @@ -375,6 +425,9 @@ public Builder copy(BackupSummary model) { if (model.wasPropertyExplicitlySet("sourceType")) { this.sourceType(model.getSourceType()); } + if (model.wasPropertyExplicitlySet("timeCreatedPrecise")) { + this.timeCreatedPrecise(model.getTimeCreatedPrecise()); + } if (model.wasPropertyExplicitlySet("backupSize")) { this.backupSize(model.getBackupSize()); } @@ -384,6 +437,9 @@ public Builder copy(BackupSummary model) { if (model.wasPropertyExplicitlySet("retentionPeriod")) { this.retentionPeriod(model.getRetentionPeriod()); } + if (model.wasPropertyExplicitlySet("copyStatus")) { + this.copyStatus(model.getCopyStatus()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -536,6 +592,30 @@ public Backup.SourceType getSourceType() { return sourceType; } + /** + * The date and time the backup was created. + * This is the time the actual point-in-time data snapshot was taken, + * expressed in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreatedPrecise") + private final java.util.Date timeCreatedPrecise; + + /** + * The date and time the backup was created. + * This is the time the actual point-in-time data snapshot was taken, + * expressed in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreatedPrecise() { + return timeCreatedPrecise; + } + /** * The size of the backup, in gigabytes. **/ @@ -578,6 +658,20 @@ public Integer getRetentionPeriod() { return retentionPeriod; } + /** + * List of status for Backup Copy + **/ + @com.fasterxml.jackson.annotation.JsonProperty("copyStatus") + private final java.util.List copyStatus; + + /** + * List of status for Backup Copy + * @return the value + **/ + public java.util.List getCopyStatus() { + return copyStatus; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -654,9 +748,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", sourceType=").append(String.valueOf(this.sourceType)); + sb.append(", timeCreatedPrecise=").append(String.valueOf(this.timeCreatedPrecise)); sb.append(", backupSize=").append(String.valueOf(this.backupSize)); sb.append(", dbSystemId=").append(String.valueOf(this.dbSystemId)); sb.append(", retentionPeriod=").append(String.valueOf(this.retentionPeriod)); + sb.append(", copyStatus=").append(String.valueOf(this.copyStatus)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -682,9 +778,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.sourceType, other.sourceType) + && java.util.Objects.equals(this.timeCreatedPrecise, other.timeCreatedPrecise) && java.util.Objects.equals(this.backupSize, other.backupSize) && java.util.Objects.equals(this.dbSystemId, other.dbSystemId) && java.util.Objects.equals(this.retentionPeriod, other.retentionPeriod) + && java.util.Objects.equals(this.copyStatus, other.copyStatus) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -709,11 +807,17 @@ public int hashCode() { (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.sourceType == null ? 43 : this.sourceType.hashCode()); + result = + (result * PRIME) + + (this.timeCreatedPrecise == null + ? 43 + : this.timeCreatedPrecise.hashCode()); result = (result * PRIME) + (this.backupSize == null ? 43 : this.backupSize.hashCode()); result = (result * PRIME) + (this.dbSystemId == null ? 43 : this.dbSystemId.hashCode()); result = (result * PRIME) + (this.retentionPeriod == null ? 43 : this.retentionPeriod.hashCode()); + result = (result * PRIME) + (this.copyStatus == null ? 43 : this.copyStatus.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()); diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Configuration.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Configuration.java index 691b1c27c2..1e1571769c 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Configuration.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Configuration.java @@ -654,6 +654,7 @@ public String getDbVersion() { public enum ConfigType { Default("DEFAULT"), Custom("CUSTOM"), + Copied("COPIED"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DailyBackupPolicy.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DailyBackupPolicy.java index f8b05ca5d1..36833a67ba 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DailyBackupPolicy.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DailyBackupPolicy.java @@ -35,6 +35,15 @@ public Builder retentionDays(Integer retentionDays) { this.__explicitlySet__.add("retentionDays"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("copyPolicy") + private BackupCopyPolicy copyPolicy; + + public Builder copyPolicy(BackupCopyPolicy copyPolicy) { + this.copyPolicy = copyPolicy; + this.__explicitlySet__.add("copyPolicy"); + return this; + } /** * Hour of the day when the backup starts. **/ @@ -56,7 +65,8 @@ public Builder backupStart(String backupStart) { private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public DailyBackupPolicy build() { - DailyBackupPolicy model = new DailyBackupPolicy(this.retentionDays, this.backupStart); + DailyBackupPolicy model = + new DailyBackupPolicy(this.retentionDays, this.copyPolicy, this.backupStart); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -68,6 +78,9 @@ public Builder copy(DailyBackupPolicy model) { if (model.wasPropertyExplicitlySet("retentionDays")) { this.retentionDays(model.getRetentionDays()); } + if (model.wasPropertyExplicitlySet("copyPolicy")) { + this.copyPolicy(model.getCopyPolicy()); + } if (model.wasPropertyExplicitlySet("backupStart")) { this.backupStart(model.getBackupStart()); } @@ -87,8 +100,9 @@ public Builder toBuilder() { } @Deprecated - public DailyBackupPolicy(Integer retentionDays, String backupStart) { - super(retentionDays); + public DailyBackupPolicy( + Integer retentionDays, BackupCopyPolicy copyPolicy, String backupStart) { + super(retentionDays, copyPolicy); this.backupStart = backupStart; } diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DbSystemDetails.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DbSystemDetails.java index ee41581dc5..85093ef4fc 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DbSystemDetails.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DbSystemDetails.java @@ -19,11 +19,12 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class DbSystemDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"systemType", "dbVersion"}) - public DbSystemDetails(DbSystem.SystemType systemType, String dbVersion) { + @java.beans.ConstructorProperties({"systemType", "dbVersion", "configId"}) + public DbSystemDetails(DbSystem.SystemType systemType, String dbVersion, String configId) { super(); this.systemType = systemType; this.dbVersion = dbVersion; + this.configId = configId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -60,12 +61,29 @@ public Builder dbVersion(String dbVersion) { this.__explicitlySet__.add("dbVersion"); return this; } + /** + * OCID of the configuration that was applied on the source dbSystem at the time when backup was taken. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("configId") + private String configId; + + /** + * OCID of the configuration that was applied on the source dbSystem at the time when backup was taken. + * @param configId the value to set + * @return this builder + **/ + public Builder configId(String configId) { + this.configId = configId; + this.__explicitlySet__.add("configId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public DbSystemDetails build() { - DbSystemDetails model = new DbSystemDetails(this.systemType, this.dbVersion); + DbSystemDetails model = + new DbSystemDetails(this.systemType, this.dbVersion, this.configId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -80,6 +98,9 @@ public Builder copy(DbSystemDetails model) { if (model.wasPropertyExplicitlySet("dbVersion")) { this.dbVersion(model.getDbVersion()); } + if (model.wasPropertyExplicitlySet("configId")) { + this.configId(model.getConfigId()); + } return this; } } @@ -123,6 +144,20 @@ public String getDbVersion() { return dbVersion; } + /** + * OCID of the configuration that was applied on the source dbSystem at the time when backup was taken. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("configId") + private final String configId; + + /** + * OCID of the configuration that was applied on the source dbSystem at the time when backup was taken. + * @return the value + **/ + public String getConfigId() { + return configId; + } + @Override public String toString() { return this.toString(true); @@ -139,6 +174,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("systemType=").append(String.valueOf(this.systemType)); sb.append(", dbVersion=").append(String.valueOf(this.dbVersion)); + sb.append(", configId=").append(String.valueOf(this.configId)); sb.append(")"); return sb.toString(); } @@ -155,6 +191,7 @@ public boolean equals(Object o) { DbSystemDetails other = (DbSystemDetails) o; return java.util.Objects.equals(this.systemType, other.systemType) && java.util.Objects.equals(this.dbVersion, other.dbVersion) + && java.util.Objects.equals(this.configId, other.configId) && super.equals(other); } @@ -164,6 +201,7 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.systemType == null ? 43 : this.systemType.hashCode()); result = (result * PRIME) + (this.dbVersion == null ? 43 : this.dbVersion.hashCode()); + result = (result * PRIME) + (this.configId == null ? 43 : this.configId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/MonthlyBackupPolicy.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/MonthlyBackupPolicy.java index cc95100a18..5139f49d83 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/MonthlyBackupPolicy.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/MonthlyBackupPolicy.java @@ -35,6 +35,15 @@ public Builder retentionDays(Integer retentionDays) { this.__explicitlySet__.add("retentionDays"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("copyPolicy") + private BackupCopyPolicy copyPolicy; + + public Builder copyPolicy(BackupCopyPolicy copyPolicy) { + this.copyPolicy = copyPolicy; + this.__explicitlySet__.add("copyPolicy"); + return this; + } /** * Hour of the day when backup starts. **/ @@ -78,7 +87,10 @@ public Builder daysOfTheMonth(java.util.List daysOfTheMonth) { public MonthlyBackupPolicy build() { MonthlyBackupPolicy model = new MonthlyBackupPolicy( - this.retentionDays, this.backupStart, this.daysOfTheMonth); + this.retentionDays, + this.copyPolicy, + this.backupStart, + this.daysOfTheMonth); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -90,6 +102,9 @@ public Builder copy(MonthlyBackupPolicy model) { if (model.wasPropertyExplicitlySet("retentionDays")) { this.retentionDays(model.getRetentionDays()); } + if (model.wasPropertyExplicitlySet("copyPolicy")) { + this.copyPolicy(model.getCopyPolicy()); + } if (model.wasPropertyExplicitlySet("backupStart")) { this.backupStart(model.getBackupStart()); } @@ -113,8 +128,11 @@ public Builder toBuilder() { @Deprecated public MonthlyBackupPolicy( - Integer retentionDays, String backupStart, java.util.List daysOfTheMonth) { - super(retentionDays); + Integer retentionDays, + BackupCopyPolicy copyPolicy, + String backupStart, + java.util.List daysOfTheMonth) { + super(retentionDays, copyPolicy); this.backupStart = backupStart; this.daysOfTheMonth = daysOfTheMonth; } diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/NoneBackupPolicy.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/NoneBackupPolicy.java index 97db34dd5d..da65bce3d6 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/NoneBackupPolicy.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/NoneBackupPolicy.java @@ -34,11 +34,20 @@ public Builder retentionDays(Integer retentionDays) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("copyPolicy") + private BackupCopyPolicy copyPolicy; + + public Builder copyPolicy(BackupCopyPolicy copyPolicy) { + this.copyPolicy = copyPolicy; + this.__explicitlySet__.add("copyPolicy"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public NoneBackupPolicy build() { - NoneBackupPolicy model = new NoneBackupPolicy(this.retentionDays); + NoneBackupPolicy model = new NoneBackupPolicy(this.retentionDays, this.copyPolicy); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -50,6 +59,9 @@ public Builder copy(NoneBackupPolicy model) { if (model.wasPropertyExplicitlySet("retentionDays")) { this.retentionDays(model.getRetentionDays()); } + if (model.wasPropertyExplicitlySet("copyPolicy")) { + this.copyPolicy(model.getCopyPolicy()); + } return this; } } @@ -66,8 +78,8 @@ public Builder toBuilder() { } @Deprecated - public NoneBackupPolicy(Integer retentionDays) { - super(retentionDays); + public NoneBackupPolicy(Integer retentionDays, BackupCopyPolicy copyPolicy) { + super(retentionDays, copyPolicy); } @Override diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/SourceBackupDetails.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/SourceBackupDetails.java new file mode 100644 index 0000000000..749cd367d1 --- /dev/null +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/SourceBackupDetails.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.psql.model; + +/** + * Information about the Source Backup associated with a backup. + *
+ * 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: 20220915") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SourceBackupDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SourceBackupDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"sourceRegion", "sourceBackupId"}) + public SourceBackupDetails(String sourceRegion, String sourceBackupId) { + super(); + this.sourceRegion = sourceRegion; + this.sourceBackupId = sourceBackupId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Backup Region of the COPY source type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceRegion") + private String sourceRegion; + + /** + * Backup Region of the COPY source type. + * @param sourceRegion the value to set + * @return this builder + **/ + public Builder sourceRegion(String sourceRegion) { + this.sourceRegion = sourceRegion; + this.__explicitlySet__.add("sourceRegion"); + return this; + } + /** + * Backup ID of the COPY source type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceBackupId") + private String sourceBackupId; + + /** + * Backup ID of the COPY source type. + * @param sourceBackupId the value to set + * @return this builder + **/ + public Builder sourceBackupId(String sourceBackupId) { + this.sourceBackupId = sourceBackupId; + this.__explicitlySet__.add("sourceBackupId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SourceBackupDetails build() { + SourceBackupDetails model = + new SourceBackupDetails(this.sourceRegion, this.sourceBackupId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SourceBackupDetails model) { + if (model.wasPropertyExplicitlySet("sourceRegion")) { + this.sourceRegion(model.getSourceRegion()); + } + if (model.wasPropertyExplicitlySet("sourceBackupId")) { + this.sourceBackupId(model.getSourceBackupId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Backup Region of the COPY source type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceRegion") + private final String sourceRegion; + + /** + * Backup Region of the COPY source type. + * @return the value + **/ + public String getSourceRegion() { + return sourceRegion; + } + + /** + * Backup ID of the COPY source type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceBackupId") + private final String sourceBackupId; + + /** + * Backup ID of the COPY source type. + * @return the value + **/ + public String getSourceBackupId() { + return sourceBackupId; + } + + @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("SourceBackupDetails("); + sb.append("super=").append(super.toString()); + sb.append("sourceRegion=").append(String.valueOf(this.sourceRegion)); + sb.append(", sourceBackupId=").append(String.valueOf(this.sourceBackupId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SourceBackupDetails)) { + return false; + } + + SourceBackupDetails other = (SourceBackupDetails) o; + return java.util.Objects.equals(this.sourceRegion, other.sourceRegion) + && java.util.Objects.equals(this.sourceBackupId, other.sourceBackupId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.sourceRegion == null ? 43 : this.sourceRegion.hashCode()); + result = + (result * PRIME) + + (this.sourceBackupId == null ? 43 : this.sourceBackupId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/WeeklyBackupPolicy.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/WeeklyBackupPolicy.java index 20cdec75b3..4ca7025f2c 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/WeeklyBackupPolicy.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/WeeklyBackupPolicy.java @@ -35,6 +35,15 @@ public Builder retentionDays(Integer retentionDays) { this.__explicitlySet__.add("retentionDays"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("copyPolicy") + private BackupCopyPolicy copyPolicy; + + public Builder copyPolicy(BackupCopyPolicy copyPolicy) { + this.copyPolicy = copyPolicy; + this.__explicitlySet__.add("copyPolicy"); + return this; + } /** * The day of the week that the backup starts. **/ @@ -74,7 +83,10 @@ public Builder backupStart(String backupStart) { public WeeklyBackupPolicy build() { WeeklyBackupPolicy model = new WeeklyBackupPolicy( - this.retentionDays, this.daysOfTheWeek, this.backupStart); + this.retentionDays, + this.copyPolicy, + this.daysOfTheWeek, + this.backupStart); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -86,6 +98,9 @@ public Builder copy(WeeklyBackupPolicy model) { if (model.wasPropertyExplicitlySet("retentionDays")) { this.retentionDays(model.getRetentionDays()); } + if (model.wasPropertyExplicitlySet("copyPolicy")) { + this.copyPolicy(model.getCopyPolicy()); + } if (model.wasPropertyExplicitlySet("daysOfTheWeek")) { this.daysOfTheWeek(model.getDaysOfTheWeek()); } @@ -110,9 +125,10 @@ public Builder toBuilder() { @Deprecated public WeeklyBackupPolicy( Integer retentionDays, + BackupCopyPolicy copyPolicy, java.util.List daysOfTheWeek, String backupStart) { - super(retentionDays); + super(retentionDays, copyPolicy); this.daysOfTheWeek = daysOfTheWeek; this.backupStart = backupStart; } diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/BackupCopyRequest.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/BackupCopyRequest.java new file mode 100644 index 0000000000..71ddc05784 --- /dev/null +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/BackupCopyRequest.java @@ -0,0 +1,342 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.psql.requests; + +import com.oracle.bmc.psql.model.*; +/** + * Example: Click here to see how to use BackupCopyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220915") +public class BackupCopyRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * A unique identifier for the backup. + */ + private String backupId; + + /** + * A unique identifier for the backup. + */ + public String getBackupId() { + return backupId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.psql.model.BackupCopyDetails backupCopyDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.psql.model.BackupCopyDetails getBackupCopyDetails() { + return backupCopyDetails; + } + /** + * 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, {@code retrytoken} could be expired or invalidated. + * + */ + 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, {@code retrytoken} could be expired or invalidated. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.psql.model.BackupCopyDetails getBody$() { + return backupCopyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + BackupCopyRequest, com.oracle.bmc.psql.model.BackupCopyDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A unique identifier for the backup. + */ + private String backupId = null; + + /** + * A unique identifier for the backup. + * @param backupId the value to set + * @return this builder instance + */ + public Builder backupId(String backupId) { + this.backupId = backupId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.psql.model.BackupCopyDetails backupCopyDetails = null; + + /** + * The information to be updated. + * @param backupCopyDetails the value to set + * @return this builder instance + */ + public Builder backupCopyDetails( + com.oracle.bmc.psql.model.BackupCopyDetails backupCopyDetails) { + this.backupCopyDetails = backupCopyDetails; + 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, {@code retrytoken} could be expired or invalidated. + * + */ + 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, {@code retrytoken} could be expired or invalidated. + * + * @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(BackupCopyRequest o) { + backupId(o.getBackupId()); + backupCopyDetails(o.getBackupCopyDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of BackupCopyRequest 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 BackupCopyRequest + */ + public BackupCopyRequest build() { + BackupCopyRequest 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.psql.model.BackupCopyDetails body) { + backupCopyDetails(body); + return this; + } + + /** + * Build the instance of BackupCopyRequest 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 BackupCopyRequest + */ + public BackupCopyRequest buildWithoutInvocationCallback() { + BackupCopyRequest request = new BackupCopyRequest(); + request.backupId = backupId; + request.backupCopyDetails = backupCopyDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new BackupCopyRequest(backupId, backupCopyDetails, 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() + .backupId(backupId) + .backupCopyDetails(backupCopyDetails) + .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(",backupId=").append(String.valueOf(this.backupId)); + sb.append(",backupCopyDetails=").append(String.valueOf(this.backupCopyDetails)); + 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 BackupCopyRequest)) { + return false; + } + + BackupCopyRequest other = (BackupCopyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.backupId, other.backupId) + && java.util.Objects.equals(this.backupCopyDetails, other.backupCopyDetails) + && 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.backupId == null ? 43 : this.backupId.hashCode()); + result = + (result * PRIME) + + (this.backupCopyDetails == null ? 43 : this.backupCopyDetails.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-psql/src/main/java/com/oracle/bmc/psql/requests/ListConfigurationsRequest.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/ListConfigurationsRequest.java index 594dfcf132..f7c501ab4c 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/ListConfigurationsRequest.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/ListConfigurationsRequest.java @@ -33,6 +33,17 @@ public String getCompartmentId() { public com.oracle.bmc.psql.model.Configuration.LifecycleState getLifecycleState() { return lifecycleState; } + /** + * A filter to return only resources if their {@code configType} matches the given {@code configType}. + */ + private com.oracle.bmc.psql.model.Configuration.ConfigType configType; + + /** + * A filter to return only resources if their {@code configType} matches the given {@code configType}. + */ + public com.oracle.bmc.psql.model.Configuration.ConfigType getConfigType() { + return configType; + } /** * A filter to return only resources that match the entire display name given. */ @@ -214,6 +225,21 @@ public Builder lifecycleState( return this; } + /** + * A filter to return only resources if their {@code configType} matches the given {@code configType}. + */ + private com.oracle.bmc.psql.model.Configuration.ConfigType configType = null; + + /** + * A filter to return only resources if their {@code configType} matches the given {@code configType}. + * @param configType the value to set + * @return this builder instance + */ + public Builder configType(com.oracle.bmc.psql.model.Configuration.ConfigType configType) { + this.configType = configType; + return this; + } + /** * A filter to return only resources that match the entire display name given. */ @@ -385,6 +411,7 @@ public Builder retryConfiguration( public Builder copy(ListConfigurationsRequest o) { compartmentId(o.getCompartmentId()); lifecycleState(o.getLifecycleState()); + configType(o.getConfigType()); displayName(o.getDisplayName()); dbVersion(o.getDbVersion()); shape(o.getShape()); @@ -428,6 +455,7 @@ public ListConfigurationsRequest buildWithoutInvocationCallback() { ListConfigurationsRequest request = new ListConfigurationsRequest(); request.compartmentId = compartmentId; request.lifecycleState = lifecycleState; + request.configType = configType; request.displayName = displayName; request.dbVersion = dbVersion; request.shape = shape; @@ -438,7 +466,7 @@ public ListConfigurationsRequest buildWithoutInvocationCallback() { request.sortBy = sortBy; request.opcRequestId = opcRequestId; return request; - // new ListConfigurationsRequest(compartmentId, lifecycleState, displayName, dbVersion, shape, configurationId, limit, page, sortOrder, sortBy, opcRequestId); + // new ListConfigurationsRequest(compartmentId, lifecycleState, configType, displayName, dbVersion, shape, configurationId, limit, page, sortOrder, sortBy, opcRequestId); } } @@ -450,6 +478,7 @@ public Builder toBuilder() { return new Builder() .compartmentId(compartmentId) .lifecycleState(lifecycleState) + .configType(configType) .displayName(displayName) .dbVersion(dbVersion) .shape(shape) @@ -476,6 +505,7 @@ public String toString() { sb.append("super=").append(super.toString()); sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",configType=").append(String.valueOf(this.configType)); sb.append(",displayName=").append(String.valueOf(this.displayName)); sb.append(",dbVersion=").append(String.valueOf(this.dbVersion)); sb.append(",shape=").append(String.valueOf(this.shape)); @@ -502,6 +532,7 @@ public boolean equals(Object 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.configType, other.configType) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.dbVersion, other.dbVersion) && java.util.Objects.equals(this.shape, other.shape) @@ -523,6 +554,7 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.configType == null ? 43 : this.configType.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.dbVersion == null ? 43 : this.dbVersion.hashCode()); result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/responses/BackupCopyResponse.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/responses/BackupCopyResponse.java new file mode 100644 index 0000000000..386db70767 --- /dev/null +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/responses/BackupCopyResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.psql.responses; + +import com.oracle.bmc.psql.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220915") +public class BackupCopyResponse 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 BackupCopyResponse( + 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(BackupCopyResponse 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 BackupCopyResponse build() { + return new BackupCopyResponse( + __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 BackupCopyResponse)) { + return false; + } + + BackupCopyResponse other = (BackupCopyResponse) 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-queue/pom.xml b/bmc-queue/pom.xml index 5006b6d6b0..745e96df5c 100644 --- a/bmc-queue/pom.xml +++ b/bmc-queue/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-queue @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-recovery/pom.xml b/bmc-recovery/pom.xml index ae76cf57b5..561618ea25 100644 --- a/bmc-recovery/pom.xml +++ b/bmc-recovery/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-recovery @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-redis/pom.xml b/bmc-redis/pom.xml index a565a1a55d..d384459927 100644 --- a/bmc-redis/pom.xml +++ b/bmc-redis/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-redis @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-resourcemanager/pom.xml b/bmc-resourcemanager/pom.xml index ad47c25c7e..48103c3008 100644 --- a/bmc-resourcemanager/pom.xml +++ b/bmc-resourcemanager/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-resourcemanager @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-resourcescheduler/pom.xml b/bmc-resourcescheduler/pom.xml index 0487b3dbcb..e1e59f7989 100644 --- a/bmc-resourcescheduler/pom.xml +++ b/bmc-resourcescheduler/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-resourcescheduler @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-resourcesearch/pom.xml b/bmc-resourcesearch/pom.xml index 7316ff8064..3ecccb592e 100644 --- a/bmc-resourcesearch/pom.xml +++ b/bmc-resourcesearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-resourcesearch @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-rover/pom.xml b/bmc-rover/pom.xml index 5ea79791f9..6e5788dc9c 100644 --- a/bmc-rover/pom.xml +++ b/bmc-rover/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-rover @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-sch/pom.xml b/bmc-sch/pom.xml index c934de019e..58df810aff 100644 --- a/bmc-sch/pom.xml +++ b/bmc-sch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-sch @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-sch/src/main/java/com/oracle/bmc/sch/model/FunctionsTargetDetails.java b/bmc-sch/src/main/java/com/oracle/bmc/sch/model/FunctionsTargetDetails.java index fabf916a66..5c1271493f 100644 --- a/bmc-sch/src/main/java/com/oracle/bmc/sch/model/FunctionsTargetDetails.java +++ b/bmc-sch/src/main/java/com/oracle/bmc/sch/model/FunctionsTargetDetails.java @@ -50,6 +50,7 @@ public Builder functionId(String functionId) { } /** * The batch rollover size in kilobytes. + * Only one size option can be specified: {@code batchSizeInKbs} or {@code batchSizeInNum}. * **/ @com.fasterxml.jackson.annotation.JsonProperty("batchSizeInKbs") @@ -57,6 +58,7 @@ public Builder functionId(String functionId) { /** * The batch rollover size in kilobytes. + * Only one size option can be specified: {@code batchSizeInKbs} or {@code batchSizeInNum}. * * @param batchSizeInKbs the value to set * @return this builder @@ -68,6 +70,7 @@ public Builder batchSizeInKbs(Integer batchSizeInKbs) { } /** * The batch rollover size in number of messages. + * Only one size option can be specified: {@code batchSizeInKbs} or {@code batchSizeInNum}. * **/ @com.fasterxml.jackson.annotation.JsonProperty("batchSizeInNum") @@ -75,6 +78,7 @@ public Builder batchSizeInKbs(Integer batchSizeInKbs) { /** * The batch rollover size in number of messages. + * Only one size option can be specified: {@code batchSizeInKbs} or {@code batchSizeInNum}. * * @param batchSizeInNum the value to set * @return this builder @@ -179,6 +183,7 @@ public String getFunctionId() { /** * The batch rollover size in kilobytes. + * Only one size option can be specified: {@code batchSizeInKbs} or {@code batchSizeInNum}. * **/ @com.fasterxml.jackson.annotation.JsonProperty("batchSizeInKbs") @@ -186,6 +191,7 @@ public String getFunctionId() { /** * The batch rollover size in kilobytes. + * Only one size option can be specified: {@code batchSizeInKbs} or {@code batchSizeInNum}. * * @return the value **/ @@ -195,6 +201,7 @@ public Integer getBatchSizeInKbs() { /** * The batch rollover size in number of messages. + * Only one size option can be specified: {@code batchSizeInKbs} or {@code batchSizeInNum}. * **/ @com.fasterxml.jackson.annotation.JsonProperty("batchSizeInNum") @@ -202,6 +209,7 @@ public Integer getBatchSizeInKbs() { /** * The batch rollover size in number of messages. + * Only one size option can be specified: {@code batchSizeInKbs} or {@code batchSizeInNum}. * * @return the value **/ diff --git a/bmc-sch/src/main/java/com/oracle/bmc/sch/model/LogSource.java b/bmc-sch/src/main/java/com/oracle/bmc/sch/model/LogSource.java index d155d4d8a5..3dfbe7403e 100644 --- a/bmc-sch/src/main/java/com/oracle/bmc/sch/model/LogSource.java +++ b/bmc-sch/src/main/java/com/oracle/bmc/sch/model/LogSource.java @@ -49,18 +49,16 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the log group. - * Note: For the Notifications target, only _Audit is allowed. - * Example OCID for _Audit log group: ocid1.tenancy.oc1..exampleuniqueid/_Audit + * Identifier of the log group. Either {@code _Audit} or the [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the log group. + * Note: For the Notifications target, only {@code _Audit} is allowed. * **/ @com.fasterxml.jackson.annotation.JsonProperty("logGroupId") private String logGroupId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the log group. - * Note: For the Notifications target, only _Audit is allowed. - * Example OCID for _Audit log group: ocid1.tenancy.oc1..exampleuniqueid/_Audit + * Identifier of the log group. Either {@code _Audit} or the [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the log group. + * Note: For the Notifications target, only {@code _Audit} is allowed. * * @param logGroupId the value to set * @return this builder @@ -143,18 +141,16 @@ public String getCompartmentId() { } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the log group. - * Note: For the Notifications target, only _Audit is allowed. - * Example OCID for _Audit log group: ocid1.tenancy.oc1..exampleuniqueid/_Audit + * Identifier of the log group. Either {@code _Audit} or the [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the log group. + * Note: For the Notifications target, only {@code _Audit} is allowed. * **/ @com.fasterxml.jackson.annotation.JsonProperty("logGroupId") private final String logGroupId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the log group. - * Note: For the Notifications target, only _Audit is allowed. - * Example OCID for _Audit log group: ocid1.tenancy.oc1..exampleuniqueid/_Audit + * Identifier of the log group. Either {@code _Audit} or the [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the log group. + * Note: For the Notifications target, only {@code _Audit} is allowed. * * @return the value **/ diff --git a/bmc-sch/src/main/java/com/oracle/bmc/sch/model/MonitoringTargetDetails.java b/bmc-sch/src/main/java/com/oracle/bmc/sch/model/MonitoringTargetDetails.java index 11f3e60abb..d054164c64 100644 --- a/bmc-sch/src/main/java/com/oracle/bmc/sch/model/MonitoringTargetDetails.java +++ b/bmc-sch/src/main/java/com/oracle/bmc/sch/model/MonitoringTargetDetails.java @@ -50,7 +50,6 @@ public Builder compartmentId(String compartmentId) { } /** * The namespace of the metric. - *

* Example: {@code oci_computeagent} * **/ @@ -59,7 +58,6 @@ public Builder compartmentId(String compartmentId) { /** * The namespace of the metric. - *

* Example: {@code oci_computeagent} * * @param metricNamespace the value to set @@ -72,7 +70,6 @@ public Builder metricNamespace(String metricNamespace) { } /** * The name of the metric. - *

* Example: {@code CpuUtilization} * **/ @@ -81,7 +78,6 @@ public Builder metricNamespace(String metricNamespace) { /** * The name of the metric. - *

* Example: {@code CpuUtilization} * * @param metric the value to set @@ -184,7 +180,6 @@ public String getCompartmentId() { /** * The namespace of the metric. - *

* Example: {@code oci_computeagent} * **/ @@ -193,7 +188,6 @@ public String getCompartmentId() { /** * The namespace of the metric. - *

* Example: {@code oci_computeagent} * * @return the value @@ -204,7 +198,6 @@ public String getMetricNamespace() { /** * The name of the metric. - *

* Example: {@code CpuUtilization} * **/ @@ -213,7 +206,6 @@ public String getMetricNamespace() { /** * The name of the metric. - *

* Example: {@code CpuUtilization} * * @return the value diff --git a/bmc-sch/src/main/java/com/oracle/bmc/sch/model/NotificationsTargetDetails.java b/bmc-sch/src/main/java/com/oracle/bmc/sch/model/NotificationsTargetDetails.java index 23a99939d3..c299ab6864 100644 --- a/bmc-sch/src/main/java/com/oracle/bmc/sch/model/NotificationsTargetDetails.java +++ b/bmc-sch/src/main/java/com/oracle/bmc/sch/model/NotificationsTargetDetails.java @@ -50,7 +50,6 @@ public Builder topicId(String topicId) { } /** * Whether to apply a simplified, user-friendly format to the message. Applies only when friendly formatting is supported by the connector source and the subscription protocol. - *

* Example: {@code true} * **/ @@ -59,7 +58,6 @@ public Builder topicId(String topicId) { /** * Whether to apply a simplified, user-friendly format to the message. Applies only when friendly formatting is supported by the connector source and the subscription protocol. - *

* Example: {@code true} * * @param enableFormattedMessaging the value to set @@ -131,7 +129,6 @@ public String getTopicId() { /** * Whether to apply a simplified, user-friendly format to the message. Applies only when friendly formatting is supported by the connector source and the subscription protocol. - *

* Example: {@code true} * **/ @@ -140,7 +137,6 @@ public String getTopicId() { /** * Whether to apply a simplified, user-friendly format to the message. Applies only when friendly formatting is supported by the connector source and the subscription protocol. - *

* Example: {@code true} * * @return the value diff --git a/bmc-sch/src/main/java/com/oracle/bmc/sch/model/PluginSourceDetails.java b/bmc-sch/src/main/java/com/oracle/bmc/sch/model/PluginSourceDetails.java index 0b52f3f700..ae3cf93b2f 100644 --- a/bmc-sch/src/main/java/com/oracle/bmc/sch/model/PluginSourceDetails.java +++ b/bmc-sch/src/main/java/com/oracle/bmc/sch/model/PluginSourceDetails.java @@ -32,7 +32,7 @@ public final class PluginSourceDetails extends SourceDetails { public static class Builder { /** * The name of the connector plugin. This name indicates the service to be called by the connector plugin. For example, {@code QueueSource} indicates the Queue service. - * To find names of connector plugins, list the plugin using (ListConnectorPlugin)[#/en/serviceconnectors/latest/ConnectorPluginSummary/ListConnectorPlugins]. + * To find names of connector plugins, list the plugin using {@link #listConnectorPlugins(ListConnectorPluginsRequest) listConnectorPlugins}. * **/ @com.fasterxml.jackson.annotation.JsonProperty("pluginName") @@ -40,7 +40,7 @@ public static class Builder { /** * The name of the connector plugin. This name indicates the service to be called by the connector plugin. For example, {@code QueueSource} indicates the Queue service. - * To find names of connector plugins, list the plugin using (ListConnectorPlugin)[#/en/serviceconnectors/latest/ConnectorPluginSummary/ListConnectorPlugins]. + * To find names of connector plugins, list the plugin using {@link #listConnectorPlugins(ListConnectorPluginsRequest) listConnectorPlugins}. * * @param pluginName the value to set * @return this builder @@ -53,7 +53,7 @@ public Builder pluginName(String pluginName) { /** * The configuration map for the connector plugin. This map includes parameters specific to the connector plugin type. * For example, for {@code QueueSource}, the map lists the OCID of the selected queue. - * To find the parameters for a connector plugin, get the plugin using (GetConnectorPlugin)[#/en/serviceconnectors/latest/ConnectorPlugin/GetConnectorPlugin] and review its schema value. + * To find the parameters for a connector plugin, get the plugin using {@link #getConnectorPlugin(GetConnectorPluginRequest) getConnectorPlugin} and review its schema value. * **/ @com.fasterxml.jackson.annotation.JsonProperty("configMap") @@ -62,7 +62,7 @@ public Builder pluginName(String pluginName) { /** * The configuration map for the connector plugin. This map includes parameters specific to the connector plugin type. * For example, for {@code QueueSource}, the map lists the OCID of the selected queue. - * To find the parameters for a connector plugin, get the plugin using (GetConnectorPlugin)[#/en/serviceconnectors/latest/ConnectorPlugin/GetConnectorPlugin] and review its schema value. + * To find the parameters for a connector plugin, get the plugin using {@link #getConnectorPlugin(GetConnectorPluginRequest) getConnectorPlugin} and review its schema value. * * @param configMap the value to set * @return this builder @@ -116,7 +116,7 @@ public PluginSourceDetails(String pluginName, Object configMap) { /** * The name of the connector plugin. This name indicates the service to be called by the connector plugin. For example, {@code QueueSource} indicates the Queue service. - * To find names of connector plugins, list the plugin using (ListConnectorPlugin)[#/en/serviceconnectors/latest/ConnectorPluginSummary/ListConnectorPlugins]. + * To find names of connector plugins, list the plugin using {@link #listConnectorPlugins(ListConnectorPluginsRequest) listConnectorPlugins}. * **/ @com.fasterxml.jackson.annotation.JsonProperty("pluginName") @@ -124,7 +124,7 @@ public PluginSourceDetails(String pluginName, Object configMap) { /** * The name of the connector plugin. This name indicates the service to be called by the connector plugin. For example, {@code QueueSource} indicates the Queue service. - * To find names of connector plugins, list the plugin using (ListConnectorPlugin)[#/en/serviceconnectors/latest/ConnectorPluginSummary/ListConnectorPlugins]. + * To find names of connector plugins, list the plugin using {@link #listConnectorPlugins(ListConnectorPluginsRequest) listConnectorPlugins}. * * @return the value **/ @@ -135,7 +135,7 @@ public String getPluginName() { /** * The configuration map for the connector plugin. This map includes parameters specific to the connector plugin type. * For example, for {@code QueueSource}, the map lists the OCID of the selected queue. - * To find the parameters for a connector plugin, get the plugin using (GetConnectorPlugin)[#/en/serviceconnectors/latest/ConnectorPlugin/GetConnectorPlugin] and review its schema value. + * To find the parameters for a connector plugin, get the plugin using {@link #getConnectorPlugin(GetConnectorPluginRequest) getConnectorPlugin} and review its schema value. * **/ @com.fasterxml.jackson.annotation.JsonProperty("configMap") @@ -144,7 +144,7 @@ public String getPluginName() { /** * The configuration map for the connector plugin. This map includes parameters specific to the connector plugin type. * For example, for {@code QueueSource}, the map lists the OCID of the selected queue. - * To find the parameters for a connector plugin, get the plugin using (GetConnectorPlugin)[#/en/serviceconnectors/latest/ConnectorPlugin/GetConnectorPlugin] and review its schema value. + * To find the parameters for a connector plugin, get the plugin using {@link #getConnectorPlugin(GetConnectorPluginRequest) getConnectorPlugin} and review its schema value. * * @return the value **/ diff --git a/bmc-sch/src/main/java/com/oracle/bmc/sch/model/ServiceConnector.java b/bmc-sch/src/main/java/com/oracle/bmc/sch/model/ServiceConnector.java index 9a1654aafe..ff54f2b0c9 100644 --- a/bmc-sch/src/main/java/com/oracle/bmc/sch/model/ServiceConnector.java +++ b/bmc-sch/src/main/java/com/oracle/bmc/sch/model/ServiceConnector.java @@ -30,6 +30,7 @@ public final class ServiceConnector extends com.oracle.bmc.http.internal.Explici "timeCreated", "timeUpdated", "lifecycleState", + "lifecycleDetails", "lifecyleDetails", "source", "tasks", @@ -46,6 +47,7 @@ public ServiceConnector( java.util.Date timeCreated, java.util.Date timeUpdated, LifecycleState lifecycleState, + String lifecycleDetails, String lifecyleDetails, SourceDetails source, java.util.List tasks, @@ -61,6 +63,7 @@ public ServiceConnector( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; this.lifecyleDetails = lifecyleDetails; this.source = source; this.tasks = tasks; @@ -214,10 +217,34 @@ public Builder lifecycleState(LifecycleState lifecycleState) { * information for a resource in a {@code FAILED} state. * **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. + * For example, the message might provide actionable + * information for a resource in a {@code 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; + } + /** + * *Please note this property is deprecated and will be removed on January 27, 2026. Use {@code lifecycleDetails} instead.* + * A message describing the current state in more detail. + * For example, the message might provide actionable + * information for a resource in a {@code FAILED} state. + * + **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecyleDetails") private String lifecyleDetails; /** + * *Please note this property is deprecated and will be removed on January 27, 2026. Use {@code lifecycleDetails} instead.* * A message describing the current state in more detail. * For example, the message might provide actionable * information for a resource in a {@code FAILED} state. @@ -343,6 +370,7 @@ public ServiceConnector build() { this.timeCreated, this.timeUpdated, this.lifecycleState, + this.lifecycleDetails, this.lifecyleDetails, this.source, this.tasks, @@ -379,6 +407,9 @@ public Builder copy(ServiceConnector model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("lifecyleDetails")) { this.lifecyleDetails(model.getLifecyleDetails()); } @@ -543,10 +574,32 @@ public LifecycleState getLifecycleState() { * information for a resource in a {@code FAILED} state. * **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. + * For example, the message might provide actionable + * information for a resource in a {@code FAILED} state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * *Please note this property is deprecated and will be removed on January 27, 2026. Use {@code lifecycleDetails} instead.* + * A message describing the current state in more detail. + * For example, the message might provide actionable + * information for a resource in a {@code FAILED} state. + * + **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecyleDetails") private final String lifecyleDetails; /** + * *Please note this property is deprecated and will be removed on January 27, 2026. Use {@code lifecycleDetails} instead.* * A message describing the current state in more detail. * For example, the message might provide actionable * information for a resource in a {@code FAILED} state. @@ -664,6 +717,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", lifecyleDetails=").append(String.valueOf(this.lifecyleDetails)); sb.append(", source=").append(String.valueOf(this.source)); sb.append(", tasks=").append(String.valueOf(this.tasks)); @@ -692,6 +746,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.lifecyleDetails, other.lifecyleDetails) && java.util.Objects.equals(this.source, other.source) && java.util.Objects.equals(this.tasks, other.tasks) @@ -717,6 +772,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.lifecyleDetails == null ? 43 : this.lifecyleDetails.hashCode()); diff --git a/bmc-secrets/pom.xml b/bmc-secrets/pom.xml index 6634d3ebea..799c126286 100644 --- a/bmc-secrets/pom.xml +++ b/bmc-secrets/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-secrets @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-securityattribute/pom.xml b/bmc-securityattribute/pom.xml index 48788901a7..6b401b709b 100644 --- a/bmc-securityattribute/pom.xml +++ b/bmc-securityattribute/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-securityattribute @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttribute.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttribute.java index ea963eceb8..1c2eb72215 100644 --- a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttribute.java +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttribute.java @@ -8,7 +8,7 @@ import com.oracle.bmc.securityattribute.responses.*; /** - * Use the Security Attributes API to manage security attributes and security attribute namespaces. For more information, see the documentation for [Security Attributes](https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attributes.htm) and [Security Attribute Nampespaces](https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * Use the Security Attributes API to manage security attributes and security attribute namespaces. For more information, see the documentation for [Security Attributes](https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attributes.htm) and [Security Attribute Namespaces](https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") @@ -72,9 +72,9 @@ public interface SecurityAttribute extends AutoCloseable { * When all security attributes have been removed, the state changes to DELETED. You cannot restore a deleted security attribute. After the security attribute state * changes to DELETED, you can use the same security attribute name again. * - * After you start this operation, you cannot start either the {@link #deleteSecurityAttribute(DeleteSecurityAttributeRequest) deleteSecurityAttribute} or the {@link #cascadeDeleteSecurityAttributeNamespace(CascadeDeleteSecurityAttributeNamespaceRequest) cascadeDeleteSecurityAttributeNamespace} operation until this process completes. + * After you start this operation, you cannot start either the {@link #deleteSecurityAttribute(DeleteSecurityAttributeRequest) deleteSecurityAttribute} or the {@link #cascadingDeleteSecurityAttributeNamespace(CascadingDeleteSecurityAttributeNamespaceRequest) cascadingDeleteSecurityAttributeNamespace} operation until this process completes. * - * In order to delete security attribute, you must first retire the security attribute. Use {@link #updateSecurityAttribute(UpdateSecurityAttributeRequest) updateSecurityAttribute} + * In order to delete security attribute, you must first retire the security attribute. Use {@link #updateSecurityAttributeNamespace(UpdateSecurityAttributeNamespaceRequest) updateSecurityAttributeNamespace} * to retire a security attribute. * * @param request The request object containing the details to send @@ -205,7 +205,7 @@ ChangeSecurityAttributeNamespaceCompartmentResponse changeSecurityAttributeNames *

* You must also specify a *description* for the namespace. * It does not have to be unique, and you can change it with - * {@link #securityAttributeNamespace(SecurityAttributeNamespaceRequest) securityAttributeNamespace}. + * {@link #updateSecurityAttributeNamespace(UpdateSecurityAttributeNamespaceRequest) updateSecurityAttributeNamespace}. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -229,7 +229,7 @@ CreateSecurityAttributeNamespaceResponse createSecurityAttributeNamespace( * When all attributes have been removed, the state changes to DELETED. You cannot restore a deleted attribute. Once the deleted attribute * changes its state to DELETED, you can use the same security attribute name again. *

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

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

* You can't add a namespace with the same name as a retired namespace in the same tenancy. diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsync.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsync.java index 7b3b054833..36a511cb29 100644 --- a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsync.java +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsync.java @@ -8,7 +8,7 @@ import com.oracle.bmc.securityattribute.responses.*; /** - * Use the Security Attributes API to manage security attributes and security attribute namespaces. For more information, see the documentation for [Security Attributes](https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attributes.htm) and [Security Attribute Nampespaces](https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * Use the Security Attributes API to manage security attributes and security attribute namespaces. For more information, see the documentation for [Security Attributes](https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attributes.htm) and [Security Attribute Namespaces](https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") public interface SecurityAttributeAsync extends AutoCloseable { @@ -71,9 +71,9 @@ public interface SecurityAttributeAsync extends AutoCloseable { * When all security attributes have been removed, the state changes to DELETED. You cannot restore a deleted security attribute. After the security attribute state * changes to DELETED, you can use the same security attribute name again. * - * After you start this operation, you cannot start either the {@link #deleteSecurityAttribute(DeleteSecurityAttributeRequest, Consumer, Consumer) deleteSecurityAttribute} or the {@link #cascadeDeleteSecurityAttributeNamespace(CascadeDeleteSecurityAttributeNamespaceRequest, Consumer, Consumer) cascadeDeleteSecurityAttributeNamespace} operation until this process completes. + * After you start this operation, you cannot start either the {@link #deleteSecurityAttribute(DeleteSecurityAttributeRequest, Consumer, Consumer) deleteSecurityAttribute} or the {@link #cascadingDeleteSecurityAttributeNamespace(CascadingDeleteSecurityAttributeNamespaceRequest, Consumer, Consumer) cascadingDeleteSecurityAttributeNamespace} operation until this process completes. * - * In order to delete security attribute, you must first retire the security attribute. Use {@link #updateSecurityAttribute(UpdateSecurityAttributeRequest, Consumer, Consumer) updateSecurityAttribute} + * In order to delete security attribute, you must first retire the security attribute. Use {@link #updateSecurityAttributeNamespace(UpdateSecurityAttributeNamespaceRequest, Consumer, Consumer) updateSecurityAttributeNamespace} * to retire a security attribute. * * @@ -225,7 +225,7 @@ java.util.concurrent.Future createSecurityAttri *

* You must also specify a *description* for the namespace. * It does not have to be unique, and you can change it with - * {@link #securityAttributeNamespace(SecurityAttributeNamespaceRequest, Consumer, Consumer) securityAttributeNamespace}. + * {@link #updateSecurityAttributeNamespace(UpdateSecurityAttributeNamespaceRequest, Consumer, Consumer) updateSecurityAttributeNamespace}. * * * @param request The request object containing the details to send @@ -254,7 +254,7 @@ java.util.concurrent.Future createSecurityAttri * When all attributes have been removed, the state changes to DELETED. You cannot restore a deleted attribute. Once the deleted attribute * changes its state to DELETED, you can use the same security attribute name again. *

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

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

* You can't add a namespace with the same name as a retired namespace in the same tenancy. diff --git a/bmc-servicecatalog/pom.xml b/bmc-servicecatalog/pom.xml index 9d837df511..778ac7ef36 100644 --- a/bmc-servicecatalog/pom.xml +++ b/bmc-servicecatalog/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-servicecatalog @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-servicemanagerproxy/pom.xml b/bmc-servicemanagerproxy/pom.xml index bfdd8b40e5..8f9879fd8b 100644 --- a/bmc-servicemanagerproxy/pom.xml +++ b/bmc-servicemanagerproxy/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-servicemanagerproxy @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-servicemesh/pom.xml b/bmc-servicemesh/pom.xml index 62a4d64773..3d0f6bfebe 100644 --- a/bmc-servicemesh/pom.xml +++ b/bmc-servicemesh/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-servicemesh @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.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 98ceaba5f7..763670127f 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.81.0 + 2.82.0 ../pom.xml oci-java-sdk-shaded-full diff --git a/bmc-shaded/pom.xml b/bmc-shaded/pom.xml index b679218d88..f23cbd119d 100644 --- a/bmc-shaded/pom.xml +++ b/bmc-shaded/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml diff --git a/bmc-stackmonitoring/pom.xml b/bmc-stackmonitoring/pom.xml index 24b3ad099e..5fc20107f4 100644 --- a/bmc-stackmonitoring/pom.xml +++ b/bmc-stackmonitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-stackmonitoring @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/ListMonitoredResourceTypesConverter.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/ListMonitoredResourceTypesConverter.java index 27c0ea3c4d..6b7b0ee334 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/ListMonitoredResourceTypesConverter.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/ListMonitoredResourceTypesConverter.java @@ -74,6 +74,22 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getMetricNamespace())); } + if (request.getSourceType() != null) { + target = + target.queryParam( + "sourceType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSourceType().getValue())); + } + + if (request.getResourceCategory() != null) { + target = + target.queryParam( + "resourceCategory", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceCategory().getValue())); + } + if (request.getSortBy() != null) { target = target.queryParam( diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AdditionalConfigurationDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AdditionalConfigurationDetails.java new file mode 100644 index 0000000000..6d00d1511f --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AdditionalConfigurationDetails.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Property 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AdditionalConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AdditionalConfigurationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"propertiesMap"}) + public AdditionalConfigurationDetails(java.util.Map propertiesMap) { + super(); + this.propertiesMap = propertiesMap; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Key/Value pair of Property + **/ + @com.fasterxml.jackson.annotation.JsonProperty("propertiesMap") + private java.util.Map propertiesMap; + + /** + * Key/Value pair of Property + * @param propertiesMap the value to set + * @return this builder + **/ + public Builder propertiesMap(java.util.Map propertiesMap) { + this.propertiesMap = propertiesMap; + this.__explicitlySet__.add("propertiesMap"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AdditionalConfigurationDetails build() { + AdditionalConfigurationDetails model = + new AdditionalConfigurationDetails(this.propertiesMap); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AdditionalConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("propertiesMap")) { + this.propertiesMap(model.getPropertiesMap()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Key/Value pair of Property + **/ + @com.fasterxml.jackson.annotation.JsonProperty("propertiesMap") + private final java.util.Map propertiesMap; + + /** + * Key/Value pair of Property + * @return the value + **/ + public java.util.Map getPropertiesMap() { + return propertiesMap; + } + + @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("AdditionalConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("propertiesMap=").append(String.valueOf(this.propertiesMap)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AdditionalConfigurationDetails)) { + return false; + } + + AdditionalConfigurationDetails other = (AdditionalConfigurationDetails) o; + return java.util.Objects.equals(this.propertiesMap, other.propertiesMap) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.propertiesMap == null ? 43 : this.propertiesMap.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AgentExtensionHandlerConfiguration.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AgentExtensionHandlerConfiguration.java new file mode 100644 index 0000000000..9670acd11c --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AgentExtensionHandlerConfiguration.java @@ -0,0 +1,422 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Specific resource mapping configurations for Agent Extension Handlers. + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AgentExtensionHandlerConfiguration.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AgentExtensionHandlerConfiguration + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "collectorTypes", + "metricUploadIntervalInSeconds", + "telemetryResourceGroup", + "telegrafResourceNameConfig", + "collectdResourceNameConfig", + "metricNameConfig", + "metricMappings", + "handlerProperties" + }) + public AgentExtensionHandlerConfiguration( + java.util.List collectorTypes, + Integer metricUploadIntervalInSeconds, + String telemetryResourceGroup, + TelegrafResourceNameConfigurationDetails telegrafResourceNameConfig, + CollectdResourceNameConfigurationDetails collectdResourceNameConfig, + MetricNameConfigurationDetails metricNameConfig, + java.util.List metricMappings, + java.util.List handlerProperties) { + super(); + this.collectorTypes = collectorTypes; + this.metricUploadIntervalInSeconds = metricUploadIntervalInSeconds; + this.telemetryResourceGroup = telemetryResourceGroup; + this.telegrafResourceNameConfig = telegrafResourceNameConfig; + this.collectdResourceNameConfig = collectdResourceNameConfig; + this.metricNameConfig = metricNameConfig; + this.metricMappings = metricMappings; + this.handlerProperties = handlerProperties; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of collector/plugin names. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("collectorTypes") + private java.util.List collectorTypes; + + /** + * List of collector/plugin names. + * @param collectorTypes the value to set + * @return this builder + **/ + public Builder collectorTypes(java.util.List collectorTypes) { + this.collectorTypes = collectorTypes; + this.__explicitlySet__.add("collectorTypes"); + return this; + } + /** + * Metric upload interval in seconds. Any metric sent by telegraf/collectd before the + * configured interval expires will be dropped. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metricUploadIntervalInSeconds") + private Integer metricUploadIntervalInSeconds; + + /** + * Metric upload interval in seconds. Any metric sent by telegraf/collectd before the + * configured interval expires will be dropped. + * + * @param metricUploadIntervalInSeconds the value to set + * @return this builder + **/ + public Builder metricUploadIntervalInSeconds(Integer metricUploadIntervalInSeconds) { + this.metricUploadIntervalInSeconds = metricUploadIntervalInSeconds; + this.__explicitlySet__.add("metricUploadIntervalInSeconds"); + return this; + } + /** + * Resource group string; if not specified, the resource group string will be generated by the handler. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("telemetryResourceGroup") + private String telemetryResourceGroup; + + /** + * Resource group string; if not specified, the resource group string will be generated by the handler. + * @param telemetryResourceGroup the value to set + * @return this builder + **/ + public Builder telemetryResourceGroup(String telemetryResourceGroup) { + this.telemetryResourceGroup = telemetryResourceGroup; + this.__explicitlySet__.add("telemetryResourceGroup"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("telegrafResourceNameConfig") + private TelegrafResourceNameConfigurationDetails telegrafResourceNameConfig; + + public Builder telegrafResourceNameConfig( + TelegrafResourceNameConfigurationDetails telegrafResourceNameConfig) { + this.telegrafResourceNameConfig = telegrafResourceNameConfig; + this.__explicitlySet__.add("telegrafResourceNameConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("collectdResourceNameConfig") + private CollectdResourceNameConfigurationDetails collectdResourceNameConfig; + + public Builder collectdResourceNameConfig( + CollectdResourceNameConfigurationDetails collectdResourceNameConfig) { + this.collectdResourceNameConfig = collectdResourceNameConfig; + this.__explicitlySet__.add("collectdResourceNameConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metricNameConfig") + private MetricNameConfigurationDetails metricNameConfig; + + public Builder metricNameConfig(MetricNameConfigurationDetails metricNameConfig) { + this.metricNameConfig = metricNameConfig; + this.__explicitlySet__.add("metricNameConfig"); + return this; + } + /** + * List of AgentExtensionHandlerMetricMappingDetails. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metricMappings") + private java.util.List metricMappings; + + /** + * List of AgentExtensionHandlerMetricMappingDetails. + * @param metricMappings the value to set + * @return this builder + **/ + public Builder metricMappings( + java.util.List metricMappings) { + this.metricMappings = metricMappings; + this.__explicitlySet__.add("metricMappings"); + return this; + } + /** + * List of handler configuration properties + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handlerProperties") + private java.util.List handlerProperties; + + /** + * List of handler configuration properties + * @param handlerProperties the value to set + * @return this builder + **/ + public Builder handlerProperties( + java.util.List handlerProperties) { + this.handlerProperties = handlerProperties; + this.__explicitlySet__.add("handlerProperties"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AgentExtensionHandlerConfiguration build() { + AgentExtensionHandlerConfiguration model = + new AgentExtensionHandlerConfiguration( + this.collectorTypes, + this.metricUploadIntervalInSeconds, + this.telemetryResourceGroup, + this.telegrafResourceNameConfig, + this.collectdResourceNameConfig, + this.metricNameConfig, + this.metricMappings, + this.handlerProperties); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AgentExtensionHandlerConfiguration model) { + if (model.wasPropertyExplicitlySet("collectorTypes")) { + this.collectorTypes(model.getCollectorTypes()); + } + if (model.wasPropertyExplicitlySet("metricUploadIntervalInSeconds")) { + this.metricUploadIntervalInSeconds(model.getMetricUploadIntervalInSeconds()); + } + if (model.wasPropertyExplicitlySet("telemetryResourceGroup")) { + this.telemetryResourceGroup(model.getTelemetryResourceGroup()); + } + if (model.wasPropertyExplicitlySet("telegrafResourceNameConfig")) { + this.telegrafResourceNameConfig(model.getTelegrafResourceNameConfig()); + } + if (model.wasPropertyExplicitlySet("collectdResourceNameConfig")) { + this.collectdResourceNameConfig(model.getCollectdResourceNameConfig()); + } + if (model.wasPropertyExplicitlySet("metricNameConfig")) { + this.metricNameConfig(model.getMetricNameConfig()); + } + if (model.wasPropertyExplicitlySet("metricMappings")) { + this.metricMappings(model.getMetricMappings()); + } + if (model.wasPropertyExplicitlySet("handlerProperties")) { + this.handlerProperties(model.getHandlerProperties()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of collector/plugin names. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("collectorTypes") + private final java.util.List collectorTypes; + + /** + * List of collector/plugin names. + * @return the value + **/ + public java.util.List getCollectorTypes() { + return collectorTypes; + } + + /** + * Metric upload interval in seconds. Any metric sent by telegraf/collectd before the + * configured interval expires will be dropped. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metricUploadIntervalInSeconds") + private final Integer metricUploadIntervalInSeconds; + + /** + * Metric upload interval in seconds. Any metric sent by telegraf/collectd before the + * configured interval expires will be dropped. + * + * @return the value + **/ + public Integer getMetricUploadIntervalInSeconds() { + return metricUploadIntervalInSeconds; + } + + /** + * Resource group string; if not specified, the resource group string will be generated by the handler. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("telemetryResourceGroup") + private final String telemetryResourceGroup; + + /** + * Resource group string; if not specified, the resource group string will be generated by the handler. + * @return the value + **/ + public String getTelemetryResourceGroup() { + return telemetryResourceGroup; + } + + @com.fasterxml.jackson.annotation.JsonProperty("telegrafResourceNameConfig") + private final TelegrafResourceNameConfigurationDetails telegrafResourceNameConfig; + + public TelegrafResourceNameConfigurationDetails getTelegrafResourceNameConfig() { + return telegrafResourceNameConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("collectdResourceNameConfig") + private final CollectdResourceNameConfigurationDetails collectdResourceNameConfig; + + public CollectdResourceNameConfigurationDetails getCollectdResourceNameConfig() { + return collectdResourceNameConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metricNameConfig") + private final MetricNameConfigurationDetails metricNameConfig; + + public MetricNameConfigurationDetails getMetricNameConfig() { + return metricNameConfig; + } + + /** + * List of AgentExtensionHandlerMetricMappingDetails. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metricMappings") + private final java.util.List metricMappings; + + /** + * List of AgentExtensionHandlerMetricMappingDetails. + * @return the value + **/ + public java.util.List getMetricMappings() { + return metricMappings; + } + + /** + * List of handler configuration properties + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handlerProperties") + private final java.util.List handlerProperties; + + /** + * List of handler configuration properties + * @return the value + **/ + public java.util.List getHandlerProperties() { + return handlerProperties; + } + + @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("AgentExtensionHandlerConfiguration("); + sb.append("super=").append(super.toString()); + sb.append("collectorTypes=").append(String.valueOf(this.collectorTypes)); + sb.append(", metricUploadIntervalInSeconds=") + .append(String.valueOf(this.metricUploadIntervalInSeconds)); + sb.append(", telemetryResourceGroup=").append(String.valueOf(this.telemetryResourceGroup)); + sb.append(", telegrafResourceNameConfig=") + .append(String.valueOf(this.telegrafResourceNameConfig)); + sb.append(", collectdResourceNameConfig=") + .append(String.valueOf(this.collectdResourceNameConfig)); + sb.append(", metricNameConfig=").append(String.valueOf(this.metricNameConfig)); + sb.append(", metricMappings=").append(String.valueOf(this.metricMappings)); + sb.append(", handlerProperties=").append(String.valueOf(this.handlerProperties)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AgentExtensionHandlerConfiguration)) { + return false; + } + + AgentExtensionHandlerConfiguration other = (AgentExtensionHandlerConfiguration) o; + return java.util.Objects.equals(this.collectorTypes, other.collectorTypes) + && java.util.Objects.equals( + this.metricUploadIntervalInSeconds, other.metricUploadIntervalInSeconds) + && java.util.Objects.equals( + this.telemetryResourceGroup, other.telemetryResourceGroup) + && java.util.Objects.equals( + this.telegrafResourceNameConfig, other.telegrafResourceNameConfig) + && java.util.Objects.equals( + this.collectdResourceNameConfig, other.collectdResourceNameConfig) + && java.util.Objects.equals(this.metricNameConfig, other.metricNameConfig) + && java.util.Objects.equals(this.metricMappings, other.metricMappings) + && java.util.Objects.equals(this.handlerProperties, other.handlerProperties) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.collectorTypes == null ? 43 : this.collectorTypes.hashCode()); + result = + (result * PRIME) + + (this.metricUploadIntervalInSeconds == null + ? 43 + : this.metricUploadIntervalInSeconds.hashCode()); + result = + (result * PRIME) + + (this.telemetryResourceGroup == null + ? 43 + : this.telemetryResourceGroup.hashCode()); + result = + (result * PRIME) + + (this.telegrafResourceNameConfig == null + ? 43 + : this.telegrafResourceNameConfig.hashCode()); + result = + (result * PRIME) + + (this.collectdResourceNameConfig == null + ? 43 + : this.collectdResourceNameConfig.hashCode()); + result = + (result * PRIME) + + (this.metricNameConfig == null ? 43 : this.metricNameConfig.hashCode()); + result = + (result * PRIME) + + (this.metricMappings == null ? 43 : this.metricMappings.hashCode()); + result = + (result * PRIME) + + (this.handlerProperties == null ? 43 : this.handlerProperties.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AgentExtensionHandlerConfigurationProperty.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AgentExtensionHandlerConfigurationProperty.java new file mode 100644 index 0000000000..2bd49f92fb --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AgentExtensionHandlerConfigurationProperty.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Property of handler 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AgentExtensionHandlerConfigurationProperty.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AgentExtensionHandlerConfigurationProperty + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "value"}) + public AgentExtensionHandlerConfigurationProperty(String name, String value) { + super(); + this.name = name; + this.value = value; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Property name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Property name. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Property value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * Property value. + * @param value the value to set + * @return this builder + **/ + public Builder value(String 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 AgentExtensionHandlerConfigurationProperty build() { + AgentExtensionHandlerConfigurationProperty model = + new AgentExtensionHandlerConfigurationProperty(this.name, this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AgentExtensionHandlerConfigurationProperty model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + 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); + } + + /** + * Property name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Property name. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Property value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * Property value. + * @return the value + **/ + public String 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("AgentExtensionHandlerConfigurationProperty("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + 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 AgentExtensionHandlerConfigurationProperty)) { + return false; + } + + AgentExtensionHandlerConfigurationProperty other = + (AgentExtensionHandlerConfigurationProperty) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.value, other.value) + && 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.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AgentExtensionHandlerMetricMappingDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AgentExtensionHandlerMetricMappingDetails.java new file mode 100644 index 0000000000..7347693442 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AgentExtensionHandlerMetricMappingDetails.java @@ -0,0 +1,284 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Specific metric mapping configurations for Agent Extension Handlers. + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AgentExtensionHandlerMetricMappingDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AgentExtensionHandlerMetricMappingDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "collectorMetricName", + "telemetryMetricName", + "isSkipUpload", + "metricUploadIntervalInSeconds" + }) + public AgentExtensionHandlerMetricMappingDetails( + String collectorMetricName, + String telemetryMetricName, + Boolean isSkipUpload, + Integer metricUploadIntervalInSeconds) { + super(); + this.collectorMetricName = collectorMetricName; + this.telemetryMetricName = telemetryMetricName; + this.isSkipUpload = isSkipUpload; + this.metricUploadIntervalInSeconds = metricUploadIntervalInSeconds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Metric name as defined by the collector. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("collectorMetricName") + private String collectorMetricName; + + /** + * Metric name as defined by the collector. + * @param collectorMetricName the value to set + * @return this builder + **/ + public Builder collectorMetricName(String collectorMetricName) { + this.collectorMetricName = collectorMetricName; + this.__explicitlySet__.add("collectorMetricName"); + return this; + } + /** + * Metric name to be upload to telemetry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("telemetryMetricName") + private String telemetryMetricName; + + /** + * Metric name to be upload to telemetry. + * @param telemetryMetricName the value to set + * @return this builder + **/ + public Builder telemetryMetricName(String telemetryMetricName) { + this.telemetryMetricName = telemetryMetricName; + this.__explicitlySet__.add("telemetryMetricName"); + return this; + } + /** + * Is ignoring this metric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSkipUpload") + private Boolean isSkipUpload; + + /** + * Is ignoring this metric. + * @param isSkipUpload the value to set + * @return this builder + **/ + public Builder isSkipUpload(Boolean isSkipUpload) { + this.isSkipUpload = isSkipUpload; + this.__explicitlySet__.add("isSkipUpload"); + return this; + } + /** + * Metric upload interval in seconds. Any metric sent by telegraf/collectd before the + * configured interval expires will be dropped. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metricUploadIntervalInSeconds") + private Integer metricUploadIntervalInSeconds; + + /** + * Metric upload interval in seconds. Any metric sent by telegraf/collectd before the + * configured interval expires will be dropped. + * + * @param metricUploadIntervalInSeconds the value to set + * @return this builder + **/ + public Builder metricUploadIntervalInSeconds(Integer metricUploadIntervalInSeconds) { + this.metricUploadIntervalInSeconds = metricUploadIntervalInSeconds; + this.__explicitlySet__.add("metricUploadIntervalInSeconds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AgentExtensionHandlerMetricMappingDetails build() { + AgentExtensionHandlerMetricMappingDetails model = + new AgentExtensionHandlerMetricMappingDetails( + this.collectorMetricName, + this.telemetryMetricName, + this.isSkipUpload, + this.metricUploadIntervalInSeconds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AgentExtensionHandlerMetricMappingDetails model) { + if (model.wasPropertyExplicitlySet("collectorMetricName")) { + this.collectorMetricName(model.getCollectorMetricName()); + } + if (model.wasPropertyExplicitlySet("telemetryMetricName")) { + this.telemetryMetricName(model.getTelemetryMetricName()); + } + if (model.wasPropertyExplicitlySet("isSkipUpload")) { + this.isSkipUpload(model.getIsSkipUpload()); + } + if (model.wasPropertyExplicitlySet("metricUploadIntervalInSeconds")) { + this.metricUploadIntervalInSeconds(model.getMetricUploadIntervalInSeconds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Metric name as defined by the collector. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("collectorMetricName") + private final String collectorMetricName; + + /** + * Metric name as defined by the collector. + * @return the value + **/ + public String getCollectorMetricName() { + return collectorMetricName; + } + + /** + * Metric name to be upload to telemetry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("telemetryMetricName") + private final String telemetryMetricName; + + /** + * Metric name to be upload to telemetry. + * @return the value + **/ + public String getTelemetryMetricName() { + return telemetryMetricName; + } + + /** + * Is ignoring this metric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSkipUpload") + private final Boolean isSkipUpload; + + /** + * Is ignoring this metric. + * @return the value + **/ + public Boolean getIsSkipUpload() { + return isSkipUpload; + } + + /** + * Metric upload interval in seconds. Any metric sent by telegraf/collectd before the + * configured interval expires will be dropped. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metricUploadIntervalInSeconds") + private final Integer metricUploadIntervalInSeconds; + + /** + * Metric upload interval in seconds. Any metric sent by telegraf/collectd before the + * configured interval expires will be dropped. + * + * @return the value + **/ + public Integer getMetricUploadIntervalInSeconds() { + return metricUploadIntervalInSeconds; + } + + @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("AgentExtensionHandlerMetricMappingDetails("); + sb.append("super=").append(super.toString()); + sb.append("collectorMetricName=").append(String.valueOf(this.collectorMetricName)); + sb.append(", telemetryMetricName=").append(String.valueOf(this.telemetryMetricName)); + sb.append(", isSkipUpload=").append(String.valueOf(this.isSkipUpload)); + sb.append(", metricUploadIntervalInSeconds=") + .append(String.valueOf(this.metricUploadIntervalInSeconds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AgentExtensionHandlerMetricMappingDetails)) { + return false; + } + + AgentExtensionHandlerMetricMappingDetails other = + (AgentExtensionHandlerMetricMappingDetails) o; + return java.util.Objects.equals(this.collectorMetricName, other.collectorMetricName) + && java.util.Objects.equals(this.telemetryMetricName, other.telemetryMetricName) + && java.util.Objects.equals(this.isSkipUpload, other.isSkipUpload) + && java.util.Objects.equals( + this.metricUploadIntervalInSeconds, other.metricUploadIntervalInSeconds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.collectorMetricName == null + ? 43 + : this.collectorMetricName.hashCode()); + result = + (result * PRIME) + + (this.telemetryMetricName == null + ? 43 + : this.telemetryMetricName.hashCode()); + result = (result * PRIME) + (this.isSkipUpload == null ? 43 : this.isSkipUpload.hashCode()); + result = + (result * PRIME) + + (this.metricUploadIntervalInSeconds == null + ? 43 + : this.metricUploadIntervalInSeconds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AgentReceiverProperties.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AgentReceiverProperties.java new file mode 100644 index 0000000000..96a95628cf --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AgentReceiverProperties.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Properties for agent receiver. + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AgentReceiverProperties.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AgentReceiverProperties + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"listenerPort"}) + public AgentReceiverProperties(Integer listenerPort) { + super(); + this.listenerPort = listenerPort; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Receiver listener port. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private Integer listenerPort; + + /** + * Receiver listener port. + * @param listenerPort the value to set + * @return this builder + **/ + public Builder listenerPort(Integer listenerPort) { + this.listenerPort = listenerPort; + this.__explicitlySet__.add("listenerPort"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AgentReceiverProperties build() { + AgentReceiverProperties model = new AgentReceiverProperties(this.listenerPort); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AgentReceiverProperties model) { + if (model.wasPropertyExplicitlySet("listenerPort")) { + this.listenerPort(model.getListenerPort()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Receiver listener port. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private final Integer listenerPort; + + /** + * Receiver listener port. + * @return the value + **/ + public Integer getListenerPort() { + return listenerPort; + } + + @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("AgentReceiverProperties("); + sb.append("super=").append(super.toString()); + sb.append("listenerPort=").append(String.valueOf(this.listenerPort)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AgentReceiverProperties)) { + return false; + } + + AgentReceiverProperties other = (AgentReceiverProperties) o; + return java.util.Objects.equals(this.listenerPort, other.listenerPort) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.listenerPort == null ? 43 : this.listenerPort.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AvailabilityMetricsDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AvailabilityMetricsDetails.java new file mode 100644 index 0000000000..866dcd5d00 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/AvailabilityMetricsDetails.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Availability metrics 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AvailabilityMetricsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AvailabilityMetricsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"metrics", "collectionIntervalInSeconds"}) + public AvailabilityMetricsDetails( + java.util.List metrics, Integer collectionIntervalInSeconds) { + super(); + this.metrics = metrics; + this.collectionIntervalInSeconds = collectionIntervalInSeconds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of metrics used for availability calculation for the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metrics") + private java.util.List metrics; + + /** + * List of metrics used for availability calculation for the resource. + * @param metrics the value to set + * @return this builder + **/ + public Builder metrics(java.util.List metrics) { + this.metrics = metrics; + this.__explicitlySet__.add("metrics"); + return this; + } + /** + * Availability metric collection internal in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("collectionIntervalInSeconds") + private Integer collectionIntervalInSeconds; + + /** + * Availability metric collection internal in seconds. + * @param collectionIntervalInSeconds the value to set + * @return this builder + **/ + public Builder collectionIntervalInSeconds(Integer collectionIntervalInSeconds) { + this.collectionIntervalInSeconds = collectionIntervalInSeconds; + this.__explicitlySet__.add("collectionIntervalInSeconds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AvailabilityMetricsDetails build() { + AvailabilityMetricsDetails model = + new AvailabilityMetricsDetails(this.metrics, this.collectionIntervalInSeconds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AvailabilityMetricsDetails model) { + if (model.wasPropertyExplicitlySet("metrics")) { + this.metrics(model.getMetrics()); + } + if (model.wasPropertyExplicitlySet("collectionIntervalInSeconds")) { + this.collectionIntervalInSeconds(model.getCollectionIntervalInSeconds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of metrics used for availability calculation for the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metrics") + private final java.util.List metrics; + + /** + * List of metrics used for availability calculation for the resource. + * @return the value + **/ + public java.util.List getMetrics() { + return metrics; + } + + /** + * Availability metric collection internal in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("collectionIntervalInSeconds") + private final Integer collectionIntervalInSeconds; + + /** + * Availability metric collection internal in seconds. + * @return the value + **/ + public Integer getCollectionIntervalInSeconds() { + return collectionIntervalInSeconds; + } + + @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("AvailabilityMetricsDetails("); + sb.append("super=").append(super.toString()); + sb.append("metrics=").append(String.valueOf(this.metrics)); + sb.append(", collectionIntervalInSeconds=") + .append(String.valueOf(this.collectionIntervalInSeconds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AvailabilityMetricsDetails)) { + return false; + } + + AvailabilityMetricsDetails other = (AvailabilityMetricsDetails) o; + return java.util.Objects.equals(this.metrics, other.metrics) + && java.util.Objects.equals( + this.collectionIntervalInSeconds, other.collectionIntervalInSeconds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.metrics == null ? 43 : this.metrics.hashCode()); + result = + (result * PRIME) + + (this.collectionIntervalInSeconds == null + ? 43 + : this.collectionIntervalInSeconds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CollectdResourceNameConfigurationDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CollectdResourceNameConfigurationDetails.java new file mode 100644 index 0000000000..9531257334 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CollectdResourceNameConfigurationDetails.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Resource name generation overriding configurations for collectd resource types. + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CollectdResourceNameConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CollectdResourceNameConfigurationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"suffix", "includeProperties", "excludeProperties"}) + public CollectdResourceNameConfigurationDetails( + String suffix, + java.util.List includeProperties, + java.util.List excludeProperties) { + super(); + this.suffix = suffix; + this.includeProperties = includeProperties; + this.excludeProperties = excludeProperties; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * String to be suffixed to the resource name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suffix") + private String suffix; + + /** + * String to be suffixed to the resource name. + * @param suffix the value to set + * @return this builder + **/ + public Builder suffix(String suffix) { + this.suffix = suffix; + this.__explicitlySet__.add("suffix"); + return this; + } + /** + * List of property names to be included. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("includeProperties") + private java.util.List includeProperties; + + /** + * List of property names to be included. + * @param includeProperties the value to set + * @return this builder + **/ + public Builder includeProperties(java.util.List includeProperties) { + this.includeProperties = includeProperties; + this.__explicitlySet__.add("includeProperties"); + return this; + } + /** + * List of property names to be excluded. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("excludeProperties") + private java.util.List excludeProperties; + + /** + * List of property names to be excluded. + * @param excludeProperties the value to set + * @return this builder + **/ + public Builder excludeProperties(java.util.List excludeProperties) { + this.excludeProperties = excludeProperties; + this.__explicitlySet__.add("excludeProperties"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CollectdResourceNameConfigurationDetails build() { + CollectdResourceNameConfigurationDetails model = + new CollectdResourceNameConfigurationDetails( + this.suffix, this.includeProperties, this.excludeProperties); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CollectdResourceNameConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("suffix")) { + this.suffix(model.getSuffix()); + } + if (model.wasPropertyExplicitlySet("includeProperties")) { + this.includeProperties(model.getIncludeProperties()); + } + if (model.wasPropertyExplicitlySet("excludeProperties")) { + this.excludeProperties(model.getExcludeProperties()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * String to be suffixed to the resource name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suffix") + private final String suffix; + + /** + * String to be suffixed to the resource name. + * @return the value + **/ + public String getSuffix() { + return suffix; + } + + /** + * List of property names to be included. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("includeProperties") + private final java.util.List includeProperties; + + /** + * List of property names to be included. + * @return the value + **/ + public java.util.List getIncludeProperties() { + return includeProperties; + } + + /** + * List of property names to be excluded. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("excludeProperties") + private final java.util.List excludeProperties; + + /** + * List of property names to be excluded. + * @return the value + **/ + public java.util.List getExcludeProperties() { + return excludeProperties; + } + + @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("CollectdResourceNameConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("suffix=").append(String.valueOf(this.suffix)); + sb.append(", includeProperties=").append(String.valueOf(this.includeProperties)); + sb.append(", excludeProperties=").append(String.valueOf(this.excludeProperties)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CollectdResourceNameConfigurationDetails)) { + return false; + } + + CollectdResourceNameConfigurationDetails other = + (CollectdResourceNameConfigurationDetails) o; + return java.util.Objects.equals(this.suffix, other.suffix) + && java.util.Objects.equals(this.includeProperties, other.includeProperties) + && java.util.Objects.equals(this.excludeProperties, other.excludeProperties) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.suffix == null ? 43 : this.suffix.hashCode()); + result = + (result * PRIME) + + (this.includeProperties == null ? 43 : this.includeProperties.hashCode()); + result = + (result * PRIME) + + (this.excludeProperties == null ? 43 : this.excludeProperties.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ComputeAutoActivatePluginConfigDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ComputeAutoActivatePluginConfigDetails.java new file mode 100644 index 0000000000..c3448e27cc --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ComputeAutoActivatePluginConfigDetails.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * A configuration of the COMPUTE_AUTO_ACTIVATE_PLUGIN type consists of a boolean value + * that determines if detection of new or terminated Compute instances should be enabled, + * and if the Management Agent as a plugin of Oracle Cloud Agent should automatically be activated. + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComputeAutoActivatePluginConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComputeAutoActivatePluginConfigDetails extends Config { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + 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("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + 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("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + 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("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private Boolean isEnabled; + + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + * @param isEnabled the value to set + * @return this builder + **/ + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + this.__explicitlySet__.add("isEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComputeAutoActivatePluginConfigDetails build() { + ComputeAutoActivatePluginConfigDetails model = + new ComputeAutoActivatePluginConfigDetails( + this.id, + this.compartmentId, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.freeformTags, + this.definedTags, + this.systemTags, + this.isEnabled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComputeAutoActivatePluginConfigDetails 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("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()); + } + if (model.wasPropertyExplicitlySet("isEnabled")) { + this.isEnabled(model.getIsEnabled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ComputeAutoActivatePluginConfigDetails( + String id, + String compartmentId, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + Boolean isEnabled) { + super( + id, + compartmentId, + displayName, + timeCreated, + timeUpdated, + lifecycleState, + freeformTags, + definedTags, + systemTags); + this.isEnabled = isEnabled; + } + + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private final Boolean isEnabled; + + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + * @return the value + **/ + public Boolean getIsEnabled() { + return isEnabled; + } + + @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("ComputeAutoActivatePluginConfigDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", isEnabled=").append(String.valueOf(this.isEnabled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComputeAutoActivatePluginConfigDetails)) { + return false; + } + + ComputeAutoActivatePluginConfigDetails other = (ComputeAutoActivatePluginConfigDetails) o; + return java.util.Objects.equals(this.isEnabled, other.isEnabled) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ComputeAutoActivatePluginConfigSummary.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ComputeAutoActivatePluginConfigSummary.java new file mode 100644 index 0000000000..79a869b22e --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ComputeAutoActivatePluginConfigSummary.java @@ -0,0 +1,276 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Summary of a COMPUTE_AUTO_ACTIVATE_PLUGIN config. + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComputeAutoActivatePluginConfigSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComputeAutoActivatePluginConfigSummary extends ConfigSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + 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("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + 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("lifecycleState") + private Config.LifecycleState lifecycleState; + + public Builder lifecycleState(Config.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + 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("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private Boolean isEnabled; + + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + * @param isEnabled the value to set + * @return this builder + **/ + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + this.__explicitlySet__.add("isEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComputeAutoActivatePluginConfigSummary build() { + ComputeAutoActivatePluginConfigSummary model = + new ComputeAutoActivatePluginConfigSummary( + this.id, + this.compartmentId, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.freeformTags, + this.definedTags, + this.systemTags, + this.isEnabled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComputeAutoActivatePluginConfigSummary 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("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()); + } + if (model.wasPropertyExplicitlySet("isEnabled")) { + this.isEnabled(model.getIsEnabled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ComputeAutoActivatePluginConfigSummary( + String id, + String compartmentId, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Config.LifecycleState lifecycleState, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + Boolean isEnabled) { + super( + id, + compartmentId, + displayName, + timeCreated, + timeUpdated, + lifecycleState, + freeformTags, + definedTags, + systemTags); + this.isEnabled = isEnabled; + } + + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private final Boolean isEnabled; + + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + * @return the value + **/ + public Boolean getIsEnabled() { + return isEnabled; + } + + @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("ComputeAutoActivatePluginConfigSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", isEnabled=").append(String.valueOf(this.isEnabled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComputeAutoActivatePluginConfigSummary)) { + return false; + } + + ComputeAutoActivatePluginConfigSummary other = (ComputeAutoActivatePluginConfigSummary) o; + return java.util.Objects.equals(this.isEnabled, other.isEnabled) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/Config.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/Config.java index 5ffa7db881..ceb0ce5825 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/Config.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/Config.java @@ -28,10 +28,18 @@ defaultImpl = Config.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OnboardConfigDetails.class, + name = "ONBOARD" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = LicenseEnterpriseExtensibilityConfigDetails.class, name = "LICENSE_ENTERPRISE_EXTENSIBILITY" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ComputeAutoActivatePluginConfigDetails.class, + name = "COMPUTE_AUTO_ACTIVATE_PLUGIN" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = LicenseAutoAssignConfigDetails.class, name = "LICENSE_AUTO_ASSIGN" @@ -342,8 +350,10 @@ public int hashCode() { **/ public enum ConfigType { AutoPromote("AUTO_PROMOTE"), + ComputeAutoActivatePlugin("COMPUTE_AUTO_ACTIVATE_PLUGIN"), LicenseAutoAssign("LICENSE_AUTO_ASSIGN"), LicenseEnterpriseExtensibility("LICENSE_ENTERPRISE_EXTENSIBILITY"), + Onboard("ONBOARD"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ConfigSummary.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ConfigSummary.java index b11c561323..8f099434e0 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ConfigSummary.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ConfigSummary.java @@ -30,6 +30,14 @@ value = LicenseAutoAssignConfigSummary.class, name = "LICENSE_AUTO_ASSIGN" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ComputeAutoActivatePluginConfigSummary.class, + name = "COMPUTE_AUTO_ACTIVATE_PLUGIN" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OnboardConfigSummary.class, + name = "ONBOARD" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = LicenseEnterpriseExtensibilityConfigSummary.class, name = "LICENSE_ENTERPRISE_EXTENSIBILITY" diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateComputeAutoActivatePluginConfigDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateComputeAutoActivatePluginConfigDetails.java new file mode 100644 index 0000000000..c1f4fd15f8 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateComputeAutoActivatePluginConfigDetails.java @@ -0,0 +1,198 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * The details of a COMPUTE_AUTO_ACTIVATE_PLUGIN 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateComputeAutoActivatePluginConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateComputeAutoActivatePluginConfigDetails extends CreateConfigDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @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("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + 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; + } + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private Boolean isEnabled; + + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + * @param isEnabled the value to set + * @return this builder + **/ + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + this.__explicitlySet__.add("isEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateComputeAutoActivatePluginConfigDetails build() { + CreateComputeAutoActivatePluginConfigDetails model = + new CreateComputeAutoActivatePluginConfigDetails( + this.displayName, + this.compartmentId, + this.freeformTags, + this.definedTags, + this.isEnabled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateComputeAutoActivatePluginConfigDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("isEnabled")) { + this.isEnabled(model.getIsEnabled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateComputeAutoActivatePluginConfigDetails( + String displayName, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags, + Boolean isEnabled) { + super(displayName, compartmentId, freeformTags, definedTags); + this.isEnabled = isEnabled; + } + + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private final Boolean isEnabled; + + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + * @return the value + **/ + public Boolean getIsEnabled() { + return isEnabled; + } + + @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("CreateComputeAutoActivatePluginConfigDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", isEnabled=").append(String.valueOf(this.isEnabled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateComputeAutoActivatePluginConfigDetails)) { + return false; + } + + CreateComputeAutoActivatePluginConfigDetails other = + (CreateComputeAutoActivatePluginConfigDetails) o; + return java.util.Objects.equals(this.isEnabled, other.isEnabled) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateConfigDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateConfigDetails.java index 946948036e..1d9fbef64f 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateConfigDetails.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateConfigDetails.java @@ -26,10 +26,18 @@ value = CreateLicenseAutoAssignConfigDetails.class, name = "LICENSE_AUTO_ASSIGN" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateOnboardConfigDetails.class, + name = "ONBOARD" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreateAutoPromoteConfigDetails.class, name = "AUTO_PROMOTE" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateComputeAutoActivatePluginConfigDetails.class, + name = "COMPUTE_AUTO_ACTIVATE_PLUGIN" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreateLicenseEnterpriseExtensibilityConfigDetails.class, name = "LICENSE_ENTERPRISE_EXTENSIBILITY" diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMaintenanceWindowDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMaintenanceWindowDetails.java index 9290ec2015..8e4c902107 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMaintenanceWindowDetails.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMaintenanceWindowDetails.java @@ -28,20 +28,26 @@ public final class CreateMaintenanceWindowDetails "description", "compartmentId", "resources", - "schedule" + "schedule", + "freeformTags", + "definedTags" }) public CreateMaintenanceWindowDetails( String name, String description, String compartmentId, java.util.List resources, - MaintenanceWindowSchedule schedule) { + MaintenanceWindowSchedule schedule, + java.util.Map freeformTags, + java.util.Map> definedTags) { super(); this.name = name; this.description = description; this.compartmentId = compartmentId; this.resources = resources; this.schedule = schedule; + this.freeformTags = freeformTags; + this.definedTags = definedTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -123,6 +129,47 @@ public Builder schedule(MaintenanceWindowSchedule schedule) { this.__explicitlySet__.add("schedule"); 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(); @@ -134,7 +181,9 @@ public CreateMaintenanceWindowDetails build() { this.description, this.compartmentId, this.resources, - this.schedule); + this.schedule, + this.freeformTags, + this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -158,6 +207,12 @@ public Builder copy(CreateMaintenanceWindowDetails model) { if (model.wasPropertyExplicitlySet("schedule")) { this.schedule(model.getSchedule()); } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } return this; } } @@ -240,6 +295,42 @@ public MaintenanceWindowSchedule getSchedule() { return schedule; } + /** + * 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); @@ -259,6 +350,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", resources=").append(String.valueOf(this.resources)); sb.append(", schedule=").append(String.valueOf(this.schedule)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); return sb.toString(); } @@ -278,6 +371,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.resources, other.resources) && java.util.Objects.equals(this.schedule, other.schedule) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); } @@ -292,6 +387,8 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.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-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMonitoredResourceTypeDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMonitoredResourceTypeDetails.java index 10b74693a0..0ce2c12287 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMonitoredResourceTypeDetails.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMonitoredResourceTypeDetails.java @@ -116,14 +116,14 @@ public Builder description(String description) { return this; } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy containing the resource type. + * Compartment Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy containing the resource type. + * Compartment Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * * @param compartmentId the value to set * @return this builder @@ -352,14 +352,14 @@ public String getDescription() { } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy containing the resource type. + * Compartment Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy containing the resource type. + * Compartment Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * * @return the value **/ diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateOnboardConfigDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateOnboardConfigDetails.java new file mode 100644 index 0000000000..9d2cbf1e9c --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateOnboardConfigDetails.java @@ -0,0 +1,393 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * A configuration of the ONBOARD type, contains fields describing Onboarding customization: policies, + * dynamic groups, user groups. + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateOnboardConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateOnboardConfigDetails extends CreateConfigDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @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("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + 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; + } + /** + * Assigned version to given onboard configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * Assigned version to given onboard configuration. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * True if customer decides marks configuration as manually configured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isManuallyOnboarded") + private Boolean isManuallyOnboarded; + + /** + * True if customer decides marks configuration as manually configured. + * @param isManuallyOnboarded the value to set + * @return this builder + **/ + public Builder isManuallyOnboarded(Boolean isManuallyOnboarded) { + this.isManuallyOnboarded = isManuallyOnboarded; + this.__explicitlySet__.add("isManuallyOnboarded"); + return this; + } + /** + * List of policy names assigned for onboarding + **/ + @com.fasterxml.jackson.annotation.JsonProperty("policyNames") + private java.util.List policyNames; + + /** + * List of policy names assigned for onboarding + * @param policyNames the value to set + * @return this builder + **/ + public Builder policyNames(java.util.List policyNames) { + this.policyNames = policyNames; + this.__explicitlySet__.add("policyNames"); + return this; + } + /** + * List of dynamic groups dedicated for Stack Monitoring. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dynamicGroups") + private java.util.List dynamicGroups; + + /** + * List of dynamic groups dedicated for Stack Monitoring. + * @param dynamicGroups the value to set + * @return this builder + **/ + public Builder dynamicGroups(java.util.List dynamicGroups) { + this.dynamicGroups = dynamicGroups; + this.__explicitlySet__.add("dynamicGroups"); + return this; + } + /** + * List of user groups dedicated for Stack Monitoring. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroups") + private java.util.List userGroups; + + /** + * List of user groups dedicated for Stack Monitoring. + * @param userGroups the value to set + * @return this builder + **/ + public Builder userGroups(java.util.List userGroups) { + this.userGroups = userGroups; + this.__explicitlySet__.add("userGroups"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("additionalConfigurations") + private AdditionalConfigurationDetails additionalConfigurations; + + public Builder additionalConfigurations( + AdditionalConfigurationDetails additionalConfigurations) { + this.additionalConfigurations = additionalConfigurations; + this.__explicitlySet__.add("additionalConfigurations"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateOnboardConfigDetails build() { + CreateOnboardConfigDetails model = + new CreateOnboardConfigDetails( + this.displayName, + this.compartmentId, + this.freeformTags, + this.definedTags, + this.version, + this.isManuallyOnboarded, + this.policyNames, + this.dynamicGroups, + this.userGroups, + this.additionalConfigurations); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateOnboardConfigDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("isManuallyOnboarded")) { + this.isManuallyOnboarded(model.getIsManuallyOnboarded()); + } + if (model.wasPropertyExplicitlySet("policyNames")) { + this.policyNames(model.getPolicyNames()); + } + if (model.wasPropertyExplicitlySet("dynamicGroups")) { + this.dynamicGroups(model.getDynamicGroups()); + } + if (model.wasPropertyExplicitlySet("userGroups")) { + this.userGroups(model.getUserGroups()); + } + if (model.wasPropertyExplicitlySet("additionalConfigurations")) { + this.additionalConfigurations(model.getAdditionalConfigurations()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateOnboardConfigDetails( + String displayName, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags, + String version, + Boolean isManuallyOnboarded, + java.util.List policyNames, + java.util.List dynamicGroups, + java.util.List userGroups, + AdditionalConfigurationDetails additionalConfigurations) { + super(displayName, compartmentId, freeformTags, definedTags); + this.version = version; + this.isManuallyOnboarded = isManuallyOnboarded; + this.policyNames = policyNames; + this.dynamicGroups = dynamicGroups; + this.userGroups = userGroups; + this.additionalConfigurations = additionalConfigurations; + } + + /** + * Assigned version to given onboard configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * Assigned version to given onboard configuration. + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * True if customer decides marks configuration as manually configured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isManuallyOnboarded") + private final Boolean isManuallyOnboarded; + + /** + * True if customer decides marks configuration as manually configured. + * @return the value + **/ + public Boolean getIsManuallyOnboarded() { + return isManuallyOnboarded; + } + + /** + * List of policy names assigned for onboarding + **/ + @com.fasterxml.jackson.annotation.JsonProperty("policyNames") + private final java.util.List policyNames; + + /** + * List of policy names assigned for onboarding + * @return the value + **/ + public java.util.List getPolicyNames() { + return policyNames; + } + + /** + * List of dynamic groups dedicated for Stack Monitoring. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dynamicGroups") + private final java.util.List dynamicGroups; + + /** + * List of dynamic groups dedicated for Stack Monitoring. + * @return the value + **/ + public java.util.List getDynamicGroups() { + return dynamicGroups; + } + + /** + * List of user groups dedicated for Stack Monitoring. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroups") + private final java.util.List userGroups; + + /** + * List of user groups dedicated for Stack Monitoring. + * @return the value + **/ + public java.util.List getUserGroups() { + return userGroups; + } + + @com.fasterxml.jackson.annotation.JsonProperty("additionalConfigurations") + private final AdditionalConfigurationDetails additionalConfigurations; + + public AdditionalConfigurationDetails getAdditionalConfigurations() { + return additionalConfigurations; + } + + @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("CreateOnboardConfigDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(", isManuallyOnboarded=").append(String.valueOf(this.isManuallyOnboarded)); + sb.append(", policyNames=").append(String.valueOf(this.policyNames)); + sb.append(", dynamicGroups=").append(String.valueOf(this.dynamicGroups)); + sb.append(", userGroups=").append(String.valueOf(this.userGroups)); + sb.append(", additionalConfigurations=") + .append(String.valueOf(this.additionalConfigurations)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOnboardConfigDetails)) { + return false; + } + + CreateOnboardConfigDetails other = (CreateOnboardConfigDetails) o; + return java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.isManuallyOnboarded, other.isManuallyOnboarded) + && java.util.Objects.equals(this.policyNames, other.policyNames) + && java.util.Objects.equals(this.dynamicGroups, other.dynamicGroups) + && java.util.Objects.equals(this.userGroups, other.userGroups) + && java.util.Objects.equals( + this.additionalConfigurations, other.additionalConfigurations) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = + (result * PRIME) + + (this.isManuallyOnboarded == null + ? 43 + : this.isManuallyOnboarded.hashCode()); + result = (result * PRIME) + (this.policyNames == null ? 43 : this.policyNames.hashCode()); + result = + (result * PRIME) + + (this.dynamicGroups == null ? 43 : this.dynamicGroups.hashCode()); + result = (result * PRIME) + (this.userGroups == null ? 43 : this.userGroups.hashCode()); + result = + (result * PRIME) + + (this.additionalConfigurations == null + ? 43 + : this.additionalConfigurations.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/DynamicGroupDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/DynamicGroupDetails.java new file mode 100644 index 0000000000..525947d191 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/DynamicGroupDetails.java @@ -0,0 +1,280 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Dynamic Group object + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DynamicGroupDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DynamicGroupDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "domain", "stackMonitoringAssignment"}) + public DynamicGroupDetails( + String name, String domain, StackMonitoringAssignment stackMonitoringAssignment) { + super(); + this.name = name; + this.domain = domain; + this.stackMonitoringAssignment = stackMonitoringAssignment; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of dynamic Group + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of dynamic Group + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Identity domain name + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private String domain; + + /** + * Identity domain name + * + * @param domain the value to set + * @return this builder + **/ + public Builder domain(String domain) { + this.domain = domain; + this.__explicitlySet__.add("domain"); + return this; + } + /** + * Assignment of dynamic group in context of Stack Monitoring service. It describes the purpose of dynamic groups in Stack Monitoring. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stackMonitoringAssignment") + private StackMonitoringAssignment stackMonitoringAssignment; + + /** + * Assignment of dynamic group in context of Stack Monitoring service. It describes the purpose of dynamic groups in Stack Monitoring. + * + * @param stackMonitoringAssignment the value to set + * @return this builder + **/ + public Builder stackMonitoringAssignment( + StackMonitoringAssignment stackMonitoringAssignment) { + this.stackMonitoringAssignment = stackMonitoringAssignment; + this.__explicitlySet__.add("stackMonitoringAssignment"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DynamicGroupDetails build() { + DynamicGroupDetails model = + new DynamicGroupDetails(this.name, this.domain, this.stackMonitoringAssignment); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DynamicGroupDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("domain")) { + this.domain(model.getDomain()); + } + if (model.wasPropertyExplicitlySet("stackMonitoringAssignment")) { + this.stackMonitoringAssignment(model.getStackMonitoringAssignment()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Name of dynamic Group + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of dynamic Group + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Identity domain name + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private final String domain; + + /** + * Identity domain name + * + * @return the value + **/ + public String getDomain() { + return domain; + } + + /** + * Assignment of dynamic group in context of Stack Monitoring service. It describes the purpose of dynamic groups in Stack Monitoring. + * + **/ + public enum StackMonitoringAssignment { + ManagementAgents("MANAGEMENT_AGENTS"), + MonitoredInstances("MONITORED_INSTANCES"), + + /** + * 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(StackMonitoringAssignment.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (StackMonitoringAssignment v : StackMonitoringAssignment.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + StackMonitoringAssignment(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static StackMonitoringAssignment create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'StackMonitoringAssignment', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Assignment of dynamic group in context of Stack Monitoring service. It describes the purpose of dynamic groups in Stack Monitoring. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stackMonitoringAssignment") + private final StackMonitoringAssignment stackMonitoringAssignment; + + /** + * Assignment of dynamic group in context of Stack Monitoring service. It describes the purpose of dynamic groups in Stack Monitoring. + * + * @return the value + **/ + public StackMonitoringAssignment getStackMonitoringAssignment() { + return stackMonitoringAssignment; + } + + @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("DynamicGroupDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", domain=").append(String.valueOf(this.domain)); + sb.append(", stackMonitoringAssignment=") + .append(String.valueOf(this.stackMonitoringAssignment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DynamicGroupDetails)) { + return false; + } + + DynamicGroupDetails other = (DynamicGroupDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.domain, other.domain) + && java.util.Objects.equals( + this.stackMonitoringAssignment, other.stackMonitoringAssignment) + && 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.domain == null ? 43 : this.domain.hashCode()); + result = + (result * PRIME) + + (this.stackMonitoringAssignment == null + ? 43 + : this.stackMonitoringAssignment.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/GroupDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/GroupDetails.java new file mode 100644 index 0000000000..7e878edac8 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/GroupDetails.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * User Group object + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = GroupDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GroupDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "domain", "stackMonitoringRole"}) + public GroupDetails(String name, String domain, String stackMonitoringRole) { + super(); + this.name = name; + this.domain = domain; + this.stackMonitoringRole = stackMonitoringRole; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of user Group + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of user Group + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Identity domain name + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private String domain; + + /** + * Identity domain name + * + * @param domain the value to set + * @return this builder + **/ + public Builder domain(String domain) { + this.domain = domain; + this.__explicitlySet__.add("domain"); + return this; + } + /** + * Role assigned to user group in context of Stack Monitoring service. Access role can be for example: ADMINISTRATOR, OPERATOR, VIEWER, any other access role + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stackMonitoringRole") + private String stackMonitoringRole; + + /** + * Role assigned to user group in context of Stack Monitoring service. Access role can be for example: ADMINISTRATOR, OPERATOR, VIEWER, any other access role + * + * @param stackMonitoringRole the value to set + * @return this builder + **/ + public Builder stackMonitoringRole(String stackMonitoringRole) { + this.stackMonitoringRole = stackMonitoringRole; + this.__explicitlySet__.add("stackMonitoringRole"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GroupDetails build() { + GroupDetails model = new GroupDetails(this.name, this.domain, this.stackMonitoringRole); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GroupDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("domain")) { + this.domain(model.getDomain()); + } + if (model.wasPropertyExplicitlySet("stackMonitoringRole")) { + this.stackMonitoringRole(model.getStackMonitoringRole()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Name of user Group + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of user Group + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Identity domain name + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private final String domain; + + /** + * Identity domain name + * + * @return the value + **/ + public String getDomain() { + return domain; + } + + /** + * Role assigned to user group in context of Stack Monitoring service. Access role can be for example: ADMINISTRATOR, OPERATOR, VIEWER, any other access role + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stackMonitoringRole") + private final String stackMonitoringRole; + + /** + * Role assigned to user group in context of Stack Monitoring service. Access role can be for example: ADMINISTRATOR, OPERATOR, VIEWER, any other access role + * + * @return the value + **/ + public String getStackMonitoringRole() { + return stackMonitoringRole; + } + + @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("GroupDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", domain=").append(String.valueOf(this.domain)); + sb.append(", stackMonitoringRole=").append(String.valueOf(this.stackMonitoringRole)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GroupDetails)) { + return false; + } + + GroupDetails other = (GroupDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.domain, other.domain) + && java.util.Objects.equals(this.stackMonitoringRole, other.stackMonitoringRole) + && 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.domain == null ? 43 : this.domain.hashCode()); + result = + (result * PRIME) + + (this.stackMonitoringRole == null + ? 43 + : this.stackMonitoringRole.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/HandlerType.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/HandlerType.java new file mode 100644 index 0000000000..27120bc0c6 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/HandlerType.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Handler type. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public enum HandlerType { + Telegraf("TELEGRAF"), + Collectd("COLLECTD"), + + /** + * 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(HandlerType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (HandlerType v : HandlerType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + HandlerType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static HandlerType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'HandlerType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ImportOciTelemetryResourcesTaskDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ImportOciTelemetryResourcesTaskDetails.java index 65f7b7fc7c..8566299b29 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ImportOciTelemetryResourcesTaskDetails.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ImportOciTelemetryResourcesTaskDetails.java @@ -33,6 +33,8 @@ public static class Builder { * Possible values: * * OCI_TELEMETRY_NATIVE - The metrics are pushed to telemetry from OCI Native Services. * * OCI_TELEMETRY_PROMETHEUS - The metrics are pushed to telemetry from Prometheus. + * * OCI_TELEMETRY_TELEGRAF - The metrics are pushed to telemetry from Telegraf receiver. + * * OCI_TELEMETRY_COLLECTD - The metrics are pushed to telemetry from CollectD receiver. * **/ @com.fasterxml.jackson.annotation.JsonProperty("source") @@ -43,6 +45,8 @@ public static class Builder { * Possible values: * * OCI_TELEMETRY_NATIVE - The metrics are pushed to telemetry from OCI Native Services. * * OCI_TELEMETRY_PROMETHEUS - The metrics are pushed to telemetry from Prometheus. + * * OCI_TELEMETRY_TELEGRAF - The metrics are pushed to telemetry from Telegraf receiver. + * * OCI_TELEMETRY_COLLECTD - The metrics are pushed to telemetry from CollectD receiver. * * @param source the value to set * @return this builder @@ -277,7 +281,7 @@ public Builder resourceTypeFilter(String resourceTypeFilter) { * List of metrics to be used to calculate the availability of the resource. * Resource is considered to be up if at least one of the specified metrics is available for * the resource during the specified interval using the property - * 'availabilityProxyMetricCollectionIntervalInSeconds'. + * 'availabilityProxyMetricCollectionInterval'. * If no metrics are specified, availability will not be calculated for the resource. * **/ @@ -288,7 +292,7 @@ public Builder resourceTypeFilter(String resourceTypeFilter) { * List of metrics to be used to calculate the availability of the resource. * Resource is considered to be up if at least one of the specified metrics is available for * the resource during the specified interval using the property - * 'availabilityProxyMetricCollectionIntervalInSeconds'. + * 'availabilityProxyMetricCollectionInterval'. * If no metrics are specified, availability will not be calculated for the resource. * * @param availabilityProxyMetrics the value to set @@ -447,11 +451,15 @@ public ImportOciTelemetryResourcesTaskDetails( * Possible values: * * OCI_TELEMETRY_NATIVE - The metrics are pushed to telemetry from OCI Native Services. * * OCI_TELEMETRY_PROMETHEUS - The metrics are pushed to telemetry from Prometheus. + * * OCI_TELEMETRY_TELEGRAF - The metrics are pushed to telemetry from Telegraf receiver. + * * OCI_TELEMETRY_COLLECTD - The metrics are pushed to telemetry from CollectD receiver. * **/ public enum Source { OciTelemetryNative("OCI_TELEMETRY_NATIVE"), OciTelemetryPrometheus("OCI_TELEMETRY_PROMETHEUS"), + OciTelemetryTelegraf("OCI_TELEMETRY_TELEGRAF"), + OciTelemetryCollectd("OCI_TELEMETRY_COLLECTD"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -498,6 +506,8 @@ public static Source create(String key) { * Possible values: * * OCI_TELEMETRY_NATIVE - The metrics are pushed to telemetry from OCI Native Services. * * OCI_TELEMETRY_PROMETHEUS - The metrics are pushed to telemetry from Prometheus. + * * OCI_TELEMETRY_TELEGRAF - The metrics are pushed to telemetry from Telegraf receiver. + * * OCI_TELEMETRY_COLLECTD - The metrics are pushed to telemetry from CollectD receiver. * **/ @com.fasterxml.jackson.annotation.JsonProperty("source") @@ -508,6 +518,8 @@ public static Source create(String key) { * Possible values: * * OCI_TELEMETRY_NATIVE - The metrics are pushed to telemetry from OCI Native Services. * * OCI_TELEMETRY_PROMETHEUS - The metrics are pushed to telemetry from Prometheus. + * * OCI_TELEMETRY_TELEGRAF - The metrics are pushed to telemetry from Telegraf receiver. + * * OCI_TELEMETRY_COLLECTD - The metrics are pushed to telemetry from CollectD receiver. * * @return the value **/ @@ -717,7 +729,7 @@ public String getResourceTypeFilter() { * List of metrics to be used to calculate the availability of the resource. * Resource is considered to be up if at least one of the specified metrics is available for * the resource during the specified interval using the property - * 'availabilityProxyMetricCollectionIntervalInSeconds'. + * 'availabilityProxyMetricCollectionInterval'. * If no metrics are specified, availability will not be calculated for the resource. * **/ @@ -728,7 +740,7 @@ public String getResourceTypeFilter() { * List of metrics to be used to calculate the availability of the resource. * Resource is considered to be up if at least one of the specified metrics is available for * the resource during the specified interval using the property - * 'availabilityProxyMetricCollectionIntervalInSeconds'. + * 'availabilityProxyMetricCollectionInterval'. * If no metrics are specified, availability will not be calculated for the resource. * * @return the value diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindow.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindow.java index 0544baee37..c0d8221e16 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindow.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindow.java @@ -34,7 +34,10 @@ public final class MaintenanceWindow extends com.oracle.bmc.http.internal.Explic "lifecycleDetails", "schedule", "timeCreated", - "timeUpdated" + "timeUpdated", + "freeformTags", + "definedTags", + "systemTags" }) public MaintenanceWindow( String id, @@ -47,7 +50,10 @@ public MaintenanceWindow( MaintenanceWindowLifecycleDetails lifecycleDetails, MaintenanceWindowSchedule schedule, java.util.Date timeCreated, - java.util.Date timeUpdated) { + java.util.Date timeUpdated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.name = name; @@ -60,6 +66,9 @@ public MaintenanceWindow( this.schedule = schedule; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -245,6 +254,67 @@ public Builder timeUpdated(java.util.Date timeUpdated) { this.__explicitlySet__.add("timeUpdated"); 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(); @@ -262,7 +332,10 @@ public MaintenanceWindow build() { this.lifecycleDetails, this.schedule, this.timeCreated, - this.timeUpdated); + this.timeUpdated, + this.freeformTags, + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -304,6 +377,15 @@ public Builder copy(MaintenanceWindow model) { if (model.wasPropertyExplicitlySet("timeUpdated")) { this.timeUpdated(model.getTimeUpdated()); } + 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; } } @@ -478,6 +560,60 @@ public java.util.Date getTimeUpdated() { return timeUpdated; } + /** + * 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); @@ -503,6 +639,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", schedule=").append(String.valueOf(this.schedule)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + 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(); } @@ -528,6 +667,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.schedule, other.schedule) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && 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); } @@ -554,6 +696,9 @@ public int hashCode() { result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.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.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-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MetricNameConfigurationDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MetricNameConfigurationDetails.java new file mode 100644 index 0000000000..f4f542e81c --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MetricNameConfigurationDetails.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Metric name generation overriding configurations. + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MetricNameConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MetricNameConfigurationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"isPrefixWithCollectorType", "excludePatternOnPrefix"}) + public MetricNameConfigurationDetails( + Boolean isPrefixWithCollectorType, String excludePatternOnPrefix) { + super(); + this.isPrefixWithCollectorType = isPrefixWithCollectorType; + this.excludePatternOnPrefix = excludePatternOnPrefix; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * is prefixing the metric with collector type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isPrefixWithCollectorType") + private Boolean isPrefixWithCollectorType; + + /** + * is prefixing the metric with collector type. + * @param isPrefixWithCollectorType the value to set + * @return this builder + **/ + public Builder isPrefixWithCollectorType(Boolean isPrefixWithCollectorType) { + this.isPrefixWithCollectorType = isPrefixWithCollectorType; + this.__explicitlySet__.add("isPrefixWithCollectorType"); + return this; + } + /** + * String pattern to be removed from the prefix of the metric name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("excludePatternOnPrefix") + private String excludePatternOnPrefix; + + /** + * String pattern to be removed from the prefix of the metric name. + * @param excludePatternOnPrefix the value to set + * @return this builder + **/ + public Builder excludePatternOnPrefix(String excludePatternOnPrefix) { + this.excludePatternOnPrefix = excludePatternOnPrefix; + this.__explicitlySet__.add("excludePatternOnPrefix"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MetricNameConfigurationDetails build() { + MetricNameConfigurationDetails model = + new MetricNameConfigurationDetails( + this.isPrefixWithCollectorType, this.excludePatternOnPrefix); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MetricNameConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("isPrefixWithCollectorType")) { + this.isPrefixWithCollectorType(model.getIsPrefixWithCollectorType()); + } + if (model.wasPropertyExplicitlySet("excludePatternOnPrefix")) { + this.excludePatternOnPrefix(model.getExcludePatternOnPrefix()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * is prefixing the metric with collector type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isPrefixWithCollectorType") + private final Boolean isPrefixWithCollectorType; + + /** + * is prefixing the metric with collector type. + * @return the value + **/ + public Boolean getIsPrefixWithCollectorType() { + return isPrefixWithCollectorType; + } + + /** + * String pattern to be removed from the prefix of the metric name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("excludePatternOnPrefix") + private final String excludePatternOnPrefix; + + /** + * String pattern to be removed from the prefix of the metric name. + * @return the value + **/ + public String getExcludePatternOnPrefix() { + return excludePatternOnPrefix; + } + + @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("MetricNameConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("isPrefixWithCollectorType=") + .append(String.valueOf(this.isPrefixWithCollectorType)); + sb.append(", excludePatternOnPrefix=").append(String.valueOf(this.excludePatternOnPrefix)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MetricNameConfigurationDetails)) { + return false; + } + + MetricNameConfigurationDetails other = (MetricNameConfigurationDetails) o; + return java.util.Objects.equals( + this.isPrefixWithCollectorType, other.isPrefixWithCollectorType) + && java.util.Objects.equals( + this.excludePatternOnPrefix, other.excludePatternOnPrefix) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.isPrefixWithCollectorType == null + ? 43 + : this.isPrefixWithCollectorType.hashCode()); + result = + (result * PRIME) + + (this.excludePatternOnPrefix == null + ? 43 + : this.excludePatternOnPrefix.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTask.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTask.java index 6bd7865172..0518ebc490 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTask.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTask.java @@ -25,6 +25,7 @@ public final class MonitoredResourceTask @java.beans.ConstructorProperties({ "id", "name", + "type", "compartmentId", "tenantId", "taskDetails", @@ -39,6 +40,7 @@ public final class MonitoredResourceTask public MonitoredResourceTask( String id, String name, + String type, String compartmentId, String tenantId, MonitoredResourceTaskDetails taskDetails, @@ -52,6 +54,7 @@ public MonitoredResourceTask( super(); this.id = id; this.name = name; + this.type = type; this.compartmentId = compartmentId; this.tenantId = tenantId; this.taskDetails = taskDetails; @@ -98,6 +101,22 @@ public Builder name(String name) { this.__explicitlySet__.add("name"); return this; } + /** + * Type of the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private String type; + + /** + * Type of the task. + * @param type the value to set + * @return this builder + **/ + public Builder type(String type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment identifier. * @@ -287,6 +306,7 @@ public MonitoredResourceTask build() { new MonitoredResourceTask( this.id, this.name, + this.type, this.compartmentId, this.tenantId, this.taskDetails, @@ -311,6 +331,9 @@ public Builder copy(MonitoredResourceTask model) { if (model.wasPropertyExplicitlySet("name")) { this.name(model.getName()); } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -384,6 +407,20 @@ public String getName() { return name; } + /** + * Type of the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final String type; + + /** + * Type of the task. + * @return the value + **/ + public String getType() { + return type; + } + /** * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment identifier. * @@ -559,6 +596,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("id=").append(String.valueOf(this.id)); sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", type=").append(String.valueOf(this.type)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", tenantId=").append(String.valueOf(this.tenantId)); sb.append(", taskDetails=").append(String.valueOf(this.taskDetails)); @@ -585,6 +623,7 @@ public boolean equals(Object o) { MonitoredResourceTask other = (MonitoredResourceTask) o; return java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.type, other.type) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.tenantId, other.tenantId) && java.util.Objects.equals(this.taskDetails, other.taskDetails) @@ -604,6 +643,7 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTaskDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTaskDetails.java index 83fd62b6db..6c07edc160 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTaskDetails.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTaskDetails.java @@ -25,6 +25,14 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = ImportOciTelemetryResourcesTaskDetails.class, name = "IMPORT_OCI_TELEMETRY_RESOURCES" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateAgentReceiverTaskDetails.class, + name = "UPDATE_AGENT_RECEIVER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateResourceTypeConfigTaskDetails.class, + name = "UPDATE_RESOURCE_TYPE_CONFIGS" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) @@ -80,6 +88,8 @@ public int hashCode() { **/ public enum Type { ImportOciTelemetryResources("IMPORT_OCI_TELEMETRY_RESOURCES"), + UpdateAgentReceiver("UPDATE_AGENT_RECEIVER"), + UpdateResourceTypeConfigs("UPDATE_RESOURCE_TYPE_CONFIGS"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTaskSummary.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTaskSummary.java index a0de0ecfdc..dd1bf4bc66 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTaskSummary.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTaskSummary.java @@ -25,6 +25,7 @@ public final class MonitoredResourceTaskSummary @java.beans.ConstructorProperties({ "id", "name", + "type", "taskDetails", "workRequestIds", "timeCreated", @@ -37,6 +38,7 @@ public final class MonitoredResourceTaskSummary public MonitoredResourceTaskSummary( String id, String name, + String type, MonitoredResourceTaskDetails taskDetails, java.util.List workRequestIds, java.util.Date timeCreated, @@ -48,6 +50,7 @@ public MonitoredResourceTaskSummary( super(); this.id = id; this.name = name; + this.type = type; this.taskDetails = taskDetails; this.workRequestIds = workRequestIds; this.timeCreated = timeCreated; @@ -94,6 +97,22 @@ public Builder name(String name) { this.__explicitlySet__.add("name"); return this; } + /** + * Type of the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private String type; + + /** + * Type of the task. + * @param type the value to set + * @return this builder + **/ + public Builder type(String type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("taskDetails") private MonitoredResourceTaskDetails taskDetails; @@ -247,6 +266,7 @@ public MonitoredResourceTaskSummary build() { new MonitoredResourceTaskSummary( this.id, this.name, + this.type, this.taskDetails, this.workRequestIds, this.timeCreated, @@ -269,6 +289,9 @@ public Builder copy(MonitoredResourceTaskSummary model) { if (model.wasPropertyExplicitlySet("name")) { this.name(model.getName()); } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } if (model.wasPropertyExplicitlySet("taskDetails")) { this.taskDetails(model.getTaskDetails()); } @@ -338,6 +361,20 @@ public String getName() { return name; } + /** + * Type of the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final String type; + + /** + * Type of the task. + * @return the value + **/ + public String getType() { + return type; + } + @com.fasterxml.jackson.annotation.JsonProperty("taskDetails") private final MonitoredResourceTaskDetails taskDetails; @@ -481,6 +518,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("id=").append(String.valueOf(this.id)); sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", type=").append(String.valueOf(this.type)); sb.append(", taskDetails=").append(String.valueOf(this.taskDetails)); sb.append(", workRequestIds=").append(String.valueOf(this.workRequestIds)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); @@ -505,6 +543,7 @@ public boolean equals(Object o) { MonitoredResourceTaskSummary other = (MonitoredResourceTaskSummary) o; return java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.type, other.type) && java.util.Objects.equals(this.taskDetails, other.taskDetails) && java.util.Objects.equals(this.workRequestIds, other.workRequestIds) && java.util.Objects.equals(this.timeCreated, other.timeCreated) @@ -522,6 +561,7 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); result = (result * PRIME) + (this.taskDetails == null ? 43 : this.taskDetails.hashCode()); result = (result * PRIME) diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceType.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceType.java index 3e36abca2a..66ed26a0dd 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceType.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceType.java @@ -30,6 +30,10 @@ public final class MonitoredResourceType "description", "metricNamespace", "compartmentId", + "tenancyId", + "availabilityMetricsConfig", + "handlerConfig", + "isSystemDefined", "lifecycleState", "sourceType", "resourceCategory", @@ -48,6 +52,10 @@ public MonitoredResourceType( String description, String metricNamespace, String compartmentId, + String tenancyId, + AvailabilityMetricsDetails availabilityMetricsConfig, + AgentExtensionHandlerConfiguration handlerConfig, + Boolean isSystemDefined, ResourceTypeLifecycleState lifecycleState, SourceType sourceType, ResourceCategory resourceCategory, @@ -65,6 +73,10 @@ public MonitoredResourceType( this.description = description; this.metricNamespace = metricNamespace; this.compartmentId = compartmentId; + this.tenancyId = tenancyId; + this.availabilityMetricsConfig = availabilityMetricsConfig; + this.handlerConfig = handlerConfig; + this.isSystemDefined = isSystemDefined; this.lifecycleState = lifecycleState; this.sourceType = sourceType; this.resourceCategory = resourceCategory; @@ -166,14 +178,14 @@ public Builder metricNamespace(String metricNamespace) { return this; } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy containing the resource type. + * Compartment Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy containing the resource type. + * Compartment Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * * @param compartmentId the value to set * @return this builder @@ -183,6 +195,59 @@ public Builder compartmentId(String compartmentId) { this.__explicitlySet__.add("compartmentId"); return this; } + /** + * Tenancy Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * Tenancy Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("availabilityMetricsConfig") + private AvailabilityMetricsDetails availabilityMetricsConfig; + + public Builder availabilityMetricsConfig( + AvailabilityMetricsDetails availabilityMetricsConfig) { + this.availabilityMetricsConfig = availabilityMetricsConfig; + this.__explicitlySet__.add("availabilityMetricsConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("handlerConfig") + private AgentExtensionHandlerConfiguration handlerConfig; + + public Builder handlerConfig(AgentExtensionHandlerConfiguration handlerConfig) { + this.handlerConfig = handlerConfig; + this.__explicitlySet__.add("handlerConfig"); + return this; + } + /** + * If boolean flag is true, then the resource type cannot be modified or deleted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSystemDefined") + private Boolean isSystemDefined; + + /** + * If boolean flag is true, then the resource type cannot be modified or deleted. + * @param isSystemDefined the value to set + * @return this builder + **/ + public Builder isSystemDefined(Boolean isSystemDefined) { + this.isSystemDefined = isSystemDefined; + this.__explicitlySet__.add("isSystemDefined"); + return this; + } /** * Lifecycle state of the monitored resource type. **/ @@ -375,6 +440,10 @@ public MonitoredResourceType build() { this.description, this.metricNamespace, this.compartmentId, + this.tenancyId, + this.availabilityMetricsConfig, + this.handlerConfig, + this.isSystemDefined, this.lifecycleState, this.sourceType, this.resourceCategory, @@ -411,6 +480,18 @@ public Builder copy(MonitoredResourceType model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + if (model.wasPropertyExplicitlySet("availabilityMetricsConfig")) { + this.availabilityMetricsConfig(model.getAvailabilityMetricsConfig()); + } + if (model.wasPropertyExplicitlySet("handlerConfig")) { + this.handlerConfig(model.getHandlerConfig()); + } + if (model.wasPropertyExplicitlySet("isSystemDefined")) { + this.isSystemDefined(model.getIsSystemDefined()); + } if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } @@ -533,14 +614,14 @@ public String getMetricNamespace() { } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy containing the resource type. + * Compartment Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy containing the resource type. + * Compartment Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * * @return the value **/ @@ -548,6 +629,50 @@ public String getCompartmentId() { return compartmentId; } + /** + * Tenancy Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * Tenancy Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("availabilityMetricsConfig") + private final AvailabilityMetricsDetails availabilityMetricsConfig; + + public AvailabilityMetricsDetails getAvailabilityMetricsConfig() { + return availabilityMetricsConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("handlerConfig") + private final AgentExtensionHandlerConfiguration handlerConfig; + + public AgentExtensionHandlerConfiguration getHandlerConfig() { + return handlerConfig; + } + + /** + * If boolean flag is true, then the resource type cannot be modified or deleted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSystemDefined") + private final Boolean isSystemDefined; + + /** + * If boolean flag is true, then the resource type cannot be modified or deleted. + * @return the value + **/ + public Boolean getIsSystemDefined() { + return isSystemDefined; + } + /** * Lifecycle state of the monitored resource type. **/ @@ -725,6 +850,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", description=").append(String.valueOf(this.description)); sb.append(", metricNamespace=").append(String.valueOf(this.metricNamespace)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(", availabilityMetricsConfig=") + .append(String.valueOf(this.availabilityMetricsConfig)); + sb.append(", handlerConfig=").append(String.valueOf(this.handlerConfig)); + sb.append(", isSystemDefined=").append(String.valueOf(this.isSystemDefined)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", sourceType=").append(String.valueOf(this.sourceType)); sb.append(", resourceCategory=").append(String.valueOf(this.resourceCategory)); @@ -755,6 +885,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.metricNamespace, other.metricNamespace) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.tenancyId, other.tenancyId) + && java.util.Objects.equals( + this.availabilityMetricsConfig, other.availabilityMetricsConfig) + && java.util.Objects.equals(this.handlerConfig, other.handlerConfig) + && java.util.Objects.equals(this.isSystemDefined, other.isSystemDefined) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.sourceType, other.sourceType) && java.util.Objects.equals(this.resourceCategory, other.resourceCategory) @@ -783,6 +918,18 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = + (result * PRIME) + + (this.availabilityMetricsConfig == null + ? 43 + : this.availabilityMetricsConfig.hashCode()); + result = + (result * PRIME) + + (this.handlerConfig == null ? 43 : this.handlerConfig.hashCode()); + result = + (result * PRIME) + + (this.isSystemDefined == null ? 43 : this.isSystemDefined.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTypeSummary.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTypeSummary.java index f65d5f1d78..13647c9d80 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTypeSummary.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceTypeSummary.java @@ -29,6 +29,9 @@ public final class MonitoredResourceTypeSummary "description", "metricNamespace", "compartmentId", + "availabilityMetricsConfig", + "handlerConfig", + "isSystemDefined", "lifecycleState", "sourceType", "resourceCategory", @@ -47,6 +50,9 @@ public MonitoredResourceTypeSummary( String description, String metricNamespace, String compartmentId, + AvailabilityMetricsDetails availabilityMetricsConfig, + AgentExtensionHandlerConfiguration handlerConfig, + Boolean isSystemDefined, ResourceTypeLifecycleState lifecycleState, SourceType sourceType, ResourceCategory resourceCategory, @@ -64,6 +70,9 @@ public MonitoredResourceTypeSummary( this.description = description; this.metricNamespace = metricNamespace; this.compartmentId = compartmentId; + this.availabilityMetricsConfig = availabilityMetricsConfig; + this.handlerConfig = handlerConfig; + this.isSystemDefined = isSystemDefined; this.lifecycleState = lifecycleState; this.sourceType = sourceType; this.resourceCategory = resourceCategory; @@ -165,14 +174,14 @@ public Builder metricNamespace(String metricNamespace) { return this; } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy containing the resource type. + * Compartment Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy containing the resource type. + * Compartment Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * * @param compartmentId the value to set * @return this builder @@ -182,6 +191,41 @@ public Builder compartmentId(String compartmentId) { this.__explicitlySet__.add("compartmentId"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("availabilityMetricsConfig") + private AvailabilityMetricsDetails availabilityMetricsConfig; + + public Builder availabilityMetricsConfig( + AvailabilityMetricsDetails availabilityMetricsConfig) { + this.availabilityMetricsConfig = availabilityMetricsConfig; + this.__explicitlySet__.add("availabilityMetricsConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("handlerConfig") + private AgentExtensionHandlerConfiguration handlerConfig; + + public Builder handlerConfig(AgentExtensionHandlerConfiguration handlerConfig) { + this.handlerConfig = handlerConfig; + this.__explicitlySet__.add("handlerConfig"); + return this; + } + /** + * If boolean flag is true, then the resource type cannot be modified or deleted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSystemDefined") + private Boolean isSystemDefined; + + /** + * If boolean flag is true, then the resource type cannot be modified or deleted. + * @param isSystemDefined the value to set + * @return this builder + **/ + public Builder isSystemDefined(Boolean isSystemDefined) { + this.isSystemDefined = isSystemDefined; + this.__explicitlySet__.add("isSystemDefined"); + return this; + } /** * Lifecycle state of the monitored resource type. **/ @@ -374,6 +418,9 @@ public MonitoredResourceTypeSummary build() { this.description, this.metricNamespace, this.compartmentId, + this.availabilityMetricsConfig, + this.handlerConfig, + this.isSystemDefined, this.lifecycleState, this.sourceType, this.resourceCategory, @@ -410,6 +457,15 @@ public Builder copy(MonitoredResourceTypeSummary model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("availabilityMetricsConfig")) { + this.availabilityMetricsConfig(model.getAvailabilityMetricsConfig()); + } + if (model.wasPropertyExplicitlySet("handlerConfig")) { + this.handlerConfig(model.getHandlerConfig()); + } + if (model.wasPropertyExplicitlySet("isSystemDefined")) { + this.isSystemDefined(model.getIsSystemDefined()); + } if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } @@ -532,14 +588,14 @@ public String getMetricNamespace() { } /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy containing the resource type. + * Compartment Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** - * The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tenancy containing the resource type. + * Compartment Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * * @return the value **/ @@ -547,6 +603,34 @@ public String getCompartmentId() { return compartmentId; } + @com.fasterxml.jackson.annotation.JsonProperty("availabilityMetricsConfig") + private final AvailabilityMetricsDetails availabilityMetricsConfig; + + public AvailabilityMetricsDetails getAvailabilityMetricsConfig() { + return availabilityMetricsConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("handlerConfig") + private final AgentExtensionHandlerConfiguration handlerConfig; + + public AgentExtensionHandlerConfiguration getHandlerConfig() { + return handlerConfig; + } + + /** + * If boolean flag is true, then the resource type cannot be modified or deleted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSystemDefined") + private final Boolean isSystemDefined; + + /** + * If boolean flag is true, then the resource type cannot be modified or deleted. + * @return the value + **/ + public Boolean getIsSystemDefined() { + return isSystemDefined; + } + /** * Lifecycle state of the monitored resource type. **/ @@ -724,6 +808,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", description=").append(String.valueOf(this.description)); sb.append(", metricNamespace=").append(String.valueOf(this.metricNamespace)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", availabilityMetricsConfig=") + .append(String.valueOf(this.availabilityMetricsConfig)); + sb.append(", handlerConfig=").append(String.valueOf(this.handlerConfig)); + sb.append(", isSystemDefined=").append(String.valueOf(this.isSystemDefined)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", sourceType=").append(String.valueOf(this.sourceType)); sb.append(", resourceCategory=").append(String.valueOf(this.resourceCategory)); @@ -754,6 +842,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.metricNamespace, other.metricNamespace) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.availabilityMetricsConfig, other.availabilityMetricsConfig) + && java.util.Objects.equals(this.handlerConfig, other.handlerConfig) + && java.util.Objects.equals(this.isSystemDefined, other.isSystemDefined) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.sourceType, other.sourceType) && java.util.Objects.equals(this.resourceCategory, other.resourceCategory) @@ -782,6 +874,17 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.availabilityMetricsConfig == null + ? 43 + : this.availabilityMetricsConfig.hashCode()); + result = + (result * PRIME) + + (this.handlerConfig == null ? 43 : this.handlerConfig.hashCode()); + result = + (result * PRIME) + + (this.isSystemDefined == null ? 43 : this.isSystemDefined.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OnboardConfigDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OnboardConfigDetails.java new file mode 100644 index 0000000000..39d711e1a6 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OnboardConfigDetails.java @@ -0,0 +1,472 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * A configuration of the ONBOARD type, contains fields describing Onboarding customization: policies, + * dynamic groups, user groups. + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OnboardConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OnboardConfigDetails extends Config { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + 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("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + 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("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + 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("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * Assigned version to given onboard configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * Assigned version to given onboard configuration. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * True if customer decides marks configuration as manually configured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isManuallyOnboarded") + private Boolean isManuallyOnboarded; + + /** + * True if customer decides marks configuration as manually configured. + * @param isManuallyOnboarded the value to set + * @return this builder + **/ + public Builder isManuallyOnboarded(Boolean isManuallyOnboarded) { + this.isManuallyOnboarded = isManuallyOnboarded; + this.__explicitlySet__.add("isManuallyOnboarded"); + return this; + } + /** + * List of policy names assigned for onboarding + **/ + @com.fasterxml.jackson.annotation.JsonProperty("policyNames") + private java.util.List policyNames; + + /** + * List of policy names assigned for onboarding + * @param policyNames the value to set + * @return this builder + **/ + public Builder policyNames(java.util.List policyNames) { + this.policyNames = policyNames; + this.__explicitlySet__.add("policyNames"); + return this; + } + /** + * List of dynamic groups dedicated for Stack Monitoring. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dynamicGroups") + private java.util.List dynamicGroups; + + /** + * List of dynamic groups dedicated for Stack Monitoring. + * @param dynamicGroups the value to set + * @return this builder + **/ + public Builder dynamicGroups(java.util.List dynamicGroups) { + this.dynamicGroups = dynamicGroups; + this.__explicitlySet__.add("dynamicGroups"); + return this; + } + /** + * List of user groups dedicated for Stack Monitoring. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroups") + private java.util.List userGroups; + + /** + * List of user groups dedicated for Stack Monitoring. + * @param userGroups the value to set + * @return this builder + **/ + public Builder userGroups(java.util.List userGroups) { + this.userGroups = userGroups; + this.__explicitlySet__.add("userGroups"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("additionalConfigurations") + private AdditionalConfigurationDetails additionalConfigurations; + + public Builder additionalConfigurations( + AdditionalConfigurationDetails additionalConfigurations) { + this.additionalConfigurations = additionalConfigurations; + this.__explicitlySet__.add("additionalConfigurations"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OnboardConfigDetails build() { + OnboardConfigDetails model = + new OnboardConfigDetails( + this.id, + this.compartmentId, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.freeformTags, + this.definedTags, + this.systemTags, + this.version, + this.isManuallyOnboarded, + this.policyNames, + this.dynamicGroups, + this.userGroups, + this.additionalConfigurations); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OnboardConfigDetails 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("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()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("isManuallyOnboarded")) { + this.isManuallyOnboarded(model.getIsManuallyOnboarded()); + } + if (model.wasPropertyExplicitlySet("policyNames")) { + this.policyNames(model.getPolicyNames()); + } + if (model.wasPropertyExplicitlySet("dynamicGroups")) { + this.dynamicGroups(model.getDynamicGroups()); + } + if (model.wasPropertyExplicitlySet("userGroups")) { + this.userGroups(model.getUserGroups()); + } + if (model.wasPropertyExplicitlySet("additionalConfigurations")) { + this.additionalConfigurations(model.getAdditionalConfigurations()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OnboardConfigDetails( + String id, + String compartmentId, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + String version, + Boolean isManuallyOnboarded, + java.util.List policyNames, + java.util.List dynamicGroups, + java.util.List userGroups, + AdditionalConfigurationDetails additionalConfigurations) { + super( + id, + compartmentId, + displayName, + timeCreated, + timeUpdated, + lifecycleState, + freeformTags, + definedTags, + systemTags); + this.version = version; + this.isManuallyOnboarded = isManuallyOnboarded; + this.policyNames = policyNames; + this.dynamicGroups = dynamicGroups; + this.userGroups = userGroups; + this.additionalConfigurations = additionalConfigurations; + } + + /** + * Assigned version to given onboard configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * Assigned version to given onboard configuration. + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * True if customer decides marks configuration as manually configured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isManuallyOnboarded") + private final Boolean isManuallyOnboarded; + + /** + * True if customer decides marks configuration as manually configured. + * @return the value + **/ + public Boolean getIsManuallyOnboarded() { + return isManuallyOnboarded; + } + + /** + * List of policy names assigned for onboarding + **/ + @com.fasterxml.jackson.annotation.JsonProperty("policyNames") + private final java.util.List policyNames; + + /** + * List of policy names assigned for onboarding + * @return the value + **/ + public java.util.List getPolicyNames() { + return policyNames; + } + + /** + * List of dynamic groups dedicated for Stack Monitoring. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dynamicGroups") + private final java.util.List dynamicGroups; + + /** + * List of dynamic groups dedicated for Stack Monitoring. + * @return the value + **/ + public java.util.List getDynamicGroups() { + return dynamicGroups; + } + + /** + * List of user groups dedicated for Stack Monitoring. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroups") + private final java.util.List userGroups; + + /** + * List of user groups dedicated for Stack Monitoring. + * @return the value + **/ + public java.util.List getUserGroups() { + return userGroups; + } + + @com.fasterxml.jackson.annotation.JsonProperty("additionalConfigurations") + private final AdditionalConfigurationDetails additionalConfigurations; + + public AdditionalConfigurationDetails getAdditionalConfigurations() { + return additionalConfigurations; + } + + @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("OnboardConfigDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(", isManuallyOnboarded=").append(String.valueOf(this.isManuallyOnboarded)); + sb.append(", policyNames=").append(String.valueOf(this.policyNames)); + sb.append(", dynamicGroups=").append(String.valueOf(this.dynamicGroups)); + sb.append(", userGroups=").append(String.valueOf(this.userGroups)); + sb.append(", additionalConfigurations=") + .append(String.valueOf(this.additionalConfigurations)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OnboardConfigDetails)) { + return false; + } + + OnboardConfigDetails other = (OnboardConfigDetails) o; + return java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.isManuallyOnboarded, other.isManuallyOnboarded) + && java.util.Objects.equals(this.policyNames, other.policyNames) + && java.util.Objects.equals(this.dynamicGroups, other.dynamicGroups) + && java.util.Objects.equals(this.userGroups, other.userGroups) + && java.util.Objects.equals( + this.additionalConfigurations, other.additionalConfigurations) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = + (result * PRIME) + + (this.isManuallyOnboarded == null + ? 43 + : this.isManuallyOnboarded.hashCode()); + result = (result * PRIME) + (this.policyNames == null ? 43 : this.policyNames.hashCode()); + result = + (result * PRIME) + + (this.dynamicGroups == null ? 43 : this.dynamicGroups.hashCode()); + result = (result * PRIME) + (this.userGroups == null ? 43 : this.userGroups.hashCode()); + result = + (result * PRIME) + + (this.additionalConfigurations == null + ? 43 + : this.additionalConfigurations.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OnboardConfigSummary.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OnboardConfigSummary.java new file mode 100644 index 0000000000..1cb9530932 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OnboardConfigSummary.java @@ -0,0 +1,321 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * A configuration of the ONBOARD type, contains fields describing Onboarding customization: policies, + * dynamic groups, user groups. + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OnboardConfigSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OnboardConfigSummary extends ConfigSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + 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("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + 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("lifecycleState") + private Config.LifecycleState lifecycleState; + + public Builder lifecycleState(Config.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + 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("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * Assigned version to given onboard configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * Assigned version to given onboard configuration. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * True if customer decides marks configuration as manually configured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isManuallyOnboarded") + private Boolean isManuallyOnboarded; + + /** + * True if customer decides marks configuration as manually configured. + * @param isManuallyOnboarded the value to set + * @return this builder + **/ + public Builder isManuallyOnboarded(Boolean isManuallyOnboarded) { + this.isManuallyOnboarded = isManuallyOnboarded; + this.__explicitlySet__.add("isManuallyOnboarded"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OnboardConfigSummary build() { + OnboardConfigSummary model = + new OnboardConfigSummary( + this.id, + this.compartmentId, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.freeformTags, + this.definedTags, + this.systemTags, + this.version, + this.isManuallyOnboarded); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OnboardConfigSummary 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("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()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("isManuallyOnboarded")) { + this.isManuallyOnboarded(model.getIsManuallyOnboarded()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OnboardConfigSummary( + String id, + String compartmentId, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Config.LifecycleState lifecycleState, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + String version, + Boolean isManuallyOnboarded) { + super( + id, + compartmentId, + displayName, + timeCreated, + timeUpdated, + lifecycleState, + freeformTags, + definedTags, + systemTags); + this.version = version; + this.isManuallyOnboarded = isManuallyOnboarded; + } + + /** + * Assigned version to given onboard configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * Assigned version to given onboard configuration. + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * True if customer decides marks configuration as manually configured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isManuallyOnboarded") + private final Boolean isManuallyOnboarded; + + /** + * True if customer decides marks configuration as manually configured. + * @return the value + **/ + public Boolean getIsManuallyOnboarded() { + return isManuallyOnboarded; + } + + @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("OnboardConfigSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(", isManuallyOnboarded=").append(String.valueOf(this.isManuallyOnboarded)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OnboardConfigSummary)) { + return false; + } + + OnboardConfigSummary other = (OnboardConfigSummary) o; + return java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.isManuallyOnboarded, other.isManuallyOnboarded) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = + (result * PRIME) + + (this.isManuallyOnboarded == null + ? 43 + : this.isManuallyOnboarded.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OperationType.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OperationType.java index 8596138444..9cc8b1016d 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OperationType.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OperationType.java @@ -29,6 +29,8 @@ public enum OperationType { UpdateMaintenanceWindow("UPDATE_MAINTENANCE_WINDOW"), DeleteMaintenanceWindow("DELETE_MAINTENANCE_WINDOW"), StopMaintenanceWindow("STOP_MAINTENANCE_WINDOW"), + UpdateAgentReceiver("UPDATE_AGENT_RECEIVER"), + UpdateResourceTypeConfigs("UPDATE_RESOURCE_TYPE_CONFIGS"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ResourceCategory.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ResourceCategory.java index 0cdc422de3..0407bc1364 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ResourceCategory.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ResourceCategory.java @@ -12,6 +12,7 @@ public enum ResourceCategory { Application("APPLICATION"), Database("DATABASE"), Middleware("MIDDLEWARE"), + Infrastructure("INFRASTRUCTURE"), Unknown("UNKNOWN"), /** diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ResourceLifecycleState.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ResourceLifecycleState.java index 666cc7867b..e035f63690 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ResourceLifecycleState.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ResourceLifecycleState.java @@ -13,6 +13,7 @@ public enum ResourceLifecycleState { Creating("CREATING"), Updating("UPDATING"), Active("ACTIVE"), + Inactive("INACTIVE"), Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ResourceTypeConfigDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ResourceTypeConfigDetails.java new file mode 100644 index 0000000000..d19d488814 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/ResourceTypeConfigDetails.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Resource type configuration 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ResourceTypeConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ResourceTypeConfigDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "resourceType", + "availabilityMetricsConfig", + "handlerConfig" + }) + public ResourceTypeConfigDetails( + String resourceType, + AvailabilityMetricsDetails availabilityMetricsConfig, + AgentExtensionHandlerConfiguration handlerConfig) { + super(); + this.resourceType = resourceType; + this.availabilityMetricsConfig = availabilityMetricsConfig; + this.handlerConfig = handlerConfig; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Resource type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private String resourceType; + + /** + * Resource type. + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(String resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("availabilityMetricsConfig") + private AvailabilityMetricsDetails availabilityMetricsConfig; + + public Builder availabilityMetricsConfig( + AvailabilityMetricsDetails availabilityMetricsConfig) { + this.availabilityMetricsConfig = availabilityMetricsConfig; + this.__explicitlySet__.add("availabilityMetricsConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("handlerConfig") + private AgentExtensionHandlerConfiguration handlerConfig; + + public Builder handlerConfig(AgentExtensionHandlerConfiguration handlerConfig) { + this.handlerConfig = handlerConfig; + this.__explicitlySet__.add("handlerConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ResourceTypeConfigDetails build() { + ResourceTypeConfigDetails model = + new ResourceTypeConfigDetails( + this.resourceType, this.availabilityMetricsConfig, this.handlerConfig); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ResourceTypeConfigDetails model) { + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("availabilityMetricsConfig")) { + this.availabilityMetricsConfig(model.getAvailabilityMetricsConfig()); + } + if (model.wasPropertyExplicitlySet("handlerConfig")) { + this.handlerConfig(model.getHandlerConfig()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Resource type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final String resourceType; + + /** + * Resource type. + * @return the value + **/ + public String getResourceType() { + return resourceType; + } + + @com.fasterxml.jackson.annotation.JsonProperty("availabilityMetricsConfig") + private final AvailabilityMetricsDetails availabilityMetricsConfig; + + public AvailabilityMetricsDetails getAvailabilityMetricsConfig() { + return availabilityMetricsConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("handlerConfig") + private final AgentExtensionHandlerConfiguration handlerConfig; + + public AgentExtensionHandlerConfiguration getHandlerConfig() { + return handlerConfig; + } + + @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("ResourceTypeConfigDetails("); + sb.append("super=").append(super.toString()); + sb.append("resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", availabilityMetricsConfig=") + .append(String.valueOf(this.availabilityMetricsConfig)); + sb.append(", handlerConfig=").append(String.valueOf(this.handlerConfig)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ResourceTypeConfigDetails)) { + return false; + } + + ResourceTypeConfigDetails other = (ResourceTypeConfigDetails) o; + return java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals( + this.availabilityMetricsConfig, other.availabilityMetricsConfig) + && java.util.Objects.equals(this.handlerConfig, other.handlerConfig) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = + (result * PRIME) + + (this.availabilityMetricsConfig == null + ? 43 + : this.availabilityMetricsConfig.hashCode()); + result = + (result * PRIME) + + (this.handlerConfig == null ? 43 : this.handlerConfig.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/TelegrafResourceNameConfigurationDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/TelegrafResourceNameConfigurationDetails.java new file mode 100644 index 0000000000..cea08f3069 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/TelegrafResourceNameConfigurationDetails.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Resource name generation overriding configurations for telegraf resource types. + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TelegrafResourceNameConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TelegrafResourceNameConfigurationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"isUseTagsOnly", "includeTags", "excludeTags"}) + public TelegrafResourceNameConfigurationDetails( + Boolean isUseTagsOnly, + java.util.List includeTags, + java.util.List excludeTags) { + super(); + this.isUseTagsOnly = isUseTagsOnly; + this.includeTags = includeTags; + this.excludeTags = excludeTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Flag to indicate if only tags will be used for resource name generation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUseTagsOnly") + private Boolean isUseTagsOnly; + + /** + * Flag to indicate if only tags will be used for resource name generation. + * @param isUseTagsOnly the value to set + * @return this builder + **/ + public Builder isUseTagsOnly(Boolean isUseTagsOnly) { + this.isUseTagsOnly = isUseTagsOnly; + this.__explicitlySet__.add("isUseTagsOnly"); + return this; + } + /** + * List of tag names to be included. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("includeTags") + private java.util.List includeTags; + + /** + * List of tag names to be included. + * @param includeTags the value to set + * @return this builder + **/ + public Builder includeTags(java.util.List includeTags) { + this.includeTags = includeTags; + this.__explicitlySet__.add("includeTags"); + return this; + } + /** + * List of tag names to be excluded. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("excludeTags") + private java.util.List excludeTags; + + /** + * List of tag names to be excluded. + * @param excludeTags the value to set + * @return this builder + **/ + public Builder excludeTags(java.util.List excludeTags) { + this.excludeTags = excludeTags; + this.__explicitlySet__.add("excludeTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TelegrafResourceNameConfigurationDetails build() { + TelegrafResourceNameConfigurationDetails model = + new TelegrafResourceNameConfigurationDetails( + this.isUseTagsOnly, this.includeTags, this.excludeTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TelegrafResourceNameConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("isUseTagsOnly")) { + this.isUseTagsOnly(model.getIsUseTagsOnly()); + } + if (model.wasPropertyExplicitlySet("includeTags")) { + this.includeTags(model.getIncludeTags()); + } + if (model.wasPropertyExplicitlySet("excludeTags")) { + this.excludeTags(model.getExcludeTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Flag to indicate if only tags will be used for resource name generation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUseTagsOnly") + private final Boolean isUseTagsOnly; + + /** + * Flag to indicate if only tags will be used for resource name generation. + * @return the value + **/ + public Boolean getIsUseTagsOnly() { + return isUseTagsOnly; + } + + /** + * List of tag names to be included. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("includeTags") + private final java.util.List includeTags; + + /** + * List of tag names to be included. + * @return the value + **/ + public java.util.List getIncludeTags() { + return includeTags; + } + + /** + * List of tag names to be excluded. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("excludeTags") + private final java.util.List excludeTags; + + /** + * List of tag names to be excluded. + * @return the value + **/ + public java.util.List getExcludeTags() { + return excludeTags; + } + + @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("TelegrafResourceNameConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("isUseTagsOnly=").append(String.valueOf(this.isUseTagsOnly)); + sb.append(", includeTags=").append(String.valueOf(this.includeTags)); + sb.append(", excludeTags=").append(String.valueOf(this.excludeTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TelegrafResourceNameConfigurationDetails)) { + return false; + } + + TelegrafResourceNameConfigurationDetails other = + (TelegrafResourceNameConfigurationDetails) o; + return java.util.Objects.equals(this.isUseTagsOnly, other.isUseTagsOnly) + && java.util.Objects.equals(this.includeTags, other.includeTags) + && java.util.Objects.equals(this.excludeTags, other.excludeTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.isUseTagsOnly == null ? 43 : this.isUseTagsOnly.hashCode()); + result = (result * PRIME) + (this.includeTags == null ? 43 : this.includeTags.hashCode()); + result = (result * PRIME) + (this.excludeTags == null ? 43 : this.excludeTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateAgentReceiverTaskDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateAgentReceiverTaskDetails.java new file mode 100644 index 0000000000..197c4f8399 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateAgentReceiverTaskDetails.java @@ -0,0 +1,250 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Request details for enabling/disabling the metric receiver on the management agent. + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateAgentReceiverTaskDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateAgentReceiverTaskDetails extends MonitoredResourceTaskDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Management Agent Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private String agentId; + + /** + * Management Agent Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * @param agentId the value to set + * @return this builder + **/ + public Builder agentId(String agentId) { + this.agentId = agentId; + this.__explicitlySet__.add("agentId"); + return this; + } + /** + * Type of the handler. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handlerType") + private HandlerType handlerType; + + /** + * Type of the handler. + * @param handlerType the value to set + * @return this builder + **/ + public Builder handlerType(HandlerType handlerType) { + this.handlerType = handlerType; + this.__explicitlySet__.add("handlerType"); + return this; + } + /** + * True to enable the receiver and false to disable the receiver on the agent. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnable") + private Boolean isEnable; + + /** + * True to enable the receiver and false to disable the receiver on the agent. + * + * @param isEnable the value to set + * @return this builder + **/ + public Builder isEnable(Boolean isEnable) { + this.isEnable = isEnable; + this.__explicitlySet__.add("isEnable"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("receiverProperties") + private AgentReceiverProperties receiverProperties; + + public Builder receiverProperties(AgentReceiverProperties receiverProperties) { + this.receiverProperties = receiverProperties; + this.__explicitlySet__.add("receiverProperties"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateAgentReceiverTaskDetails build() { + UpdateAgentReceiverTaskDetails model = + new UpdateAgentReceiverTaskDetails( + this.agentId, this.handlerType, this.isEnable, this.receiverProperties); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateAgentReceiverTaskDetails model) { + if (model.wasPropertyExplicitlySet("agentId")) { + this.agentId(model.getAgentId()); + } + if (model.wasPropertyExplicitlySet("handlerType")) { + this.handlerType(model.getHandlerType()); + } + if (model.wasPropertyExplicitlySet("isEnable")) { + this.isEnable(model.getIsEnable()); + } + if (model.wasPropertyExplicitlySet("receiverProperties")) { + this.receiverProperties(model.getReceiverProperties()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateAgentReceiverTaskDetails( + String agentId, + HandlerType handlerType, + Boolean isEnable, + AgentReceiverProperties receiverProperties) { + super(); + this.agentId = agentId; + this.handlerType = handlerType; + this.isEnable = isEnable; + this.receiverProperties = receiverProperties; + } + + /** + * Management Agent Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private final String agentId; + + /** + * Management Agent Identifier [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * @return the value + **/ + public String getAgentId() { + return agentId; + } + + /** + * Type of the handler. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handlerType") + private final HandlerType handlerType; + + /** + * Type of the handler. + * @return the value + **/ + public HandlerType getHandlerType() { + return handlerType; + } + + /** + * True to enable the receiver and false to disable the receiver on the agent. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnable") + private final Boolean isEnable; + + /** + * True to enable the receiver and false to disable the receiver on the agent. + * + * @return the value + **/ + public Boolean getIsEnable() { + return isEnable; + } + + @com.fasterxml.jackson.annotation.JsonProperty("receiverProperties") + private final AgentReceiverProperties receiverProperties; + + public AgentReceiverProperties getReceiverProperties() { + return receiverProperties; + } + + @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("UpdateAgentReceiverTaskDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", agentId=").append(String.valueOf(this.agentId)); + sb.append(", handlerType=").append(String.valueOf(this.handlerType)); + sb.append(", isEnable=").append(String.valueOf(this.isEnable)); + sb.append(", receiverProperties=").append(String.valueOf(this.receiverProperties)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAgentReceiverTaskDetails)) { + return false; + } + + UpdateAgentReceiverTaskDetails other = (UpdateAgentReceiverTaskDetails) o; + return java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals(this.handlerType, other.handlerType) + && java.util.Objects.equals(this.isEnable, other.isEnable) + && java.util.Objects.equals(this.receiverProperties, other.receiverProperties) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = (result * PRIME) + (this.handlerType == null ? 43 : this.handlerType.hashCode()); + result = (result * PRIME) + (this.isEnable == null ? 43 : this.isEnable.hashCode()); + result = + (result * PRIME) + + (this.receiverProperties == null + ? 43 + : this.receiverProperties.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateComputeAutoActivatePluginConfigDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateComputeAutoActivatePluginConfigDetails.java new file mode 100644 index 0000000000..166b58ddca --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateComputeAutoActivatePluginConfigDetails.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Change the details of a COMPUTE_AUTO_ACTIVATE_PLUGIN config. + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateComputeAutoActivatePluginConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateComputeAutoActivatePluginConfigDetails extends UpdateConfigDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @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("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; + } + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private Boolean isEnabled; + + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + * @param isEnabled the value to set + * @return this builder + **/ + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + this.__explicitlySet__.add("isEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateComputeAutoActivatePluginConfigDetails build() { + UpdateComputeAutoActivatePluginConfigDetails model = + new UpdateComputeAutoActivatePluginConfigDetails( + this.displayName, this.freeformTags, this.definedTags, this.isEnabled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateComputeAutoActivatePluginConfigDetails 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()); + } + if (model.wasPropertyExplicitlySet("isEnabled")) { + this.isEnabled(model.getIsEnabled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateComputeAutoActivatePluginConfigDetails( + String displayName, + java.util.Map freeformTags, + java.util.Map> definedTags, + Boolean isEnabled) { + super(displayName, freeformTags, definedTags); + this.isEnabled = isEnabled; + } + + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private final Boolean isEnabled; + + /** + * True if automatic activation of the Management Agent plugin is enabled, false if it is not enabled. + * @return the value + **/ + public Boolean getIsEnabled() { + return isEnabled; + } + + @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("UpdateComputeAutoActivatePluginConfigDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", isEnabled=").append(String.valueOf(this.isEnabled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateComputeAutoActivatePluginConfigDetails)) { + return false; + } + + UpdateComputeAutoActivatePluginConfigDetails other = + (UpdateComputeAutoActivatePluginConfigDetails) o; + return java.util.Objects.equals(this.isEnabled, other.isEnabled) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateConfigDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateConfigDetails.java index d00ccb1ad3..3c16af7ec1 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateConfigDetails.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateConfigDetails.java @@ -22,6 +22,10 @@ defaultImpl = UpdateConfigDetails.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateComputeAutoActivatePluginConfigDetails.class, + name = "COMPUTE_AUTO_ACTIVATE_PLUGIN" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = UpdateLicenseEnterpriseExtensibilityConfigDetails.class, name = "LICENSE_ENTERPRISE_EXTENSIBILITY" @@ -33,6 +37,10 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = UpdateLicenseAutoAssignConfigDetails.class, name = "LICENSE_AUTO_ASSIGN" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateOnboardConfigDetails.class, + name = "ONBOARD" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateMaintenanceWindowDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateMaintenanceWindowDetails.java index 3a24421853..50b775e73d 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateMaintenanceWindowDetails.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateMaintenanceWindowDetails.java @@ -23,15 +23,25 @@ public final class UpdateMaintenanceWindowDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"description", "resources", "schedule"}) + @java.beans.ConstructorProperties({ + "description", + "resources", + "schedule", + "freeformTags", + "definedTags" + }) public UpdateMaintenanceWindowDetails( String description, java.util.List resources, - MaintenanceWindowSchedule schedule) { + MaintenanceWindowSchedule schedule, + java.util.Map freeformTags, + java.util.Map> definedTags) { super(); this.description = description; this.resources = resources; this.schedule = schedule; + this.freeformTags = freeformTags; + this.definedTags = definedTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -79,6 +89,47 @@ public Builder schedule(MaintenanceWindowSchedule schedule) { this.__explicitlySet__.add("schedule"); 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(); @@ -86,7 +137,11 @@ public Builder schedule(MaintenanceWindowSchedule schedule) { public UpdateMaintenanceWindowDetails build() { UpdateMaintenanceWindowDetails model = new UpdateMaintenanceWindowDetails( - this.description, this.resources, this.schedule); + this.description, + this.resources, + this.schedule, + this.freeformTags, + this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -104,6 +159,12 @@ public Builder copy(UpdateMaintenanceWindowDetails model) { if (model.wasPropertyExplicitlySet("schedule")) { this.schedule(model.getSchedule()); } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } return this; } } @@ -156,6 +217,42 @@ public MaintenanceWindowSchedule getSchedule() { return schedule; } + /** + * 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); @@ -173,6 +270,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("description=").append(String.valueOf(this.description)); sb.append(", resources=").append(String.valueOf(this.resources)); sb.append(", schedule=").append(String.valueOf(this.schedule)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); return sb.toString(); } @@ -190,6 +289,8 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.resources, other.resources) && java.util.Objects.equals(this.schedule, other.schedule) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); } @@ -200,6 +301,8 @@ public int hashCode() { result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.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-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateOnboardConfigDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateOnboardConfigDetails.java new file mode 100644 index 0000000000..876f14c9e1 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateOnboardConfigDetails.java @@ -0,0 +1,379 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Update configuration object, contains fields describing Onboarding customization: policies, + * dynamic groups, user groups. + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateOnboardConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateOnboardConfigDetails extends UpdateConfigDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @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("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; + } + /** + * Assigned version to given onboard configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * Assigned version to given onboard configuration. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * True if customer decides marks configuration as manually configured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isManuallyOnboarded") + private Boolean isManuallyOnboarded; + + /** + * True if customer decides marks configuration as manually configured. + * @param isManuallyOnboarded the value to set + * @return this builder + **/ + public Builder isManuallyOnboarded(Boolean isManuallyOnboarded) { + this.isManuallyOnboarded = isManuallyOnboarded; + this.__explicitlySet__.add("isManuallyOnboarded"); + return this; + } + /** + * List of policy names assigned for onboarding + **/ + @com.fasterxml.jackson.annotation.JsonProperty("policyNames") + private java.util.List policyNames; + + /** + * List of policy names assigned for onboarding + * @param policyNames the value to set + * @return this builder + **/ + public Builder policyNames(java.util.List policyNames) { + this.policyNames = policyNames; + this.__explicitlySet__.add("policyNames"); + return this; + } + /** + * List of dynamic groups dedicated for Stack Monitoring. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dynamicGroups") + private java.util.List dynamicGroups; + + /** + * List of dynamic groups dedicated for Stack Monitoring. + * @param dynamicGroups the value to set + * @return this builder + **/ + public Builder dynamicGroups(java.util.List dynamicGroups) { + this.dynamicGroups = dynamicGroups; + this.__explicitlySet__.add("dynamicGroups"); + return this; + } + /** + * List of user groups dedicated for Stack Monitoring. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroups") + private java.util.List userGroups; + + /** + * List of user groups dedicated for Stack Monitoring. + * @param userGroups the value to set + * @return this builder + **/ + public Builder userGroups(java.util.List userGroups) { + this.userGroups = userGroups; + this.__explicitlySet__.add("userGroups"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("additionalConfigurations") + private AdditionalConfigurationDetails additionalConfigurations; + + public Builder additionalConfigurations( + AdditionalConfigurationDetails additionalConfigurations) { + this.additionalConfigurations = additionalConfigurations; + this.__explicitlySet__.add("additionalConfigurations"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateOnboardConfigDetails build() { + UpdateOnboardConfigDetails model = + new UpdateOnboardConfigDetails( + this.displayName, + this.freeformTags, + this.definedTags, + this.version, + this.isManuallyOnboarded, + this.policyNames, + this.dynamicGroups, + this.userGroups, + this.additionalConfigurations); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateOnboardConfigDetails 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()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("isManuallyOnboarded")) { + this.isManuallyOnboarded(model.getIsManuallyOnboarded()); + } + if (model.wasPropertyExplicitlySet("policyNames")) { + this.policyNames(model.getPolicyNames()); + } + if (model.wasPropertyExplicitlySet("dynamicGroups")) { + this.dynamicGroups(model.getDynamicGroups()); + } + if (model.wasPropertyExplicitlySet("userGroups")) { + this.userGroups(model.getUserGroups()); + } + if (model.wasPropertyExplicitlySet("additionalConfigurations")) { + this.additionalConfigurations(model.getAdditionalConfigurations()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateOnboardConfigDetails( + String displayName, + java.util.Map freeformTags, + java.util.Map> definedTags, + String version, + Boolean isManuallyOnboarded, + java.util.List policyNames, + java.util.List dynamicGroups, + java.util.List userGroups, + AdditionalConfigurationDetails additionalConfigurations) { + super(displayName, freeformTags, definedTags); + this.version = version; + this.isManuallyOnboarded = isManuallyOnboarded; + this.policyNames = policyNames; + this.dynamicGroups = dynamicGroups; + this.userGroups = userGroups; + this.additionalConfigurations = additionalConfigurations; + } + + /** + * Assigned version to given onboard configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * Assigned version to given onboard configuration. + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * True if customer decides marks configuration as manually configured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isManuallyOnboarded") + private final Boolean isManuallyOnboarded; + + /** + * True if customer decides marks configuration as manually configured. + * @return the value + **/ + public Boolean getIsManuallyOnboarded() { + return isManuallyOnboarded; + } + + /** + * List of policy names assigned for onboarding + **/ + @com.fasterxml.jackson.annotation.JsonProperty("policyNames") + private final java.util.List policyNames; + + /** + * List of policy names assigned for onboarding + * @return the value + **/ + public java.util.List getPolicyNames() { + return policyNames; + } + + /** + * List of dynamic groups dedicated for Stack Monitoring. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dynamicGroups") + private final java.util.List dynamicGroups; + + /** + * List of dynamic groups dedicated for Stack Monitoring. + * @return the value + **/ + public java.util.List getDynamicGroups() { + return dynamicGroups; + } + + /** + * List of user groups dedicated for Stack Monitoring. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroups") + private final java.util.List userGroups; + + /** + * List of user groups dedicated for Stack Monitoring. + * @return the value + **/ + public java.util.List getUserGroups() { + return userGroups; + } + + @com.fasterxml.jackson.annotation.JsonProperty("additionalConfigurations") + private final AdditionalConfigurationDetails additionalConfigurations; + + public AdditionalConfigurationDetails getAdditionalConfigurations() { + return additionalConfigurations; + } + + @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("UpdateOnboardConfigDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(", isManuallyOnboarded=").append(String.valueOf(this.isManuallyOnboarded)); + sb.append(", policyNames=").append(String.valueOf(this.policyNames)); + sb.append(", dynamicGroups=").append(String.valueOf(this.dynamicGroups)); + sb.append(", userGroups=").append(String.valueOf(this.userGroups)); + sb.append(", additionalConfigurations=") + .append(String.valueOf(this.additionalConfigurations)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateOnboardConfigDetails)) { + return false; + } + + UpdateOnboardConfigDetails other = (UpdateOnboardConfigDetails) o; + return java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.isManuallyOnboarded, other.isManuallyOnboarded) + && java.util.Objects.equals(this.policyNames, other.policyNames) + && java.util.Objects.equals(this.dynamicGroups, other.dynamicGroups) + && java.util.Objects.equals(this.userGroups, other.userGroups) + && java.util.Objects.equals( + this.additionalConfigurations, other.additionalConfigurations) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = + (result * PRIME) + + (this.isManuallyOnboarded == null + ? 43 + : this.isManuallyOnboarded.hashCode()); + result = (result * PRIME) + (this.policyNames == null ? 43 : this.policyNames.hashCode()); + result = + (result * PRIME) + + (this.dynamicGroups == null ? 43 : this.dynamicGroups.hashCode()); + result = (result * PRIME) + (this.userGroups == null ? 43 : this.userGroups.hashCode()); + result = + (result * PRIME) + + (this.additionalConfigurations == null + ? 43 + : this.additionalConfigurations.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateResourceTypeConfigTaskDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateResourceTypeConfigTaskDetails.java new file mode 100644 index 0000000000..23a066e154 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateResourceTypeConfigTaskDetails.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Update the availability metrics and the handler configuration for + * the telegraf/collectd resource types. + * + *
+ * 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: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateResourceTypeConfigTaskDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateResourceTypeConfigTaskDetails extends MonitoredResourceTaskDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the handler. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handlerType") + private HandlerType handlerType; + + /** + * Type of the handler. + * @param handlerType the value to set + * @return this builder + **/ + public Builder handlerType(HandlerType handlerType) { + this.handlerType = handlerType; + this.__explicitlySet__.add("handlerType"); + return this; + } + /** + * A collection of resource type configuration details. User can provide + * availability proxy metrics list for resource types along with the + * telegraf/collectd handler configuration for the resource types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceTypesConfiguration") + private java.util.List resourceTypesConfiguration; + + /** + * A collection of resource type configuration details. User can provide + * availability proxy metrics list for resource types along with the + * telegraf/collectd handler configuration for the resource types. + * + * @param resourceTypesConfiguration the value to set + * @return this builder + **/ + public Builder resourceTypesConfiguration( + java.util.List resourceTypesConfiguration) { + this.resourceTypesConfiguration = resourceTypesConfiguration; + this.__explicitlySet__.add("resourceTypesConfiguration"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateResourceTypeConfigTaskDetails build() { + UpdateResourceTypeConfigTaskDetails model = + new UpdateResourceTypeConfigTaskDetails( + this.handlerType, this.resourceTypesConfiguration); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateResourceTypeConfigTaskDetails model) { + if (model.wasPropertyExplicitlySet("handlerType")) { + this.handlerType(model.getHandlerType()); + } + if (model.wasPropertyExplicitlySet("resourceTypesConfiguration")) { + this.resourceTypesConfiguration(model.getResourceTypesConfiguration()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateResourceTypeConfigTaskDetails( + HandlerType handlerType, + java.util.List resourceTypesConfiguration) { + super(); + this.handlerType = handlerType; + this.resourceTypesConfiguration = resourceTypesConfiguration; + } + + /** + * Type of the handler. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handlerType") + private final HandlerType handlerType; + + /** + * Type of the handler. + * @return the value + **/ + public HandlerType getHandlerType() { + return handlerType; + } + + /** + * A collection of resource type configuration details. User can provide + * availability proxy metrics list for resource types along with the + * telegraf/collectd handler configuration for the resource types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceTypesConfiguration") + private final java.util.List resourceTypesConfiguration; + + /** + * A collection of resource type configuration details. User can provide + * availability proxy metrics list for resource types along with the + * telegraf/collectd handler configuration for the resource types. + * + * @return the value + **/ + public java.util.List getResourceTypesConfiguration() { + return resourceTypesConfiguration; + } + + @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("UpdateResourceTypeConfigTaskDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", handlerType=").append(String.valueOf(this.handlerType)); + sb.append(", resourceTypesConfiguration=") + .append(String.valueOf(this.resourceTypesConfiguration)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateResourceTypeConfigTaskDetails)) { + return false; + } + + UpdateResourceTypeConfigTaskDetails other = (UpdateResourceTypeConfigTaskDetails) o; + return java.util.Objects.equals(this.handlerType, other.handlerType) + && java.util.Objects.equals( + this.resourceTypesConfiguration, other.resourceTypesConfiguration) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.handlerType == null ? 43 : this.handlerType.hashCode()); + result = + (result * PRIME) + + (this.resourceTypesConfiguration == null + ? 43 + : this.resourceTypesConfiguration.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/ListMonitoredResourceTypesRequest.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/ListMonitoredResourceTypesRequest.java index c14cf42194..e907a362cc 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/ListMonitoredResourceTypesRequest.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/ListMonitoredResourceTypesRequest.java @@ -77,6 +77,28 @@ public Boolean getIsExcludeSystemTypes() { public String getMetricNamespace() { return metricNamespace; } + /** + * A filter to return only resources with matching source type. + */ + private com.oracle.bmc.stackmonitoring.model.SourceType sourceType; + + /** + * A filter to return only resources with matching source type. + */ + public com.oracle.bmc.stackmonitoring.model.SourceType getSourceType() { + return sourceType; + } + /** + * A filter to return only resources with matching resource category. + */ + private com.oracle.bmc.stackmonitoring.model.ResourceCategory resourceCategory; + + /** + * A filter to return only resources with matching resource category. + */ + public com.oracle.bmc.stackmonitoring.model.ResourceCategory getResourceCategory() { + return resourceCategory; + } /** * The field to sort by. Only one sort order may be provided. * Default order for 'timeUpdated' is descending. Default order for 'name' is ascending. @@ -352,6 +374,37 @@ public Builder metricNamespace(String metricNamespace) { return this; } + /** + * A filter to return only resources with matching source type. + */ + private com.oracle.bmc.stackmonitoring.model.SourceType sourceType = null; + + /** + * A filter to return only resources with matching source type. + * @param sourceType the value to set + * @return this builder instance + */ + public Builder sourceType(com.oracle.bmc.stackmonitoring.model.SourceType sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * A filter to return only resources with matching resource category. + */ + private com.oracle.bmc.stackmonitoring.model.ResourceCategory resourceCategory = null; + + /** + * A filter to return only resources with matching resource category. + * @param resourceCategory the value to set + * @return this builder instance + */ + public Builder resourceCategory( + com.oracle.bmc.stackmonitoring.model.ResourceCategory resourceCategory) { + this.resourceCategory = resourceCategory; + return this; + } + /** * The field to sort by. Only one sort order may be provided. * Default order for 'timeUpdated' is descending. Default order for 'name' is ascending. @@ -596,6 +649,8 @@ public Builder copy(ListMonitoredResourceTypesRequest o) { status(o.getStatus()); isExcludeSystemTypes(o.getIsExcludeSystemTypes()); metricNamespace(o.getMetricNamespace()); + sourceType(o.getSourceType()); + resourceCategory(o.getResourceCategory()); sortBy(o.getSortBy()); sortOrder(o.getSortOrder()); limit(o.getLimit()); @@ -640,6 +695,8 @@ public ListMonitoredResourceTypesRequest buildWithoutInvocationCallback() { request.status = status; request.isExcludeSystemTypes = isExcludeSystemTypes; request.metricNamespace = metricNamespace; + request.sourceType = sourceType; + request.resourceCategory = resourceCategory; request.sortBy = sortBy; request.sortOrder = sortOrder; request.limit = limit; @@ -648,7 +705,7 @@ public ListMonitoredResourceTypesRequest buildWithoutInvocationCallback() { request.fields = fields; request.excludeFields = excludeFields; return request; - // new ListMonitoredResourceTypesRequest(compartmentId, name, status, isExcludeSystemTypes, metricNamespace, sortBy, sortOrder, limit, page, opcRequestId, fields, excludeFields); + // new ListMonitoredResourceTypesRequest(compartmentId, name, status, isExcludeSystemTypes, metricNamespace, sourceType, resourceCategory, sortBy, sortOrder, limit, page, opcRequestId, fields, excludeFields); } } @@ -663,6 +720,8 @@ public Builder toBuilder() { .status(status) .isExcludeSystemTypes(isExcludeSystemTypes) .metricNamespace(metricNamespace) + .sourceType(sourceType) + .resourceCategory(resourceCategory) .sortBy(sortBy) .sortOrder(sortOrder) .limit(limit) @@ -690,6 +749,8 @@ public String toString() { sb.append(",status=").append(String.valueOf(this.status)); sb.append(",isExcludeSystemTypes=").append(String.valueOf(this.isExcludeSystemTypes)); sb.append(",metricNamespace=").append(String.valueOf(this.metricNamespace)); + sb.append(",sourceType=").append(String.valueOf(this.sourceType)); + sb.append(",resourceCategory=").append(String.valueOf(this.resourceCategory)); sb.append(",sortBy=").append(String.valueOf(this.sortBy)); sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); sb.append(",limit=").append(String.valueOf(this.limit)); @@ -717,6 +778,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.status, other.status) && java.util.Objects.equals(this.isExcludeSystemTypes, other.isExcludeSystemTypes) && java.util.Objects.equals(this.metricNamespace, other.metricNamespace) + && java.util.Objects.equals(this.sourceType, other.sourceType) + && java.util.Objects.equals(this.resourceCategory, other.resourceCategory) && java.util.Objects.equals(this.sortBy, other.sortBy) && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.limit, other.limit) @@ -743,6 +806,10 @@ public int hashCode() { result = (result * PRIME) + (this.metricNamespace == null ? 43 : this.metricNamespace.hashCode()); + result = (result * PRIME) + (this.sourceType == null ? 43 : this.sourceType.hashCode()); + result = + (result * PRIME) + + (this.resourceCategory == null ? 43 : this.resourceCategory.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()); diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/RequestMonitoredResourcesSummarizedCountRequest.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/RequestMonitoredResourcesSummarizedCountRequest.java index fe991682a6..b6a8b09d2d 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/RequestMonitoredResourcesSummarizedCountRequest.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/RequestMonitoredResourcesSummarizedCountRequest.java @@ -37,6 +37,7 @@ public enum GroupBy { ResourceType("resourceType"), License("license"), ParentResourceId("parentResourceId"), + Namespace("namespace"), ; private final String value; diff --git a/bmc-streaming/pom.xml b/bmc-streaming/pom.xml index 3c912ab81b..fc9324d472 100644 --- a/bmc-streaming/pom.xml +++ b/bmc-streaming/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-streaming @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-tenantmanagercontrolplane/pom.xml b/bmc-tenantmanagercontrolplane/pom.xml index 338173870d..303b7a90a7 100644 --- a/bmc-tenantmanagercontrolplane/pom.xml +++ b/bmc-tenantmanagercontrolplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-tenantmanagercontrolplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/internal/http/CreateSubscriptionMappingConverter.java b/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/internal/http/CreateSubscriptionMappingConverter.java index 6a45c00e01..3f9033a0e7 100644 --- a/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/internal/http/CreateSubscriptionMappingConverter.java +++ b/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/internal/http/CreateSubscriptionMappingConverter.java @@ -139,17 +139,6 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( 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> etagHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( headers, "etag"); diff --git a/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/model/AdditionalAssignedRegionCollection.java b/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/model/AdditionalAssignedRegionCollection.java new file mode 100644 index 0000000000..31e281d202 --- /dev/null +++ b/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/model/AdditionalAssignedRegionCollection.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.tenantmanagercontrolplane.model; + +/** + * List of regions assignments of 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: 20230401") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AdditionalAssignedRegionCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AdditionalAssignedRegionCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public AdditionalAssignedRegionCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Array containing all regions in region assignments list of a subscription + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * Array containing all regions in region assignments list of a subscription + * @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 AdditionalAssignedRegionCollection build() { + AdditionalAssignedRegionCollection model = + new AdditionalAssignedRegionCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AdditionalAssignedRegionCollection 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 containing all regions in region assignments list of a subscription + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * Array containing all regions in region assignments list of a subscription + * @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("AdditionalAssignedRegionCollection("); + 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 AdditionalAssignedRegionCollection)) { + return false; + } + + AdditionalAssignedRegionCollection other = (AdditionalAssignedRegionCollection) 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-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/model/ClassicSubscription.java b/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/model/ClassicSubscription.java index 17c9f55604..50cf6f0c5c 100644 --- a/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/model/ClassicSubscription.java +++ b/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/model/ClassicSubscription.java @@ -346,6 +346,22 @@ public Builder endDate(java.util.Date endDate) { this.__explicitlySet__.add("endDate"); return this; } + /** + * This list will contain up to 5 regions where the subscription has a physical presence + **/ + @com.fasterxml.jackson.annotation.JsonProperty("regionAssignments") + private java.util.List regionAssignments; + + /** + * This list will contain up to 5 regions where the subscription has a physical presence + * @param regionAssignments the value to set + * @return this builder + **/ + public Builder regionAssignments(java.util.List regionAssignments) { + this.regionAssignments = regionAssignments; + this.__explicitlySet__.add("regionAssignments"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -375,7 +391,8 @@ public ClassicSubscription build() { this.promotion, this.purchaseEntitlementId, this.startDate, - this.endDate); + this.endDate, + this.regionAssignments); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -453,6 +470,9 @@ public Builder copy(ClassicSubscription model) { if (model.wasPropertyExplicitlySet("endDate")) { this.endDate(model.getEndDate()); } + if (model.wasPropertyExplicitlySet("regionAssignments")) { + this.regionAssignments(model.getRegionAssignments()); + } return this; } } @@ -492,7 +512,8 @@ public ClassicSubscription( java.util.List promotion, String purchaseEntitlementId, java.util.Date startDate, - java.util.Date endDate) { + java.util.Date endDate, + java.util.List regionAssignments) { super(id, compartmentId, serviceName, timeCreated, timeUpdated, freeformTags, definedTags); this.classicSubscriptionId = classicSubscriptionId; this.isClassicSubscription = isClassicSubscription; @@ -510,6 +531,7 @@ public ClassicSubscription( this.purchaseEntitlementId = purchaseEntitlementId; this.startDate = startDate; this.endDate = endDate; + this.regionAssignments = regionAssignments; } /** @@ -736,6 +758,20 @@ public java.util.Date getEndDate() { return endDate; } + /** + * This list will contain up to 5 regions where the subscription has a physical presence + **/ + @com.fasterxml.jackson.annotation.JsonProperty("regionAssignments") + private final java.util.List regionAssignments; + + /** + * This list will contain up to 5 regions where the subscription has a physical presence + * @return the value + **/ + public java.util.List getRegionAssignments() { + return regionAssignments; + } + @Override public String toString() { return this.toString(true); @@ -767,6 +803,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", purchaseEntitlementId=").append(String.valueOf(this.purchaseEntitlementId)); sb.append(", startDate=").append(String.valueOf(this.startDate)); sb.append(", endDate=").append(String.valueOf(this.endDate)); + sb.append(", regionAssignments=").append(String.valueOf(this.regionAssignments)); sb.append(")"); return sb.toString(); } @@ -798,6 +835,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.purchaseEntitlementId, other.purchaseEntitlementId) && java.util.Objects.equals(this.startDate, other.startDate) && java.util.Objects.equals(this.endDate, other.endDate) + && java.util.Objects.equals(this.regionAssignments, other.regionAssignments) && super.equals(other); } @@ -851,6 +889,9 @@ public int hashCode() { : this.purchaseEntitlementId.hashCode()); result = (result * PRIME) + (this.startDate == null ? 43 : this.startDate.hashCode()); result = (result * PRIME) + (this.endDate == null ? 43 : this.endDate.hashCode()); + result = + (result * PRIME) + + (this.regionAssignments == null ? 43 : this.regionAssignments.hashCode()); return result; } } diff --git a/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/model/ClassicSubscriptionEnvironmentName.java b/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/model/ClassicSubscriptionEnvironmentName.java deleted file mode 100644 index 2f19143204..0000000000 --- a/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/model/ClassicSubscriptionEnvironmentName.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. - */ -package com.oracle.bmc.tenantmanagercontrolplane.model; - -/** - * TAS (Tenant Automation System) legacy environment this order orginated from. - **/ -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230401") -public enum ClassicSubscriptionEnvironmentName { - Prod("PROD"), - Preprod("PREPROD"), - Preprod1("PREPROD1"), - Pintlab("PINTLAB"), - Miglab("MIGLAB"), - Pool2("POOL2"), - Pintlab2("PINTLAB2"), - Mylab0("MYLAB0"), - Mylab1("MYLAB1"), - Mylab2("MYLAB2"), - Mylab3("MYLAB3"), - Mylab4("MYLAB4"), - Mylab5("MYLAB5"), - ; - - private final String value; - private static java.util.Map map; - - static { - map = new java.util.HashMap<>(); - for (ClassicSubscriptionEnvironmentName v : ClassicSubscriptionEnvironmentName.values()) { - map.put(v.getValue(), v); - } - } - - ClassicSubscriptionEnvironmentName(String value) { - this.value = value; - } - - @com.fasterxml.jackson.annotation.JsonValue - public String getValue() { - return value; - } - - @com.fasterxml.jackson.annotation.JsonCreator - public static ClassicSubscriptionEnvironmentName create(String key) { - if (map.containsKey(key)) { - return map.get(key); - } - throw new IllegalArgumentException("Invalid ClassicSubscriptionEnvironmentName: " + key); - } -} diff --git a/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/responses/CreateSubscriptionMappingResponse.java b/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/responses/CreateSubscriptionMappingResponse.java index f774e2ffba..9421a058f4 100644 --- a/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/responses/CreateSubscriptionMappingResponse.java +++ b/bmc-tenantmanagercontrolplane/src/main/java/com/oracle/bmc/tenantmanagercontrolplane/responses/CreateSubscriptionMappingResponse.java @@ -25,21 +25,6 @@ public String getOpcRequestId() { return opcRequestId; } - /** - * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query the status of the asynchronous operation. - * - */ - private String opcWorkRequestId; - - /** - * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query the status of the asynchronous operation. - * - * @return the value - */ - public String getOpcWorkRequestId() { - return opcWorkRequestId; - } - /** * For optimistic concurrency control. See {@code if-match}. * @@ -73,7 +58,6 @@ public String getEtag() { "__httpStatusCode__", "headers", "opcRequestId", - "opcWorkRequestId", "etag", "subscriptionMapping" }) @@ -81,13 +65,11 @@ private CreateSubscriptionMappingResponse( int __httpStatusCode__, javax.ws.rs.core.MultivaluedMap headers, String opcRequestId, - String opcWorkRequestId, String etag, com.oracle.bmc.tenantmanagercontrolplane.model.SubscriptionMapping subscriptionMapping) { super(__httpStatusCode__, headers); this.opcRequestId = opcRequestId; - this.opcWorkRequestId = opcWorkRequestId; this.etag = etag; this.subscriptionMapping = subscriptionMapping; } @@ -126,23 +108,6 @@ public Builder opcRequestId(String opcRequestId) { return this; } - /** - * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query the status of the asynchronous operation. - * - */ - private String opcWorkRequestId; - - /** - * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query the status of the asynchronous operation. - * - * @param opcWorkRequestId the value to set - * @return this builder - */ - public Builder opcWorkRequestId(String opcWorkRequestId) { - this.opcWorkRequestId = opcWorkRequestId; - return this; - } - /** * For optimistic concurrency control. See {@code if-match}. * @@ -186,7 +151,6 @@ public Builder copy(CreateSubscriptionMappingResponse o) { __httpStatusCode__(o.get__httpStatusCode__()); headers(o.getHeaders()); opcRequestId(o.getOpcRequestId()); - opcWorkRequestId(o.getOpcWorkRequestId()); etag(o.getEtag()); subscriptionMapping(o.getSubscriptionMapping()); @@ -199,12 +163,7 @@ public Builder copy(CreateSubscriptionMappingResponse o) { */ public CreateSubscriptionMappingResponse build() { return new CreateSubscriptionMappingResponse( - __httpStatusCode__, - headers, - opcRequestId, - opcWorkRequestId, - etag, - subscriptionMapping); + __httpStatusCode__, headers, opcRequestId, etag, subscriptionMapping); } } @@ -222,7 +181,6 @@ public String toString() { sb.append("("); sb.append("super=").append(super.toString()); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); - sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); sb.append(",etag=").append(String.valueOf(etag)); sb.append(",subscriptionMapping=").append(String.valueOf(subscriptionMapping)); sb.append(")"); @@ -241,7 +199,6 @@ public boolean equals(Object o) { CreateSubscriptionMappingResponse other = (CreateSubscriptionMappingResponse) o; return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) - && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) && java.util.Objects.equals(this.etag, other.etag) && java.util.Objects.equals(this.subscriptionMapping, other.subscriptionMapping); } @@ -251,9 +208,6 @@ 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()); result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); result = (result * PRIME) diff --git a/bmc-threatintelligence/pom.xml b/bmc-threatintelligence/pom.xml index c562b1d92f..acef0ec6c2 100644 --- a/bmc-threatintelligence/pom.xml +++ b/bmc-threatintelligence/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-threatintelligence @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-usage/pom.xml b/bmc-usage/pom.xml index 290e8f1e5c..5ec630ccc0 100644 --- a/bmc-usage/pom.xml +++ b/bmc-usage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-usage @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-usageapi/pom.xml b/bmc-usageapi/pom.xml index ea22aae4e1..c9bb3d736e 100644 --- a/bmc-usageapi/pom.xml +++ b/bmc-usageapi/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-usageapi @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-vault/pom.xml b/bmc-vault/pom.xml index 97424870bc..41eaedf8f9 100644 --- a/bmc-vault/pom.xml +++ b/bmc-vault/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-vault @@ -16,12 +16,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 2.81.0 + 2.82.0 diff --git a/bmc-vbsinst/pom.xml b/bmc-vbsinst/pom.xml index aaa0722513..32178ff5ca 100644 --- a/bmc-vbsinst/pom.xml +++ b/bmc-vbsinst/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-vbsinst @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-visualbuilder/pom.xml b/bmc-visualbuilder/pom.xml index 4b8e37e172..6b0b6bd828 100644 --- a/bmc-visualbuilder/pom.xml +++ b/bmc-visualbuilder/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-visualbuilder @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-vnmonitoring/pom.xml b/bmc-vnmonitoring/pom.xml index 1bcca5d88b..89ce535ef5 100644 --- a/bmc-vnmonitoring/pom.xml +++ b/bmc-vnmonitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-vnmonitoring @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-vulnerabilityscanning/pom.xml b/bmc-vulnerabilityscanning/pom.xml index bf7703283f..48670bf248 100644 --- a/bmc-vulnerabilityscanning/pom.xml +++ b/bmc-vulnerabilityscanning/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-vulnerabilityscanning @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-waa/pom.xml b/bmc-waa/pom.xml index 5e8348a54a..7f0f69ff30 100644 --- a/bmc-waa/pom.xml +++ b/bmc-waa/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-waa @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-waas/pom.xml b/bmc-waas/pom.xml index 05648cb2e0..de34fc70e2 100644 --- a/bmc-waas/pom.xml +++ b/bmc-waas/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-waas @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-waf/pom.xml b/bmc-waf/pom.xml index 1d7567babf..f22bcc7c9a 100644 --- a/bmc-waf/pom.xml +++ b/bmc-waf/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-waf @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/bmc-workrequests/pom.xml b/bmc-workrequests/pom.xml index b0c3708f5b..6dd44bcee3 100644 --- a/bmc-workrequests/pom.xml +++ b/bmc-workrequests/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-workrequests @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 diff --git a/bmc-zpr/pom.xml b/bmc-zpr/pom.xml index 9e6bdba750..8bd0d15239 100644 --- a/bmc-zpr/pom.xml +++ b/bmc-zpr/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 ../pom.xml oci-java-sdk-zpr @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.81.0 + 2.82.0 \ No newline at end of file diff --git a/pom.xml b/pom.xml index 0d4a79c07e..74196c6e8a 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.oracle.oci.sdk oci-java-sdk - 2.81.0 + 2.82.0 pom Oracle Cloud Infrastructure SDK This project contains the SDK used for Oracle Cloud Infrastructure @@ -120,7 +120,8 @@ - + + false @@ -871,6 +872,7 @@ bmc-securityattribute bmc-zpr bmc-dblm + bmc-mngdmac bmc-full bmc-shaded