diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e6893d58e6..0aecbfaac31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). ### Added - N/A +## 1.2.45 - 2018-08-23 +### Added +- Support for fault domains in the Identity service +- Support for Autonomous Data Warehouse and Autonomous Transaction Processing in the Database service +- Support for resizing an offline volume in the Block Storage service + ## 1.2.44 - 2018-08-09 ### Added - Support for fault domains in the Compute service diff --git a/bmc-addons/bmc-apache-connector-provider/README.md b/bmc-addons/bmc-apache-connector-provider/README.md index 3173c872ca2..875bbde942a 100644 --- a/bmc-addons/bmc-apache-connector-provider/README.md +++ b/bmc-addons/bmc-apache-connector-provider/README.md @@ -6,10 +6,10 @@ The oci-java-sdk-addons-apache is an optional add-on to the OCI Java SDK. It le The add-on provides two features: -* **Connection pooling**. A detailed explantation can be found [here](https://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html) +* **Connection pooling**. A detailed explanation can be found [here](https://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html) * **HTTP(S) proxy support**. -Note: The `ApacheConnectorProvider` buffers requests into memory and can impact memory utilization of your application. This increased use of memory is especially relavent when using`ObjectStorageClient` to upload large objects to the Object Storage service. +Note: The `ApacheConnectorProvider` buffers requests into memory and can impact memory utilization of your application. This increased use of memory is especially relevant when using`ObjectStorageClient` to upload large objects to the Object Storage service. ## Installation 1. The OCI Java SDK must be installed and configured before installing the add-on. See [the documentation](https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm) for details. diff --git a/bmc-addons/bmc-apache-connector-provider/pom.xml b/bmc-addons/bmc-apache-connector-provider/pom.xml index 188f38d5c3b..2c909077343 100644 --- a/bmc-addons/bmc-apache-connector-provider/pom.xml +++ b/bmc-addons/bmc-apache-connector-provider/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 1.2.44 + 1.2.45 ../pom.xml @@ -37,7 +37,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 diff --git a/bmc-addons/pom.xml b/bmc-addons/pom.xml index ff8faf6d590..7a6375c320f 100644 --- a/bmc-addons/pom.xml +++ b/bmc-addons/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml diff --git a/bmc-audit/pom.xml b/bmc-audit/pom.xml index 373c1e8637a..a17b3c08c49 100644 --- a/bmc-audit/pom.xml +++ b/bmc-audit/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 diff --git a/bmc-bom/pom.xml b/bmc-bom/pom.xml index ff0df14cdf0..6154671d50d 100644 --- a/bmc-bom/pom.xml +++ b/bmc-bom/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml oci-java-sdk-bom @@ -19,68 +19,68 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 false com.oracle.oci.sdk oci-java-sdk-audit - 1.2.44 + 1.2.45 false com.oracle.oci.sdk oci-java-sdk-containerengine - 1.2.44 + 1.2.45 false com.oracle.oci.sdk oci-java-sdk-core - 1.2.44 + 1.2.45 false com.oracle.oci.sdk oci-java-sdk-database - 1.2.44 + 1.2.45 false com.oracle.oci.sdk oci-java-sdk-dns - 1.2.44 + 1.2.45 false com.oracle.oci.sdk oci-java-sdk-email - 1.2.44 + 1.2.45 false com.oracle.oci.sdk oci-java-sdk-filestorage - 1.2.44 + 1.2.45 false com.oracle.oci.sdk oci-java-sdk-identity - 1.2.44 + 1.2.45 false com.oracle.oci.sdk oci-java-sdk-loadbalancer - 1.2.44 + 1.2.45 false com.oracle.oci.sdk oci-java-sdk-objectstorage - 1.2.44 + 1.2.45 false pom @@ -88,13 +88,13 @@ com.oracle.oci.sdk oci-java-sdk-resourcesearch false - 1.2.44 + 1.2.45 com.oracle.oci.sdk false oci-java-sdk-addons-apache - 1.2.44 + 1.2.45 diff --git a/bmc-common/pom.xml b/bmc-common/pom.xml index 2b5e8b9e899..41d40fb1883 100644 --- a/bmc-common/pom.xml +++ b/bmc-common/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml @@ -15,10 +15,7 @@ https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm - - 1.52 + 1.60 diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/internal/RestClient.java b/bmc-common/src/main/java/com/oracle/bmc/http/internal/RestClient.java index d2cc8b5b733..b7feed3f492 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/internal/RestClient.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/internal/RestClient.java @@ -12,6 +12,7 @@ import lombok.RequiredArgsConstructor; import lombok.Value; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import javax.annotation.Nullable; import javax.ws.rs.ProcessingException; @@ -151,7 +152,9 @@ private Object attemptToSerialize(@Nullable Object body) { try { return (body instanceof String || body instanceof InputStream) ? body - : RestClientFactory.getObjectMapper().writeValueAsString(body); + : (body != null) + ? RestClientFactory.getObjectMapper().writeValueAsString(body) + : StringUtils.EMPTY; } catch (JsonProcessingException e) { throw new IllegalArgumentException("Unable to process JSON body", e); } diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/BouncyCastleHelper.java b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/BouncyCastleHelper.java new file mode 100644 index 00000000000..cb3686a5a44 --- /dev/null +++ b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/BouncyCastleHelper.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.http.signing.internal; + +import com.google.common.base.Throwables; +import lombok.extern.slf4j.Slf4j; + +import java.security.Provider; +import java.security.Security; + +@Slf4j +class BouncyCastleHelper { + private final boolean isProviderInstalled; + private final Provider bouncyCastleProvider; + + private BouncyCastleHelper() { + isProviderInstalled = + Security.getProvider("BC") != null || Security.getProvider("BCFIPS") != null; + try { + bouncyCastleProvider = (Provider) getBouncyCastleProviderClass().newInstance(); + } catch (InstantiationException | IllegalAccessException ex) { + LOG.error("Failed to instantiate provider", ex); + throw Throwables.propagate(ex); + } + } + + private static class Holder { + private static final BouncyCastleHelper INSTANCE = new BouncyCastleHelper(); + } + + static BouncyCastleHelper getInstance() { + return Holder.INSTANCE; + } + + boolean isProviderInstalled() { + return isProviderInstalled; + } + + Provider getBouncyCastleProvider() { + return bouncyCastleProvider; + } + + private static Class getBouncyCastleProviderClass() { + LOG.debug("Trying to get BouncyCastleProvider"); + try { + return Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider"); + } catch (ClassNotFoundException e) { + LOG.info("Did not find BouncyCastleProvider"); + } + + LOG.debug("Trying to get BouncyCastleFipsProvider"); + try { + return Class.forName("org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider"); + } catch (ClassNotFoundException e) { + LOG.info("Did not find BouncyCastleFipsProvider"); + } + + throw new IllegalStateException("No matching BouncyCastle provider found."); + } +} diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplier.java b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplier.java index 7abb2002c08..5703e952560 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplier.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplier.java @@ -6,6 +6,8 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.security.Provider; +import java.security.Security; import java.security.interfaces.RSAPrivateKey; import javax.annotation.Nonnull; @@ -72,8 +74,22 @@ public PEMFileRSAPrivateKeySupplier( Preconditions.checkNotNull( passphraseCharacters, "The provided private key requires a passphrase"); + JcePEMDecryptorProviderBuilder decryptorProviderBuilder = + new JcePEMDecryptorProviderBuilder(); + + // If either of BouncyCastle or BouncyCastleFIPS provider is installed, then irrespective of the + // version of the library used, decryption of passphrase protected PEM files are supported. Else, + // for versions of BouncyCastle > 1.52 (or BC-FIPS), need to add the provider to be able to read + // passphrase protected PEM files. Adding the provider to the PEMDecryptorProvider instead of + // modifying the application's security environment (by calling Security.addProvider) to maintain + // backward compatibility. Details at https://github.com/bcgit/bc-java/issues/156 + if (!BouncyCastleHelper.getInstance().isProviderInstalled()) { + decryptorProviderBuilder.setProvider( + BouncyCastleHelper.getInstance().getBouncyCastleProvider()); + } + PEMDecryptorProvider decProv = - new JcePEMDecryptorProviderBuilder().build(passphraseCharacters); + decryptorProviderBuilder.build(passphraseCharacters); try { keyInfo = ((PEMEncryptedKeyPair) object) diff --git a/bmc-containerengine/pom.xml b/bmc-containerengine/pom.xml index f0151872687..85557082383 100644 --- a/bmc-containerengine/pom.xml +++ b/bmc-containerengine/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 diff --git a/bmc-core/pom.xml b/bmc-core/pom.xml index 6ef4325c453..ee239648634 100644 --- a/bmc-core/pom.xml +++ b/bmc-core/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVirtualCircuitPublicPrefixDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVirtualCircuitPublicPrefixDetails.java index 61b9f52a95e..83de0fd2ff8 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVirtualCircuitPublicPrefixDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVirtualCircuitPublicPrefixDetails.java @@ -60,7 +60,7 @@ public static Builder builder() { /** * An individual public IP prefix (CIDR) to add to the public virtual circuit. - * Must be /24 or less specific. + * Must be /31 or less specific. * **/ @com.fasterxml.jackson.annotation.JsonProperty("cidrBlock") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateBootVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateBootVolumeDetails.java index 6759948d45c..52123773c41 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateBootVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateBootVolumeDetails.java @@ -51,12 +51,21 @@ public Builder freeformTags(java.util.Map freeformTags) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("sizeInGBs") + private Long sizeInGBs; + + public Builder sizeInGBs(Long sizeInGBs) { + this.sizeInGBs = sizeInGBs; + this.__explicitlySet__.add("sizeInGBs"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public UpdateBootVolumeDetails build() { UpdateBootVolumeDetails __instance__ = - new UpdateBootVolumeDetails(definedTags, displayName, freeformTags); + new UpdateBootVolumeDetails(definedTags, displayName, freeformTags, sizeInGBs); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -66,7 +75,8 @@ public Builder copy(UpdateBootVolumeDetails o) { Builder copiedBuilder = definedTags(o.getDefinedTags()) .displayName(o.getDisplayName()) - .freeformTags(o.getFreeformTags()); + .freeformTags(o.getFreeformTags()) + .sizeInGBs(o.getSizeInGBs()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -109,6 +119,12 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") java.util.Map freeformTags; + /** + * The size to resize the volume to in GBs. Has to be larger than the current size. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sizeInGBs") + Long sizeInGBs; + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeDetails.java index 8da96f199d7..59b4ee2c16e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeDetails.java @@ -51,12 +51,21 @@ public Builder freeformTags(java.util.Map freeformTags) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("sizeInGBs") + private Long sizeInGBs; + + public Builder sizeInGBs(Long sizeInGBs) { + this.sizeInGBs = sizeInGBs; + this.__explicitlySet__.add("sizeInGBs"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public UpdateVolumeDetails build() { UpdateVolumeDetails __instance__ = - new UpdateVolumeDetails(definedTags, displayName, freeformTags); + new UpdateVolumeDetails(definedTags, displayName, freeformTags, sizeInGBs); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -66,7 +75,8 @@ public Builder copy(UpdateVolumeDetails o) { Builder copiedBuilder = definedTags(o.getDefinedTags()) .displayName(o.getDisplayName()) - .freeformTags(o.getFreeformTags()); + .freeformTags(o.getFreeformTags()) + .sizeInGBs(o.getSizeInGBs()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -109,6 +119,12 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") java.util.Map freeformTags; + /** + * The size to resize the volume to in GBs. Has to be larger than the current size. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sizeInGBs") + Long sizeInGBs; + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuit.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuit.java index bb7d9d16594..18ed9440294 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuit.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuit.java @@ -615,7 +615,7 @@ public static ProviderState create(String key) { /** * For a public virtual circuit. The public IP prefixes (CIDRs) the customer wants to - * advertise across the connection. Each prefix must be /24 or less specific. + * advertise across the connection. Each prefix must be /31 or less specific. * **/ @com.fasterxml.jackson.annotation.JsonProperty("publicPrefixes") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeGroup.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeGroup.java index f7ceaf61edf..2d77f3f2d03 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeGroup.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeGroup.java @@ -130,6 +130,15 @@ public Builder volumeIds(java.util.List volumeIds) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("isHydrated") + private Boolean isHydrated; + + public Builder isHydrated(Boolean isHydrated) { + this.isHydrated = isHydrated; + this.__explicitlySet__.add("isHydrated"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -147,7 +156,8 @@ public VolumeGroup build() { sizeInGBs, sourceDetails, timeCreated, - volumeIds); + volumeIds, + isHydrated); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -166,7 +176,8 @@ public Builder copy(VolumeGroup o) { .sizeInGBs(o.getSizeInGBs()) .sourceDetails(o.getSourceDetails()) .timeCreated(o.getTimeCreated()) - .volumeIds(o.getVolumeIds()); + .volumeIds(o.getVolumeIds()) + .isHydrated(o.getIsHydrated()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -311,6 +322,12 @@ public static LifecycleState create(String key) { @com.fasterxml.jackson.annotation.JsonProperty("volumeIds") java.util.List volumeIds; + /** + * Specifies whether the newly created cloned volume group's data has finished copying from the source volume group or backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHydrated") + Boolean isHydrated; + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); } diff --git a/bmc-database/pom.xml b/bmc-database/pom.xml index 374751c1fe0..171bd4055e8 100644 --- a/bmc-database/pom.xml +++ b/bmc-database/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 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 f3a0e504616..be67ca7091a 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 @@ -36,6 +36,46 @@ public interface Database extends AutoCloseable { */ void setRegion(String regionId); + /** + * Creates a new Autonomous Data Warehouse. + * + * @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. + */ + CreateAutonomousDataWarehouseResponse createAutonomousDataWarehouse( + CreateAutonomousDataWarehouseRequest request); + + /** + * Creates a new Autonomous Data Warehouse backup for the specified database based on the provided request 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. + */ + CreateAutonomousDataWarehouseBackupResponse createAutonomousDataWarehouseBackup( + CreateAutonomousDataWarehouseBackupRequest request); + + /** + * Creates a new Autonomous Database. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + CreateAutonomousDatabaseResponse createAutonomousDatabase( + CreateAutonomousDatabaseRequest request); + + /** + * Creates a new Autonomous Database backup for the specified database based on the provided request 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. + */ + CreateAutonomousDatabaseBackupResponse createAutonomousDatabaseBackup( + CreateAutonomousDatabaseBackupRequest request); + /** * Creates a new backup in the specified database based on the request parameters you provide. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. * @@ -94,6 +134,26 @@ CreateDataGuardAssociationResponse createDataGuardAssociation( */ DbNodeActionResponse dbNodeAction(DbNodeActionRequest request); + /** + * Deletes the specified Autonomous Data Warehouse. + * + * @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. + */ + DeleteAutonomousDataWarehouseResponse deleteAutonomousDataWarehouse( + DeleteAutonomousDataWarehouseRequest request); + + /** + * Deletes the specified Autonomous Database. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + DeleteAutonomousDatabaseResponse deleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest request); + /** * Deletes a full backup. You cannot delete automatic backups using this API. * @param request The request object containing the details to send @@ -125,6 +185,43 @@ CreateDataGuardAssociationResponse createDataGuardAssociation( FailoverDataGuardAssociationResponse failoverDataGuardAssociation( FailoverDataGuardAssociationRequest request); + /** + * Gets the details of the specified Autonomous Data Warehouse. + * + * @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. + */ + GetAutonomousDataWarehouseResponse getAutonomousDataWarehouse( + GetAutonomousDataWarehouseRequest request); + + /** + * Gets information about the specified Autonomous Data Warehouse backup. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetAutonomousDataWarehouseBackupResponse getAutonomousDataWarehouseBackup( + GetAutonomousDataWarehouseBackupRequest request); + + /** + * Gets the details of the specified Autonomous Database. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetAutonomousDatabaseResponse getAutonomousDatabase(GetAutonomousDatabaseRequest request); + + /** + * Gets information about the specified Autonomous Database backup. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetAutonomousDatabaseBackupResponse getAutonomousDatabaseBackup( + GetAutonomousDatabaseBackupRequest request); + /** * Gets information about the specified backup. * @param request The request object containing the details to send @@ -230,6 +327,45 @@ GetDbSystemPatchHistoryEntryResponse getDbSystemPatchHistoryEntry( */ LaunchDbSystemResponse launchDbSystem(LaunchDbSystemRequest request); + /** + * Gets a list of Autonomous Data Warehouse backups based on either the `autonomousDataWarehouseId` or `compartmentId` specified as a query 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. + */ + ListAutonomousDataWarehouseBackupsResponse listAutonomousDataWarehouseBackups( + ListAutonomousDataWarehouseBackupsRequest request); + + /** + * Gets a list of Autonomous Data Warehouses. + * + * @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. + */ + ListAutonomousDataWarehousesResponse listAutonomousDataWarehouses( + ListAutonomousDataWarehousesRequest request); + + /** + * Gets a list of Autonomous Database backups based on either the `autonomousDatabaseId` or `compartmentId` specified as a query 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. + */ + ListAutonomousDatabaseBackupsResponse listAutonomousDatabaseBackups( + ListAutonomousDatabaseBackupsRequest request); + + /** + * Gets a list of Autonomous Databases. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListAutonomousDatabasesResponse listAutonomousDatabases(ListAutonomousDatabasesRequest request); + /** * Gets a list of backups based on the databaseId or compartmentId specified. Either one of the query parameters must be provided. * @@ -350,6 +486,26 @@ ListDbSystemPatchHistoryEntriesResponse listDbSystemPatchHistoryEntries( ReinstateDataGuardAssociationResponse reinstateDataGuardAssociation( ReinstateDataGuardAssociationRequest request); + /** + * Restores an Autonomous Data Warehouse based on the provided request 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. + */ + RestoreAutonomousDataWarehouseResponse restoreAutonomousDataWarehouse( + RestoreAutonomousDataWarehouseRequest request); + + /** + * Restores an Autonomous Database based on the provided request 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. + */ + RestoreAutonomousDatabaseResponse restoreAutonomousDatabase( + RestoreAutonomousDatabaseRequest request); + /** * Restore a Database based on the request parameters you provide. * @@ -359,6 +515,44 @@ ReinstateDataGuardAssociationResponse reinstateDataGuardAssociation( */ RestoreDatabaseResponse restoreDatabase(RestoreDatabaseRequest request); + /** + * Starts the specified autonomous Data Warehouse. + * + * @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. + */ + StartAutonomousDataWarehouseResponse startAutonomousDataWarehouse( + StartAutonomousDataWarehouseRequest request); + + /** + * Starts the specified Autonomous Database. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + StartAutonomousDatabaseResponse startAutonomousDatabase(StartAutonomousDatabaseRequest request); + + /** + * Stops the specified Autonomous Data Warehouse. + * + * @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. + */ + StopAutonomousDataWarehouseResponse stopAutonomousDataWarehouse( + StopAutonomousDataWarehouseRequest request); + + /** + * Stops the specified Autonomous Database. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + StopAutonomousDatabaseResponse stopAutonomousDatabase(StopAutonomousDatabaseRequest request); + /** * Performs a switchover to transition the primary database of a Data Guard association into a standby role. The * standby database associated with the `dataGuardAssociationId` assumes the primary database role. @@ -380,6 +574,26 @@ SwitchoverDataGuardAssociationResponse switchoverDataGuardAssociation( */ TerminateDbSystemResponse terminateDbSystem(TerminateDbSystemRequest request); + /** + * Updates the specified Autonomous Data Warehouse with a new CPU core count and size. + * + * @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. + */ + UpdateAutonomousDataWarehouseResponse updateAutonomousDataWarehouse( + UpdateAutonomousDataWarehouseRequest request); + + /** + * Updates the specified Autonomous Database with a new CPU core count and size. + * + * @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. + */ + UpdateAutonomousDatabaseResponse updateAutonomousDatabase( + UpdateAutonomousDatabaseRequest request); + /** * Update a Database based on the request parameters you provide. * 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 740bb37e366..001302e61fe 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 @@ -36,6 +36,80 @@ public interface DatabaseAsync extends AutoCloseable { */ void setRegion(String regionId); + /** + * Creates a new Autonomous Data Warehouse. + * + * + * @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 + createAutonomousDataWarehouse( + CreateAutonomousDataWarehouseRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateAutonomousDataWarehouseRequest, + CreateAutonomousDataWarehouseResponse> + handler); + + /** + * Creates a new Autonomous Data Warehouse backup for the specified database based on the provided request 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 + createAutonomousDataWarehouseBackup( + CreateAutonomousDataWarehouseBackupRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateAutonomousDataWarehouseBackupRequest, + CreateAutonomousDataWarehouseBackupResponse> + handler); + + /** + * Creates a new Autonomous Database. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createAutonomousDatabase( + CreateAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateAutonomousDatabaseRequest, CreateAutonomousDatabaseResponse> + handler); + + /** + * Creates a new Autonomous Database backup for the specified database based on the provided request 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 + createAutonomousDatabaseBackup( + CreateAutonomousDatabaseBackupRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateAutonomousDatabaseBackupRequest, + CreateAutonomousDatabaseBackupResponse> + handler); + /** * Creates a new backup in the specified database based on the request parameters you provide. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. * @@ -122,6 +196,42 @@ java.util.concurrent.Future dbNodeAction( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Deletes the specified Autonomous Data Warehouse. + * + * + * @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 + deleteAutonomousDataWarehouse( + DeleteAutonomousDataWarehouseRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteAutonomousDataWarehouseRequest, + DeleteAutonomousDataWarehouseResponse> + handler); + + /** + * Deletes the specified Autonomous Database. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteAutonomousDatabaseRequest, DeleteAutonomousDatabaseResponse> + handler); + /** * Deletes a full backup. You cannot delete automatic backups using this API. * @@ -175,6 +285,74 @@ java.util.concurrent.Future failoverDataGu FailoverDataGuardAssociationResponse> handler); + /** + * Gets the details of the specified Autonomous Data Warehouse. + * + * + * @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 getAutonomousDataWarehouse( + GetAutonomousDataWarehouseRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetAutonomousDataWarehouseRequest, GetAutonomousDataWarehouseResponse> + handler); + + /** + * Gets information about the specified Autonomous Data Warehouse backup. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getAutonomousDataWarehouseBackup( + GetAutonomousDataWarehouseBackupRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetAutonomousDataWarehouseBackupRequest, + GetAutonomousDataWarehouseBackupResponse> + handler); + + /** + * Gets the details of the specified Autonomous Database. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getAutonomousDatabase( + GetAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetAutonomousDatabaseRequest, GetAutonomousDatabaseResponse> + handler); + + /** + * Gets information about the specified Autonomous Database backup. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getAutonomousDatabaseBackup( + GetAutonomousDatabaseBackupRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> + handler); + /** * Gets information about the specified backup. * @@ -354,6 +532,79 @@ java.util.concurrent.Future launchDbSystem( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets a list of Autonomous Data Warehouse backups based on either the `autonomousDataWarehouseId` or `compartmentId` specified as a query 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 + listAutonomousDataWarehouseBackups( + ListAutonomousDataWarehouseBackupsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDataWarehouseBackupsRequest, + ListAutonomousDataWarehouseBackupsResponse> + handler); + + /** + * Gets a list of Autonomous Data Warehouses. + * + * + * @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 listAutonomousDataWarehouses( + ListAutonomousDataWarehousesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDataWarehousesRequest, + ListAutonomousDataWarehousesResponse> + handler); + + /** + * Gets a list of Autonomous Database backups based on either the `autonomousDatabaseId` or `compartmentId` specified as a query 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 + listAutonomousDatabaseBackups( + ListAutonomousDatabaseBackupsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDatabaseBackupsRequest, + ListAutonomousDatabaseBackupsResponse> + handler); + + /** + * Gets a list of Autonomous Databases. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listAutonomousDatabases( + ListAutonomousDatabasesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDatabasesRequest, ListAutonomousDatabasesResponse> + handler); + /** * Gets a list of backups based on the databaseId or compartmentId specified. Either one of the query parameters must be provided. * @@ -571,6 +822,42 @@ java.util.concurrent.Future listDbVersions( ReinstateDataGuardAssociationResponse> handler); + /** + * Restores an Autonomous Data Warehouse based on the provided request 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 + restoreAutonomousDataWarehouse( + RestoreAutonomousDataWarehouseRequest request, + com.oracle.bmc.responses.AsyncHandler< + RestoreAutonomousDataWarehouseRequest, + RestoreAutonomousDataWarehouseResponse> + handler); + + /** + * Restores an Autonomous Database based on the provided request 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 restoreAutonomousDatabase( + RestoreAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + RestoreAutonomousDatabaseRequest, RestoreAutonomousDatabaseResponse> + handler); + /** * Restore a Database based on the request parameters you provide. * @@ -587,6 +874,75 @@ java.util.concurrent.Future restoreDatabase( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Starts the specified autonomous Data Warehouse. + * + * + * @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 startAutonomousDataWarehouse( + StartAutonomousDataWarehouseRequest request, + com.oracle.bmc.responses.AsyncHandler< + StartAutonomousDataWarehouseRequest, + StartAutonomousDataWarehouseResponse> + handler); + + /** + * Starts the specified Autonomous Database. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future startAutonomousDatabase( + StartAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + StartAutonomousDatabaseRequest, StartAutonomousDatabaseResponse> + handler); + + /** + * Stops the specified Autonomous Data Warehouse. + * + * + * @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 stopAutonomousDataWarehouse( + StopAutonomousDataWarehouseRequest request, + com.oracle.bmc.responses.AsyncHandler< + StopAutonomousDataWarehouseRequest, StopAutonomousDataWarehouseResponse> + handler); + + /** + * Stops the specified Autonomous Database. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future stopAutonomousDatabase( + StopAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + StopAutonomousDatabaseRequest, StopAutonomousDatabaseResponse> + handler); + /** * Performs a switchover to transition the primary database of a Data Guard association into a standby role. The * standby database associated with the `dataGuardAssociationId` assumes the primary database role. @@ -625,6 +981,42 @@ java.util.concurrent.Future terminateDbSystem( TerminateDbSystemRequest, TerminateDbSystemResponse> handler); + /** + * Updates the specified Autonomous Data Warehouse with a new CPU core count and size. + * + * + * @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 + updateAutonomousDataWarehouse( + UpdateAutonomousDataWarehouseRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateAutonomousDataWarehouseRequest, + UpdateAutonomousDataWarehouseResponse> + handler); + + /** + * Updates the specified Autonomous Database with a new CPU core count and size. + * + * + * @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 updateAutonomousDatabase( + UpdateAutonomousDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateAutonomousDatabaseRequest, UpdateAutonomousDatabaseResponse> + handler); + /** * Update a Database based on the request parameters you provide. * 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 a378f46ff3f..77555727378 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 @@ -286,26 +286,32 @@ public void close() { } @Override - public java.util.concurrent.Future createBackup( - final CreateBackupRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async createBackup"); - final CreateBackupRequest interceptedRequest = - CreateBackupConverter.interceptRequest(request); + public java.util.concurrent.Future + createAutonomousDataWarehouse( + final CreateAutonomousDataWarehouseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateAutonomousDataWarehouseRequest, + CreateAutonomousDataWarehouseResponse> + handler) { + LOG.trace("Called async createAutonomousDataWarehouse"); + final CreateAutonomousDataWarehouseRequest interceptedRequest = + CreateAutonomousDataWarehouseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateBackupConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = CreateBackupConverter.fromResponse(); + CreateAutonomousDataWarehouseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDataWarehouseResponse> + transformer = CreateAutonomousDataWarehouseConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + CreateAutonomousDataWarehouseRequest, CreateAutonomousDataWarehouseResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - CreateBackupRequest, CreateBackupResponse>( + CreateAutonomousDataWarehouseRequest, + CreateAutonomousDataWarehouseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -320,7 +326,7 @@ public void retryCall() { this, interceptedRequest); client.post( ib, - interceptedRequest.getCreateBackupDetails(), + interceptedRequest.getCreateAutonomousDataWarehouseDetails(), interceptedRequest, onSuccess, onError); @@ -337,7 +343,7 @@ public void retryCall() { java.util.concurrent.Future responseFuture = client.post( ib, - interceptedRequest.getCreateBackupDetails(), + interceptedRequest.getCreateAutonomousDataWarehouseDetails(), interceptedRequest, onSuccess, onError); @@ -345,7 +351,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, CreateBackupResponse>( + javax.ws.rs.core.Response, CreateAutonomousDataWarehouseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -356,7 +362,7 @@ public void retryCall() { public java.util.concurrent.Future get() { return client.post( ib, - interceptedRequest.getCreateBackupDetails(), + interceptedRequest.getCreateAutonomousDataWarehouseDetails(), interceptedRequest, onSuccess, onError); @@ -369,31 +375,34 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - createDataGuardAssociation( - final CreateDataGuardAssociationRequest request, + public java.util.concurrent.Future + createAutonomousDataWarehouseBackup( + final CreateAutonomousDataWarehouseBackupRequest request, final com.oracle.bmc.responses.AsyncHandler< - CreateDataGuardAssociationRequest, - CreateDataGuardAssociationResponse> + CreateAutonomousDataWarehouseBackupRequest, + CreateAutonomousDataWarehouseBackupResponse> handler) { - LOG.trace("Called async createDataGuardAssociation"); - final CreateDataGuardAssociationRequest interceptedRequest = - CreateDataGuardAssociationConverter.interceptRequest(request); + LOG.trace("Called async createAutonomousDataWarehouseBackup"); + final CreateAutonomousDataWarehouseBackupRequest interceptedRequest = + CreateAutonomousDataWarehouseBackupConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateDataGuardAssociationConverter.fromRequest(client, interceptedRequest); + CreateAutonomousDataWarehouseBackupConverter.fromRequest( + client, interceptedRequest); final com.google.common.base.Function< - javax.ws.rs.core.Response, CreateDataGuardAssociationResponse> - transformer = CreateDataGuardAssociationConverter.fromResponse(); + javax.ws.rs.core.Response, CreateAutonomousDataWarehouseBackupResponse> + transformer = CreateAutonomousDataWarehouseBackupConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< - CreateDataGuardAssociationRequest, CreateDataGuardAssociationResponse> + CreateAutonomousDataWarehouseBackupRequest, + CreateAutonomousDataWarehouseBackupResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - CreateDataGuardAssociationRequest, CreateDataGuardAssociationResponse>( + CreateAutonomousDataWarehouseBackupRequest, + CreateAutonomousDataWarehouseBackupResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -408,7 +417,8 @@ public void retryCall() { this, interceptedRequest); client.post( ib, - interceptedRequest.getCreateDataGuardAssociationDetails(), + interceptedRequest + .getCreateAutonomousDataWarehouseBackupDetails(), interceptedRequest, onSuccess, onError); @@ -425,7 +435,7 @@ public void retryCall() { java.util.concurrent.Future responseFuture = client.post( ib, - interceptedRequest.getCreateDataGuardAssociationDetails(), + interceptedRequest.getCreateAutonomousDataWarehouseBackupDetails(), interceptedRequest, onSuccess, onError); @@ -433,7 +443,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, CreateDataGuardAssociationResponse>( + javax.ws.rs.core.Response, CreateAutonomousDataWarehouseBackupResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -444,7 +454,8 @@ public void retryCall() { public java.util.concurrent.Future get() { return client.post( ib, - interceptedRequest.getCreateDataGuardAssociationDetails(), + interceptedRequest + .getCreateAutonomousDataWarehouseBackupDetails(), interceptedRequest, onSuccess, onError); @@ -457,26 +468,29 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future createDbHome( - final CreateDbHomeRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future createAutonomousDatabase( + final CreateAutonomousDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateAutonomousDatabaseRequest, CreateAutonomousDatabaseResponse> handler) { - LOG.trace("Called async createDbHome"); - final CreateDbHomeRequest interceptedRequest = - CreateDbHomeConverter.interceptRequest(request); + LOG.trace("Called async createAutonomousDatabase"); + final CreateAutonomousDatabaseRequest interceptedRequest = + CreateAutonomousDatabaseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateDbHomeConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = CreateDbHomeConverter.fromResponse(); + CreateAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDatabaseResponse> + transformer = CreateAutonomousDatabaseConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + CreateAutonomousDatabaseRequest, CreateAutonomousDatabaseResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - CreateDbHomeRequest, CreateDbHomeResponse>( + CreateAutonomousDatabaseRequest, CreateAutonomousDatabaseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -491,7 +505,7 @@ public void retryCall() { this, interceptedRequest); client.post( ib, - interceptedRequest.getCreateDbHomeWithDbSystemIdDetails(), + interceptedRequest.getCreateAutonomousDatabaseDetails(), interceptedRequest, onSuccess, onError); @@ -508,7 +522,7 @@ public void retryCall() { java.util.concurrent.Future responseFuture = client.post( ib, - interceptedRequest.getCreateDbHomeWithDbSystemIdDetails(), + interceptedRequest.getCreateAutonomousDatabaseDetails(), interceptedRequest, onSuccess, onError); @@ -516,7 +530,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, CreateDbHomeResponse>( + javax.ws.rs.core.Response, CreateAutonomousDatabaseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -527,7 +541,7 @@ public void retryCall() { public java.util.concurrent.Future get() { return client.post( ib, - interceptedRequest.getCreateDbHomeWithDbSystemIdDetails(), + interceptedRequest.getCreateAutonomousDatabaseDetails(), interceptedRequest, onSuccess, onError); @@ -540,26 +554,33 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future dbNodeAction( - final DbNodeActionRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async dbNodeAction"); - final DbNodeActionRequest interceptedRequest = - DbNodeActionConverter.interceptRequest(request); + public java.util.concurrent.Future + createAutonomousDatabaseBackup( + final CreateAutonomousDatabaseBackupRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateAutonomousDatabaseBackupRequest, + CreateAutonomousDatabaseBackupResponse> + handler) { + LOG.trace("Called async createAutonomousDatabaseBackup"); + final CreateAutonomousDatabaseBackupRequest interceptedRequest = + CreateAutonomousDatabaseBackupConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DbNodeActionConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = DbNodeActionConverter.fromResponse(); + CreateAutonomousDatabaseBackupConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDatabaseBackupResponse> + transformer = CreateAutonomousDatabaseBackupConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + CreateAutonomousDatabaseBackupRequest, + CreateAutonomousDatabaseBackupResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - DbNodeActionRequest, DbNodeActionResponse>( + CreateAutonomousDatabaseBackupRequest, + CreateAutonomousDatabaseBackupResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -572,7 +593,12 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.post(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getCreateAutonomousDatabaseBackupDetails(), + interceptedRequest, + onSuccess, + onError); } }; } @@ -584,12 +610,17 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.post(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getCreateAutonomousDatabaseBackupDetails(), + interceptedRequest, + onSuccess, + onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, DbNodeActionResponse>( + javax.ws.rs.core.Response, CreateAutonomousDatabaseBackupResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -598,7 +629,12 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.post(ib, interceptedRequest, onSuccess, onError); + return client.post( + ib, + interceptedRequest.getCreateAutonomousDatabaseBackupDetails(), + interceptedRequest, + onSuccess, + onError); } }); } else { @@ -608,26 +644,26 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future deleteBackup( - final DeleteBackupRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future createBackup( + final CreateBackupRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async deleteBackup"); - final DeleteBackupRequest interceptedRequest = - DeleteBackupConverter.interceptRequest(request); + LOG.trace("Called async createBackup"); + final CreateBackupRequest interceptedRequest = + CreateBackupConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteBackupConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = DeleteBackupConverter.fromResponse(); + CreateBackupConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = CreateBackupConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - DeleteBackupRequest, DeleteBackupResponse>( + CreateBackupRequest, CreateBackupResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -640,7 +676,12 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.delete(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getCreateBackupDetails(), + interceptedRequest, + onSuccess, + onError); } }; } @@ -652,12 +693,17 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.delete(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getCreateBackupDetails(), + interceptedRequest, + onSuccess, + onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, DeleteBackupResponse>( + javax.ws.rs.core.Response, CreateBackupResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -666,7 +712,12 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.delete(ib, interceptedRequest, onSuccess, onError); + return client.post( + ib, + interceptedRequest.getCreateBackupDetails(), + interceptedRequest, + onSuccess, + onError); } }); } else { @@ -676,26 +727,31 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future deleteDbHome( - final DeleteDbHomeRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async deleteDbHome"); - final DeleteDbHomeRequest interceptedRequest = - DeleteDbHomeConverter.interceptRequest(request); + public java.util.concurrent.Future + createDataGuardAssociation( + final CreateDataGuardAssociationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateDataGuardAssociationRequest, + CreateDataGuardAssociationResponse> + handler) { + LOG.trace("Called async createDataGuardAssociation"); + final CreateDataGuardAssociationRequest interceptedRequest = + CreateDataGuardAssociationConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteDbHomeConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = DeleteDbHomeConverter.fromResponse(); + CreateDataGuardAssociationConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateDataGuardAssociationResponse> + transformer = CreateDataGuardAssociationConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + CreateDataGuardAssociationRequest, CreateDataGuardAssociationResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - DeleteDbHomeRequest, DeleteDbHomeResponse>( + CreateDataGuardAssociationRequest, CreateDataGuardAssociationResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -708,7 +764,12 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.delete(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getCreateDataGuardAssociationDetails(), + interceptedRequest, + onSuccess, + onError); } }; } @@ -720,12 +781,17 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.delete(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getCreateDataGuardAssociationDetails(), + interceptedRequest, + onSuccess, + onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, DeleteDbHomeResponse>( + javax.ws.rs.core.Response, CreateDataGuardAssociationResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -734,7 +800,12 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.delete(ib, interceptedRequest, onSuccess, onError); + return client.post( + ib, + interceptedRequest.getCreateDataGuardAssociationDetails(), + interceptedRequest, + onSuccess, + onError); } }); } else { @@ -744,32 +815,26 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - failoverDataGuardAssociation( - final FailoverDataGuardAssociationRequest request, - final com.oracle.bmc.responses.AsyncHandler< - FailoverDataGuardAssociationRequest, - FailoverDataGuardAssociationResponse> - handler) { - LOG.trace("Called async failoverDataGuardAssociation"); - final FailoverDataGuardAssociationRequest interceptedRequest = - FailoverDataGuardAssociationConverter.interceptRequest(request); + public java.util.concurrent.Future createDbHome( + final CreateDbHomeRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async createDbHome"); + final CreateDbHomeRequest interceptedRequest = + CreateDbHomeConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - FailoverDataGuardAssociationConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function< - javax.ws.rs.core.Response, FailoverDataGuardAssociationResponse> - transformer = FailoverDataGuardAssociationConverter.fromResponse(); + CreateDbHomeConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = CreateDbHomeConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler< - FailoverDataGuardAssociationRequest, FailoverDataGuardAssociationResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - FailoverDataGuardAssociationRequest, - FailoverDataGuardAssociationResponse>( + CreateDbHomeRequest, CreateDbHomeResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -784,7 +849,7 @@ public void retryCall() { this, interceptedRequest); client.post( ib, - interceptedRequest.getFailoverDataGuardAssociationDetails(), + interceptedRequest.getCreateDbHomeWithDbSystemIdDetails(), interceptedRequest, onSuccess, onError); @@ -801,7 +866,7 @@ public void retryCall() { java.util.concurrent.Future responseFuture = client.post( ib, - interceptedRequest.getFailoverDataGuardAssociationDetails(), + interceptedRequest.getCreateDbHomeWithDbSystemIdDetails(), interceptedRequest, onSuccess, onError); @@ -809,7 +874,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, FailoverDataGuardAssociationResponse>( + javax.ws.rs.core.Response, CreateDbHomeResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -820,7 +885,7 @@ public void retryCall() { public java.util.concurrent.Future get() { return client.post( ib, - interceptedRequest.getFailoverDataGuardAssociationDetails(), + interceptedRequest.getCreateDbHomeWithDbSystemIdDetails(), interceptedRequest, onSuccess, onError); @@ -833,25 +898,26 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getBackup( - final GetBackupRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future dbNodeAction( + final DbNodeActionRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async getBackup"); - final GetBackupRequest interceptedRequest = GetBackupConverter.interceptRequest(request); + LOG.trace("Called async dbNodeAction"); + final DbNodeActionRequest interceptedRequest = + DbNodeActionConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetBackupConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetBackupConverter.fromResponse(); + DbNodeActionConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = DbNodeActionConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler handlerToUse = - handler; + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetBackupRequest, GetBackupResponse>( + DbNodeActionRequest, DbNodeActionResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -864,7 +930,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.post(ib, interceptedRequest, onSuccess, onError); } }; } @@ -876,12 +942,12 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.post(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetBackupResponse>( + javax.ws.rs.core.Response, DbNodeActionResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -890,7 +956,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.post(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -900,29 +966,32 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getDataGuardAssociation( - final GetDataGuardAssociationRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetDataGuardAssociationRequest, GetDataGuardAssociationResponse> - handler) { - LOG.trace("Called async getDataGuardAssociation"); - final GetDataGuardAssociationRequest interceptedRequest = - GetDataGuardAssociationConverter.interceptRequest(request); + public java.util.concurrent.Future + deleteAutonomousDataWarehouse( + final DeleteAutonomousDataWarehouseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteAutonomousDataWarehouseRequest, + DeleteAutonomousDataWarehouseResponse> + handler) { + LOG.trace("Called async deleteAutonomousDataWarehouse"); + final DeleteAutonomousDataWarehouseRequest interceptedRequest = + DeleteAutonomousDataWarehouseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDataGuardAssociationConverter.fromRequest(client, interceptedRequest); + DeleteAutonomousDataWarehouseConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< - javax.ws.rs.core.Response, GetDataGuardAssociationResponse> - transformer = GetDataGuardAssociationConverter.fromResponse(); + javax.ws.rs.core.Response, DeleteAutonomousDataWarehouseResponse> + transformer = DeleteAutonomousDataWarehouseConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< - GetDataGuardAssociationRequest, GetDataGuardAssociationResponse> + DeleteAutonomousDataWarehouseRequest, DeleteAutonomousDataWarehouseResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetDataGuardAssociationRequest, GetDataGuardAssociationResponse>( + DeleteAutonomousDataWarehouseRequest, + DeleteAutonomousDataWarehouseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -935,7 +1004,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.delete(ib, interceptedRequest, onSuccess, onError); } }; } @@ -947,12 +1016,12 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.delete(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetDataGuardAssociationResponse>( + javax.ws.rs.core.Response, DeleteAutonomousDataWarehouseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -961,7 +1030,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.delete(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -971,26 +1040,29 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getDatabase( - final GetDatabaseRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future deleteAutonomousDatabase( + final DeleteAutonomousDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteAutonomousDatabaseRequest, DeleteAutonomousDatabaseResponse> handler) { - LOG.trace("Called async getDatabase"); - final GetDatabaseRequest interceptedRequest = - GetDatabaseConverter.interceptRequest(request); + LOG.trace("Called async deleteAutonomousDatabase"); + final DeleteAutonomousDatabaseRequest interceptedRequest = + DeleteAutonomousDatabaseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDatabaseConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetDatabaseConverter.fromResponse(); + DeleteAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAutonomousDatabaseResponse> + transformer = DeleteAutonomousDatabaseConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + DeleteAutonomousDatabaseRequest, DeleteAutonomousDatabaseResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetDatabaseRequest, GetDatabaseResponse>( + DeleteAutonomousDatabaseRequest, DeleteAutonomousDatabaseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1003,7 +1075,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.delete(ib, interceptedRequest, onSuccess, onError); } }; } @@ -1015,12 +1087,12 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.delete(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetDatabaseResponse>( + javax.ws.rs.core.Response, DeleteAutonomousDatabaseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1029,7 +1101,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.delete(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -1039,25 +1111,26 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getDbHome( - final GetDbHomeRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future deleteBackup( + final DeleteBackupRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async getDbHome"); - final GetDbHomeRequest interceptedRequest = GetDbHomeConverter.interceptRequest(request); + LOG.trace("Called async deleteBackup"); + final DeleteBackupRequest interceptedRequest = + DeleteBackupConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbHomeConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetDbHomeConverter.fromResponse(); + DeleteBackupConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = DeleteBackupConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler handlerToUse = - handler; + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetDbHomeRequest, GetDbHomeResponse>( + DeleteBackupRequest, DeleteBackupResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1070,7 +1143,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.delete(ib, interceptedRequest, onSuccess, onError); } }; } @@ -1082,12 +1155,12 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.delete(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetDbHomeResponse>( + javax.ws.rs.core.Response, DeleteBackupResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1096,7 +1169,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.delete(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -1106,27 +1179,26 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getDbHomePatch( - final GetDbHomePatchRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetDbHomePatchRequest, GetDbHomePatchResponse> + public java.util.concurrent.Future deleteDbHome( + final DeleteDbHomeRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async getDbHomePatch"); - final GetDbHomePatchRequest interceptedRequest = - GetDbHomePatchConverter.interceptRequest(request); + LOG.trace("Called async deleteDbHome"); + final DeleteDbHomeRequest interceptedRequest = + DeleteDbHomeConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbHomePatchConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetDbHomePatchConverter.fromResponse(); + DeleteDbHomeConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = DeleteDbHomeConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetDbHomePatchRequest, GetDbHomePatchResponse>( + DeleteDbHomeRequest, DeleteDbHomeResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1139,7 +1211,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.delete(ib, interceptedRequest, onSuccess, onError); } }; } @@ -1151,12 +1223,12 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.delete(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetDbHomePatchResponse>( + javax.ws.rs.core.Response, DeleteDbHomeResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1165,7 +1237,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.delete(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -1175,31 +1247,32 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - getDbHomePatchHistoryEntry( - final GetDbHomePatchHistoryEntryRequest request, + public java.util.concurrent.Future + failoverDataGuardAssociation( + final FailoverDataGuardAssociationRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetDbHomePatchHistoryEntryRequest, - GetDbHomePatchHistoryEntryResponse> + FailoverDataGuardAssociationRequest, + FailoverDataGuardAssociationResponse> handler) { - LOG.trace("Called async getDbHomePatchHistoryEntry"); - final GetDbHomePatchHistoryEntryRequest interceptedRequest = - GetDbHomePatchHistoryEntryConverter.interceptRequest(request); + LOG.trace("Called async failoverDataGuardAssociation"); + final FailoverDataGuardAssociationRequest interceptedRequest = + FailoverDataGuardAssociationConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbHomePatchHistoryEntryConverter.fromRequest(client, interceptedRequest); + FailoverDataGuardAssociationConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< - javax.ws.rs.core.Response, GetDbHomePatchHistoryEntryResponse> - transformer = GetDbHomePatchHistoryEntryConverter.fromResponse(); + javax.ws.rs.core.Response, FailoverDataGuardAssociationResponse> + transformer = FailoverDataGuardAssociationConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< - GetDbHomePatchHistoryEntryRequest, GetDbHomePatchHistoryEntryResponse> + FailoverDataGuardAssociationRequest, FailoverDataGuardAssociationResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetDbHomePatchHistoryEntryRequest, GetDbHomePatchHistoryEntryResponse>( + FailoverDataGuardAssociationRequest, + FailoverDataGuardAssociationResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1212,7 +1285,12 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getFailoverDataGuardAssociationDetails(), + interceptedRequest, + onSuccess, + onError); } }; } @@ -1224,12 +1302,17 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getFailoverDataGuardAssociationDetails(), + interceptedRequest, + onSuccess, + onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetDbHomePatchHistoryEntryResponse>( + javax.ws.rs.core.Response, FailoverDataGuardAssociationResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1238,7 +1321,12 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.post( + ib, + interceptedRequest.getFailoverDataGuardAssociationDetails(), + interceptedRequest, + onSuccess, + onError); } }); } else { @@ -1248,25 +1336,31 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getDbNode( - final GetDbNodeRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async getDbNode"); - final GetDbNodeRequest interceptedRequest = GetDbNodeConverter.interceptRequest(request); + public java.util.concurrent.Future + getAutonomousDataWarehouse( + final GetAutonomousDataWarehouseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetAutonomousDataWarehouseRequest, + GetAutonomousDataWarehouseResponse> + handler) { + LOG.trace("Called async getAutonomousDataWarehouse"); + final GetAutonomousDataWarehouseRequest interceptedRequest = + GetAutonomousDataWarehouseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbNodeConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetDbNodeConverter.fromResponse(); + GetAutonomousDataWarehouseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDataWarehouseResponse> + transformer = GetAutonomousDataWarehouseConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler handlerToUse = - handler; + com.oracle.bmc.responses.AsyncHandler< + GetAutonomousDataWarehouseRequest, GetAutonomousDataWarehouseResponse> + handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetDbNodeRequest, GetDbNodeResponse>( + GetAutonomousDataWarehouseRequest, GetAutonomousDataWarehouseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1296,7 +1390,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetDbNodeResponse>( + javax.ws.rs.core.Response, GetAutonomousDataWarehouseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1315,26 +1409,33 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getDbSystem( - final GetDbSystemRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async getDbSystem"); - final GetDbSystemRequest interceptedRequest = - GetDbSystemConverter.interceptRequest(request); + public java.util.concurrent.Future + getAutonomousDataWarehouseBackup( + final GetAutonomousDataWarehouseBackupRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetAutonomousDataWarehouseBackupRequest, + GetAutonomousDataWarehouseBackupResponse> + handler) { + LOG.trace("Called async getAutonomousDataWarehouseBackup"); + final GetAutonomousDataWarehouseBackupRequest interceptedRequest = + GetAutonomousDataWarehouseBackupConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbSystemConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetDbSystemConverter.fromResponse(); + GetAutonomousDataWarehouseBackupConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDataWarehouseBackupResponse> + transformer = GetAutonomousDataWarehouseBackupConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + GetAutonomousDataWarehouseBackupRequest, + GetAutonomousDataWarehouseBackupResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetDbSystemRequest, GetDbSystemResponse>( + GetAutonomousDataWarehouseBackupRequest, + GetAutonomousDataWarehouseBackupResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1364,7 +1465,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetDbSystemResponse>( + javax.ws.rs.core.Response, GetAutonomousDataWarehouseBackupResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1383,27 +1484,29 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getDbSystemPatch( - final GetDbSystemPatchRequest request, + public java.util.concurrent.Future getAutonomousDatabase( + final GetAutonomousDatabaseRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetDbSystemPatchRequest, GetDbSystemPatchResponse> + GetAutonomousDatabaseRequest, GetAutonomousDatabaseResponse> handler) { - LOG.trace("Called async getDbSystemPatch"); - final GetDbSystemPatchRequest interceptedRequest = - GetDbSystemPatchConverter.interceptRequest(request); + LOG.trace("Called async getAutonomousDatabase"); + final GetAutonomousDatabaseRequest interceptedRequest = + GetAutonomousDatabaseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbSystemPatchConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetDbSystemPatchConverter.fromResponse(); + GetAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDatabaseResponse> + transformer = GetAutonomousDatabaseConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + GetAutonomousDatabaseRequest, GetAutonomousDatabaseResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetDbSystemPatchRequest, GetDbSystemPatchResponse>( + GetAutonomousDatabaseRequest, GetAutonomousDatabaseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1433,7 +1536,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetDbSystemPatchResponse>( + javax.ws.rs.core.Response, GetAutonomousDatabaseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1452,32 +1555,32 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - getDbSystemPatchHistoryEntry( - final GetDbSystemPatchHistoryEntryRequest request, + public java.util.concurrent.Future + getAutonomousDatabaseBackup( + final GetAutonomousDatabaseBackupRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetDbSystemPatchHistoryEntryRequest, - GetDbSystemPatchHistoryEntryResponse> + GetAutonomousDatabaseBackupRequest, + GetAutonomousDatabaseBackupResponse> handler) { - LOG.trace("Called async getDbSystemPatchHistoryEntry"); - final GetDbSystemPatchHistoryEntryRequest interceptedRequest = - GetDbSystemPatchHistoryEntryConverter.interceptRequest(request); + LOG.trace("Called async getAutonomousDatabaseBackup"); + final GetAutonomousDatabaseBackupRequest interceptedRequest = + GetAutonomousDatabaseBackupConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbSystemPatchHistoryEntryConverter.fromRequest(client, interceptedRequest); + GetAutonomousDatabaseBackupConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< - javax.ws.rs.core.Response, GetDbSystemPatchHistoryEntryResponse> - transformer = GetDbSystemPatchHistoryEntryConverter.fromResponse(); + javax.ws.rs.core.Response, GetAutonomousDatabaseBackupResponse> + transformer = GetAutonomousDatabaseBackupConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< - GetDbSystemPatchHistoryEntryRequest, GetDbSystemPatchHistoryEntryResponse> + GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetDbSystemPatchHistoryEntryRequest, - GetDbSystemPatchHistoryEntryResponse>( + GetAutonomousDatabaseBackupRequest, + GetAutonomousDatabaseBackupResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1507,7 +1610,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetDbSystemPatchHistoryEntryResponse>( + javax.ws.rs.core.Response, GetAutonomousDatabaseBackupResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1526,27 +1629,25 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future launchDbSystem( - final LaunchDbSystemRequest request, - final com.oracle.bmc.responses.AsyncHandler< - LaunchDbSystemRequest, LaunchDbSystemResponse> + public java.util.concurrent.Future getBackup( + final GetBackupRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async launchDbSystem"); - final LaunchDbSystemRequest interceptedRequest = - LaunchDbSystemConverter.interceptRequest(request); + LOG.trace("Called async getBackup"); + final GetBackupRequest interceptedRequest = GetBackupConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - LaunchDbSystemConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = LaunchDbSystemConverter.fromResponse(); + GetBackupConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetBackupConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler - handlerToUse = handler; + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - LaunchDbSystemRequest, LaunchDbSystemResponse>( + GetBackupRequest, GetBackupResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1559,12 +1660,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.post( - ib, - interceptedRequest.getLaunchDbSystemDetails(), - interceptedRequest, - onSuccess, - onError); + client.get(ib, interceptedRequest, onSuccess, onError); } }; } @@ -1576,17 +1672,12 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.post( - ib, - interceptedRequest.getLaunchDbSystemDetails(), - interceptedRequest, - onSuccess, - onError); + client.get(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, LaunchDbSystemResponse>( + javax.ws.rs.core.Response, GetBackupResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1595,12 +1686,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.post( - ib, - interceptedRequest.getLaunchDbSystemDetails(), - interceptedRequest, - onSuccess, - onError); + return client.get(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -1610,26 +1696,29 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listBackups( - final ListBackupsRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future getDataGuardAssociation( + final GetDataGuardAssociationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDataGuardAssociationRequest, GetDataGuardAssociationResponse> handler) { - LOG.trace("Called async listBackups"); - final ListBackupsRequest interceptedRequest = - ListBackupsConverter.interceptRequest(request); + LOG.trace("Called async getDataGuardAssociation"); + final GetDataGuardAssociationRequest interceptedRequest = + GetDataGuardAssociationConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListBackupsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListBackupsConverter.fromResponse(); + GetDataGuardAssociationConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetDataGuardAssociationResponse> + transformer = GetDataGuardAssociationConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + GetDataGuardAssociationRequest, GetDataGuardAssociationResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListBackupsRequest, ListBackupsResponse>( + GetDataGuardAssociationRequest, GetDataGuardAssociationResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1659,7 +1748,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ListBackupsResponse>( + javax.ws.rs.core.Response, GetDataGuardAssociationResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1678,29 +1767,26 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listDataGuardAssociations( - final ListDataGuardAssociationsRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListDataGuardAssociationsRequest, ListDataGuardAssociationsResponse> + public java.util.concurrent.Future getDatabase( + final GetDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listDataGuardAssociations"); - final ListDataGuardAssociationsRequest interceptedRequest = - ListDataGuardAssociationsConverter.interceptRequest(request); + LOG.trace("Called async getDatabase"); + final GetDatabaseRequest interceptedRequest = + GetDatabaseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDataGuardAssociationsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function< - javax.ws.rs.core.Response, ListDataGuardAssociationsResponse> - transformer = ListDataGuardAssociationsConverter.fromResponse(); + GetDatabaseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetDatabaseConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler< - ListDataGuardAssociationsRequest, ListDataGuardAssociationsResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListDataGuardAssociationsRequest, ListDataGuardAssociationsResponse>( + GetDatabaseRequest, GetDatabaseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1730,7 +1816,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ListDataGuardAssociationsResponse>( + javax.ws.rs.core.Response, GetDatabaseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1749,26 +1835,25 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listDatabases( - final ListDatabasesRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future getDbHome( + final GetDbHomeRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listDatabases"); - final ListDatabasesRequest interceptedRequest = - ListDatabasesConverter.interceptRequest(request); + LOG.trace("Called async getDbHome"); + final GetDbHomeRequest interceptedRequest = GetDbHomeConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDatabasesConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListDatabasesConverter.fromResponse(); + GetDbHomeConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetDbHomeConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler - handlerToUse = handler; + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListDatabasesRequest, ListDatabasesResponse>( + GetDbHomeRequest, GetDbHomeResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1798,7 +1883,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ListDatabasesResponse>( + javax.ws.rs.core.Response, GetDbHomeResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1817,32 +1902,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - listDbHomePatchHistoryEntries( - final ListDbHomePatchHistoryEntriesRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListDbHomePatchHistoryEntriesRequest, - ListDbHomePatchHistoryEntriesResponse> - handler) { - LOG.trace("Called async listDbHomePatchHistoryEntries"); - final ListDbHomePatchHistoryEntriesRequest interceptedRequest = - ListDbHomePatchHistoryEntriesConverter.interceptRequest(request); + public java.util.concurrent.Future getDbHomePatch( + final GetDbHomePatchRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDbHomePatchRequest, GetDbHomePatchResponse> + handler) { + LOG.trace("Called async getDbHomePatch"); + final GetDbHomePatchRequest interceptedRequest = + GetDbHomePatchConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbHomePatchHistoryEntriesConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function< - javax.ws.rs.core.Response, ListDbHomePatchHistoryEntriesResponse> - transformer = ListDbHomePatchHistoryEntriesConverter.fromResponse(); + GetDbHomePatchConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetDbHomePatchConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler< - ListDbHomePatchHistoryEntriesRequest, ListDbHomePatchHistoryEntriesResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListDbHomePatchHistoryEntriesRequest, - ListDbHomePatchHistoryEntriesResponse>( + GetDbHomePatchRequest, GetDbHomePatchResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1872,7 +1952,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ListDbHomePatchHistoryEntriesResponse>( + javax.ws.rs.core.Response, GetDbHomePatchResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1891,27 +1971,31 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listDbHomePatches( - final ListDbHomePatchesRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListDbHomePatchesRequest, ListDbHomePatchesResponse> - handler) { - LOG.trace("Called async listDbHomePatches"); - final ListDbHomePatchesRequest interceptedRequest = - ListDbHomePatchesConverter.interceptRequest(request); + public java.util.concurrent.Future + getDbHomePatchHistoryEntry( + final GetDbHomePatchHistoryEntryRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDbHomePatchHistoryEntryRequest, + GetDbHomePatchHistoryEntryResponse> + handler) { + LOG.trace("Called async getDbHomePatchHistoryEntry"); + final GetDbHomePatchHistoryEntryRequest interceptedRequest = + GetDbHomePatchHistoryEntryConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbHomePatchesConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListDbHomePatchesConverter.fromResponse(); + GetDbHomePatchHistoryEntryConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetDbHomePatchHistoryEntryResponse> + transformer = GetDbHomePatchHistoryEntryConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + GetDbHomePatchHistoryEntryRequest, GetDbHomePatchHistoryEntryResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListDbHomePatchesRequest, ListDbHomePatchesResponse>( + GetDbHomePatchHistoryEntryRequest, GetDbHomePatchHistoryEntryResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1941,7 +2025,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ListDbHomePatchesResponse>( + javax.ws.rs.core.Response, GetDbHomePatchHistoryEntryResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1960,26 +2044,25 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listDbHomes( - final ListDbHomesRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future getDbNode( + final GetDbNodeRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listDbHomes"); - final ListDbHomesRequest interceptedRequest = - ListDbHomesConverter.interceptRequest(request); + LOG.trace("Called async getDbNode"); + final GetDbNodeRequest interceptedRequest = GetDbNodeConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbHomesConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListDbHomesConverter.fromResponse(); + GetDbNodeConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetDbNodeConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler - handlerToUse = handler; + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListDbHomesRequest, ListDbHomesResponse>( + GetDbNodeRequest, GetDbNodeResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2009,7 +2092,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ListDbHomesResponse>( + javax.ws.rs.core.Response, GetDbNodeResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2028,26 +2111,26 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listDbNodes( - final ListDbNodesRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future getDbSystem( + final GetDbSystemRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listDbNodes"); - final ListDbNodesRequest interceptedRequest = - ListDbNodesConverter.interceptRequest(request); + LOG.trace("Called async getDbSystem"); + final GetDbSystemRequest interceptedRequest = + GetDbSystemConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbNodesConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListDbNodesConverter.fromResponse(); + GetDbSystemConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetDbSystemConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListDbNodesRequest, ListDbNodesResponse>( + GetDbSystemRequest, GetDbSystemResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2077,7 +2160,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ListDbNodesResponse>( + javax.ws.rs.core.Response, GetDbSystemResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2096,33 +2179,1651 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - listDbSystemPatchHistoryEntries( - final ListDbSystemPatchHistoryEntriesRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListDbSystemPatchHistoryEntriesRequest, - ListDbSystemPatchHistoryEntriesResponse> - handler) { - LOG.trace("Called async listDbSystemPatchHistoryEntries"); - final ListDbSystemPatchHistoryEntriesRequest interceptedRequest = - ListDbSystemPatchHistoryEntriesConverter.interceptRequest(request); + public java.util.concurrent.Future getDbSystemPatch( + final GetDbSystemPatchRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDbSystemPatchRequest, GetDbSystemPatchResponse> + handler) { + LOG.trace("Called async getDbSystemPatch"); + final GetDbSystemPatchRequest interceptedRequest = + GetDbSystemPatchConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbSystemPatchHistoryEntriesConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function< - javax.ws.rs.core.Response, ListDbSystemPatchHistoryEntriesResponse> - transformer = ListDbSystemPatchHistoryEntriesConverter.fromResponse(); + GetDbSystemPatchConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetDbSystemPatchConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetDbSystemPatchRequest, GetDbSystemPatchResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, GetDbSystemPatchResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future + getDbSystemPatchHistoryEntry( + final GetDbSystemPatchHistoryEntryRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDbSystemPatchHistoryEntryRequest, + GetDbSystemPatchHistoryEntryResponse> + handler) { + LOG.trace("Called async getDbSystemPatchHistoryEntry"); + final GetDbSystemPatchHistoryEntryRequest interceptedRequest = + GetDbSystemPatchHistoryEntryConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDbSystemPatchHistoryEntryConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetDbSystemPatchHistoryEntryResponse> + transformer = GetDbSystemPatchHistoryEntryConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + GetDbSystemPatchHistoryEntryRequest, GetDbSystemPatchHistoryEntryResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetDbSystemPatchHistoryEntryRequest, + GetDbSystemPatchHistoryEntryResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, GetDbSystemPatchHistoryEntryResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future launchDbSystem( + final LaunchDbSystemRequest request, + final com.oracle.bmc.responses.AsyncHandler< + LaunchDbSystemRequest, LaunchDbSystemResponse> + handler) { + LOG.trace("Called async launchDbSystem"); + final LaunchDbSystemRequest interceptedRequest = + LaunchDbSystemConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + LaunchDbSystemConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = LaunchDbSystemConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + LaunchDbSystemRequest, LaunchDbSystemResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post( + ib, + interceptedRequest.getLaunchDbSystemDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getLaunchDbSystemDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, LaunchDbSystemResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getLaunchDbSystemDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future + listAutonomousDataWarehouseBackups( + final ListAutonomousDataWarehouseBackupsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDataWarehouseBackupsRequest, + ListAutonomousDataWarehouseBackupsResponse> + handler) { + LOG.trace("Called async listAutonomousDataWarehouseBackups"); + final ListAutonomousDataWarehouseBackupsRequest interceptedRequest = + ListAutonomousDataWarehouseBackupsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAutonomousDataWarehouseBackupsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDataWarehouseBackupsResponse> + transformer = ListAutonomousDataWarehouseBackupsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDataWarehouseBackupsRequest, + ListAutonomousDataWarehouseBackupsResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListAutonomousDataWarehouseBackupsRequest, + ListAutonomousDataWarehouseBackupsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListAutonomousDataWarehouseBackupsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future + listAutonomousDataWarehouses( + final ListAutonomousDataWarehousesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDataWarehousesRequest, + ListAutonomousDataWarehousesResponse> + handler) { + LOG.trace("Called async listAutonomousDataWarehouses"); + final ListAutonomousDataWarehousesRequest interceptedRequest = + ListAutonomousDataWarehousesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAutonomousDataWarehousesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDataWarehousesResponse> + transformer = ListAutonomousDataWarehousesConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDataWarehousesRequest, ListAutonomousDataWarehousesResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListAutonomousDataWarehousesRequest, + ListAutonomousDataWarehousesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListAutonomousDataWarehousesResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future + listAutonomousDatabaseBackups( + final ListAutonomousDatabaseBackupsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDatabaseBackupsRequest, + ListAutonomousDatabaseBackupsResponse> + handler) { + LOG.trace("Called async listAutonomousDatabaseBackups"); + final ListAutonomousDatabaseBackupsRequest interceptedRequest = + ListAutonomousDatabaseBackupsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAutonomousDatabaseBackupsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDatabaseBackupsResponse> + transformer = ListAutonomousDatabaseBackupsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDatabaseBackupsRequest, ListAutonomousDatabaseBackupsResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListAutonomousDatabaseBackupsRequest, + ListAutonomousDatabaseBackupsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListAutonomousDatabaseBackupsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listAutonomousDatabases( + final ListAutonomousDatabasesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDatabasesRequest, ListAutonomousDatabasesResponse> + handler) { + LOG.trace("Called async listAutonomousDatabases"); + final ListAutonomousDatabasesRequest interceptedRequest = + ListAutonomousDatabasesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAutonomousDatabasesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDatabasesResponse> + transformer = ListAutonomousDatabasesConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListAutonomousDatabasesRequest, ListAutonomousDatabasesResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListAutonomousDatabasesRequest, ListAutonomousDatabasesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListAutonomousDatabasesResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listBackups( + final ListBackupsRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listBackups"); + final ListBackupsRequest interceptedRequest = + ListBackupsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListBackupsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListBackupsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListBackupsRequest, ListBackupsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListBackupsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listDataGuardAssociations( + final ListDataGuardAssociationsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDataGuardAssociationsRequest, ListDataGuardAssociationsResponse> + handler) { + LOG.trace("Called async listDataGuardAssociations"); + final ListDataGuardAssociationsRequest interceptedRequest = + ListDataGuardAssociationsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDataGuardAssociationsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListDataGuardAssociationsResponse> + transformer = ListDataGuardAssociationsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListDataGuardAssociationsRequest, ListDataGuardAssociationsResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListDataGuardAssociationsRequest, ListDataGuardAssociationsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListDataGuardAssociationsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listDatabases( + final ListDatabasesRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listDatabases"); + final ListDatabasesRequest interceptedRequest = + ListDatabasesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDatabasesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListDatabasesConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListDatabasesRequest, ListDatabasesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListDatabasesResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future + listDbHomePatchHistoryEntries( + final ListDbHomePatchHistoryEntriesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDbHomePatchHistoryEntriesRequest, + ListDbHomePatchHistoryEntriesResponse> + handler) { + LOG.trace("Called async listDbHomePatchHistoryEntries"); + final ListDbHomePatchHistoryEntriesRequest interceptedRequest = + ListDbHomePatchHistoryEntriesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDbHomePatchHistoryEntriesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListDbHomePatchHistoryEntriesResponse> + transformer = ListDbHomePatchHistoryEntriesConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListDbHomePatchHistoryEntriesRequest, ListDbHomePatchHistoryEntriesResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListDbHomePatchHistoryEntriesRequest, + ListDbHomePatchHistoryEntriesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListDbHomePatchHistoryEntriesResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listDbHomePatches( + final ListDbHomePatchesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDbHomePatchesRequest, ListDbHomePatchesResponse> + handler) { + LOG.trace("Called async listDbHomePatches"); + final ListDbHomePatchesRequest interceptedRequest = + ListDbHomePatchesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDbHomePatchesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListDbHomePatchesConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListDbHomePatchesRequest, ListDbHomePatchesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListDbHomePatchesResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listDbHomes( + final ListDbHomesRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listDbHomes"); + final ListDbHomesRequest interceptedRequest = + ListDbHomesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDbHomesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListDbHomesConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListDbHomesRequest, ListDbHomesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListDbHomesResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listDbNodes( + final ListDbNodesRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listDbNodes"); + final ListDbNodesRequest interceptedRequest = + ListDbNodesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDbNodesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListDbNodesConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListDbNodesRequest, ListDbNodesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListDbNodesResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future + listDbSystemPatchHistoryEntries( + final ListDbSystemPatchHistoryEntriesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDbSystemPatchHistoryEntriesRequest, + ListDbSystemPatchHistoryEntriesResponse> + handler) { + LOG.trace("Called async listDbSystemPatchHistoryEntries"); + final ListDbSystemPatchHistoryEntriesRequest interceptedRequest = + ListDbSystemPatchHistoryEntriesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDbSystemPatchHistoryEntriesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListDbSystemPatchHistoryEntriesResponse> + transformer = ListDbSystemPatchHistoryEntriesConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListDbSystemPatchHistoryEntriesRequest, + ListDbSystemPatchHistoryEntriesResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListDbSystemPatchHistoryEntriesRequest, + ListDbSystemPatchHistoryEntriesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListDbSystemPatchHistoryEntriesResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listDbSystemPatches( + final ListDbSystemPatchesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDbSystemPatchesRequest, ListDbSystemPatchesResponse> + handler) { + LOG.trace("Called async listDbSystemPatches"); + final ListDbSystemPatchesRequest interceptedRequest = + ListDbSystemPatchesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDbSystemPatchesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListDbSystemPatchesResponse> + transformer = ListDbSystemPatchesConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListDbSystemPatchesRequest, ListDbSystemPatchesResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListDbSystemPatchesRequest, ListDbSystemPatchesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListDbSystemPatchesResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listDbSystemShapes( + final ListDbSystemShapesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDbSystemShapesRequest, ListDbSystemShapesResponse> + handler) { + LOG.trace("Called async listDbSystemShapes"); + final ListDbSystemShapesRequest interceptedRequest = + ListDbSystemShapesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDbSystemShapesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListDbSystemShapesConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListDbSystemShapesRequest, ListDbSystemShapesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListDbSystemShapesResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listDbSystems( + final ListDbSystemsRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listDbSystems"); + final ListDbSystemsRequest interceptedRequest = + ListDbSystemsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDbSystemsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListDbSystemsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListDbSystemsRequest, ListDbSystemsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListDbSystemsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listDbVersions( + final ListDbVersionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDbVersionsRequest, ListDbVersionsResponse> + handler) { + LOG.trace("Called async listDbVersions"); + final ListDbVersionsRequest interceptedRequest = + ListDbVersionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDbVersionsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListDbVersionsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListDbVersionsRequest, ListDbVersionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListDbVersionsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future + reinstateDataGuardAssociation( + final ReinstateDataGuardAssociationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ReinstateDataGuardAssociationRequest, + ReinstateDataGuardAssociationResponse> + handler) { + LOG.trace("Called async reinstateDataGuardAssociation"); + final ReinstateDataGuardAssociationRequest interceptedRequest = + ReinstateDataGuardAssociationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReinstateDataGuardAssociationConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ReinstateDataGuardAssociationResponse> + transformer = ReinstateDataGuardAssociationConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ReinstateDataGuardAssociationRequest, ReinstateDataGuardAssociationResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ReinstateDataGuardAssociationRequest, + ReinstateDataGuardAssociationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post( + ib, + interceptedRequest.getReinstateDataGuardAssociationDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getReinstateDataGuardAssociationDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ReinstateDataGuardAssociationResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getReinstateDataGuardAssociationDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future + restoreAutonomousDataWarehouse( + final RestoreAutonomousDataWarehouseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RestoreAutonomousDataWarehouseRequest, + RestoreAutonomousDataWarehouseResponse> + handler) { + LOG.trace("Called async restoreAutonomousDataWarehouse"); + final RestoreAutonomousDataWarehouseRequest interceptedRequest = + RestoreAutonomousDataWarehouseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RestoreAutonomousDataWarehouseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, RestoreAutonomousDataWarehouseResponse> + transformer = RestoreAutonomousDataWarehouseConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + RestoreAutonomousDataWarehouseRequest, + RestoreAutonomousDataWarehouseResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + RestoreAutonomousDataWarehouseRequest, + RestoreAutonomousDataWarehouseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post( + ib, + interceptedRequest.getRestoreAutonomousDataWarehouseDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getRestoreAutonomousDataWarehouseDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, RestoreAutonomousDataWarehouseResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getRestoreAutonomousDataWarehouseDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future restoreAutonomousDatabase( + final RestoreAutonomousDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RestoreAutonomousDatabaseRequest, RestoreAutonomousDatabaseResponse> + handler) { + LOG.trace("Called async restoreAutonomousDatabase"); + final RestoreAutonomousDatabaseRequest interceptedRequest = + RestoreAutonomousDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RestoreAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, RestoreAutonomousDatabaseResponse> + transformer = RestoreAutonomousDatabaseConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + RestoreAutonomousDatabaseRequest, RestoreAutonomousDatabaseResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + RestoreAutonomousDatabaseRequest, RestoreAutonomousDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post( + ib, + interceptedRequest.getRestoreAutonomousDatabaseDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getRestoreAutonomousDatabaseDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, RestoreAutonomousDatabaseResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getRestoreAutonomousDatabaseDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future restoreDatabase( + final RestoreDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RestoreDatabaseRequest, RestoreDatabaseResponse> + handler) { + LOG.trace("Called async restoreDatabase"); + final RestoreDatabaseRequest interceptedRequest = + RestoreDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RestoreDatabaseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = RestoreDatabaseConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler< - ListDbSystemPatchHistoryEntriesRequest, - ListDbSystemPatchHistoryEntriesResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListDbSystemPatchHistoryEntriesRequest, - ListDbSystemPatchHistoryEntriesResponse>( + RestoreDatabaseRequest, RestoreDatabaseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2135,7 +3836,12 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getRestoreDatabaseDetails(), + interceptedRequest, + onSuccess, + onError); } }; } @@ -2147,12 +3853,17 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getRestoreDatabaseDetails(), + interceptedRequest, + onSuccess, + onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ListDbSystemPatchHistoryEntriesResponse>( + javax.ws.rs.core.Response, RestoreDatabaseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2161,7 +3872,12 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.post( + ib, + interceptedRequest.getRestoreDatabaseDetails(), + interceptedRequest, + onSuccess, + onError); } }); } else { @@ -2171,29 +3887,32 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listDbSystemPatches( - final ListDbSystemPatchesRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListDbSystemPatchesRequest, ListDbSystemPatchesResponse> - handler) { - LOG.trace("Called async listDbSystemPatches"); - final ListDbSystemPatchesRequest interceptedRequest = - ListDbSystemPatchesConverter.interceptRequest(request); + public java.util.concurrent.Future + startAutonomousDataWarehouse( + final StartAutonomousDataWarehouseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + StartAutonomousDataWarehouseRequest, + StartAutonomousDataWarehouseResponse> + handler) { + LOG.trace("Called async startAutonomousDataWarehouse"); + final StartAutonomousDataWarehouseRequest interceptedRequest = + StartAutonomousDataWarehouseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbSystemPatchesConverter.fromRequest(client, interceptedRequest); + StartAutonomousDataWarehouseConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< - javax.ws.rs.core.Response, ListDbSystemPatchesResponse> - transformer = ListDbSystemPatchesConverter.fromResponse(); + javax.ws.rs.core.Response, StartAutonomousDataWarehouseResponse> + transformer = StartAutonomousDataWarehouseConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< - ListDbSystemPatchesRequest, ListDbSystemPatchesResponse> + StartAutonomousDataWarehouseRequest, StartAutonomousDataWarehouseResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListDbSystemPatchesRequest, ListDbSystemPatchesResponse>( + StartAutonomousDataWarehouseRequest, + StartAutonomousDataWarehouseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2206,7 +3925,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.post(ib, interceptedRequest, onSuccess, onError); } }; } @@ -2218,12 +3937,12 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.post(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ListDbSystemPatchesResponse>( + javax.ws.rs.core.Response, StartAutonomousDataWarehouseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2232,7 +3951,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.post(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -2242,27 +3961,29 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listDbSystemShapes( - final ListDbSystemShapesRequest request, + public java.util.concurrent.Future startAutonomousDatabase( + final StartAutonomousDatabaseRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListDbSystemShapesRequest, ListDbSystemShapesResponse> + StartAutonomousDatabaseRequest, StartAutonomousDatabaseResponse> handler) { - LOG.trace("Called async listDbSystemShapes"); - final ListDbSystemShapesRequest interceptedRequest = - ListDbSystemShapesConverter.interceptRequest(request); + LOG.trace("Called async startAutonomousDatabase"); + final StartAutonomousDatabaseRequest interceptedRequest = + StartAutonomousDatabaseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbSystemShapesConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListDbSystemShapesConverter.fromResponse(); + StartAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, StartAutonomousDatabaseResponse> + transformer = StartAutonomousDatabaseConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + StartAutonomousDatabaseRequest, StartAutonomousDatabaseResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListDbSystemShapesRequest, ListDbSystemShapesResponse>( + StartAutonomousDatabaseRequest, StartAutonomousDatabaseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2275,7 +3996,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.post(ib, interceptedRequest, onSuccess, onError); } }; } @@ -2287,12 +4008,12 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.post(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ListDbSystemShapesResponse>( + javax.ws.rs.core.Response, StartAutonomousDatabaseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2301,7 +4022,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.post(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -2311,26 +4032,32 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listDbSystems( - final ListDbSystemsRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async listDbSystems"); - final ListDbSystemsRequest interceptedRequest = - ListDbSystemsConverter.interceptRequest(request); + public java.util.concurrent.Future + stopAutonomousDataWarehouse( + final StopAutonomousDataWarehouseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + StopAutonomousDataWarehouseRequest, + StopAutonomousDataWarehouseResponse> + handler) { + LOG.trace("Called async stopAutonomousDataWarehouse"); + final StopAutonomousDataWarehouseRequest interceptedRequest = + StopAutonomousDataWarehouseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbSystemsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListDbSystemsConverter.fromResponse(); + StopAutonomousDataWarehouseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, StopAutonomousDataWarehouseResponse> + transformer = StopAutonomousDataWarehouseConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + StopAutonomousDataWarehouseRequest, StopAutonomousDataWarehouseResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListDbSystemsRequest, ListDbSystemsResponse>( + StopAutonomousDataWarehouseRequest, + StopAutonomousDataWarehouseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2343,7 +4070,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.post(ib, interceptedRequest, onSuccess, onError); } }; } @@ -2355,12 +4082,12 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.post(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ListDbSystemsResponse>( + javax.ws.rs.core.Response, StopAutonomousDataWarehouseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2369,7 +4096,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.post(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -2379,27 +4106,29 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listDbVersions( - final ListDbVersionsRequest request, + public java.util.concurrent.Future stopAutonomousDatabase( + final StopAutonomousDatabaseRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListDbVersionsRequest, ListDbVersionsResponse> + StopAutonomousDatabaseRequest, StopAutonomousDatabaseResponse> handler) { - LOG.trace("Called async listDbVersions"); - final ListDbVersionsRequest interceptedRequest = - ListDbVersionsConverter.interceptRequest(request); + LOG.trace("Called async stopAutonomousDatabase"); + final StopAutonomousDatabaseRequest interceptedRequest = + StopAutonomousDatabaseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbVersionsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListDbVersionsConverter.fromResponse(); + StopAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, StopAutonomousDatabaseResponse> + transformer = StopAutonomousDatabaseConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + StopAutonomousDatabaseRequest, StopAutonomousDatabaseResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListDbVersionsRequest, ListDbVersionsResponse>( + StopAutonomousDatabaseRequest, StopAutonomousDatabaseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2412,7 +4141,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.post(ib, interceptedRequest, onSuccess, onError); } }; } @@ -2424,12 +4153,12 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.post(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ListDbVersionsResponse>( + javax.ws.rs.core.Response, StopAutonomousDatabaseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2438,7 +4167,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.post(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -2448,32 +4177,33 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - reinstateDataGuardAssociation( - final ReinstateDataGuardAssociationRequest request, + public java.util.concurrent.Future + switchoverDataGuardAssociation( + final SwitchoverDataGuardAssociationRequest request, final com.oracle.bmc.responses.AsyncHandler< - ReinstateDataGuardAssociationRequest, - ReinstateDataGuardAssociationResponse> + SwitchoverDataGuardAssociationRequest, + SwitchoverDataGuardAssociationResponse> handler) { - LOG.trace("Called async reinstateDataGuardAssociation"); - final ReinstateDataGuardAssociationRequest interceptedRequest = - ReinstateDataGuardAssociationConverter.interceptRequest(request); + LOG.trace("Called async switchoverDataGuardAssociation"); + final SwitchoverDataGuardAssociationRequest interceptedRequest = + SwitchoverDataGuardAssociationConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ReinstateDataGuardAssociationConverter.fromRequest(client, interceptedRequest); + SwitchoverDataGuardAssociationConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< - javax.ws.rs.core.Response, ReinstateDataGuardAssociationResponse> - transformer = ReinstateDataGuardAssociationConverter.fromResponse(); + javax.ws.rs.core.Response, SwitchoverDataGuardAssociationResponse> + transformer = SwitchoverDataGuardAssociationConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< - ReinstateDataGuardAssociationRequest, ReinstateDataGuardAssociationResponse> + SwitchoverDataGuardAssociationRequest, + SwitchoverDataGuardAssociationResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ReinstateDataGuardAssociationRequest, - ReinstateDataGuardAssociationResponse>( + SwitchoverDataGuardAssociationRequest, + SwitchoverDataGuardAssociationResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2488,7 +4218,7 @@ public void retryCall() { this, interceptedRequest); client.post( ib, - interceptedRequest.getReinstateDataGuardAssociationDetails(), + interceptedRequest.getSwitchoverDataGuardAssociationDetails(), interceptedRequest, onSuccess, onError); @@ -2505,7 +4235,7 @@ public void retryCall() { java.util.concurrent.Future responseFuture = client.post( ib, - interceptedRequest.getReinstateDataGuardAssociationDetails(), + interceptedRequest.getSwitchoverDataGuardAssociationDetails(), interceptedRequest, onSuccess, onError); @@ -2513,7 +4243,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, ReinstateDataGuardAssociationResponse>( + javax.ws.rs.core.Response, SwitchoverDataGuardAssociationResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2524,7 +4254,7 @@ public void retryCall() { public java.util.concurrent.Future get() { return client.post( ib, - interceptedRequest.getReinstateDataGuardAssociationDetails(), + interceptedRequest.getSwitchoverDataGuardAssociationDetails(), interceptedRequest, onSuccess, onError); @@ -2537,27 +4267,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future restoreDatabase( - final RestoreDatabaseRequest request, + public java.util.concurrent.Future terminateDbSystem( + final TerminateDbSystemRequest request, final com.oracle.bmc.responses.AsyncHandler< - RestoreDatabaseRequest, RestoreDatabaseResponse> + TerminateDbSystemRequest, TerminateDbSystemResponse> handler) { - LOG.trace("Called async restoreDatabase"); - final RestoreDatabaseRequest interceptedRequest = - RestoreDatabaseConverter.interceptRequest(request); + LOG.trace("Called async terminateDbSystem"); + final TerminateDbSystemRequest interceptedRequest = + TerminateDbSystemConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - RestoreDatabaseConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = RestoreDatabaseConverter.fromResponse(); + TerminateDbSystemConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = TerminateDbSystemConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - RestoreDatabaseRequest, RestoreDatabaseResponse>( + TerminateDbSystemRequest, TerminateDbSystemResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2570,12 +4300,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.post( - ib, - interceptedRequest.getRestoreDatabaseDetails(), - interceptedRequest, - onSuccess, - onError); + client.delete(ib, interceptedRequest, onSuccess, onError); } }; } @@ -2587,17 +4312,12 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.post( - ib, - interceptedRequest.getRestoreDatabaseDetails(), - interceptedRequest, - onSuccess, - onError); + client.delete(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, RestoreDatabaseResponse>( + javax.ws.rs.core.Response, TerminateDbSystemResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2606,12 +4326,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.post( - ib, - interceptedRequest.getRestoreDatabaseDetails(), - interceptedRequest, - onSuccess, - onError); + return client.delete(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -2621,33 +4336,32 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - switchoverDataGuardAssociation( - final SwitchoverDataGuardAssociationRequest request, + public java.util.concurrent.Future + updateAutonomousDataWarehouse( + final UpdateAutonomousDataWarehouseRequest request, final com.oracle.bmc.responses.AsyncHandler< - SwitchoverDataGuardAssociationRequest, - SwitchoverDataGuardAssociationResponse> + UpdateAutonomousDataWarehouseRequest, + UpdateAutonomousDataWarehouseResponse> handler) { - LOG.trace("Called async switchoverDataGuardAssociation"); - final SwitchoverDataGuardAssociationRequest interceptedRequest = - SwitchoverDataGuardAssociationConverter.interceptRequest(request); + LOG.trace("Called async updateAutonomousDataWarehouse"); + final UpdateAutonomousDataWarehouseRequest interceptedRequest = + UpdateAutonomousDataWarehouseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - SwitchoverDataGuardAssociationConverter.fromRequest(client, interceptedRequest); + UpdateAutonomousDataWarehouseConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< - javax.ws.rs.core.Response, SwitchoverDataGuardAssociationResponse> - transformer = SwitchoverDataGuardAssociationConverter.fromResponse(); + javax.ws.rs.core.Response, UpdateAutonomousDataWarehouseResponse> + transformer = UpdateAutonomousDataWarehouseConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< - SwitchoverDataGuardAssociationRequest, - SwitchoverDataGuardAssociationResponse> + UpdateAutonomousDataWarehouseRequest, UpdateAutonomousDataWarehouseResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - SwitchoverDataGuardAssociationRequest, - SwitchoverDataGuardAssociationResponse>( + UpdateAutonomousDataWarehouseRequest, + UpdateAutonomousDataWarehouseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2660,9 +4374,9 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.post( + client.put( ib, - interceptedRequest.getSwitchoverDataGuardAssociationDetails(), + interceptedRequest.getUpdateAutonomousDataWarehouseDetails(), interceptedRequest, onSuccess, onError); @@ -2677,9 +4391,9 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.post( + client.put( ib, - interceptedRequest.getSwitchoverDataGuardAssociationDetails(), + interceptedRequest.getUpdateAutonomousDataWarehouseDetails(), interceptedRequest, onSuccess, onError); @@ -2687,7 +4401,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, SwitchoverDataGuardAssociationResponse>( + javax.ws.rs.core.Response, UpdateAutonomousDataWarehouseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2696,9 +4410,9 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.post( + return client.put( ib, - interceptedRequest.getSwitchoverDataGuardAssociationDetails(), + interceptedRequest.getUpdateAutonomousDataWarehouseDetails(), interceptedRequest, onSuccess, onError); @@ -2711,27 +4425,29 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future terminateDbSystem( - final TerminateDbSystemRequest request, + public java.util.concurrent.Future updateAutonomousDatabase( + final UpdateAutonomousDatabaseRequest request, final com.oracle.bmc.responses.AsyncHandler< - TerminateDbSystemRequest, TerminateDbSystemResponse> + UpdateAutonomousDatabaseRequest, UpdateAutonomousDatabaseResponse> handler) { - LOG.trace("Called async terminateDbSystem"); - final TerminateDbSystemRequest interceptedRequest = - TerminateDbSystemConverter.interceptRequest(request); + LOG.trace("Called async updateAutonomousDatabase"); + final UpdateAutonomousDatabaseRequest interceptedRequest = + UpdateAutonomousDatabaseConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - TerminateDbSystemConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = TerminateDbSystemConverter.fromResponse(); + UpdateAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateAutonomousDatabaseResponse> + transformer = UpdateAutonomousDatabaseConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + UpdateAutonomousDatabaseRequest, UpdateAutonomousDatabaseResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - TerminateDbSystemRequest, TerminateDbSystemResponse>( + UpdateAutonomousDatabaseRequest, UpdateAutonomousDatabaseResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2744,7 +4460,12 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.delete(ib, interceptedRequest, onSuccess, onError); + client.put( + ib, + interceptedRequest.getUpdateAutonomousDatabaseDetails(), + interceptedRequest, + onSuccess, + onError); } }; } @@ -2756,12 +4477,17 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.delete(ib, interceptedRequest, onSuccess, onError); + client.put( + ib, + interceptedRequest.getUpdateAutonomousDatabaseDetails(), + interceptedRequest, + onSuccess, + onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, TerminateDbSystemResponse>( + javax.ws.rs.core.Response, UpdateAutonomousDatabaseResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2770,7 +4496,12 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.delete(ib, interceptedRequest, onSuccess, onError); + return client.put( + ib, + interceptedRequest.getUpdateAutonomousDatabaseDetails(), + interceptedRequest, + onSuccess, + onError); } }); } else { 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 ac12500d7a5..8af676f1f99 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 @@ -308,6 +308,121 @@ public void close() { client.close(); } + @Override + public CreateAutonomousDataWarehouseResponse createAutonomousDataWarehouse( + CreateAutonomousDataWarehouseRequest request) { + LOG.trace("Called createAutonomousDataWarehouse"); + request = CreateAutonomousDataWarehouseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAutonomousDataWarehouseConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDataWarehouseResponse> + transformer = CreateAutonomousDataWarehouseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.post(ib, request.getCreateAutonomousDataWarehouseDetails(), request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public CreateAutonomousDataWarehouseBackupResponse createAutonomousDataWarehouseBackup( + CreateAutonomousDataWarehouseBackupRequest request) { + LOG.trace("Called createAutonomousDataWarehouseBackup"); + request = CreateAutonomousDataWarehouseBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAutonomousDataWarehouseBackupConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDataWarehouseBackupResponse> + transformer = CreateAutonomousDataWarehouseBackupConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.post( + ib, + request.getCreateAutonomousDataWarehouseBackupDetails(), + request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public CreateAutonomousDatabaseResponse createAutonomousDatabase( + CreateAutonomousDatabaseRequest request) { + LOG.trace("Called createAutonomousDatabase"); + request = CreateAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAutonomousDatabaseConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = CreateAutonomousDatabaseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.post(ib, request.getCreateAutonomousDatabaseDetails(), request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public CreateAutonomousDatabaseBackupResponse createAutonomousDatabaseBackup( + CreateAutonomousDatabaseBackupRequest request) { + LOG.trace("Called createAutonomousDatabaseBackup"); + request = CreateAutonomousDatabaseBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAutonomousDatabaseBackupConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDatabaseBackupResponse> + transformer = CreateAutonomousDatabaseBackupConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.post( + ib, request.getCreateAutonomousDatabaseBackupDetails(), request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public CreateBackupResponse createBackup(CreateBackupRequest request) { LOG.trace("Called createBackup"); @@ -413,6 +528,59 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public DeleteAutonomousDataWarehouseResponse deleteAutonomousDataWarehouse( + DeleteAutonomousDataWarehouseRequest request) { + LOG.trace("Called deleteAutonomousDataWarehouse"); + request = DeleteAutonomousDataWarehouseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAutonomousDataWarehouseConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAutonomousDataWarehouseResponse> + transformer = DeleteAutonomousDataWarehouseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.delete(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public DeleteAutonomousDatabaseResponse deleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest request) { + LOG.trace("Called deleteAutonomousDatabase"); + request = DeleteAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAutonomousDatabaseConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = DeleteAutonomousDatabaseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.delete(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public DeleteBackupResponse deleteBackup(DeleteBackupRequest request) { LOG.trace("Called deleteBackup"); @@ -491,6 +659,113 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public GetAutonomousDataWarehouseResponse getAutonomousDataWarehouse( + GetAutonomousDataWarehouseRequest request) { + LOG.trace("Called getAutonomousDataWarehouse"); + request = GetAutonomousDataWarehouseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousDataWarehouseConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDataWarehouseResponse> + transformer = GetAutonomousDataWarehouseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public GetAutonomousDataWarehouseBackupResponse getAutonomousDataWarehouseBackup( + GetAutonomousDataWarehouseBackupRequest request) { + LOG.trace("Called getAutonomousDataWarehouseBackup"); + request = GetAutonomousDataWarehouseBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousDataWarehouseBackupConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDataWarehouseBackupResponse> + transformer = GetAutonomousDataWarehouseBackupConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public GetAutonomousDatabaseResponse getAutonomousDatabase( + GetAutonomousDatabaseRequest request) { + LOG.trace("Called getAutonomousDatabase"); + request = GetAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousDatabaseConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetAutonomousDatabaseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public GetAutonomousDatabaseBackupResponse getAutonomousDatabaseBackup( + GetAutonomousDatabaseBackupRequest request) { + LOG.trace("Called getAutonomousDatabaseBackup"); + request = GetAutonomousDatabaseBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousDatabaseBackupConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDatabaseBackupResponse> + transformer = GetAutonomousDatabaseBackupConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public GetBackupResponse getBackup(GetBackupRequest request) { LOG.trace("Called getBackup"); @@ -772,6 +1047,113 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public ListAutonomousDataWarehouseBackupsResponse listAutonomousDataWarehouseBackups( + ListAutonomousDataWarehouseBackupsRequest request) { + LOG.trace("Called listAutonomousDataWarehouseBackups"); + request = ListAutonomousDataWarehouseBackupsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAutonomousDataWarehouseBackupsConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDataWarehouseBackupsResponse> + transformer = ListAutonomousDataWarehouseBackupsConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public ListAutonomousDataWarehousesResponse listAutonomousDataWarehouses( + ListAutonomousDataWarehousesRequest request) { + LOG.trace("Called listAutonomousDataWarehouses"); + request = ListAutonomousDataWarehousesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAutonomousDataWarehousesConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDataWarehousesResponse> + transformer = ListAutonomousDataWarehousesConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public ListAutonomousDatabaseBackupsResponse listAutonomousDatabaseBackups( + ListAutonomousDatabaseBackupsRequest request) { + LOG.trace("Called listAutonomousDatabaseBackups"); + request = ListAutonomousDatabaseBackupsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAutonomousDatabaseBackupsConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDatabaseBackupsResponse> + transformer = ListAutonomousDatabaseBackupsConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public ListAutonomousDatabasesResponse listAutonomousDatabases( + ListAutonomousDatabasesRequest request) { + LOG.trace("Called listAutonomousDatabases"); + request = ListAutonomousDatabasesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAutonomousDatabasesConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListAutonomousDatabasesConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public ListBackupsResponse listBackups(ListBackupsRequest request) { LOG.trace("Called listBackups"); @@ -1106,6 +1488,63 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public RestoreAutonomousDataWarehouseResponse restoreAutonomousDataWarehouse( + RestoreAutonomousDataWarehouseRequest request) { + LOG.trace("Called restoreAutonomousDataWarehouse"); + request = RestoreAutonomousDataWarehouseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RestoreAutonomousDataWarehouseConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, RestoreAutonomousDataWarehouseResponse> + transformer = RestoreAutonomousDataWarehouseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.post( + ib, request.getRestoreAutonomousDataWarehouseDetails(), request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public RestoreAutonomousDatabaseResponse restoreAutonomousDatabase( + RestoreAutonomousDatabaseRequest request) { + LOG.trace("Called restoreAutonomousDatabase"); + request = RestoreAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RestoreAutonomousDatabaseConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, RestoreAutonomousDatabaseResponse> + transformer = RestoreAutonomousDatabaseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.post(ib, request.getRestoreAutonomousDatabaseDetails(), request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public RestoreDatabaseResponse restoreDatabase(RestoreDatabaseRequest request) { LOG.trace("Called restoreDatabase"); @@ -1132,6 +1571,112 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public StartAutonomousDataWarehouseResponse startAutonomousDataWarehouse( + StartAutonomousDataWarehouseRequest request) { + LOG.trace("Called startAutonomousDataWarehouse"); + request = StartAutonomousDataWarehouseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StartAutonomousDataWarehouseConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, StartAutonomousDataWarehouseResponse> + transformer = StartAutonomousDataWarehouseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.post(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public StartAutonomousDatabaseResponse startAutonomousDatabase( + StartAutonomousDatabaseRequest request) { + LOG.trace("Called startAutonomousDatabase"); + request = StartAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StartAutonomousDatabaseConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = StartAutonomousDatabaseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.post(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public StopAutonomousDataWarehouseResponse stopAutonomousDataWarehouse( + StopAutonomousDataWarehouseRequest request) { + LOG.trace("Called stopAutonomousDataWarehouse"); + request = StopAutonomousDataWarehouseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StopAutonomousDataWarehouseConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, StopAutonomousDataWarehouseResponse> + transformer = StopAutonomousDataWarehouseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.post(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public StopAutonomousDatabaseResponse stopAutonomousDatabase( + StopAutonomousDatabaseRequest request) { + LOG.trace("Called stopAutonomousDatabase"); + request = StopAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StopAutonomousDatabaseConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = StopAutonomousDatabaseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.post(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public SwitchoverDataGuardAssociationResponse switchoverDataGuardAssociation( SwitchoverDataGuardAssociationRequest request) { @@ -1186,6 +1731,61 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public UpdateAutonomousDataWarehouseResponse updateAutonomousDataWarehouse( + UpdateAutonomousDataWarehouseRequest request) { + LOG.trace("Called updateAutonomousDataWarehouse"); + request = UpdateAutonomousDataWarehouseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateAutonomousDataWarehouseConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateAutonomousDataWarehouseResponse> + transformer = UpdateAutonomousDataWarehouseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.put(ib, request.getUpdateAutonomousDataWarehouseDetails(), request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public UpdateAutonomousDatabaseResponse updateAutonomousDatabase( + UpdateAutonomousDatabaseRequest request) { + LOG.trace("Called updateAutonomousDatabase"); + request = UpdateAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateAutonomousDatabaseConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = UpdateAutonomousDatabaseConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.put(ib, request.getUpdateAutonomousDatabaseDetails(), request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public UpdateDatabaseResponse updateDatabase(UpdateDatabaseRequest request) { LOG.trace("Called updateDatabase"); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabasePaginators.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabasePaginators.java index fd52740fa17..1d419410648 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/DatabasePaginators.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/DatabasePaginators.java @@ -29,6 +29,502 @@ public class DatabasePaginators { private final Database client; + /** + * Creates a new iterable which will iterate over the responses received from the listAutonomousDataWarehouseBackups 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 + listAutonomousDataWarehouseBackupsResponseIterator( + final ListAutonomousDataWarehouseBackupsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAutonomousDataWarehouseBackupsRequest.Builder, + ListAutonomousDataWarehouseBackupsRequest, + ListAutonomousDataWarehouseBackupsResponse>( + new com.google.common.base.Supplier< + ListAutonomousDataWarehouseBackupsRequest.Builder>() { + @Override + public ListAutonomousDataWarehouseBackupsRequest.Builder get() { + return ListAutonomousDataWarehouseBackupsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function< + ListAutonomousDataWarehouseBackupsResponse, String>() { + @Override + public String apply(ListAutonomousDataWarehouseBackupsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDataWarehouseBackupsRequest.Builder>, + ListAutonomousDataWarehouseBackupsRequest>() { + @Override + public ListAutonomousDataWarehouseBackupsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDataWarehouseBackupsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAutonomousDataWarehouseBackupsRequest, + ListAutonomousDataWarehouseBackupsResponse>() { + @Override + public ListAutonomousDataWarehouseBackupsResponse apply( + ListAutonomousDataWarehouseBackupsRequest request) { + return client.listAutonomousDataWarehouseBackups(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.AutonomousDataWarehouseBackupSummary} objects + * contained in responses from the listAutonomousDataWarehouseBackups operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.AutonomousDataWarehouseBackupSummary} objects + * contained in responses received from the service. + */ + public Iterable + listAutonomousDataWarehouseBackupsRecordIterator( + final ListAutonomousDataWarehouseBackupsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAutonomousDataWarehouseBackupsRequest.Builder, + ListAutonomousDataWarehouseBackupsRequest, + ListAutonomousDataWarehouseBackupsResponse, + com.oracle.bmc.database.model.AutonomousDataWarehouseBackupSummary>( + new com.google.common.base.Supplier< + ListAutonomousDataWarehouseBackupsRequest.Builder>() { + @Override + public ListAutonomousDataWarehouseBackupsRequest.Builder get() { + return ListAutonomousDataWarehouseBackupsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function< + ListAutonomousDataWarehouseBackupsResponse, String>() { + @Override + public String apply(ListAutonomousDataWarehouseBackupsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDataWarehouseBackupsRequest.Builder>, + ListAutonomousDataWarehouseBackupsRequest>() { + @Override + public ListAutonomousDataWarehouseBackupsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDataWarehouseBackupsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAutonomousDataWarehouseBackupsRequest, + ListAutonomousDataWarehouseBackupsResponse>() { + @Override + public ListAutonomousDataWarehouseBackupsResponse apply( + ListAutonomousDataWarehouseBackupsRequest request) { + return client.listAutonomousDataWarehouseBackups(request); + } + }, + new com.google.common.base.Function< + ListAutonomousDataWarehouseBackupsResponse, + java.util.List< + com.oracle.bmc.database.model + .AutonomousDataWarehouseBackupSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.database.model + .AutonomousDataWarehouseBackupSummary> + apply(ListAutonomousDataWarehouseBackupsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listAutonomousDataWarehouses 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 + listAutonomousDataWarehousesResponseIterator( + final ListAutonomousDataWarehousesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAutonomousDataWarehousesRequest.Builder, ListAutonomousDataWarehousesRequest, + ListAutonomousDataWarehousesResponse>( + new com.google.common.base.Supplier() { + @Override + public ListAutonomousDataWarehousesRequest.Builder get() { + return ListAutonomousDataWarehousesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function< + ListAutonomousDataWarehousesResponse, String>() { + @Override + public String apply(ListAutonomousDataWarehousesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDataWarehousesRequest.Builder>, + ListAutonomousDataWarehousesRequest>() { + @Override + public ListAutonomousDataWarehousesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDataWarehousesRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAutonomousDataWarehousesRequest, + ListAutonomousDataWarehousesResponse>() { + @Override + public ListAutonomousDataWarehousesResponse apply( + ListAutonomousDataWarehousesRequest request) { + return client.listAutonomousDataWarehouses(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.AutonomousDataWarehouseSummary} objects + * contained in responses from the listAutonomousDataWarehouses operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.AutonomousDataWarehouseSummary} objects + * contained in responses received from the service. + */ + public Iterable + listAutonomousDataWarehousesRecordIterator( + final ListAutonomousDataWarehousesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAutonomousDataWarehousesRequest.Builder, ListAutonomousDataWarehousesRequest, + ListAutonomousDataWarehousesResponse, + com.oracle.bmc.database.model.AutonomousDataWarehouseSummary>( + new com.google.common.base.Supplier() { + @Override + public ListAutonomousDataWarehousesRequest.Builder get() { + return ListAutonomousDataWarehousesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function< + ListAutonomousDataWarehousesResponse, String>() { + @Override + public String apply(ListAutonomousDataWarehousesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDataWarehousesRequest.Builder>, + ListAutonomousDataWarehousesRequest>() { + @Override + public ListAutonomousDataWarehousesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDataWarehousesRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAutonomousDataWarehousesRequest, + ListAutonomousDataWarehousesResponse>() { + @Override + public ListAutonomousDataWarehousesResponse apply( + ListAutonomousDataWarehousesRequest request) { + return client.listAutonomousDataWarehouses(request); + } + }, + new com.google.common.base.Function< + ListAutonomousDataWarehousesResponse, + java.util.List< + com.oracle.bmc.database.model.AutonomousDataWarehouseSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.database.model.AutonomousDataWarehouseSummary> + apply(ListAutonomousDataWarehousesResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listAutonomousDatabaseBackups 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 + listAutonomousDatabaseBackupsResponseIterator( + final ListAutonomousDatabaseBackupsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAutonomousDatabaseBackupsRequest.Builder, ListAutonomousDatabaseBackupsRequest, + ListAutonomousDatabaseBackupsResponse>( + new com.google.common.base.Supplier< + ListAutonomousDatabaseBackupsRequest.Builder>() { + @Override + public ListAutonomousDatabaseBackupsRequest.Builder get() { + return ListAutonomousDatabaseBackupsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function< + ListAutonomousDatabaseBackupsResponse, String>() { + @Override + public String apply(ListAutonomousDatabaseBackupsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDatabaseBackupsRequest.Builder>, + ListAutonomousDatabaseBackupsRequest>() { + @Override + public ListAutonomousDatabaseBackupsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDatabaseBackupsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAutonomousDatabaseBackupsRequest, + ListAutonomousDatabaseBackupsResponse>() { + @Override + public ListAutonomousDatabaseBackupsResponse apply( + ListAutonomousDatabaseBackupsRequest request) { + return client.listAutonomousDatabaseBackups(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.AutonomousDatabaseBackupSummary} objects + * contained in responses from the listAutonomousDatabaseBackups operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.AutonomousDatabaseBackupSummary} objects + * contained in responses received from the service. + */ + public Iterable + listAutonomousDatabaseBackupsRecordIterator( + final ListAutonomousDatabaseBackupsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAutonomousDatabaseBackupsRequest.Builder, ListAutonomousDatabaseBackupsRequest, + ListAutonomousDatabaseBackupsResponse, + com.oracle.bmc.database.model.AutonomousDatabaseBackupSummary>( + new com.google.common.base.Supplier< + ListAutonomousDatabaseBackupsRequest.Builder>() { + @Override + public ListAutonomousDatabaseBackupsRequest.Builder get() { + return ListAutonomousDatabaseBackupsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function< + ListAutonomousDatabaseBackupsResponse, String>() { + @Override + public String apply(ListAutonomousDatabaseBackupsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDatabaseBackupsRequest.Builder>, + ListAutonomousDatabaseBackupsRequest>() { + @Override + public ListAutonomousDatabaseBackupsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDatabaseBackupsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAutonomousDatabaseBackupsRequest, + ListAutonomousDatabaseBackupsResponse>() { + @Override + public ListAutonomousDatabaseBackupsResponse apply( + ListAutonomousDatabaseBackupsRequest request) { + return client.listAutonomousDatabaseBackups(request); + } + }, + new com.google.common.base.Function< + ListAutonomousDatabaseBackupsResponse, + java.util.List< + com.oracle.bmc.database.model.AutonomousDatabaseBackupSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.database.model.AutonomousDatabaseBackupSummary> + apply(ListAutonomousDatabaseBackupsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listAutonomousDatabases 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 listAutonomousDatabasesResponseIterator( + final ListAutonomousDatabasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAutonomousDatabasesRequest.Builder, ListAutonomousDatabasesRequest, + ListAutonomousDatabasesResponse>( + new com.google.common.base.Supplier() { + @Override + public ListAutonomousDatabasesRequest.Builder get() { + return ListAutonomousDatabasesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListAutonomousDatabasesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDatabasesRequest.Builder>, + ListAutonomousDatabasesRequest>() { + @Override + public ListAutonomousDatabasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDatabasesRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAutonomousDatabasesRequest, ListAutonomousDatabasesResponse>() { + @Override + public ListAutonomousDatabasesResponse apply( + ListAutonomousDatabasesRequest request) { + return client.listAutonomousDatabases(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.AutonomousDatabaseSummary} objects + * contained in responses from the listAutonomousDatabases operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.AutonomousDatabaseSummary} objects + * contained in responses received from the service. + */ + public Iterable + listAutonomousDatabasesRecordIterator(final ListAutonomousDatabasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAutonomousDatabasesRequest.Builder, ListAutonomousDatabasesRequest, + ListAutonomousDatabasesResponse, + com.oracle.bmc.database.model.AutonomousDatabaseSummary>( + new com.google.common.base.Supplier() { + @Override + public ListAutonomousDatabasesRequest.Builder get() { + return ListAutonomousDatabasesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListAutonomousDatabasesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDatabasesRequest.Builder>, + ListAutonomousDatabasesRequest>() { + @Override + public ListAutonomousDatabasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAutonomousDatabasesRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAutonomousDatabasesRequest, ListAutonomousDatabasesResponse>() { + @Override + public ListAutonomousDatabasesResponse apply( + ListAutonomousDatabasesRequest request) { + return client.listAutonomousDatabases(request); + } + }, + new com.google.common.base.Function< + ListAutonomousDatabasesResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListAutonomousDatabasesResponse response) { + return response.getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listBackups operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseWaiters.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseWaiters.java index 01a805f4bf1..457443f137a 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 @@ -18,6 +18,459 @@ public class DatabaseWaiters { private final java.util.concurrent.ExecutorService executorService; private final Database client; + /** + * Creates a new {@link Waiter} using 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< + GetAutonomousDataWarehouseRequest, GetAutonomousDataWarehouseResponse> + forAutonomousDataWarehouse( + GetAutonomousDataWarehouseRequest request, + com.oracle.bmc.database.model.AutonomousDataWarehouse.LifecycleState... + targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousDataWarehouse( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link TerminationStrategy} to use + * @param delayStrategy the {@link DelayStrategy} to use + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDataWarehouseRequest, GetAutonomousDataWarehouseResponse> + forAutonomousDataWarehouse( + GetAutonomousDataWarehouseRequest request, + com.oracle.bmc.database.model.AutonomousDataWarehouse.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + org.apache.commons.lang3.Validate.notNull(targetState, "The targetState cannot be null"); + + return forAutonomousDataWarehouse( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link TerminationStrategy} to use + * @param delayStrategy the {@link 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< + GetAutonomousDataWarehouseRequest, GetAutonomousDataWarehouseResponse> + forAutonomousDataWarehouse( + GetAutonomousDataWarehouseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousDataWarehouse.LifecycleState... + targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousDataWarehouse( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousDataWarehouse. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousDataWarehouseRequest, GetAutonomousDataWarehouseResponse> + forAutonomousDataWarehouse( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousDataWarehouseRequest request, + final com.oracle.bmc.database.model.AutonomousDataWarehouse.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( + com.google.common.base.Suppliers.ofInstance(request), + new com.google.common.base.Function< + GetAutonomousDataWarehouseRequest, + GetAutonomousDataWarehouseResponse>() { + @Override + public GetAutonomousDataWarehouseResponse apply( + GetAutonomousDataWarehouseRequest request) { + return client.getAutonomousDataWarehouse(request); + } + }, + new com.google.common.base.Predicate() { + @Override + public boolean apply(GetAutonomousDataWarehouseResponse response) { + return targetStatesSet.contains( + response.getAutonomousDataWarehouse().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousDataWarehouse.LifecycleState + .Terminated)), + request); + } + + /** + * Creates a new {@link Waiter} using 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< + GetAutonomousDataWarehouseBackupRequest, + GetAutonomousDataWarehouseBackupResponse> + forAutonomousDataWarehouseBackup( + GetAutonomousDataWarehouseBackupRequest request, + com.oracle.bmc.database.model.AutonomousDataWarehouseBackup.LifecycleState... + targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousDataWarehouseBackup( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link TerminationStrategy} to use + * @param delayStrategy the {@link DelayStrategy} to use + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDataWarehouseBackupRequest, + GetAutonomousDataWarehouseBackupResponse> + forAutonomousDataWarehouseBackup( + GetAutonomousDataWarehouseBackupRequest request, + com.oracle.bmc.database.model.AutonomousDataWarehouseBackup.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + org.apache.commons.lang3.Validate.notNull(targetState, "The targetState cannot be null"); + + return forAutonomousDataWarehouseBackup( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link TerminationStrategy} to use + * @param delayStrategy the {@link 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< + GetAutonomousDataWarehouseBackupRequest, + GetAutonomousDataWarehouseBackupResponse> + forAutonomousDataWarehouseBackup( + GetAutonomousDataWarehouseBackupRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousDataWarehouseBackup.LifecycleState... + targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousDataWarehouseBackup( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousDataWarehouseBackup. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousDataWarehouseBackupRequest, + GetAutonomousDataWarehouseBackupResponse> + forAutonomousDataWarehouseBackup( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousDataWarehouseBackupRequest request, + final com.oracle.bmc.database.model.AutonomousDataWarehouseBackup + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.database.model.AutonomousDataWarehouseBackup.LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + com.google.common.base.Suppliers.ofInstance(request), + new com.google.common.base.Function< + GetAutonomousDataWarehouseBackupRequest, + GetAutonomousDataWarehouseBackupResponse>() { + @Override + public GetAutonomousDataWarehouseBackupResponse apply( + GetAutonomousDataWarehouseBackupRequest request) { + return client.getAutonomousDataWarehouseBackup(request); + } + }, + new com.google.common.base.Predicate< + GetAutonomousDataWarehouseBackupResponse>() { + @Override + public boolean apply( + GetAutonomousDataWarehouseBackupResponse response) { + return targetStatesSet.contains( + response.getAutonomousDataWarehouseBackup() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousDataWarehouseBackup + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link Waiter} using 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 + forAutonomousDatabase( + GetAutonomousDatabaseRequest request, + com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState... + targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousDatabase( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link TerminationStrategy} to use + * @param delayStrategy the {@link DelayStrategy} to use + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAutonomousDatabase( + GetAutonomousDatabaseRequest request, + com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + org.apache.commons.lang3.Validate.notNull(targetState, "The targetState cannot be null"); + + return forAutonomousDatabase( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link TerminationStrategy} to use + * @param delayStrategy the {@link 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 + forAutonomousDatabase( + GetAutonomousDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState... + targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousDatabase( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousDatabase. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseRequest, GetAutonomousDatabaseResponse> + forAutonomousDatabase( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousDatabaseRequest request, + final com.oracle.bmc.database.model.AutonomousDatabase.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( + com.google.common.base.Suppliers.ofInstance(request), + new com.google.common.base.Function< + GetAutonomousDatabaseRequest, GetAutonomousDatabaseResponse>() { + @Override + public GetAutonomousDatabaseResponse apply( + GetAutonomousDatabaseRequest request) { + return client.getAutonomousDatabase(request); + } + }, + new com.google.common.base.Predicate() { + @Override + public boolean apply(GetAutonomousDatabaseResponse response) { + return targetStatesSet.contains( + response.getAutonomousDatabase().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState + .Terminated)), + request); + } + + /** + * Creates a new {@link Waiter} using 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< + GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> + forAutonomousDatabaseBackup( + GetAutonomousDatabaseBackupRequest request, + com.oracle.bmc.database.model.AutonomousDatabaseBackup.LifecycleState... + targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousDatabaseBackup( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link TerminationStrategy} to use + * @param delayStrategy the {@link DelayStrategy} to use + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> + forAutonomousDatabaseBackup( + GetAutonomousDatabaseBackupRequest request, + com.oracle.bmc.database.model.AutonomousDatabaseBackup.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + org.apache.commons.lang3.Validate.notNull(targetState, "The targetState cannot be null"); + + return forAutonomousDatabaseBackup( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link TerminationStrategy} to use + * @param delayStrategy the {@link 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< + GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> + forAutonomousDatabaseBackup( + GetAutonomousDatabaseBackupRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousDatabaseBackup.LifecycleState... + targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousDatabaseBackup( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousDatabaseBackup. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> + forAutonomousDatabaseBackup( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousDatabaseBackupRequest request, + final com.oracle.bmc.database.model.AutonomousDatabaseBackup.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( + com.google.common.base.Suppliers.ofInstance(request), + new com.google.common.base.Function< + GetAutonomousDatabaseBackupRequest, + GetAutonomousDatabaseBackupResponse>() { + @Override + public GetAutonomousDatabaseBackupResponse apply( + GetAutonomousDatabaseBackupRequest request) { + return client.getAutonomousDatabaseBackup(request); + } + }, + new com.google.common.base.Predicate< + GetAutonomousDatabaseBackupResponse>() { + @Override + public boolean apply(GetAutonomousDatabaseBackupResponse response) { + return targetStatesSet.contains( + response.getAutonomousDatabaseBackup().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousDatabaseBackup + .LifecycleState.Deleted)), + request); + } + /** * Creates a new {@link Waiter} using default configuration. * diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateAutonomousDataWarehouseBackupConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateAutonomousDataWarehouseBackupConverter.java new file mode 100644 index 00000000000..d2449824db5 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateAutonomousDataWarehouseBackupConverter.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class CreateAutonomousDataWarehouseBackupConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateAutonomousDataWarehouseBackupRequest interceptRequest( + CreateAutonomousDataWarehouseBackupRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + CreateAutonomousDataWarehouseBackupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateAutonomousDataWarehouseBackupDetails(), + "createAutonomousDataWarehouseBackupDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("autonomousDataWarehouseBackups"); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDataWarehouseBackupResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDataWarehouseBackupResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + CreateAutonomousDataWarehouseBackupResponse>() { + @Override + public CreateAutonomousDataWarehouseBackupResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CreateAutonomousDataWarehouseBackupResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDataWarehouseBackup>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDataWarehouseBackup.class); + + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDataWarehouseBackup> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateAutonomousDataWarehouseBackupResponse.Builder builder = + CreateAutonomousDataWarehouseBackupResponse.builder(); + + builder.autonomousDataWarehouseBackup(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + CreateAutonomousDataWarehouseBackupResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateAutonomousDataWarehouseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateAutonomousDataWarehouseConverter.java new file mode 100644 index 00000000000..e3570c4ccc3 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateAutonomousDataWarehouseConverter.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class CreateAutonomousDataWarehouseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateAutonomousDataWarehouseRequest interceptRequest( + CreateAutonomousDataWarehouseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + CreateAutonomousDataWarehouseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateAutonomousDataWarehouseDetails(), + "createAutonomousDataWarehouseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("autonomousDataWarehouses"); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDataWarehouseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDataWarehouseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + CreateAutonomousDataWarehouseResponse>() { + @Override + public CreateAutonomousDataWarehouseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CreateAutonomousDataWarehouseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDataWarehouse>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDataWarehouse.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateAutonomousDataWarehouseResponse.Builder builder = + CreateAutonomousDataWarehouseResponse.builder(); + + builder.autonomousDataWarehouse(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + CreateAutonomousDataWarehouseResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateAutonomousDatabaseBackupConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateAutonomousDatabaseBackupConverter.java new file mode 100644 index 00000000000..6e3b78c0946 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateAutonomousDatabaseBackupConverter.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class CreateAutonomousDatabaseBackupConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateAutonomousDatabaseBackupRequest interceptRequest( + CreateAutonomousDatabaseBackupRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + CreateAutonomousDatabaseBackupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateAutonomousDatabaseBackupDetails(), + "createAutonomousDatabaseBackupDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("autonomousDatabaseBackups"); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDatabaseBackupResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDatabaseBackupResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + CreateAutonomousDatabaseBackupResponse>() { + @Override + public CreateAutonomousDatabaseBackupResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CreateAutonomousDatabaseBackupResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDatabaseBackup>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDatabaseBackup.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateAutonomousDatabaseBackupResponse.Builder builder = + CreateAutonomousDatabaseBackupResponse.builder(); + + builder.autonomousDatabaseBackup(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + CreateAutonomousDatabaseBackupResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateAutonomousDatabaseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateAutonomousDatabaseConverter.java new file mode 100644 index 00000000000..432241b4e0a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateAutonomousDatabaseConverter.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class CreateAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateAutonomousDatabaseRequest interceptRequest( + CreateAutonomousDatabaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + CreateAutonomousDatabaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateAutonomousDatabaseDetails(), + "createAutonomousDatabaseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("autonomousDatabases"); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDatabaseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDatabaseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAutonomousDatabaseResponse>() { + @Override + public CreateAutonomousDatabaseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CreateAutonomousDatabaseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDatabase>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDatabase.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateAutonomousDatabaseResponse.Builder builder = + CreateAutonomousDatabaseResponse.builder(); + + builder.autonomousDatabase(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + CreateAutonomousDatabaseResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteAutonomousDataWarehouseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteAutonomousDataWarehouseConverter.java new file mode 100644 index 00000000000..b1bd2ca7ba9 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteAutonomousDataWarehouseConverter.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class DeleteAutonomousDataWarehouseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static DeleteAutonomousDataWarehouseRequest interceptRequest( + DeleteAutonomousDataWarehouseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + DeleteAutonomousDataWarehouseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDataWarehouseId(), + "autonomousDataWarehouseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDataWarehouses") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDataWarehouseId())); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAutonomousDataWarehouseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAutonomousDataWarehouseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + DeleteAutonomousDataWarehouseResponse>() { + @Override + public DeleteAutonomousDataWarehouseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for DeleteAutonomousDataWarehouseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + DeleteAutonomousDataWarehouseResponse.Builder builder = + DeleteAutonomousDataWarehouseResponse.builder(); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + DeleteAutonomousDataWarehouseResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteAutonomousDatabaseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteAutonomousDatabaseConverter.java new file mode 100644 index 00000000000..20c9e8f4b35 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteAutonomousDatabaseConverter.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class DeleteAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static DeleteAutonomousDatabaseRequest interceptRequest( + DeleteAutonomousDatabaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + DeleteAutonomousDatabaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDatabaseId(), "autonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDatabaseId())); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAutonomousDatabaseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAutonomousDatabaseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAutonomousDatabaseResponse>() { + @Override + public DeleteAutonomousDatabaseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for DeleteAutonomousDatabaseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + DeleteAutonomousDatabaseResponse.Builder builder = + DeleteAutonomousDatabaseResponse.builder(); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + DeleteAutonomousDatabaseResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousDataWarehouseBackupConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousDataWarehouseBackupConverter.java new file mode 100644 index 00000000000..648a84ae4e0 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousDataWarehouseBackupConverter.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetAutonomousDataWarehouseBackupConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetAutonomousDataWarehouseBackupRequest interceptRequest( + GetAutonomousDataWarehouseBackupRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + GetAutonomousDataWarehouseBackupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDataWarehouseBackupId(), + "autonomousDataWarehouseBackupId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDataWarehouseBackups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDataWarehouseBackupId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDataWarehouseBackupResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDataWarehouseBackupResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + GetAutonomousDataWarehouseBackupResponse>() { + @Override + public GetAutonomousDataWarehouseBackupResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetAutonomousDataWarehouseBackupResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDataWarehouseBackup>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDataWarehouseBackup.class); + + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDataWarehouseBackup> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetAutonomousDataWarehouseBackupResponse.Builder builder = + GetAutonomousDataWarehouseBackupResponse.builder(); + + builder.autonomousDataWarehouseBackup(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + GetAutonomousDataWarehouseBackupResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousDataWarehouseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousDataWarehouseConverter.java new file mode 100644 index 00000000000..3f5220f3f31 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousDataWarehouseConverter.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetAutonomousDataWarehouseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetAutonomousDataWarehouseRequest interceptRequest( + GetAutonomousDataWarehouseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + GetAutonomousDataWarehouseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDataWarehouseId(), + "autonomousDataWarehouseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDataWarehouses") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDataWarehouseId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDataWarehouseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDataWarehouseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDataWarehouseResponse>() { + @Override + public GetAutonomousDataWarehouseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetAutonomousDataWarehouseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDataWarehouse>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDataWarehouse.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetAutonomousDataWarehouseResponse.Builder builder = + GetAutonomousDataWarehouseResponse.builder(); + + builder.autonomousDataWarehouse(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + GetAutonomousDataWarehouseResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousDatabaseBackupConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousDatabaseBackupConverter.java new file mode 100644 index 00000000000..2c635016bed --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousDatabaseBackupConverter.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetAutonomousDatabaseBackupConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetAutonomousDatabaseBackupRequest interceptRequest( + GetAutonomousDatabaseBackupRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + GetAutonomousDatabaseBackupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDatabaseBackupId(), + "autonomousDatabaseBackupId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDatabaseBackups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDatabaseBackupId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDatabaseBackupResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDatabaseBackupResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDatabaseBackupResponse>() { + @Override + public GetAutonomousDatabaseBackupResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetAutonomousDatabaseBackupResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDatabaseBackup>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDatabaseBackup.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetAutonomousDatabaseBackupResponse.Builder builder = + GetAutonomousDatabaseBackupResponse.builder(); + + builder.autonomousDatabaseBackup(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + GetAutonomousDatabaseBackupResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousDatabaseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousDatabaseConverter.java new file mode 100644 index 00000000000..b4e3329d968 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetAutonomousDatabaseConverter.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetAutonomousDatabaseRequest interceptRequest( + GetAutonomousDatabaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetAutonomousDatabaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDatabaseId(), "autonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDatabaseId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDatabaseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDatabaseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetAutonomousDatabaseResponse>() { + @Override + public GetAutonomousDatabaseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetAutonomousDatabaseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDatabase>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDatabase.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetAutonomousDatabaseResponse.Builder builder = + GetAutonomousDatabaseResponse.builder(); + + builder.autonomousDatabase(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + GetAutonomousDatabaseResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDataWarehouseBackupsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDataWarehouseBackupsConverter.java new file mode 100644 index 00000000000..8fc999c9668 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDataWarehouseBackupsConverter.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListAutonomousDataWarehouseBackupsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListAutonomousDataWarehouseBackupsRequest interceptRequest( + ListAutonomousDataWarehouseBackupsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ListAutonomousDataWarehouseBackupsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("autonomousDataWarehouseBackups"); + + if (request.getAutonomousDataWarehouseId() != null) { + target = + target.queryParam( + "autonomousDataWarehouseId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAutonomousDataWarehouseId())); + } + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + 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.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())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDataWarehouseBackupsResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDataWarehouseBackupsResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + ListAutonomousDataWarehouseBackupsResponse>() { + @Override + public ListAutonomousDataWarehouseBackupsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListAutonomousDataWarehouseBackupsResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + AutonomousDataWarehouseBackupSummary>>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + AutonomousDataWarehouseBackupSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + AutonomousDataWarehouseBackupSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListAutonomousDataWarehouseBackupsResponse.Builder builder = + ListAutonomousDataWarehouseBackupsResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + ListAutonomousDataWarehouseBackupsResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDataWarehousesConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDataWarehousesConverter.java new file mode 100644 index 00000000000..862c65655e2 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDataWarehousesConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListAutonomousDataWarehousesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListAutonomousDataWarehousesRequest interceptRequest( + ListAutonomousDataWarehousesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ListAutonomousDataWarehousesRequest 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("autonomousDataWarehouses"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + 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.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())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDataWarehousesResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDataWarehousesResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDataWarehousesResponse>() { + @Override + public ListAutonomousDataWarehousesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListAutonomousDataWarehousesResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + AutonomousDataWarehouseSummary>>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + AutonomousDataWarehouseSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListAutonomousDataWarehousesResponse.Builder builder = + ListAutonomousDataWarehousesResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + ListAutonomousDataWarehousesResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabaseBackupsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabaseBackupsConverter.java new file mode 100644 index 00000000000..0c72c4df957 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabaseBackupsConverter.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListAutonomousDatabaseBackupsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListAutonomousDatabaseBackupsRequest interceptRequest( + ListAutonomousDatabaseBackupsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ListAutonomousDatabaseBackupsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("autonomousDatabaseBackups"); + + if (request.getAutonomousDatabaseId() != null) { + target = + target.queryParam( + "autonomousDatabaseId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAutonomousDatabaseId())); + } + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + 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.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())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDatabaseBackupsResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDatabaseBackupsResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + ListAutonomousDatabaseBackupsResponse>() { + @Override + public ListAutonomousDatabaseBackupsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListAutonomousDatabaseBackupsResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + AutonomousDatabaseBackupSummary>>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + AutonomousDatabaseBackupSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListAutonomousDatabaseBackupsResponse.Builder builder = + ListAutonomousDatabaseBackupsResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + ListAutonomousDatabaseBackupsResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabasesConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabasesConverter.java new file mode 100644 index 00000000000..af0897403ee --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabasesConverter.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListAutonomousDatabasesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListAutonomousDatabasesRequest interceptRequest( + ListAutonomousDatabasesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ListAutonomousDatabasesRequest 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("autonomousDatabases"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + 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.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())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDatabasesResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDatabasesResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListAutonomousDatabasesResponse>() { + @Override + public ListAutonomousDatabasesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListAutonomousDatabasesResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + AutonomousDatabaseSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListAutonomousDatabasesResponse.Builder builder = + ListAutonomousDatabasesResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + ListAutonomousDatabasesResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/RestoreAutonomousDataWarehouseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/RestoreAutonomousDataWarehouseConverter.java new file mode 100644 index 00000000000..10523402aab --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/RestoreAutonomousDataWarehouseConverter.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class RestoreAutonomousDataWarehouseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static RestoreAutonomousDataWarehouseRequest interceptRequest( + RestoreAutonomousDataWarehouseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + RestoreAutonomousDataWarehouseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDataWarehouseId(), + "autonomousDataWarehouseId must not be blank"); + Validate.notNull( + request.getRestoreAutonomousDataWarehouseDetails(), + "restoreAutonomousDataWarehouseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDataWarehouses") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDataWarehouseId())) + .path("actions") + .path("restore"); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, RestoreAutonomousDataWarehouseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, RestoreAutonomousDataWarehouseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + RestoreAutonomousDataWarehouseResponse>() { + @Override + public RestoreAutonomousDataWarehouseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for RestoreAutonomousDataWarehouseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDataWarehouse>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDataWarehouse.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + RestoreAutonomousDataWarehouseResponse.Builder builder = + RestoreAutonomousDataWarehouseResponse.builder(); + + builder.autonomousDataWarehouse(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + RestoreAutonomousDataWarehouseResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/RestoreAutonomousDatabaseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/RestoreAutonomousDatabaseConverter.java new file mode 100644 index 00000000000..597e4dc6d36 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/RestoreAutonomousDatabaseConverter.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class RestoreAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static RestoreAutonomousDatabaseRequest interceptRequest( + RestoreAutonomousDatabaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + RestoreAutonomousDatabaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDatabaseId(), "autonomousDatabaseId must not be blank"); + Validate.notNull( + request.getRestoreAutonomousDatabaseDetails(), + "restoreAutonomousDatabaseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDatabaseId())) + .path("actions") + .path("restore"); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, RestoreAutonomousDatabaseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, RestoreAutonomousDatabaseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, RestoreAutonomousDatabaseResponse>() { + @Override + public RestoreAutonomousDatabaseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for RestoreAutonomousDatabaseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDatabase>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDatabase.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + RestoreAutonomousDatabaseResponse.Builder builder = + RestoreAutonomousDatabaseResponse.builder(); + + builder.autonomousDatabase(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + RestoreAutonomousDatabaseResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/StartAutonomousDataWarehouseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/StartAutonomousDataWarehouseConverter.java new file mode 100644 index 00000000000..d8bd1e3d323 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/StartAutonomousDataWarehouseConverter.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class StartAutonomousDataWarehouseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static StartAutonomousDataWarehouseRequest interceptRequest( + StartAutonomousDataWarehouseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + StartAutonomousDataWarehouseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDataWarehouseId(), + "autonomousDataWarehouseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDataWarehouses") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDataWarehouseId())) + .path("actions") + .path("start"); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, StartAutonomousDataWarehouseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, StartAutonomousDataWarehouseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, StartAutonomousDataWarehouseResponse>() { + @Override + public StartAutonomousDataWarehouseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for StartAutonomousDataWarehouseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDataWarehouse>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDataWarehouse.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + StartAutonomousDataWarehouseResponse.Builder builder = + StartAutonomousDataWarehouseResponse.builder(); + + builder.autonomousDataWarehouse(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + StartAutonomousDataWarehouseResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/StartAutonomousDatabaseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/StartAutonomousDatabaseConverter.java new file mode 100644 index 00000000000..cbbdd334e1c --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/StartAutonomousDatabaseConverter.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class StartAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static StartAutonomousDatabaseRequest interceptRequest( + StartAutonomousDatabaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + StartAutonomousDatabaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDatabaseId(), "autonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDatabaseId())) + .path("actions") + .path("start"); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, StartAutonomousDatabaseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, StartAutonomousDatabaseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, StartAutonomousDatabaseResponse>() { + @Override + public StartAutonomousDatabaseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for StartAutonomousDatabaseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDatabase>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDatabase.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + StartAutonomousDatabaseResponse.Builder builder = + StartAutonomousDatabaseResponse.builder(); + + builder.autonomousDatabase(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + StartAutonomousDatabaseResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/StopAutonomousDataWarehouseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/StopAutonomousDataWarehouseConverter.java new file mode 100644 index 00000000000..a47cf2bc725 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/StopAutonomousDataWarehouseConverter.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class StopAutonomousDataWarehouseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static StopAutonomousDataWarehouseRequest interceptRequest( + StopAutonomousDataWarehouseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + StopAutonomousDataWarehouseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDataWarehouseId(), + "autonomousDataWarehouseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDataWarehouses") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDataWarehouseId())) + .path("actions") + .path("stop"); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, StopAutonomousDataWarehouseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, StopAutonomousDataWarehouseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, StopAutonomousDataWarehouseResponse>() { + @Override + public StopAutonomousDataWarehouseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for StopAutonomousDataWarehouseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDataWarehouse>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDataWarehouse.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + StopAutonomousDataWarehouseResponse.Builder builder = + StopAutonomousDataWarehouseResponse.builder(); + + builder.autonomousDataWarehouse(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + StopAutonomousDataWarehouseResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/StopAutonomousDatabaseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/StopAutonomousDatabaseConverter.java new file mode 100644 index 00000000000..a29c06de469 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/StopAutonomousDatabaseConverter.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class StopAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static StopAutonomousDatabaseRequest interceptRequest( + StopAutonomousDatabaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, StopAutonomousDatabaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDatabaseId(), "autonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDatabaseId())) + .path("actions") + .path("stop"); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, StopAutonomousDatabaseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, StopAutonomousDatabaseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, StopAutonomousDatabaseResponse>() { + @Override + public StopAutonomousDatabaseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for StopAutonomousDatabaseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDatabase>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDatabase.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + StopAutonomousDatabaseResponse.Builder builder = + StopAutonomousDatabaseResponse.builder(); + + builder.autonomousDatabase(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + StopAutonomousDatabaseResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateAutonomousDataWarehouseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateAutonomousDataWarehouseConverter.java new file mode 100644 index 00000000000..6bb1147cb29 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateAutonomousDataWarehouseConverter.java @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class UpdateAutonomousDataWarehouseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateAutonomousDataWarehouseRequest interceptRequest( + UpdateAutonomousDataWarehouseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + UpdateAutonomousDataWarehouseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDataWarehouseId(), + "autonomousDataWarehouseId must not be blank"); + Validate.notNull( + request.getUpdateAutonomousDataWarehouseDetails(), + "updateAutonomousDataWarehouseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDataWarehouses") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDataWarehouseId())); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateAutonomousDataWarehouseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateAutonomousDataWarehouseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + UpdateAutonomousDataWarehouseResponse>() { + @Override + public UpdateAutonomousDataWarehouseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for UpdateAutonomousDataWarehouseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDataWarehouse>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDataWarehouse.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + UpdateAutonomousDataWarehouseResponse.Builder builder = + UpdateAutonomousDataWarehouseResponse.builder(); + + builder.autonomousDataWarehouse(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + UpdateAutonomousDataWarehouseResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateAutonomousDatabaseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateAutonomousDatabaseConverter.java new file mode 100644 index 00000000000..32683843e34 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateAutonomousDatabaseConverter.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class UpdateAutonomousDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateAutonomousDatabaseRequest interceptRequest( + UpdateAutonomousDatabaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + UpdateAutonomousDatabaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDatabaseId(), "autonomousDatabaseId must not be blank"); + Validate.notNull( + request.getUpdateAutonomousDatabaseDetails(), + "updateAutonomousDatabaseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDatabaseId())); + + 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()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateAutonomousDatabaseResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateAutonomousDatabaseResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateAutonomousDatabaseResponse>() { + @Override + public UpdateAutonomousDatabaseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for UpdateAutonomousDatabaseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AutonomousDatabase>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AutonomousDatabase.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + UpdateAutonomousDatabaseResponse.Builder builder = + UpdateAutonomousDatabaseResponse.builder(); + + builder.autonomousDatabase(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + UpdateAutonomousDatabaseResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouse.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouse.java new file mode 100644 index 00000000000..196025ce30a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouse.java @@ -0,0 +1,405 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * An Oracle Autonomous Data Warehouse. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDataWarehouse.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AutonomousDataWarehouse { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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("connectionStrings") + private AutonomousDataWarehouseConnectionStrings connectionStrings; + + public Builder connectionStrings( + AutonomousDataWarehouseConnectionStrings connectionStrings) { + this.connectionStrings = connectionStrings; + this.__explicitlySet__.add("connectionStrings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + private Integer cpuCoreCount; + + public Builder cpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + this.__explicitlySet__.add("cpuCoreCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + private Integer dataStorageSizeInTBs; + + public Builder dataStorageSizeInTBs(Integer dataStorageSizeInTBs) { + this.dataStorageSizeInTBs = dataStorageSizeInTBs; + this.__explicitlySet__.add("dataStorageSizeInTBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + private String dbName; + + public Builder dbName(String dbName) { + this.dbName = dbName; + this.__explicitlySet__.add("dbName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("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("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("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + 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("serviceConsoleUrl") + private String serviceConsoleUrl; + + public Builder serviceConsoleUrl(String serviceConsoleUrl) { + this.serviceConsoleUrl = serviceConsoleUrl; + this.__explicitlySet__.add("serviceConsoleUrl"); + 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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDataWarehouse build() { + AutonomousDataWarehouse __instance__ = + new AutonomousDataWarehouse( + compartmentId, + connectionStrings, + cpuCoreCount, + dataStorageSizeInTBs, + dbName, + definedTags, + displayName, + freeformTags, + id, + licenseModel, + lifecycleDetails, + lifecycleState, + serviceConsoleUrl, + timeCreated); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDataWarehouse o) { + Builder copiedBuilder = + compartmentId(o.getCompartmentId()) + .connectionStrings(o.getConnectionStrings()) + .cpuCoreCount(o.getCpuCoreCount()) + .dataStorageSizeInTBs(o.getDataStorageSizeInTBs()) + .dbName(o.getDbName()) + .definedTags(o.getDefinedTags()) + .displayName(o.getDisplayName()) + .freeformTags(o.getFreeformTags()) + .id(o.getId()) + .licenseModel(o.getLicenseModel()) + .lifecycleDetails(o.getLifecycleDetails()) + .lifecycleState(o.getLifecycleState()) + .serviceConsoleUrl(o.getServiceConsoleUrl()) + .timeCreated(o.getTimeCreated()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The connection string used to connect to the Data Warehouse. The username for the Service Console is ADMIN. Use the password you entered when creating the Autonomous Data Warehouse for the password value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionStrings") + AutonomousDataWarehouseConnectionStrings connectionStrings; + + /** + * The number of CPU cores to be made available to the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + Integer cpuCoreCount; + + /** + * The quantity of data in the database, in terabytes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + Integer dataStorageSizeInTBs; + + /** + * The database name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + String dbName; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * The user-friendly name for the Autonomous Data Warehouse. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Data Warehouse. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + /** + * The Oracle license model that applies to the Oracle Autonomous Data Warehouse. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LicenseModel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Oracle license model that applies to the Oracle Autonomous Data Warehouse. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + LicenseModel licenseModel; + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + String lifecycleDetails; + /** + * The current state of the database. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Provisioning("PROVISIONING"), + Available("AVAILABLE"), + Stopping("STOPPING"), + Stopped("STOPPED"), + Starting("STARTING"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + Unavailable("UNAVAILABLE"), + RestoreInProgress("RESTORE_IN_PROGRESS"), + BackupInProgress("BACKUP_IN_PROGRESS"), + ScaleInProgress("SCALE_IN_PROGRESS"), + AvailableNeedsAttention("AVAILABLE_NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private 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 database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * The URL of the Service Console for the Data Warehouse. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceConsoleUrl") + String serviceConsoleUrl; + + /** + * The date and time the database was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouseBackup.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouseBackup.java new file mode 100644 index 00000000000..52835da82cd --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouseBackup.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * An Autonomous Data Warehouse backup. + * 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDataWarehouseBackup.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AutonomousDataWarehouseBackup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDataWarehouseId") + private String autonomousDataWarehouseId; + + public Builder autonomousDataWarehouseId(String autonomousDataWarehouseId) { + this.autonomousDataWarehouseId = autonomousDataWarehouseId; + this.__explicitlySet__.add("autonomousDataWarehouseId"); + 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("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isAutomatic") + private Boolean isAutomatic; + + public Builder isAutomatic(Boolean isAutomatic) { + this.isAutomatic = isAutomatic; + this.__explicitlySet__.add("isAutomatic"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + 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("timeEnded") + private java.util.Date timeEnded; + + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDataWarehouseBackup build() { + AutonomousDataWarehouseBackup __instance__ = + new AutonomousDataWarehouseBackup( + autonomousDataWarehouseId, + compartmentId, + displayName, + id, + isAutomatic, + lifecycleDetails, + lifecycleState, + timeEnded, + timeStarted, + type); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDataWarehouseBackup o) { + Builder copiedBuilder = + autonomousDataWarehouseId(o.getAutonomousDataWarehouseId()) + .compartmentId(o.getCompartmentId()) + .displayName(o.getDisplayName()) + .id(o.getId()) + .isAutomatic(o.getIsAutomatic()) + .lifecycleDetails(o.getLifecycleDetails()) + .lifecycleState(o.getLifecycleState()) + .timeEnded(o.getTimeEnded()) + .timeStarted(o.getTimeStarted()) + .type(o.getType()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Data Warehouse. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDataWarehouseId") + String autonomousDataWarehouseId; + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The user-friendly name for the backup. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Data Warehouse backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * Indicates whether the backup is user-initiated or automatic. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutomatic") + Boolean isAutomatic; + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + String lifecycleDetails; + /** + * The current state of the backup. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Creating("CREATING"), + 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 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 backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * The date and time the backup completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + java.util.Date timeEnded; + + /** + * The date and time the backup started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + java.util.Date timeStarted; + /** + * The type of backup. + **/ + @lombok.extern.slf4j.Slf4j + public enum Type { + Incremental("INCREMENTAL"), + Full("FULL"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The type of backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + Type type; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouseBackupSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouseBackupSummary.java new file mode 100644 index 00000000000..0b1aa87d64b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouseBackupSummary.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * An Autonomous Data Warehouse backup. + * 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDataWarehouseBackupSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AutonomousDataWarehouseBackupSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDataWarehouseId") + private String autonomousDataWarehouseId; + + public Builder autonomousDataWarehouseId(String autonomousDataWarehouseId) { + this.autonomousDataWarehouseId = autonomousDataWarehouseId; + this.__explicitlySet__.add("autonomousDataWarehouseId"); + 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("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isAutomatic") + private Boolean isAutomatic; + + public Builder isAutomatic(Boolean isAutomatic) { + this.isAutomatic = isAutomatic; + this.__explicitlySet__.add("isAutomatic"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + 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("timeEnded") + private java.util.Date timeEnded; + + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDataWarehouseBackupSummary build() { + AutonomousDataWarehouseBackupSummary __instance__ = + new AutonomousDataWarehouseBackupSummary( + autonomousDataWarehouseId, + compartmentId, + displayName, + id, + isAutomatic, + lifecycleDetails, + lifecycleState, + timeEnded, + timeStarted, + type); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDataWarehouseBackupSummary o) { + Builder copiedBuilder = + autonomousDataWarehouseId(o.getAutonomousDataWarehouseId()) + .compartmentId(o.getCompartmentId()) + .displayName(o.getDisplayName()) + .id(o.getId()) + .isAutomatic(o.getIsAutomatic()) + .lifecycleDetails(o.getLifecycleDetails()) + .lifecycleState(o.getLifecycleState()) + .timeEnded(o.getTimeEnded()) + .timeStarted(o.getTimeStarted()) + .type(o.getType()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Data Warehouse. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDataWarehouseId") + String autonomousDataWarehouseId; + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The user-friendly name for the backup. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Data Warehouse backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * Indicates whether the backup is user-initiated or automatic. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutomatic") + Boolean isAutomatic; + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + String lifecycleDetails; + /** + * The current state of the backup. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Creating("CREATING"), + 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 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 backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * The date and time the backup completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + java.util.Date timeEnded; + + /** + * The date and time the backup started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + java.util.Date timeStarted; + /** + * The type of backup. + **/ + @lombok.extern.slf4j.Slf4j + public enum Type { + Incremental("INCREMENTAL"), + Full("FULL"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The type of backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + Type type; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouseConnectionStrings.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouseConnectionStrings.java new file mode 100644 index 00000000000..3b42c04048d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouseConnectionStrings.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * Connection strings to connect to an Oracle Autonomous Data Warehouse. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDataWarehouseConnectionStrings.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AutonomousDataWarehouseConnectionStrings { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("high") + private String high; + + public Builder high(String high) { + this.high = high; + this.__explicitlySet__.add("high"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("low") + private String low; + + public Builder low(String low) { + this.low = low; + this.__explicitlySet__.add("low"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("medium") + private String medium; + + public Builder medium(String medium) { + this.medium = medium; + this.__explicitlySet__.add("medium"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDataWarehouseConnectionStrings build() { + AutonomousDataWarehouseConnectionStrings __instance__ = + new AutonomousDataWarehouseConnectionStrings(high, low, medium); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDataWarehouseConnectionStrings o) { + Builder copiedBuilder = high(o.getHigh()).low(o.getLow()).medium(o.getMedium()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("high") + String high; + + /** + * The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("low") + String low; + + /** + * The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("medium") + String medium; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouseSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouseSummary.java new file mode 100644 index 00000000000..09b583b12b4 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDataWarehouseSummary.java @@ -0,0 +1,405 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * An Oracle Autonomous Data Warehouse. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDataWarehouseSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AutonomousDataWarehouseSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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("connectionStrings") + private AutonomousDataWarehouseConnectionStrings connectionStrings; + + public Builder connectionStrings( + AutonomousDataWarehouseConnectionStrings connectionStrings) { + this.connectionStrings = connectionStrings; + this.__explicitlySet__.add("connectionStrings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + private Integer cpuCoreCount; + + public Builder cpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + this.__explicitlySet__.add("cpuCoreCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + private Integer dataStorageSizeInTBs; + + public Builder dataStorageSizeInTBs(Integer dataStorageSizeInTBs) { + this.dataStorageSizeInTBs = dataStorageSizeInTBs; + this.__explicitlySet__.add("dataStorageSizeInTBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + private String dbName; + + public Builder dbName(String dbName) { + this.dbName = dbName; + this.__explicitlySet__.add("dbName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("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("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("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + 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("serviceConsoleUrl") + private String serviceConsoleUrl; + + public Builder serviceConsoleUrl(String serviceConsoleUrl) { + this.serviceConsoleUrl = serviceConsoleUrl; + this.__explicitlySet__.add("serviceConsoleUrl"); + 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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDataWarehouseSummary build() { + AutonomousDataWarehouseSummary __instance__ = + new AutonomousDataWarehouseSummary( + compartmentId, + connectionStrings, + cpuCoreCount, + dataStorageSizeInTBs, + dbName, + definedTags, + displayName, + freeformTags, + id, + licenseModel, + lifecycleDetails, + lifecycleState, + serviceConsoleUrl, + timeCreated); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDataWarehouseSummary o) { + Builder copiedBuilder = + compartmentId(o.getCompartmentId()) + .connectionStrings(o.getConnectionStrings()) + .cpuCoreCount(o.getCpuCoreCount()) + .dataStorageSizeInTBs(o.getDataStorageSizeInTBs()) + .dbName(o.getDbName()) + .definedTags(o.getDefinedTags()) + .displayName(o.getDisplayName()) + .freeformTags(o.getFreeformTags()) + .id(o.getId()) + .licenseModel(o.getLicenseModel()) + .lifecycleDetails(o.getLifecycleDetails()) + .lifecycleState(o.getLifecycleState()) + .serviceConsoleUrl(o.getServiceConsoleUrl()) + .timeCreated(o.getTimeCreated()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The connection string used to connect to the Data Warehouse. The username for the Service Console is ADMIN. Use the password you entered when creating the Autonomous Data Warehouse for the password value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionStrings") + AutonomousDataWarehouseConnectionStrings connectionStrings; + + /** + * The number of CPU cores to be made available to the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + Integer cpuCoreCount; + + /** + * The quantity of data in the database, in terabytes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + Integer dataStorageSizeInTBs; + + /** + * The database name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + String dbName; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * The user-friendly name for the Autonomous Data Warehouse. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Data Warehouse. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + /** + * The Oracle license model that applies to the Oracle Autonomous Data Warehouse. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LicenseModel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Oracle license model that applies to the Oracle Autonomous Data Warehouse. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + LicenseModel licenseModel; + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + String lifecycleDetails; + /** + * The current state of the database. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Provisioning("PROVISIONING"), + Available("AVAILABLE"), + Stopping("STOPPING"), + Stopped("STOPPED"), + Starting("STARTING"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + Unavailable("UNAVAILABLE"), + RestoreInProgress("RESTORE_IN_PROGRESS"), + BackupInProgress("BACKUP_IN_PROGRESS"), + ScaleInProgress("SCALE_IN_PROGRESS"), + AvailableNeedsAttention("AVAILABLE_NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private 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 database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * The URL of the Service Console for the Data Warehouse. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceConsoleUrl") + String serviceConsoleUrl; + + /** + * The date and time the database was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabase.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabase.java new file mode 100644 index 00000000000..6e2a63ce1cc --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabase.java @@ -0,0 +1,404 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * An Oracle Autonomous Database. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDatabase.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AutonomousDatabase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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("connectionStrings") + private AutonomousDatabaseConnectionStrings connectionStrings; + + public Builder connectionStrings(AutonomousDatabaseConnectionStrings connectionStrings) { + this.connectionStrings = connectionStrings; + this.__explicitlySet__.add("connectionStrings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + private Integer cpuCoreCount; + + public Builder cpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + this.__explicitlySet__.add("cpuCoreCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + private Integer dataStorageSizeInTBs; + + public Builder dataStorageSizeInTBs(Integer dataStorageSizeInTBs) { + this.dataStorageSizeInTBs = dataStorageSizeInTBs; + this.__explicitlySet__.add("dataStorageSizeInTBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + private String dbName; + + public Builder dbName(String dbName) { + this.dbName = dbName; + this.__explicitlySet__.add("dbName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("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("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("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + 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("serviceConsoleUrl") + private String serviceConsoleUrl; + + public Builder serviceConsoleUrl(String serviceConsoleUrl) { + this.serviceConsoleUrl = serviceConsoleUrl; + this.__explicitlySet__.add("serviceConsoleUrl"); + 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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDatabase build() { + AutonomousDatabase __instance__ = + new AutonomousDatabase( + compartmentId, + connectionStrings, + cpuCoreCount, + dataStorageSizeInTBs, + dbName, + definedTags, + displayName, + freeformTags, + id, + licenseModel, + lifecycleDetails, + lifecycleState, + serviceConsoleUrl, + timeCreated); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDatabase o) { + Builder copiedBuilder = + compartmentId(o.getCompartmentId()) + .connectionStrings(o.getConnectionStrings()) + .cpuCoreCount(o.getCpuCoreCount()) + .dataStorageSizeInTBs(o.getDataStorageSizeInTBs()) + .dbName(o.getDbName()) + .definedTags(o.getDefinedTags()) + .displayName(o.getDisplayName()) + .freeformTags(o.getFreeformTags()) + .id(o.getId()) + .licenseModel(o.getLicenseModel()) + .lifecycleDetails(o.getLifecycleDetails()) + .lifecycleState(o.getLifecycleState()) + .serviceConsoleUrl(o.getServiceConsoleUrl()) + .timeCreated(o.getTimeCreated()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The connection string used to connect to the Autonomous Database. The username for the Service Console is ADMIN. Use the password you entered when creating the Autonomous Database for the password value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionStrings") + AutonomousDatabaseConnectionStrings connectionStrings; + + /** + * The number of CPU cores to be made available to the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + Integer cpuCoreCount; + + /** + * The quantity of data in the database, in terabytes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + Integer dataStorageSizeInTBs; + + /** + * The database name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + String dbName; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * The user-friendly name for the Autonomous Database. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + /** + * The Oracle license model that applies to the Oracle Autonomous Database. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LicenseModel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Oracle license model that applies to the Oracle Autonomous Database. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + LicenseModel licenseModel; + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + String lifecycleDetails; + /** + * The current state of the database. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Provisioning("PROVISIONING"), + Available("AVAILABLE"), + Stopping("STOPPING"), + Stopped("STOPPED"), + Starting("STARTING"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + Unavailable("UNAVAILABLE"), + RestoreInProgress("RESTORE_IN_PROGRESS"), + BackupInProgress("BACKUP_IN_PROGRESS"), + ScaleInProgress("SCALE_IN_PROGRESS"), + AvailableNeedsAttention("AVAILABLE_NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private 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 database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * The URL of the Service Console for the Autonomous Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceConsoleUrl") + String serviceConsoleUrl; + + /** + * The date and time the database was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseBackup.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseBackup.java new file mode 100644 index 00000000000..4e571f773dd --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseBackup.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * An Autonomous Database backup. + * 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDatabaseBackup.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AutonomousDatabaseBackup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabaseId") + private String autonomousDatabaseId; + + public Builder autonomousDatabaseId(String autonomousDatabaseId) { + this.autonomousDatabaseId = autonomousDatabaseId; + this.__explicitlySet__.add("autonomousDatabaseId"); + 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("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isAutomatic") + private Boolean isAutomatic; + + public Builder isAutomatic(Boolean isAutomatic) { + this.isAutomatic = isAutomatic; + this.__explicitlySet__.add("isAutomatic"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + 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("timeEnded") + private java.util.Date timeEnded; + + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDatabaseBackup build() { + AutonomousDatabaseBackup __instance__ = + new AutonomousDatabaseBackup( + autonomousDatabaseId, + compartmentId, + displayName, + id, + isAutomatic, + lifecycleDetails, + lifecycleState, + timeEnded, + timeStarted, + type); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDatabaseBackup o) { + Builder copiedBuilder = + autonomousDatabaseId(o.getAutonomousDatabaseId()) + .compartmentId(o.getCompartmentId()) + .displayName(o.getDisplayName()) + .id(o.getId()) + .isAutomatic(o.getIsAutomatic()) + .lifecycleDetails(o.getLifecycleDetails()) + .lifecycleState(o.getLifecycleState()) + .timeEnded(o.getTimeEnded()) + .timeStarted(o.getTimeStarted()) + .type(o.getType()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabaseId") + String autonomousDatabaseId; + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The user-friendly name for the backup. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * Indicates whether the backup is user-initiated or automatic. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutomatic") + Boolean isAutomatic; + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + String lifecycleDetails; + /** + * The current state of the backup. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Creating("CREATING"), + 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 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 backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * The date and time the backup completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + java.util.Date timeEnded; + + /** + * The date and time the backup started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + java.util.Date timeStarted; + /** + * The type of backup. + **/ + @lombok.extern.slf4j.Slf4j + public enum Type { + Incremental("INCREMENTAL"), + Full("FULL"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The type of backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + Type type; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseBackupSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseBackupSummary.java new file mode 100644 index 00000000000..8b34b648e1a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseBackupSummary.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * An Autonomous Database backup. + * 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDatabaseBackupSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AutonomousDatabaseBackupSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabaseId") + private String autonomousDatabaseId; + + public Builder autonomousDatabaseId(String autonomousDatabaseId) { + this.autonomousDatabaseId = autonomousDatabaseId; + this.__explicitlySet__.add("autonomousDatabaseId"); + 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("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isAutomatic") + private Boolean isAutomatic; + + public Builder isAutomatic(Boolean isAutomatic) { + this.isAutomatic = isAutomatic; + this.__explicitlySet__.add("isAutomatic"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + 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("timeEnded") + private java.util.Date timeEnded; + + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDatabaseBackupSummary build() { + AutonomousDatabaseBackupSummary __instance__ = + new AutonomousDatabaseBackupSummary( + autonomousDatabaseId, + compartmentId, + displayName, + id, + isAutomatic, + lifecycleDetails, + lifecycleState, + timeEnded, + timeStarted, + type); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDatabaseBackupSummary o) { + Builder copiedBuilder = + autonomousDatabaseId(o.getAutonomousDatabaseId()) + .compartmentId(o.getCompartmentId()) + .displayName(o.getDisplayName()) + .id(o.getId()) + .isAutomatic(o.getIsAutomatic()) + .lifecycleDetails(o.getLifecycleDetails()) + .lifecycleState(o.getLifecycleState()) + .timeEnded(o.getTimeEnded()) + .timeStarted(o.getTimeStarted()) + .type(o.getType()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabaseId") + String autonomousDatabaseId; + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The user-friendly name for the backup. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * Indicates whether the backup is user-initiated or automatic. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutomatic") + Boolean isAutomatic; + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + String lifecycleDetails; + /** + * The current state of the backup. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Creating("CREATING"), + 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 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 backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * The date and time the backup completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + java.util.Date timeEnded; + + /** + * The date and time the backup started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + java.util.Date timeStarted; + /** + * The type of backup. + **/ + @lombok.extern.slf4j.Slf4j + public enum Type { + Incremental("INCREMENTAL"), + Full("FULL"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The type of backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + Type type; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseConnectionStrings.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseConnectionStrings.java new file mode 100644 index 00000000000..6236459a4db --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseConnectionStrings.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * Connection strings to connect to an Oracle Autonomous Database. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDatabaseConnectionStrings.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AutonomousDatabaseConnectionStrings { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("high") + private String high; + + public Builder high(String high) { + this.high = high; + this.__explicitlySet__.add("high"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("low") + private String low; + + public Builder low(String low) { + this.low = low; + this.__explicitlySet__.add("low"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("medium") + private String medium; + + public Builder medium(String medium) { + this.medium = medium; + this.__explicitlySet__.add("medium"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDatabaseConnectionStrings build() { + AutonomousDatabaseConnectionStrings __instance__ = + new AutonomousDatabaseConnectionStrings(high, low, medium); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDatabaseConnectionStrings o) { + Builder copiedBuilder = high(o.getHigh()).low(o.getLow()).medium(o.getMedium()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("high") + String high; + + /** + * The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("low") + String low; + + /** + * The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("medium") + String medium; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSummary.java new file mode 100644 index 00000000000..e6f894bba36 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSummary.java @@ -0,0 +1,404 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * An Oracle Autonomous Database. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDatabaseSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AutonomousDatabaseSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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("connectionStrings") + private AutonomousDatabaseConnectionStrings connectionStrings; + + public Builder connectionStrings(AutonomousDatabaseConnectionStrings connectionStrings) { + this.connectionStrings = connectionStrings; + this.__explicitlySet__.add("connectionStrings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + private Integer cpuCoreCount; + + public Builder cpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + this.__explicitlySet__.add("cpuCoreCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + private Integer dataStorageSizeInTBs; + + public Builder dataStorageSizeInTBs(Integer dataStorageSizeInTBs) { + this.dataStorageSizeInTBs = dataStorageSizeInTBs; + this.__explicitlySet__.add("dataStorageSizeInTBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + private String dbName; + + public Builder dbName(String dbName) { + this.dbName = dbName; + this.__explicitlySet__.add("dbName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("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("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("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + 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("serviceConsoleUrl") + private String serviceConsoleUrl; + + public Builder serviceConsoleUrl(String serviceConsoleUrl) { + this.serviceConsoleUrl = serviceConsoleUrl; + this.__explicitlySet__.add("serviceConsoleUrl"); + 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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDatabaseSummary build() { + AutonomousDatabaseSummary __instance__ = + new AutonomousDatabaseSummary( + compartmentId, + connectionStrings, + cpuCoreCount, + dataStorageSizeInTBs, + dbName, + definedTags, + displayName, + freeformTags, + id, + licenseModel, + lifecycleDetails, + lifecycleState, + serviceConsoleUrl, + timeCreated); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDatabaseSummary o) { + Builder copiedBuilder = + compartmentId(o.getCompartmentId()) + .connectionStrings(o.getConnectionStrings()) + .cpuCoreCount(o.getCpuCoreCount()) + .dataStorageSizeInTBs(o.getDataStorageSizeInTBs()) + .dbName(o.getDbName()) + .definedTags(o.getDefinedTags()) + .displayName(o.getDisplayName()) + .freeformTags(o.getFreeformTags()) + .id(o.getId()) + .licenseModel(o.getLicenseModel()) + .lifecycleDetails(o.getLifecycleDetails()) + .lifecycleState(o.getLifecycleState()) + .serviceConsoleUrl(o.getServiceConsoleUrl()) + .timeCreated(o.getTimeCreated()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The connection string used to connect to the Autonomous Database. The username for the Service Console is ADMIN. Use the password you entered when creating the Autonomous Database for the password value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionStrings") + AutonomousDatabaseConnectionStrings connectionStrings; + + /** + * The number of CPU cores to be made available to the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + Integer cpuCoreCount; + + /** + * The quantity of data in the database, in terabytes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + Integer dataStorageSizeInTBs; + + /** + * The database name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + String dbName; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * The user-friendly name for the Autonomous Database. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + /** + * The Oracle license model that applies to the Oracle Autonomous Database. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LicenseModel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Oracle license model that applies to the Oracle Autonomous Database. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + LicenseModel licenseModel; + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + String lifecycleDetails; + /** + * The current state of the database. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Provisioning("PROVISIONING"), + Available("AVAILABLE"), + Stopping("STOPPING"), + Stopped("STOPPED"), + Starting("STARTING"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + Unavailable("UNAVAILABLE"), + RestoreInProgress("RESTORE_IN_PROGRESS"), + BackupInProgress("BACKUP_IN_PROGRESS"), + ScaleInProgress("SCALE_IN_PROGRESS"), + AvailableNeedsAttention("AVAILABLE_NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private 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 database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * The URL of the Service Console for the Autonomous Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceConsoleUrl") + String serviceConsoleUrl; + + /** + * The date and time the database was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDataWarehouseBackupDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDataWarehouseBackupDetails.java new file mode 100644 index 00000000000..8d41aff3984 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDataWarehouseBackupDetails.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * Details to create an Oracle Autonomous Data Warehouse backup. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousDataWarehouseBackupDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateAutonomousDataWarehouseBackupDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDataWarehouseId") + private String autonomousDataWarehouseId; + + public Builder autonomousDataWarehouseId(String autonomousDataWarehouseId) { + this.autonomousDataWarehouseId = autonomousDataWarehouseId; + this.__explicitlySet__.add("autonomousDataWarehouseId"); + 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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousDataWarehouseBackupDetails build() { + CreateAutonomousDataWarehouseBackupDetails __instance__ = + new CreateAutonomousDataWarehouseBackupDetails( + autonomousDataWarehouseId, displayName); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousDataWarehouseBackupDetails o) { + Builder copiedBuilder = + autonomousDataWarehouseId(o.getAutonomousDataWarehouseId()) + .displayName(o.getDisplayName()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Data Warehouse backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDataWarehouseId") + String autonomousDataWarehouseId; + + /** + * The user-friendly name for the backup. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDataWarehouseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDataWarehouseDetails.java new file mode 100644 index 00000000000..cdd54116dac --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDataWarehouseDetails.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * Details to create an Oracle Autonomous Data Warehouse. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousDataWarehouseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateAutonomousDataWarehouseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private String adminPassword; + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + 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("cpuCoreCount") + private Integer cpuCoreCount; + + public Builder cpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + this.__explicitlySet__.add("cpuCoreCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + private Integer dataStorageSizeInTBs; + + public Builder dataStorageSizeInTBs(Integer dataStorageSizeInTBs) { + this.dataStorageSizeInTBs = dataStorageSizeInTBs; + this.__explicitlySet__.add("dataStorageSizeInTBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + private String dbName; + + public Builder dbName(String dbName) { + this.dbName = dbName; + this.__explicitlySet__.add("dbName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("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("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("licenseModel") + private LicenseModel licenseModel; + + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousDataWarehouseDetails build() { + CreateAutonomousDataWarehouseDetails __instance__ = + new CreateAutonomousDataWarehouseDetails( + adminPassword, + compartmentId, + cpuCoreCount, + dataStorageSizeInTBs, + dbName, + definedTags, + displayName, + freeformTags, + licenseModel); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousDataWarehouseDetails o) { + Builder copiedBuilder = + adminPassword(o.getAdminPassword()) + .compartmentId(o.getCompartmentId()) + .cpuCoreCount(o.getCpuCoreCount()) + .dataStorageSizeInTBs(o.getDataStorageSizeInTBs()) + .dbName(o.getDbName()) + .definedTags(o.getDefinedTags()) + .displayName(o.getDisplayName()) + .freeformTags(o.getFreeformTags()) + .licenseModel(o.getLicenseModel()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A strong password for Admin. The password must be between 12 and 60 characters long, and must contain at least 1 uppercase, 1 lowercase and 2 numeric characters. It cannot contain the double quote symbol (\"). It must be different than the last 4 passwords. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + String adminPassword; + + /** + * The Oracle Cloud ID (OCID) of the compartment of the DB system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The number of CPU Cores to be made available to the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + Integer cpuCoreCount; + + /** + * Size, in terabytes, of the data volume that will be created and attached to the database. This storage can later be scaled up if needed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + Integer dataStorageSizeInTBs; + + /** + * The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + String dbName; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * The user-friendly name for the Autonomous Data Warehouse. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + /** + * The Oracle license model that applies to the Oracle Autonomous Data Warehouse. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + map.put(v.getValue(), v); + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid LicenseModel: " + key); + } + }; + /** + * The Oracle license model that applies to the Oracle Autonomous Data Warehouse. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + LicenseModel licenseModel; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseBackupDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseBackupDetails.java new file mode 100644 index 00000000000..81f272db6f7 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseBackupDetails.java @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * Details to create an Oracle Autonomous Database backup. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousDatabaseBackupDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateAutonomousDatabaseBackupDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabaseId") + private String autonomousDatabaseId; + + public Builder autonomousDatabaseId(String autonomousDatabaseId) { + this.autonomousDatabaseId = autonomousDatabaseId; + this.__explicitlySet__.add("autonomousDatabaseId"); + 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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousDatabaseBackupDetails build() { + CreateAutonomousDatabaseBackupDetails __instance__ = + new CreateAutonomousDatabaseBackupDetails(autonomousDatabaseId, displayName); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousDatabaseBackupDetails o) { + Builder copiedBuilder = + autonomousDatabaseId(o.getAutonomousDatabaseId()) + .displayName(o.getDisplayName()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabaseId") + String autonomousDatabaseId; + + /** + * The user-friendly name for the backup. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseDetails.java new file mode 100644 index 00000000000..0a2eddd49ae --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseDetails.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * Details to create an Oracle Autonomous Database. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateAutonomousDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private String adminPassword; + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + 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("cpuCoreCount") + private Integer cpuCoreCount; + + public Builder cpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + this.__explicitlySet__.add("cpuCoreCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + private Integer dataStorageSizeInTBs; + + public Builder dataStorageSizeInTBs(Integer dataStorageSizeInTBs) { + this.dataStorageSizeInTBs = dataStorageSizeInTBs; + this.__explicitlySet__.add("dataStorageSizeInTBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + private String dbName; + + public Builder dbName(String dbName) { + this.dbName = dbName; + this.__explicitlySet__.add("dbName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("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("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("licenseModel") + private LicenseModel licenseModel; + + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousDatabaseDetails build() { + CreateAutonomousDatabaseDetails __instance__ = + new CreateAutonomousDatabaseDetails( + adminPassword, + compartmentId, + cpuCoreCount, + dataStorageSizeInTBs, + dbName, + definedTags, + displayName, + freeformTags, + licenseModel); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousDatabaseDetails o) { + Builder copiedBuilder = + adminPassword(o.getAdminPassword()) + .compartmentId(o.getCompartmentId()) + .cpuCoreCount(o.getCpuCoreCount()) + .dataStorageSizeInTBs(o.getDataStorageSizeInTBs()) + .dbName(o.getDbName()) + .definedTags(o.getDefinedTags()) + .displayName(o.getDisplayName()) + .freeformTags(o.getFreeformTags()) + .licenseModel(o.getLicenseModel()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A strong password for Admin. The password must be between 12 and 60 characters long, and must contain at least 1 uppercase, 1 lowercase and 2 numeric characters. It cannot contain the double quote symbol (\"). It must be different than the last 4 passwords. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + String adminPassword; + + /** + * The Oracle Cloud ID (OCID) of the compartment of the DB system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The number of CPU Cores to be made available to the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + Integer cpuCoreCount; + + /** + * Size, in terabytes, of the data volume that will be created and attached to the database. This storage can later be scaled up if needed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + Integer dataStorageSizeInTBs; + + /** + * The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + String dbName; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * The user-friendly name for the Autonomous Database. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + /** + * The Oracle license model that applies to the Oracle Autonomous Database. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + map.put(v.getValue(), v); + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid LicenseModel: " + key); + } + }; + /** + * The Oracle license model that applies to the Oracle Autonomous Database. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + LicenseModel licenseModel; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystem.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystem.java index 78a15dc5155..a55b5315836 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystem.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystem.java @@ -605,7 +605,7 @@ public static DiskRedundancy create(String key) { @com.fasterxml.jackson.annotation.JsonProperty("lastPatchHistoryEntryId") String lastPatchHistoryEntryId; /** - * The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + * The Oracle license model that applies to all the databases on the DB System. The default is BRING_YOUR_OWN_LICENSE. * **/ @lombok.extern.slf4j.Slf4j @@ -652,7 +652,7 @@ public static LicenseModel create(String key) { } }; /** - * The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + * The Oracle license model that applies to all the databases on the DB System. The default is BRING_YOUR_OWN_LICENSE. * **/ @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystemSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystemSummary.java index 546196f2f4b..34ed23035b8 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystemSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystemSummary.java @@ -605,7 +605,7 @@ public static DiskRedundancy create(String key) { @com.fasterxml.jackson.annotation.JsonProperty("lastPatchHistoryEntryId") String lastPatchHistoryEntryId; /** - * The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + * The Oracle license model that applies to all the databases on the DB System. The default is BRING_YOUR_OWN_LICENSE. * **/ @lombok.extern.slf4j.Slf4j @@ -652,7 +652,7 @@ public static LicenseModel create(String key) { } }; /** - * The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + * The Oracle license model that applies to all the databases on the DB System. The default is BRING_YOUR_OWN_LICENSE. * **/ @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemDetails.java index 907699e6223..a650eae76d9 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemDetails.java @@ -417,7 +417,7 @@ public static DiskRedundancy create(String key) { @com.fasterxml.jackson.annotation.JsonProperty("diskRedundancy") DiskRedundancy diskRedundancy; /** - * The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + * The Oracle license model that applies to all the databases on the DB System. The default is BRING_YOUR_OWN_LICENSE. * **/ public enum LicenseModel { @@ -453,7 +453,7 @@ public static LicenseModel create(String key) { } }; /** - * The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + * The Oracle license model that applies to all the databases on the DB System. The default is BRING_YOUR_OWN_LICENSE. * **/ @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromBackupDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromBackupDetails.java index 05ccd2e2a94..7139ab286ea 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromBackupDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromBackupDetails.java @@ -417,7 +417,7 @@ public static DiskRedundancy create(String key) { @com.fasterxml.jackson.annotation.JsonProperty("diskRedundancy") DiskRedundancy diskRedundancy; /** - * The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + * The Oracle license model that applies to all the databases on the DB System. The default is BRING_YOUR_OWN_LICENSE. * **/ public enum LicenseModel { @@ -453,7 +453,7 @@ public static LicenseModel create(String key) { } }; /** - * The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + * The Oracle license model that applies to all the databases on the DB System. The default is BRING_YOUR_OWN_LICENSE. * **/ @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/RestoreAutonomousDataWarehouseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/RestoreAutonomousDataWarehouseDetails.java new file mode 100644 index 00000000000..52575d22452 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/RestoreAutonomousDataWarehouseDetails.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * Details to restore an Oracle Autonomous Data Warehouse. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RestoreAutonomousDataWarehouseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class RestoreAutonomousDataWarehouseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + 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 RestoreAutonomousDataWarehouseDetails build() { + RestoreAutonomousDataWarehouseDetails __instance__ = + new RestoreAutonomousDataWarehouseDetails(timestamp); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RestoreAutonomousDataWarehouseDetails o) { + Builder copiedBuilder = timestamp(o.getTimestamp()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The time to restore the database to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + java.util.Date timestamp; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/RestoreAutonomousDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/RestoreAutonomousDatabaseDetails.java new file mode 100644 index 00000000000..1f51d0b9968 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/RestoreAutonomousDatabaseDetails.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * Details to restore an Oracle Autonomous Database. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RestoreAutonomousDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class RestoreAutonomousDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + 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 RestoreAutonomousDatabaseDetails build() { + RestoreAutonomousDatabaseDetails __instance__ = + new RestoreAutonomousDatabaseDetails(timestamp); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RestoreAutonomousDatabaseDetails o) { + Builder copiedBuilder = timestamp(o.getTimestamp()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The time to restore the database to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + java.util.Date timestamp; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDataWarehouseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDataWarehouseDetails.java new file mode 100644 index 00000000000..fd2775aa242 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDataWarehouseDetails.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * Details to update an Oracle Autonomous Data Warehouse. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateAutonomousDataWarehouseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateAutonomousDataWarehouseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private String adminPassword; + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + private Integer cpuCoreCount; + + public Builder cpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + this.__explicitlySet__.add("cpuCoreCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + private Integer dataStorageSizeInTBs; + + public Builder dataStorageSizeInTBs(Integer dataStorageSizeInTBs) { + this.dataStorageSizeInTBs = dataStorageSizeInTBs; + this.__explicitlySet__.add("dataStorageSizeInTBs"); + 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("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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateAutonomousDataWarehouseDetails build() { + UpdateAutonomousDataWarehouseDetails __instance__ = + new UpdateAutonomousDataWarehouseDetails( + adminPassword, + cpuCoreCount, + dataStorageSizeInTBs, + definedTags, + displayName, + freeformTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateAutonomousDataWarehouseDetails o) { + Builder copiedBuilder = + adminPassword(o.getAdminPassword()) + .cpuCoreCount(o.getCpuCoreCount()) + .dataStorageSizeInTBs(o.getDataStorageSizeInTBs()) + .definedTags(o.getDefinedTags()) + .displayName(o.getDisplayName()) + .freeformTags(o.getFreeformTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A strong password for Admin. The password must be between 12 and 60 characters long, and must contain at least 1 uppercase, 1 lowercase and 2 numeric characters. It cannot contain the double quote symbol (\"). It must be different than the last 4 passwords. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + String adminPassword; + + /** + * The number of CPU Cores to be made available to the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + Integer cpuCoreCount; + + /** + * Size, in TBs, of the data volume that will be attached to the database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + Integer dataStorageSizeInTBs; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * The user-friendly name for the Autonomous Data Warehouse. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDatabaseDetails.java new file mode 100644 index 00000000000..526e2a0290c --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDatabaseDetails.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * Details to update an Oracle Autonomous Database. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateAutonomousDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateAutonomousDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private String adminPassword; + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + private Integer cpuCoreCount; + + public Builder cpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + this.__explicitlySet__.add("cpuCoreCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + private Integer dataStorageSizeInTBs; + + public Builder dataStorageSizeInTBs(Integer dataStorageSizeInTBs) { + this.dataStorageSizeInTBs = dataStorageSizeInTBs; + this.__explicitlySet__.add("dataStorageSizeInTBs"); + 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("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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateAutonomousDatabaseDetails build() { + UpdateAutonomousDatabaseDetails __instance__ = + new UpdateAutonomousDatabaseDetails( + adminPassword, + cpuCoreCount, + dataStorageSizeInTBs, + definedTags, + displayName, + freeformTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateAutonomousDatabaseDetails o) { + Builder copiedBuilder = + adminPassword(o.getAdminPassword()) + .cpuCoreCount(o.getCpuCoreCount()) + .dataStorageSizeInTBs(o.getDataStorageSizeInTBs()) + .definedTags(o.getDefinedTags()) + .displayName(o.getDisplayName()) + .freeformTags(o.getFreeformTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A strong password for Admin. The password must be between 12 and 60 characters long, and must contain at least 1 uppercase, 1 lowercase and 2 numeric characters. It cannot contain the double quote symbol (\"). It must be different than the last 4 passwords. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + String adminPassword; + + /** + * The number of CPU Cores to be made available to the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + Integer cpuCoreCount; + + /** + * Size, in TBs, of the data volume that will be attached to the database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + Integer dataStorageSizeInTBs; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * The user-friendly name for the Autonomous Database. The name does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateAutonomousDataWarehouseBackupRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateAutonomousDataWarehouseBackupRequest.java new file mode 100644 index 00000000000..c04963152db --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateAutonomousDataWarehouseBackupRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CreateAutonomousDataWarehouseBackupRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Request to create a new Autonomous Data Warehouse backup. + */ + private CreateAutonomousDataWarehouseBackupDetails createAutonomousDataWarehouseBackupDetails; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAutonomousDataWarehouseBackupRequest o) { + createAutonomousDataWarehouseBackupDetails( + o.getCreateAutonomousDataWarehouseBackupDetails()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of CreateAutonomousDataWarehouseBackupRequest 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 CreateAutonomousDataWarehouseBackupRequest + */ + public CreateAutonomousDataWarehouseBackupRequest build() { + CreateAutonomousDataWarehouseBackupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateAutonomousDataWarehouseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateAutonomousDataWarehouseRequest.java new file mode 100644 index 00000000000..a159ebb922e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateAutonomousDataWarehouseRequest.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CreateAutonomousDataWarehouseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Request to create a new Autonomous Data Warehouse. + */ + private CreateAutonomousDataWarehouseDetails createAutonomousDataWarehouseDetails; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAutonomousDataWarehouseRequest o) { + createAutonomousDataWarehouseDetails(o.getCreateAutonomousDataWarehouseDetails()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of CreateAutonomousDataWarehouseRequest 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 CreateAutonomousDataWarehouseRequest + */ + public CreateAutonomousDataWarehouseRequest build() { + CreateAutonomousDataWarehouseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateAutonomousDatabaseBackupRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateAutonomousDatabaseBackupRequest.java new file mode 100644 index 00000000000..2340a98e503 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateAutonomousDatabaseBackupRequest.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CreateAutonomousDatabaseBackupRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Request to create a new Autonomous Database backup. + */ + private CreateAutonomousDatabaseBackupDetails createAutonomousDatabaseBackupDetails; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAutonomousDatabaseBackupRequest o) { + createAutonomousDatabaseBackupDetails(o.getCreateAutonomousDatabaseBackupDetails()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of CreateAutonomousDatabaseBackupRequest 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 CreateAutonomousDatabaseBackupRequest + */ + public CreateAutonomousDatabaseBackupRequest build() { + CreateAutonomousDatabaseBackupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateAutonomousDatabaseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateAutonomousDatabaseRequest.java new file mode 100644 index 00000000000..9572faa1939 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateAutonomousDatabaseRequest.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CreateAutonomousDatabaseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Request to create a new Autonomous Database. + */ + private CreateAutonomousDatabaseDetails createAutonomousDatabaseDetails; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAutonomousDatabaseRequest o) { + createAutonomousDatabaseDetails(o.getCreateAutonomousDatabaseDetails()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of CreateAutonomousDatabaseRequest 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 CreateAutonomousDatabaseRequest + */ + public CreateAutonomousDatabaseRequest build() { + CreateAutonomousDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteAutonomousDataWarehouseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteAutonomousDataWarehouseRequest.java new file mode 100644 index 00000000000..c55907bbf7b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteAutonomousDataWarehouseRequest.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class DeleteAutonomousDataWarehouseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDataWarehouseId; + + /** + * 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAutonomousDataWarehouseRequest o) { + autonomousDataWarehouseId(o.getAutonomousDataWarehouseId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of DeleteAutonomousDataWarehouseRequest 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 DeleteAutonomousDataWarehouseRequest + */ + public DeleteAutonomousDataWarehouseRequest build() { + DeleteAutonomousDataWarehouseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteAutonomousDatabaseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteAutonomousDatabaseRequest.java new file mode 100644 index 00000000000..69301ea65ea --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteAutonomousDatabaseRequest.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class DeleteAutonomousDatabaseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDatabaseId; + + /** + * 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAutonomousDatabaseRequest o) { + autonomousDatabaseId(o.getAutonomousDatabaseId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of DeleteAutonomousDatabaseRequest 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 DeleteAutonomousDatabaseRequest + */ + public DeleteAutonomousDatabaseRequest build() { + DeleteAutonomousDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousDataWarehouseBackupRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousDataWarehouseBackupRequest.java new file mode 100644 index 00000000000..a38f19d02ab --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousDataWarehouseBackupRequest.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetAutonomousDataWarehouseBackupRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Data Warehouse backup. + */ + private String autonomousDataWarehouseBackupId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAutonomousDataWarehouseBackupRequest o) { + autonomousDataWarehouseBackupId(o.getAutonomousDataWarehouseBackupId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of GetAutonomousDataWarehouseBackupRequest 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 GetAutonomousDataWarehouseBackupRequest + */ + public GetAutonomousDataWarehouseBackupRequest build() { + GetAutonomousDataWarehouseBackupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousDataWarehouseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousDataWarehouseRequest.java new file mode 100644 index 00000000000..2271e687bbc --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousDataWarehouseRequest.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetAutonomousDataWarehouseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDataWarehouseId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAutonomousDataWarehouseRequest o) { + autonomousDataWarehouseId(o.getAutonomousDataWarehouseId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of GetAutonomousDataWarehouseRequest 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 GetAutonomousDataWarehouseRequest + */ + public GetAutonomousDataWarehouseRequest build() { + GetAutonomousDataWarehouseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousDatabaseBackupRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousDatabaseBackupRequest.java new file mode 100644 index 00000000000..1adffffa226 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousDatabaseBackupRequest.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetAutonomousDatabaseBackupRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database backup. + */ + private String autonomousDatabaseBackupId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAutonomousDatabaseBackupRequest o) { + autonomousDatabaseBackupId(o.getAutonomousDatabaseBackupId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of GetAutonomousDatabaseBackupRequest 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 GetAutonomousDatabaseBackupRequest + */ + public GetAutonomousDatabaseBackupRequest build() { + GetAutonomousDatabaseBackupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousDatabaseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousDatabaseRequest.java new file mode 100644 index 00000000000..6d98b59cf35 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetAutonomousDatabaseRequest.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetAutonomousDatabaseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDatabaseId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAutonomousDatabaseRequest o) { + autonomousDatabaseId(o.getAutonomousDatabaseId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of GetAutonomousDatabaseRequest 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 GetAutonomousDatabaseRequest + */ + public GetAutonomousDatabaseRequest build() { + GetAutonomousDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDataWarehouseBackupsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDataWarehouseBackupsRequest.java new file mode 100644 index 00000000000..458ecd27c0c --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDataWarehouseBackupsRequest.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListAutonomousDataWarehouseBackupsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDataWarehouseId; + + /** + * The compartment OCID. + */ + private String compartmentId; + + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + *

+ **Note:** If you do not include the availability domain filter, the resources are grouped by availability domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + *

+ **Note:** If you do not include the availability domain filter, 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 RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * 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 RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private AutonomousDataWarehouseBackupSummary.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAutonomousDataWarehouseBackupsRequest o) { + autonomousDataWarehouseId(o.getAutonomousDataWarehouseId()); + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of ListAutonomousDataWarehouseBackupsRequest 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 ListAutonomousDataWarehouseBackupsRequest + */ + public ListAutonomousDataWarehouseBackupsRequest build() { + ListAutonomousDataWarehouseBackupsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDataWarehousesRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDataWarehousesRequest.java new file mode 100644 index 00000000000..467b9cc5404 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDataWarehousesRequest.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListAutonomousDataWarehousesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The compartment [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId; + + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + *

+ **Note:** If you do not include the availability domain filter, the resources are grouped by availability domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + *

+ **Note:** If you do not include the availability domain filter, 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 RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * 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 RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private AutonomousDataWarehouseSummary.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAutonomousDataWarehousesRequest o) { + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of ListAutonomousDataWarehousesRequest 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 ListAutonomousDataWarehousesRequest + */ + public ListAutonomousDataWarehousesRequest build() { + ListAutonomousDataWarehousesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabaseBackupsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabaseBackupsRequest.java new file mode 100644 index 00000000000..9e218454801 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabaseBackupsRequest.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListAutonomousDatabaseBackupsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDatabaseId; + + /** + * The compartment OCID. + */ + private String compartmentId; + + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + *

+ **Note:** If you do not include the availability domain filter, the resources are grouped by availability domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + *

+ **Note:** If you do not include the availability domain filter, 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 RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * 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 RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private AutonomousDatabaseBackupSummary.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAutonomousDatabaseBackupsRequest o) { + autonomousDatabaseId(o.getAutonomousDatabaseId()); + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of ListAutonomousDatabaseBackupsRequest 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 ListAutonomousDatabaseBackupsRequest + */ + public ListAutonomousDatabaseBackupsRequest build() { + ListAutonomousDatabaseBackupsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabasesRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabasesRequest.java new file mode 100644 index 00000000000..31bac00efe8 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabasesRequest.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListAutonomousDatabasesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The compartment [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId; + + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + *

+ **Note:** If you do not include the availability domain filter, the resources are grouped by availability domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + *

+ **Note:** If you do not include the availability domain filter, 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 RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * 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 RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private AutonomousDatabaseSummary.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAutonomousDatabasesRequest o) { + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of ListAutonomousDatabasesRequest 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 ListAutonomousDatabasesRequest + */ + public ListAutonomousDatabasesRequest build() { + ListAutonomousDatabasesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/RestoreAutonomousDataWarehouseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/RestoreAutonomousDataWarehouseRequest.java new file mode 100644 index 00000000000..8d8a537ca48 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/RestoreAutonomousDataWarehouseRequest.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class RestoreAutonomousDataWarehouseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDataWarehouseId; + + /** + * Request to perform an Autonomous Data Warehouse restore. + */ + private RestoreAutonomousDataWarehouseDetails restoreAutonomousDataWarehouseDetails; + + /** + * 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RestoreAutonomousDataWarehouseRequest o) { + autonomousDataWarehouseId(o.getAutonomousDataWarehouseId()); + restoreAutonomousDataWarehouseDetails(o.getRestoreAutonomousDataWarehouseDetails()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of RestoreAutonomousDataWarehouseRequest 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 RestoreAutonomousDataWarehouseRequest + */ + public RestoreAutonomousDataWarehouseRequest build() { + RestoreAutonomousDataWarehouseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/RestoreAutonomousDatabaseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/RestoreAutonomousDatabaseRequest.java new file mode 100644 index 00000000000..18e04ef2159 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/RestoreAutonomousDatabaseRequest.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class RestoreAutonomousDatabaseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDatabaseId; + + /** + * Request to perform an Autonomous Database restore. + */ + private RestoreAutonomousDatabaseDetails restoreAutonomousDatabaseDetails; + + /** + * 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RestoreAutonomousDatabaseRequest o) { + autonomousDatabaseId(o.getAutonomousDatabaseId()); + restoreAutonomousDatabaseDetails(o.getRestoreAutonomousDatabaseDetails()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of RestoreAutonomousDatabaseRequest 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 RestoreAutonomousDatabaseRequest + */ + public RestoreAutonomousDatabaseRequest build() { + RestoreAutonomousDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/StartAutonomousDataWarehouseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/StartAutonomousDataWarehouseRequest.java new file mode 100644 index 00000000000..ce0ba69d033 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/StartAutonomousDataWarehouseRequest.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class StartAutonomousDataWarehouseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDataWarehouseId; + + /** + * 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StartAutonomousDataWarehouseRequest o) { + autonomousDataWarehouseId(o.getAutonomousDataWarehouseId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of StartAutonomousDataWarehouseRequest 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 StartAutonomousDataWarehouseRequest + */ + public StartAutonomousDataWarehouseRequest build() { + StartAutonomousDataWarehouseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/StartAutonomousDatabaseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/StartAutonomousDatabaseRequest.java new file mode 100644 index 00000000000..ab1ee836409 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/StartAutonomousDatabaseRequest.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class StartAutonomousDatabaseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDatabaseId; + + /** + * 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StartAutonomousDatabaseRequest o) { + autonomousDatabaseId(o.getAutonomousDatabaseId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of StartAutonomousDatabaseRequest 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 StartAutonomousDatabaseRequest + */ + public StartAutonomousDatabaseRequest build() { + StartAutonomousDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/StopAutonomousDataWarehouseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/StopAutonomousDataWarehouseRequest.java new file mode 100644 index 00000000000..0e84892e66b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/StopAutonomousDataWarehouseRequest.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class StopAutonomousDataWarehouseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDataWarehouseId; + + /** + * 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StopAutonomousDataWarehouseRequest o) { + autonomousDataWarehouseId(o.getAutonomousDataWarehouseId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of StopAutonomousDataWarehouseRequest 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 StopAutonomousDataWarehouseRequest + */ + public StopAutonomousDataWarehouseRequest build() { + StopAutonomousDataWarehouseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/StopAutonomousDatabaseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/StopAutonomousDatabaseRequest.java new file mode 100644 index 00000000000..977fe5a3ecd --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/StopAutonomousDatabaseRequest.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class StopAutonomousDatabaseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDatabaseId; + + /** + * 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StopAutonomousDatabaseRequest o) { + autonomousDatabaseId(o.getAutonomousDatabaseId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of StopAutonomousDatabaseRequest 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 StopAutonomousDatabaseRequest + */ + public StopAutonomousDatabaseRequest build() { + StopAutonomousDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateAutonomousDataWarehouseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateAutonomousDataWarehouseRequest.java new file mode 100644 index 00000000000..fd07e421258 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateAutonomousDataWarehouseRequest.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class UpdateAutonomousDataWarehouseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDataWarehouseId; + + /** + * Request to update the properties of an Autonomous Data Warehouse. + */ + private UpdateAutonomousDataWarehouseDetails updateAutonomousDataWarehouseDetails; + + /** + * 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAutonomousDataWarehouseRequest o) { + autonomousDataWarehouseId(o.getAutonomousDataWarehouseId()); + updateAutonomousDataWarehouseDetails(o.getUpdateAutonomousDataWarehouseDetails()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of UpdateAutonomousDataWarehouseRequest 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 UpdateAutonomousDataWarehouseRequest + */ + public UpdateAutonomousDataWarehouseRequest build() { + UpdateAutonomousDataWarehouseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateAutonomousDatabaseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateAutonomousDatabaseRequest.java new file mode 100644 index 00000000000..5c541127f27 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateAutonomousDatabaseRequest.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class UpdateAutonomousDatabaseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDatabaseId; + + /** + * Request to update the properties of an Autonomous Database. + */ + private UpdateAutonomousDatabaseDetails updateAutonomousDatabaseDetails; + + /** + * 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; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAutonomousDatabaseRequest o) { + autonomousDatabaseId(o.getAutonomousDatabaseId()); + updateAutonomousDatabaseDetails(o.getUpdateAutonomousDatabaseDetails()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of UpdateAutonomousDatabaseRequest 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 UpdateAutonomousDatabaseRequest + */ + public UpdateAutonomousDatabaseRequest build() { + UpdateAutonomousDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateAutonomousDataWarehouseBackupResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateAutonomousDataWarehouseBackupResponse.java new file mode 100644 index 00000000000..55bbda0d7dc --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateAutonomousDataWarehouseBackupResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateAutonomousDataWarehouseBackupResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDataWarehouseBackup instance. + */ + private AutonomousDataWarehouseBackup autonomousDataWarehouseBackup; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAutonomousDataWarehouseBackupResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDataWarehouseBackup(o.getAutonomousDataWarehouseBackup()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateAutonomousDataWarehouseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateAutonomousDataWarehouseResponse.java new file mode 100644 index 00000000000..1b0d3dd8da2 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateAutonomousDataWarehouseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateAutonomousDataWarehouseResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDataWarehouse instance. + */ + private AutonomousDataWarehouse autonomousDataWarehouse; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAutonomousDataWarehouseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDataWarehouse(o.getAutonomousDataWarehouse()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateAutonomousDatabaseBackupResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateAutonomousDatabaseBackupResponse.java new file mode 100644 index 00000000000..0ab3e262654 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateAutonomousDatabaseBackupResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateAutonomousDatabaseBackupResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDatabaseBackup instance. + */ + private AutonomousDatabaseBackup autonomousDatabaseBackup; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAutonomousDatabaseBackupResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDatabaseBackup(o.getAutonomousDatabaseBackup()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateAutonomousDatabaseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateAutonomousDatabaseResponse.java new file mode 100644 index 00000000000..02241591100 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateAutonomousDatabaseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateAutonomousDatabaseResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDatabase instance. + */ + private AutonomousDatabase autonomousDatabase; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAutonomousDatabaseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDatabase(o.getAutonomousDatabase()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteAutonomousDataWarehouseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteAutonomousDataWarehouseResponse.java new file mode 100644 index 00000000000..9753aa6a9d4 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteAutonomousDataWarehouseResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteAutonomousDataWarehouseResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAutonomousDataWarehouseResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteAutonomousDatabaseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteAutonomousDatabaseResponse.java new file mode 100644 index 00000000000..063ecb9d484 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteAutonomousDatabaseResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteAutonomousDatabaseResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAutonomousDatabaseResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousDataWarehouseBackupResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousDataWarehouseBackupResponse.java new file mode 100644 index 00000000000..181c07a7b1c --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousDataWarehouseBackupResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetAutonomousDataWarehouseBackupResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDataWarehouseBackup instance. + */ + private AutonomousDataWarehouseBackup autonomousDataWarehouseBackup; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAutonomousDataWarehouseBackupResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDataWarehouseBackup(o.getAutonomousDataWarehouseBackup()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousDataWarehouseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousDataWarehouseResponse.java new file mode 100644 index 00000000000..5dd845067f4 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousDataWarehouseResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetAutonomousDataWarehouseResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned AutonomousDataWarehouse instance. + */ + private AutonomousDataWarehouse autonomousDataWarehouse; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAutonomousDataWarehouseResponse o) { + opcRequestId(o.getOpcRequestId()); + autonomousDataWarehouse(o.getAutonomousDataWarehouse()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousDatabaseBackupResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousDatabaseBackupResponse.java new file mode 100644 index 00000000000..ebfdece4607 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousDatabaseBackupResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetAutonomousDatabaseBackupResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDatabaseBackup instance. + */ + private AutonomousDatabaseBackup autonomousDatabaseBackup; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAutonomousDatabaseBackupResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDatabaseBackup(o.getAutonomousDatabaseBackup()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousDatabaseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousDatabaseResponse.java new file mode 100644 index 00000000000..f910c4b093b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetAutonomousDatabaseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetAutonomousDatabaseResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDatabase instance. + */ + private AutonomousDatabase autonomousDatabase; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAutonomousDatabaseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDatabase(o.getAutonomousDatabase()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDataWarehouseBackupsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDataWarehouseBackupsResponse.java new file mode 100644 index 00000000000..92adaea139e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDataWarehouseBackupsResponse.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListAutonomousDataWarehouseBackupsResponse { + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the `page` parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + * + */ + private String 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; + + /** + * A list of AutonomousDataWarehouseBackupSummary instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAutonomousDataWarehouseBackupsResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDataWarehousesResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDataWarehousesResponse.java new file mode 100644 index 00000000000..1433bdc6652 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDataWarehousesResponse.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListAutonomousDataWarehousesResponse { + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the `page` parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + * + */ + private String 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; + + /** + * A list of AutonomousDataWarehouseSummary instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAutonomousDataWarehousesResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDatabaseBackupsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDatabaseBackupsResponse.java new file mode 100644 index 00000000000..9eda26e0cf1 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDatabaseBackupsResponse.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListAutonomousDatabaseBackupsResponse { + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the `page` parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + * + */ + private String 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; + + /** + * A list of AutonomousDatabaseBackupSummary instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAutonomousDatabaseBackupsResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDatabasesResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDatabasesResponse.java new file mode 100644 index 00000000000..9f0b9aa8c86 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListAutonomousDatabasesResponse.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListAutonomousDatabasesResponse { + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the `page` parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + * + */ + private String 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; + + /** + * A list of AutonomousDatabaseSummary instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAutonomousDatabasesResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/RestoreAutonomousDataWarehouseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/RestoreAutonomousDataWarehouseResponse.java new file mode 100644 index 00000000000..dcc8fcf86b9 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/RestoreAutonomousDataWarehouseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class RestoreAutonomousDataWarehouseResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDataWarehouse instance. + */ + private AutonomousDataWarehouse autonomousDataWarehouse; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RestoreAutonomousDataWarehouseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDataWarehouse(o.getAutonomousDataWarehouse()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/RestoreAutonomousDatabaseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/RestoreAutonomousDatabaseResponse.java new file mode 100644 index 00000000000..56ba96ce57a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/RestoreAutonomousDatabaseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class RestoreAutonomousDatabaseResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDatabase instance. + */ + private AutonomousDatabase autonomousDatabase; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RestoreAutonomousDatabaseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDatabase(o.getAutonomousDatabase()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/StartAutonomousDataWarehouseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/StartAutonomousDataWarehouseResponse.java new file mode 100644 index 00000000000..f24db2c42ca --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/StartAutonomousDataWarehouseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class StartAutonomousDataWarehouseResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDataWarehouse instance. + */ + private AutonomousDataWarehouse autonomousDataWarehouse; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StartAutonomousDataWarehouseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDataWarehouse(o.getAutonomousDataWarehouse()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/StartAutonomousDatabaseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/StartAutonomousDatabaseResponse.java new file mode 100644 index 00000000000..c7d51fdbf29 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/StartAutonomousDatabaseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class StartAutonomousDatabaseResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDatabase instance. + */ + private AutonomousDatabase autonomousDatabase; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StartAutonomousDatabaseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDatabase(o.getAutonomousDatabase()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/StopAutonomousDataWarehouseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/StopAutonomousDataWarehouseResponse.java new file mode 100644 index 00000000000..504251b05d3 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/StopAutonomousDataWarehouseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class StopAutonomousDataWarehouseResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDataWarehouse instance. + */ + private AutonomousDataWarehouse autonomousDataWarehouse; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StopAutonomousDataWarehouseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDataWarehouse(o.getAutonomousDataWarehouse()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/StopAutonomousDatabaseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/StopAutonomousDatabaseResponse.java new file mode 100644 index 00000000000..d34f0886d28 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/StopAutonomousDatabaseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class StopAutonomousDatabaseResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDatabase instance. + */ + private AutonomousDatabase autonomousDatabase; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StopAutonomousDatabaseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDatabase(o.getAutonomousDatabase()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateAutonomousDataWarehouseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateAutonomousDataWarehouseResponse.java new file mode 100644 index 00000000000..8ed81d917aa --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateAutonomousDataWarehouseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateAutonomousDataWarehouseResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDataWarehouse instance. + */ + private AutonomousDataWarehouse autonomousDataWarehouse; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAutonomousDataWarehouseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDataWarehouse(o.getAutonomousDataWarehouse()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateAutonomousDatabaseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateAutonomousDatabaseResponse.java new file mode 100644 index 00000000000..96260df43fb --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateAutonomousDatabaseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateAutonomousDatabaseResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String 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; + + /** + * The returned AutonomousDatabase instance. + */ + private AutonomousDatabase autonomousDatabase; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAutonomousDatabaseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + autonomousDatabase(o.getAutonomousDatabase()); + + return this; + } + } +} diff --git a/bmc-dns/pom.xml b/bmc-dns/pom.xml index f8cfb4a0536..0c1fa94dee5 100644 --- a/bmc-dns/pom.xml +++ b/bmc-dns/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 diff --git a/bmc-email/pom.xml b/bmc-email/pom.xml index 1722a97afc7..7de7c33bad7 100644 --- a/bmc-email/pom.xml +++ b/bmc-email/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 diff --git a/bmc-examples/pom.xml b/bmc-examples/pom.xml index 8ae2d29c2fc..818ee75e0b8 100644 --- a/bmc-examples/pom.xml +++ b/bmc-examples/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 1.2.44 + 1.2.45 pom import diff --git a/bmc-examples/src/main/java/AutonomousDatawarehouseExample.java b/bmc-examples/src/main/java/AutonomousDatawarehouseExample.java new file mode 100644 index 00000000000..4dd3425df77 --- /dev/null +++ b/bmc-examples/src/main/java/AutonomousDatawarehouseExample.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +import com.oracle.bmc.Region; +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.database.DatabaseClient; +import com.oracle.bmc.database.DatabaseWaiters; +import com.oracle.bmc.database.model.AutonomousDataWarehouse; +import com.oracle.bmc.database.model.CreateAutonomousDataWarehouseDetails; +import com.oracle.bmc.database.model.UpdateAutonomousDataWarehouseDetails; +import com.oracle.bmc.database.requests.CreateAutonomousDataWarehouseRequest; +import com.oracle.bmc.database.requests.DeleteAutonomousDataWarehouseRequest; +import com.oracle.bmc.database.requests.GetAutonomousDataWarehouseRequest; +import com.oracle.bmc.database.requests.StartAutonomousDataWarehouseRequest; +import com.oracle.bmc.database.requests.StopAutonomousDataWarehouseRequest; +import com.oracle.bmc.database.requests.UpdateAutonomousDataWarehouseRequest; +import com.oracle.bmc.database.responses.CreateAutonomousDataWarehouseResponse; +import com.oracle.bmc.database.responses.GetAutonomousDataWarehouseResponse; +import com.oracle.bmc.database.responses.UpdateAutonomousDataWarehouseResponse; + +import java.util.Random; + +public class AutonomousDatawarehouseExample { + + public static void main(String[] args) throws Exception { + String configurationFilePath = "~/.oci/config"; + String profile = "DEFAULT"; + + // TODO: Fill in these values + String compartmentId = args[0]; + + AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(configurationFilePath, profile); + + DatabaseClient dbClient = new DatabaseClient(provider); + dbClient.setRegion(Region.US_PHOENIX_1); + + // Create + CreateAutonomousDataWarehouseDetails createRequest = createAdwRequest(compartmentId); + + System.out.println("Creating Autonomous Datawarehouse with request : " + createRequest); + AutonomousDataWarehouse adw = createADW(dbClient, createRequest); + System.out.println("ADW instance is provisioning : " + adw); + + adw = waitForInstanceToBecomeAvailable(dbClient, adw.getId()); + System.out.println("Instance is provisioned:" + adw); + + // Get + adw = + dbClient.getAutonomousDataWarehouse( + GetAutonomousDataWarehouseRequest.builder() + .autonomousDataWarehouseId(adw.getId()) + .build()) + .getAutonomousDataWarehouse(); + System.out.println("GET request returned :" + adw); + + // Scale + UpdateAutonomousDataWarehouseDetails updateRequest = scaleAdwRequest(); + System.out.println("Updating Autonomous Datawarehouse with request : " + updateRequest); + AutonomousDataWarehouse updatedAdw = updateADW(dbClient, updateRequest, adw.getId()); + System.out.println("ADW instance is scaling : " + updatedAdw); + + updatedAdw = waitForInstanceToBecomeAvailable(dbClient, adw.getId()); + System.out.println("Instance is updated:" + updatedAdw); + + // Update Display Name + updateRequest = updateDisplayNameAdwRequest(); + System.out.println("Updating Autonomous Datawarehouse with request : " + updateRequest); + updatedAdw = updateADW(dbClient, updateRequest, adw.getId()); + System.out.println("Instance is updated:" + updatedAdw); + + // Stop + System.out.println("Stopping Autonomous Datawarehouse Shared : " + updatedAdw); + adw = + dbClient.stopAutonomousDataWarehouse( + StopAutonomousDataWarehouseRequest.builder() + .autonomousDataWarehouseId(updatedAdw.getId()) + .build()) + .getAutonomousDataWarehouse(); + adw = waitForInstanceToBeStopped(dbClient, adw.getId()); + System.out.println("Stopped Autonomous Datawarehouse Shared : " + adw); + + // Start + System.out.println("Starting Autonomous Datawarehouse Shared : " + adw); + adw = + dbClient.startAutonomousDataWarehouse( + StartAutonomousDataWarehouseRequest.builder() + .autonomousDataWarehouseId(updatedAdw.getId()) + .build()) + .getAutonomousDataWarehouse(); + adw = waitForInstanceToBecomeAvailable(dbClient, adw.getId()); + System.out.println("Started Autonomous Datawarehouse Shared : " + adw); + + // Delete + System.out.println("Deleting Autonomous Datawarehouse Shared : " + adw); + dbClient.deleteAutonomousDataWarehouse( + DeleteAutonomousDataWarehouseRequest.builder() + .autonomousDataWarehouseId(updatedAdw.getId()) + .build()); + + DatabaseWaiters waiter = dbClient.getWaiters(); + GetAutonomousDataWarehouseResponse response = + waiter.forAutonomousDataWarehouse( + GetAutonomousDataWarehouseRequest.builder() + .autonomousDataWarehouseId(adw.getId()) + .build(), + AutonomousDataWarehouse.LifecycleState.Terminated) + .execute(); + + dbClient.close(); + } + + public static AutonomousDataWarehouse createADW( + DatabaseClient dbClient, CreateAutonomousDataWarehouseDetails request) { + + CreateAutonomousDataWarehouseResponse response = + dbClient.createAutonomousDataWarehouse( + CreateAutonomousDataWarehouseRequest.builder() + .createAutonomousDataWarehouseDetails(request) + .build()); + + return response.getAutonomousDataWarehouse(); + } + + private static AutonomousDataWarehouse waitForInstanceToBecomeAvailable( + DatabaseClient dbClient, String id) throws Exception { + + DatabaseWaiters waiter = dbClient.getWaiters(); + GetAutonomousDataWarehouseResponse response = + waiter.forAutonomousDataWarehouse( + GetAutonomousDataWarehouseRequest.builder() + .autonomousDataWarehouseId(id) + .build(), + AutonomousDataWarehouse.LifecycleState.Available) + .execute(); + + return response.getAutonomousDataWarehouse(); + } + + private static AutonomousDataWarehouse updateADW( + DatabaseClient dbClient, + UpdateAutonomousDataWarehouseDetails updateRequest, + String adwId) { + UpdateAutonomousDataWarehouseResponse response = + dbClient.updateAutonomousDataWarehouse( + UpdateAutonomousDataWarehouseRequest.builder() + .updateAutonomousDataWarehouseDetails(updateRequest) + .autonomousDataWarehouseId(adwId) + .build()); + + return response.getAutonomousDataWarehouse(); + } + + private static AutonomousDataWarehouse waitForInstanceToBeStopped( + DatabaseClient dbClient, String id) throws Exception { + DatabaseWaiters waiter = dbClient.getWaiters(); + GetAutonomousDataWarehouseResponse response = + waiter.forAutonomousDataWarehouse( + GetAutonomousDataWarehouseRequest.builder() + .autonomousDataWarehouseId(id) + .build(), + AutonomousDataWarehouse.LifecycleState.Stopped) + .execute(); + + return response.getAutonomousDataWarehouse(); + } + + private static CreateAutonomousDataWarehouseDetails createAdwRequest(String compartmentId) { + Random rand = new Random(); + return CreateAutonomousDataWarehouseDetails.builder() + .cpuCoreCount(1) + .dataStorageSizeInTBs(1) + .displayName("javaSdkExample") + .adminPassword("DBaaS12345_#") + .dbName("javaSdkExam" + rand.nextInt(500)) + .compartmentId(compartmentId) + .licenseModel(CreateAutonomousDataWarehouseDetails.LicenseModel.LicenseIncluded) + .build(); + } + + private static UpdateAutonomousDataWarehouseDetails scaleAdwRequest() { + return UpdateAutonomousDataWarehouseDetails.builder() + .cpuCoreCount(2) + .dataStorageSizeInTBs(2) + .build(); + } + + private static UpdateAutonomousDataWarehouseDetails updateDisplayNameAdwRequest() { + return UpdateAutonomousDataWarehouseDetails.builder().displayName("newDisplayName").build(); + } +} diff --git a/bmc-examples/src/main/java/AutonomousTransactionProcessingSharedExample.java b/bmc-examples/src/main/java/AutonomousTransactionProcessingSharedExample.java new file mode 100644 index 00000000000..6256485a9ef --- /dev/null +++ b/bmc-examples/src/main/java/AutonomousTransactionProcessingSharedExample.java @@ -0,0 +1,197 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +import com.oracle.bmc.Region; +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.database.DatabaseClient; +import com.oracle.bmc.database.DatabaseWaiters; +import com.oracle.bmc.database.model.AutonomousDatabase; +import com.oracle.bmc.database.model.CreateAutonomousDatabaseDetails; +import com.oracle.bmc.database.model.UpdateAutonomousDatabaseDetails; +import com.oracle.bmc.database.requests.CreateAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.DeleteAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.GetAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.StartAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.StopAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.UpdateAutonomousDatabaseRequest; +import com.oracle.bmc.database.responses.CreateAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.GetAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.UpdateAutonomousDatabaseResponse; + +import java.util.Random; + +public class AutonomousTransactionProcessingSharedExample { + + public static void main(String[] args) throws Exception { + String configurationFilePath = "~/.oci/config"; + String profile = "DEFAULT"; + + // TODO: Fill in these values + String compartmentId = args[0]; + + AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(configurationFilePath, profile); + + DatabaseClient dbClient = new DatabaseClient(provider); + dbClient.setRegion(Region.US_PHOENIX_1); + + // Create + CreateAutonomousDatabaseDetails createRequest = createAtpRequest(compartmentId); + + System.out.println( + "Creating Autonomous Transaction Processing Shared with request : " + + createRequest); + AutonomousDatabase atpShared = createATP(dbClient, createRequest); + System.out.println("ATP Shared instance is provisioning : " + atpShared); + + atpShared = waitForInstanceToBecomeAvailable(dbClient, atpShared.getId()); + System.out.println("Instance is provisioned:" + atpShared); + + // Get + atpShared = + dbClient.getAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(atpShared.getId()) + .build()) + .getAutonomousDatabase(); + System.out.println("GET request returned :" + atpShared); + + // Scale + UpdateAutonomousDatabaseDetails updateRequest = scaleAtpRequest(); + System.out.println( + "Updating Autonomous Transaction Processing Shared with request : " + + updateRequest); + AutonomousDatabase updatedAtpShared = updateATP(dbClient, updateRequest, atpShared.getId()); + System.out.println("ATP Shared instance is scaling : " + updatedAtpShared); + + updatedAtpShared = waitForInstanceToBecomeAvailable(dbClient, atpShared.getId()); + System.out.println("Instance is updated:" + updatedAtpShared); + + // Update Display Name + updateRequest = updateDisplayNameAtpRequest(); + System.out.println( + "Updating Autonomous Transaction Processing Shared with request : " + + updateRequest); + updatedAtpShared = updateATP(dbClient, updateRequest, updatedAtpShared.getId()); + + System.out.println("Instance is updated:" + updatedAtpShared); + + // Stop + System.out.println( + "Stopping Autonomous Transaction Processing Shared : " + updatedAtpShared); + atpShared = + dbClient.stopAutonomousDatabase( + StopAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(updatedAtpShared.getId()) + .build()) + .getAutonomousDatabase(); + atpShared = waitForInstanceToBeStopped(dbClient, atpShared.getId()); + System.out.println("Stopped Autonomous Transaction Processing Shared : " + atpShared); + + // Start + System.out.println("Starting Autonomous Transaction Processing Shared : " + atpShared); + atpShared = + dbClient.startAutonomousDatabase( + StartAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(updatedAtpShared.getId()) + .build()) + .getAutonomousDatabase(); + atpShared = waitForInstanceToBecomeAvailable(dbClient, atpShared.getId()); + System.out.println("Started Autonomous Transaction Processing Shared : " + atpShared); + + // Delete + System.out.println("Deleting Autonomous Transaction Processing Shared : " + atpShared); + dbClient.deleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(updatedAtpShared.getId()) + .build()); + DatabaseWaiters waiter = dbClient.getWaiters(); + GetAutonomousDatabaseResponse response = + waiter.forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(atpShared.getId()) + .build(), + AutonomousDatabase.LifecycleState.Terminated) + .execute(); + + dbClient.close(); + } + + public static AutonomousDatabase createATP( + DatabaseClient dbClient, CreateAutonomousDatabaseDetails request) { + + CreateAutonomousDatabaseResponse response = + dbClient.createAutonomousDatabase( + CreateAutonomousDatabaseRequest.builder() + .createAutonomousDatabaseDetails(request) + .build()); + + return response.getAutonomousDatabase(); + } + + private static AutonomousDatabase waitForInstanceToBecomeAvailable( + DatabaseClient dbClient, String id) throws Exception { + + DatabaseWaiters waiter = dbClient.getWaiters(); + GetAutonomousDatabaseResponse response = + waiter.forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(id) + .build(), + AutonomousDatabase.LifecycleState.Available) + .execute(); + + return response.getAutonomousDatabase(); + } + + private static AutonomousDatabase updateATP( + DatabaseClient dbClient, UpdateAutonomousDatabaseDetails updateRequest, String id) { + UpdateAutonomousDatabaseResponse response = + dbClient.updateAutonomousDatabase( + UpdateAutonomousDatabaseRequest.builder() + .updateAutonomousDatabaseDetails(updateRequest) + .autonomousDatabaseId(id) + .build()); + + return response.getAutonomousDatabase(); + } + + private static AutonomousDatabase waitForInstanceToBeStopped(DatabaseClient dbClient, String id) + throws Exception { + DatabaseWaiters waiter = dbClient.getWaiters(); + GetAutonomousDatabaseResponse response = + waiter.forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(id) + .build(), + AutonomousDatabase.LifecycleState.Stopped) + .execute(); + + return response.getAutonomousDatabase(); + } + + private static CreateAutonomousDatabaseDetails createAtpRequest(String compartmentId) { + Random rand = new Random(); + return CreateAutonomousDatabaseDetails.builder() + .cpuCoreCount(1) + .dataStorageSizeInTBs(1) + .displayName("javaSdkExample") + .adminPassword("DBaaS12345_#") + .dbName("javaSdkExam" + rand.nextInt(500)) + .compartmentId(compartmentId) + .licenseModel(CreateAutonomousDatabaseDetails.LicenseModel.LicenseIncluded) + .build(); + } + + private static UpdateAutonomousDatabaseDetails scaleAtpRequest() { + return UpdateAutonomousDatabaseDetails.builder() + .cpuCoreCount(2) + .dataStorageSizeInTBs(2) + .build(); + } + + private static UpdateAutonomousDatabaseDetails updateDisplayNameAtpRequest() { + return UpdateAutonomousDatabaseDetails.builder().displayName("newDisplayName").build(); + } +} diff --git a/bmc-examples/src/main/java/ListFaultDomainsExample.java b/bmc-examples/src/main/java/ListFaultDomainsExample.java new file mode 100644 index 00000000000..4dd8c780fe9 --- /dev/null +++ b/bmc-examples/src/main/java/ListFaultDomainsExample.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.identity.Identity; +import com.oracle.bmc.identity.IdentityClient; +import com.oracle.bmc.identity.model.AvailabilityDomain; +import com.oracle.bmc.identity.model.FaultDomain; +import com.oracle.bmc.identity.requests.ListAvailabilityDomainsRequest; +import com.oracle.bmc.identity.requests.ListFaultDomainsRequest; +import com.oracle.bmc.identity.responses.ListFaultDomainsResponse; + +import java.util.List; + +public class ListFaultDomainsExample { + public static void main(String[] args) throws Exception { + + // TODO: Fill in this value + String compartmentId = null; + + String configurationFilePath = "~/.oci/config"; + String profile = "DEFAULT"; + + AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(configurationFilePath, profile); + + Identity identityClient = new IdentityClient(provider); + + List availabilityDomains = + identityClient + .listAvailabilityDomains( + ListAvailabilityDomainsRequest.builder() + .compartmentId(compartmentId) + .build()) + .getItems(); + + for (AvailabilityDomain ad : availabilityDomains) { + + ListFaultDomainsResponse listFaultDomainsResponse = + identityClient.listFaultDomains( + ListFaultDomainsRequest.builder() + .compartmentId(ad.getCompartmentId()) + .availabilityDomain(ad.getName()) + .build()); + for (FaultDomain fd : listFaultDomainsResponse.getItems()) { + System.out.println(fd.getName()); + } + } + } +} diff --git a/bmc-filestorage/pom.xml b/bmc-filestorage/pom.xml index adce3b36918..4e3366e07d4 100644 --- a/bmc-filestorage/pom.xml +++ b/bmc-filestorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 diff --git a/bmc-full/pom.xml b/bmc-full/pom.xml index 8c23ae0eac9..f1126252309 100644 --- a/bmc-full/pom.xml +++ b/bmc-full/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml oci-java-sdk-full @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 1.2.44 + 1.2.45 pom import diff --git a/bmc-identity/pom.xml b/bmc-identity/pom.xml index 6980164f3e3..413a414938b 100644 --- a/bmc-identity/pom.xml +++ b/bmc-identity/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/Identity.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/Identity.java index f6c94de1352..8cae0b8b39a 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/Identity.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/Identity.java @@ -607,9 +607,11 @@ CreateRegionSubscriptionResponse createRegionSubscription( ListAuthTokensResponse listAuthTokens(ListAuthTokensRequest request); /** - * Lists the Availability Domains in your tenancy. Specify the OCID of either the tenancy or another + * Lists the availability domains in your tenancy. Specify the OCID of either the tenancy or another * of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). * See [Where to Get the Tenancy's OCID and User's OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). + * Note that the order of the results returned can change if availability domains are added or removed; therefore, do not + * create a dependency on the list order. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -649,6 +651,17 @@ CreateRegionSubscriptionResponse createRegionSubscription( */ ListDynamicGroupsResponse listDynamicGroups(ListDynamicGroupsRequest request); + /** + * Lists the Fault Domains in your tenancy. Specify the OCID of either the tenancy or another + * of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). + * See [Where to Get the Tenancy's OCID and User's OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). + * + * @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. + */ + ListFaultDomainsResponse listFaultDomains(ListFaultDomainsRequest request); + /** * Lists the groups in your tenancy. You must specify your tenancy's OCID as the value for * the compartment ID (remember that the tenancy is simply the root compartment). diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsync.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsync.java index f0fff895dd6..0294fd2dcaf 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsync.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsync.java @@ -894,9 +894,11 @@ java.util.concurrent.Future listAuthTokens( handler); /** - * Lists the Availability Domains in your tenancy. Specify the OCID of either the tenancy or another + * Lists the availability domains in your tenancy. Specify the OCID of either the tenancy or another * of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). * See [Where to Get the Tenancy's OCID and User's OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). + * Note that the order of the results returned can change if availability domains are added or removed; therefore, do not + * create a dependency on the list order. * * * @param request The request object containing the details to send @@ -967,6 +969,24 @@ java.util.concurrent.Future listDynamicGroups( ListDynamicGroupsRequest, ListDynamicGroupsResponse> handler); + /** + * Lists the Fault Domains in your tenancy. Specify the OCID of either the tenancy or another + * of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). + * See [Where to Get the Tenancy's OCID and User's OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). + * + * + * @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 listFaultDomains( + ListFaultDomainsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Lists the groups in your tenancy. You must specify your tenancy's OCID as the value for * the compartment ID (remember that the tenancy is simply the root compartment). diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsyncClient.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsyncClient.java index 31b2dc4fb47..1e02080490c 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsyncClient.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsyncClient.java @@ -3553,6 +3553,75 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future listFaultDomains( + final ListFaultDomainsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListFaultDomainsRequest, ListFaultDomainsResponse> + handler) { + LOG.trace("Called async listFaultDomains"); + final ListFaultDomainsRequest interceptedRequest = + ListFaultDomainsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFaultDomainsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListFaultDomainsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListFaultDomainsRequest, ListFaultDomainsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListFaultDomainsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future listGroups( final ListGroupsRequest request, diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityClient.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityClient.java index e6e4ce3e351..0a94b1c2dc3 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityClient.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityClient.java @@ -1434,6 +1434,31 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public ListFaultDomainsResponse listFaultDomains(ListFaultDomainsRequest request) { + LOG.trace("Called listFaultDomains"); + request = ListFaultDomainsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFaultDomainsConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListFaultDomainsConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public ListGroupsResponse listGroups(ListGroupsRequest request) { LOG.trace("Called listGroups"); diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/ListFaultDomainsConverter.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/ListFaultDomainsConverter.java new file mode 100644 index 00000000000..f292e188b44 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/ListFaultDomainsConverter.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.internal.http; + +import com.oracle.bmc.identity.model.*; +import com.oracle.bmc.identity.requests.*; +import com.oracle.bmc.identity.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListFaultDomainsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListFaultDomainsRequest interceptRequest(ListFaultDomainsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListFaultDomainsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + Validate.notNull(request.getAvailabilityDomain(), "availabilityDomain is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("faultDomains"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + target = + target.queryParam( + "availabilityDomain", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAvailabilityDomain())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListFaultDomainsResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListFaultDomainsResponse>() { + @Override + public ListFaultDomainsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListFaultDomainsResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListFaultDomainsResponse.Builder builder = + ListFaultDomainsResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + 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)); + } + + ListFaultDomainsResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/AvailabilityDomain.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/AvailabilityDomain.java index d52cbb9b539..5357c5bdcbe 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/AvailabilityDomain.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/AvailabilityDomain.java @@ -35,6 +35,15 @@ public Builder name(String name) { return this; } + @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; @@ -48,14 +57,15 @@ public Builder compartmentId(String compartmentId) { private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public AvailabilityDomain build() { - AvailabilityDomain __instance__ = new AvailabilityDomain(name, compartmentId); + AvailabilityDomain __instance__ = new AvailabilityDomain(name, id, compartmentId); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(AvailabilityDomain o) { - Builder copiedBuilder = name(o.getName()).compartmentId(o.getCompartmentId()); + Builder copiedBuilder = + name(o.getName()).id(o.getId()).compartmentId(o.getCompartmentId()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -75,6 +85,12 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("name") String name; + /** + * The OCID of the Availability Domain. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + /** * The OCID of the tenancy. **/ diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/FaultDomain.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/FaultDomain.java new file mode 100644 index 00000000000..4c364c594a1 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/FaultDomain.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.model; + +/** + * A Fault Domain is a logical grouping of hardware and infrastructure within an Availability Domain that can become + * unavailable in its entirety either due to hardware failure such as Top-of-rack (TOR) switch failure or due to + * planned software maintenance such as security updates that reboot your instances. + * + *
+ * Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all + * explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods + * are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not + * set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset + * {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = FaultDomain.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class FaultDomain { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + 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("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("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FaultDomain build() { + FaultDomain __instance__ = new FaultDomain(name, id, compartmentId, availabilityDomain); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FaultDomain o) { + Builder copiedBuilder = + name(o.getName()) + .id(o.getId()) + .compartmentId(o.getCompartmentId()) + .availabilityDomain(o.getAvailabilityDomain()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The name of the Fault Domain. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + + /** + * The OCID of the Fault Domain. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The OCID of the compartment. Currently only tenancy (root) compartment can be provided. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The name of the availabilityDomain where the Fault Domain belongs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + String availabilityDomain; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/ListFaultDomainsRequest.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/ListFaultDomainsRequest.java new file mode 100644 index 00000000000..ce8deffbf87 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/ListFaultDomainsRequest.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.requests; + +import com.oracle.bmc.identity.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListFaultDomainsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compartment (remember that the tenancy is simply the root compartment). + * + */ + private String compartmentId; + + /** + * The name of the availibilityDomain. + * + */ + private String availabilityDomain; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * 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; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFaultDomainsRequest o) { + compartmentId(o.getCompartmentId()); + availabilityDomain(o.getAvailabilityDomain()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of ListFaultDomainsRequest 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 ListFaultDomainsRequest + */ + public ListFaultDomainsRequest build() { + ListFaultDomainsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/ListFaultDomainsResponse.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/ListFaultDomainsResponse.java new file mode 100644 index 00000000000..efff36e03f1 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/ListFaultDomainsResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.responses; + +import com.oracle.bmc.identity.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListFaultDomainsResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A list of FaultDomain instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFaultDomainsResponse o) { + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-loadbalancer/pom.xml b/bmc-loadbalancer/pom.xml index 623e217fb00..fdc59ccf9f2 100644 --- a/bmc-loadbalancer/pom.xml +++ b/bmc-loadbalancer/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml b/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml index 4ae395aff25..3d5a2a4bd90 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 - 1.2.44 + 1.2.45 ../../pom.xml @@ -18,12 +18,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 1.2.44 + 1.2.45 diff --git a/bmc-objectstorage/bmc-objectstorage-generated/pom.xml b/bmc-objectstorage/bmc-objectstorage-generated/pom.xml index 2e4671b979e..51e47372630 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 - 1.2.44 + 1.2.45 ../../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 diff --git a/bmc-objectstorage/pom.xml b/bmc-objectstorage/pom.xml index 4c02a362b46..9631f2b3001 100644 --- a/bmc-objectstorage/pom.xml +++ b/bmc-objectstorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml @@ -19,17 +19,17 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 1.2.44 + 1.2.45 com.oracle.oci.sdk oci-java-sdk-objectstorage-extensions - 1.2.44 + 1.2.45 diff --git a/bmc-resourcesearch/pom.xml b/bmc-resourcesearch/pom.xml index 634f8863e32..95bded7b16c 100644 --- a/bmc-resourcesearch/pom.xml +++ b/bmc-resourcesearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml oci-java-sdk-resourcesearch @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.44 + 1.2.45 \ 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 e285b5b3bc9..420e9d06fc6 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 - 1.2.44 + 1.2.45 ../pom.xml oci-java-sdk-shaded-full diff --git a/bmc-shaded/pom.xml b/bmc-shaded/pom.xml index cd6c4f2a03b..d7147503f1a 100644 --- a/bmc-shaded/pom.xml +++ b/bmc-shaded/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 ../pom.xml diff --git a/pom.xml b/pom.xml index 559f74e68c8..08fd73c8a3f 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.oracle.oci.sdk oci-java-sdk - 1.2.44 + 1.2.45 pom Oracle Cloud Infrastructure SDK This project contains the SDK used for Oracle Cloud Infrastructure @@ -23,25 +23,23 @@ UTF-8 - 2.9.5 + 2.9.6 2.24.1 - 19.0 - 4.11 + + 25.0-android + 4.12 1.16.16 1.16.16.0 3.0.2 - 1.7.23 + 1.7.25 1.1.0.Final 2.0.1 1.10 3.4 2.5 3.1.1 - - - 1.52 + 1.60 1.10.19 1.7.4 **/*IntegrationAutoTest.java @@ -518,4 +516,4 @@ bmc-full bmc-shaded - + \ No newline at end of file