diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c829608ec7..86ead8cf908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). ### Added - N/A +## 1.2.17 - 2017-11-02 + +### Added +- Support for updating audit retention policy in Audit service +- Support for archive storage tier, object rename and namespace metadata in Object Storage service +- Support for fast clones of volumes in Block Storage service +- Support for backup and restore in Database service +- Support for sorting and filtering in list APIs in Core Services + ## 1.2.16 - 2017-10-12 ### Changed diff --git a/bmc-audit/pom.xml b/bmc-audit/pom.xml index d1434280649..f2d0d0e1726 100644 --- a/bmc-audit/pom.xml +++ b/bmc-audit/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.16 + 1.2.17 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.16 + 1.2.17 diff --git a/bmc-audit/src/main/java/com/oracle/bmc/audit/Audit.java b/bmc-audit/src/main/java/com/oracle/bmc/audit/Audit.java index ae406e9b638..7f7566342fc 100644 --- a/bmc-audit/src/main/java/com/oracle/bmc/audit/Audit.java +++ b/bmc-audit/src/main/java/com/oracle/bmc/audit/Audit.java @@ -36,6 +36,14 @@ public interface Audit extends AutoCloseable { */ void setRegion(String regionId); + /** + * Get the configuration + * @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. + */ + GetConfigurationResponse getConfiguration(GetConfigurationRequest request); + /** * Returns all audit events for the specified compartment that were processed within the specified time range. * @param request The request object containing the details to send @@ -43,4 +51,12 @@ public interface Audit extends AutoCloseable { * @throws BmcException when an error occurs. */ ListEventsResponse listEvents(ListEventsRequest request); + + /** + * Update the configuration + * @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. + */ + UpdateConfigurationResponse updateConfiguration(UpdateConfigurationRequest request); } diff --git a/bmc-audit/src/main/java/com/oracle/bmc/audit/AuditAsync.java b/bmc-audit/src/main/java/com/oracle/bmc/audit/AuditAsync.java index 5676f102102..614d027ddb1 100644 --- a/bmc-audit/src/main/java/com/oracle/bmc/audit/AuditAsync.java +++ b/bmc-audit/src/main/java/com/oracle/bmc/audit/AuditAsync.java @@ -36,6 +36,21 @@ public interface AuditAsync extends AutoCloseable { */ void setRegion(String regionId); + /** + * Get the configuration + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getConfiguration( + GetConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Returns all audit events for the specified compartment that were processed within the specified time range. * @@ -49,4 +64,20 @@ public interface AuditAsync extends AutoCloseable { java.util.concurrent.Future listEvents( ListEventsRequest request, com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Update the configuration + * + * @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 updateConfiguration( + UpdateConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateConfigurationRequest, UpdateConfigurationResponse> + handler); } diff --git a/bmc-audit/src/main/java/com/oracle/bmc/audit/AuditAsyncClient.java b/bmc-audit/src/main/java/com/oracle/bmc/audit/AuditAsyncClient.java index d7823cb743e..e153016ca60 100644 --- a/bmc-audit/src/main/java/com/oracle/bmc/audit/AuditAsyncClient.java +++ b/bmc-audit/src/main/java/com/oracle/bmc/audit/AuditAsyncClient.java @@ -117,6 +117,28 @@ public void close() { client.close(); } + @Override + public java.util.concurrent.Future getConfiguration( + GetConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getConfiguration"); + request = GetConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetConfigurationConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetConfigurationConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.get(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future listEvents( ListEventsRequest request, @@ -137,4 +159,28 @@ public java.util.concurrent.Future listEvents( client.get(ib, request, onSuccess, onError); return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + + @Override + public java.util.concurrent.Future updateConfiguration( + UpdateConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateConfigurationRequest, UpdateConfigurationResponse> + handler) { + LOG.trace("Called async updateConfiguration"); + request = UpdateConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateConfigurationConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = UpdateConfigurationConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.put( + ib, request.getUpdateConfigurationDetails(), request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } } diff --git a/bmc-audit/src/main/java/com/oracle/bmc/audit/AuditClient.java b/bmc-audit/src/main/java/com/oracle/bmc/audit/AuditClient.java index 839b329604a..e835896da93 100644 --- a/bmc-audit/src/main/java/com/oracle/bmc/audit/AuditClient.java +++ b/bmc-audit/src/main/java/com/oracle/bmc/audit/AuditClient.java @@ -117,6 +117,19 @@ public void close() { client.close(); } + @Override + public GetConfigurationResponse getConfiguration(GetConfigurationRequest request) { + LOG.trace("Called getConfiguration"); + request = GetConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetConfigurationConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetConfigurationConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } + @Override public ListEventsResponse listEvents(ListEventsRequest request) { LOG.trace("Called listEvents"); @@ -129,4 +142,18 @@ public ListEventsResponse listEvents(ListEventsRequest request) { javax.ws.rs.core.Response response = client.get(ib, request); return transformer.apply(response); } + + @Override + public UpdateConfigurationResponse updateConfiguration(UpdateConfigurationRequest request) { + LOG.trace("Called updateConfiguration"); + request = UpdateConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateConfigurationConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = UpdateConfigurationConverter.fromResponse(); + + javax.ws.rs.core.Response response = + client.put(ib, request.getUpdateConfigurationDetails(), request); + return transformer.apply(response); + } } diff --git a/bmc-audit/src/main/java/com/oracle/bmc/audit/internal/http/GetConfigurationConverter.java b/bmc-audit/src/main/java/com/oracle/bmc/audit/internal/http/GetConfigurationConverter.java new file mode 100644 index 00000000000..55dd1dafb8d --- /dev/null +++ b/bmc-audit/src/main/java/com/oracle/bmc/audit/internal/http/GetConfigurationConverter.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.audit.internal.http; + +import com.oracle.bmc.audit.model.*; +import com.oracle.bmc.audit.requests.*; +import com.oracle.bmc.audit.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetConfigurationRequest interceptRequest(GetConfigurationRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetConfigurationRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getCompartmentId() == null) { + throw new NullPointerException("compartmentId is required"); + } + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("configuration"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + 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, GetConfigurationResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetConfigurationResponse>() { + @Override + public GetConfigurationResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetConfigurationResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + Configuration>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + Configuration.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetConfigurationResponse.Builder builder = + GetConfigurationResponse.builder(); + + builder.configuration(response.getItem()); + + GetConfigurationResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-audit/src/main/java/com/oracle/bmc/audit/internal/http/UpdateConfigurationConverter.java b/bmc-audit/src/main/java/com/oracle/bmc/audit/internal/http/UpdateConfigurationConverter.java new file mode 100644 index 00000000000..3f0a2ee0dc1 --- /dev/null +++ b/bmc-audit/src/main/java/com/oracle/bmc/audit/internal/http/UpdateConfigurationConverter.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.audit.internal.http; + +import com.oracle.bmc.audit.model.*; +import com.oracle.bmc.audit.requests.*; +import com.oracle.bmc.audit.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class UpdateConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateConfigurationRequest interceptRequest(UpdateConfigurationRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, UpdateConfigurationRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getCompartmentId() == null) { + throw new NullPointerException("compartmentId is required"); + } + + if (request.getUpdateConfigurationDetails() == null) { + throw new NullPointerException("updateConfigurationDetails is required"); + } + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("configuration"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + 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, UpdateConfigurationResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateConfigurationResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateConfigurationResponse>() { + @Override + public UpdateConfigurationResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for UpdateConfigurationResponse"); + 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(); + + UpdateConfigurationResponse.Builder builder = + UpdateConfigurationResponse.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)); + } + + com.google.common.base.Optional> + opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + UpdateConfigurationResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-audit/src/main/java/com/oracle/bmc/audit/model/Configuration.java b/bmc-audit/src/main/java/com/oracle/bmc/audit/model/Configuration.java new file mode 100644 index 00000000000..a1afc08ffde --- /dev/null +++ b/bmc-audit/src/main/java/com/oracle/bmc/audit/model/Configuration.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.audit.model; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Configuration.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class Configuration { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodDays") + private Integer retentionPeriodDays; + + public Builder retentionPeriodDays(Integer retentionPeriodDays) { + this.retentionPeriodDays = retentionPeriodDays; + this.__explicitlySet__.add("retentionPeriodDays"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Configuration build() { + Configuration __instance__ = new Configuration(retentionPeriodDays); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Configuration o) { + return retentionPeriodDays(o.getRetentionPeriodDays()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The retention period days + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodDays") + Integer retentionPeriodDays; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-audit/src/main/java/com/oracle/bmc/audit/model/UpdateConfigurationDetails.java b/bmc-audit/src/main/java/com/oracle/bmc/audit/model/UpdateConfigurationDetails.java new file mode 100644 index 00000000000..bf6f872fd51 --- /dev/null +++ b/bmc-audit/src/main/java/com/oracle/bmc/audit/model/UpdateConfigurationDetails.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.audit.model; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateConfigurationDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodDays") + private Integer retentionPeriodDays; + + public Builder retentionPeriodDays(Integer retentionPeriodDays) { + this.retentionPeriodDays = retentionPeriodDays; + this.__explicitlySet__.add("retentionPeriodDays"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateConfigurationDetails build() { + UpdateConfigurationDetails __instance__ = + new UpdateConfigurationDetails(retentionPeriodDays); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateConfigurationDetails o) { + return retentionPeriodDays(o.getRetentionPeriodDays()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The retention period days + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retentionPeriodDays") + Integer retentionPeriodDays; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-audit/src/main/java/com/oracle/bmc/audit/requests/GetConfigurationRequest.java b/bmc-audit/src/main/java/com/oracle/bmc/audit/requests/GetConfigurationRequest.java new file mode 100644 index 00000000000..6bb05b962ef --- /dev/null +++ b/bmc-audit/src/main/java/com/oracle/bmc/audit/requests/GetConfigurationRequest.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.audit.requests; + +import com.oracle.bmc.audit.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetConfigurationRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * ID of the root compartment (tenancy) + */ + private String compartmentId; + + 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(GetConfigurationRequest o) { + compartmentId(o.getCompartmentId()); + return this; + } + + /** + * Build the instance of GetConfigurationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.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 GetConfigurationRequest + */ + public GetConfigurationRequest build() { + GetConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-audit/src/main/java/com/oracle/bmc/audit/requests/UpdateConfigurationRequest.java b/bmc-audit/src/main/java/com/oracle/bmc/audit/requests/UpdateConfigurationRequest.java new file mode 100644 index 00000000000..911804feeb1 --- /dev/null +++ b/bmc-audit/src/main/java/com/oracle/bmc/audit/requests/UpdateConfigurationRequest.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.audit.requests; + +import com.oracle.bmc.audit.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class UpdateConfigurationRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * ID of the root compartment (tenancy) + */ + private String compartmentId; + + /** + * The configuration properties + */ + private UpdateConfigurationDetails updateConfigurationDetails; + + 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(UpdateConfigurationRequest o) { + compartmentId(o.getCompartmentId()); + updateConfigurationDetails(o.getUpdateConfigurationDetails()); + return this; + } + + /** + * Build the instance of UpdateConfigurationRequest 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 UpdateConfigurationRequest + */ + public UpdateConfigurationRequest build() { + UpdateConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-audit/src/main/java/com/oracle/bmc/audit/responses/GetConfigurationResponse.java b/bmc-audit/src/main/java/com/oracle/bmc/audit/responses/GetConfigurationResponse.java new file mode 100644 index 00000000000..0e9cc10228d --- /dev/null +++ b/bmc-audit/src/main/java/com/oracle/bmc/audit/responses/GetConfigurationResponse.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.audit.responses; + +import com.oracle.bmc.audit.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetConfigurationResponse { + + /** + * The returned Configuration instance. + */ + private Configuration configuration; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetConfigurationResponse o) { + + configuration(o.getConfiguration()); + + return this; + } + } +} diff --git a/bmc-audit/src/main/java/com/oracle/bmc/audit/responses/UpdateConfigurationResponse.java b/bmc-audit/src/main/java/com/oracle/bmc/audit/responses/UpdateConfigurationResponse.java new file mode 100644 index 00000000000..af401ab99c4 --- /dev/null +++ b/bmc-audit/src/main/java/com/oracle/bmc/audit/responses/UpdateConfigurationResponse.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.audit.responses; + +import com.oracle.bmc.audit.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateConfigurationResponse { + + /** + * Unique 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 [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + * + */ + private String opcWorkRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateConfigurationResponse o) { + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + } +} diff --git a/bmc-bom/pom.xml b/bmc-bom/pom.xml index d2a074ce4ff..0dc56e6486c 100644 --- a/bmc-bom/pom.xml +++ b/bmc-bom/pom.xml @@ -7,7 +7,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.16 + 1.2.17 ../pom.xml @@ -24,7 +24,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.16 + 1.2.17 false @@ -33,37 +33,37 @@ com.oracle.oci.sdk oci-java-sdk-audit - 1.2.16 + 1.2.17 false com.oracle.oci.sdk oci-java-sdk-core - 1.2.16 + 1.2.17 false com.oracle.oci.sdk oci-java-sdk-database - 1.2.16 + 1.2.17 false com.oracle.oci.sdk oci-java-sdk-identity - 1.2.16 + 1.2.17 false com.oracle.oci.sdk oci-java-sdk-loadbalancer - 1.2.16 + 1.2.17 false com.oracle.oci.sdk oci-java-sdk-objectstorage - 1.2.16 + 1.2.17 false diff --git a/bmc-common/pom.xml b/bmc-common/pom.xml index 54cc2152924..c9173e21910 100644 --- a/bmc-common/pom.xml +++ b/bmc-common/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.16 + 1.2.17 ../pom.xml diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/internal/ResponseConversionFunctionFactory.java b/bmc-common/src/main/java/com/oracle/bmc/http/internal/ResponseConversionFunctionFactory.java index a38785101f6..19433364f63 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/internal/ResponseConversionFunctionFactory.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/internal/ResponseConversionFunctionFactory.java @@ -3,8 +3,6 @@ */ package com.oracle.bmc.http.internal; -import java.util.List; - import javax.ws.rs.core.GenericType; import javax.ws.rs.core.Response; @@ -39,13 +37,14 @@ public Function> create(Class clazz) { } /** - * Creates a Function that will convert the Response into a List of objects. + * Creates a Function that will convert the Response into a parameterized collection object, + * or some other parameterized type. * - * @param type The generic type list to convert to. + * @param type The generic type to convert to. * @return A new Function. */ - public Function>> create(GenericType> type) { - return new ParsePagedResponseWithHeadersFunction<>(type); + public Function> create(GenericType type) { + return new ParseGenericResponseWithHeadersFunction<>(type); } @RequiredArgsConstructor @@ -61,14 +60,14 @@ protected WithHeaders doApply(Response response) { } @RequiredArgsConstructor - private static final class ParsePagedResponseWithHeadersFunction - extends ValidatingParseResponseFunction>> { - private final GenericType> genericType; + private static final class ParseGenericResponseWithHeadersFunction + extends ValidatingParseResponseFunction> { + private final GenericType genericType; @Override - protected WithHeaders> doApply(Response response) { - List list = ResponseHelper.readEntity(response, genericType); - return new WithHeaders<>(list, response.getStringHeaders(), response.getStatus()); + protected WithHeaders doApply(Response response) { + T entity = ResponseHelper.readEntity(response, genericType); + return new WithHeaders<>(entity, response.getStringHeaders(), response.getStatus()); } } diff --git a/bmc-core/pom.xml b/bmc-core/pom.xml index e322e383328..8a93c1273d4 100644 --- a/bmc-core/pom.xml +++ b/bmc-core/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.16 + 1.2.17 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.16 + 1.2.17 diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java b/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java index 17ae59f50a7..501f5fdf18c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java @@ -82,19 +82,19 @@ public interface Compute extends AutoCloseable { CaptureConsoleHistoryResponse captureConsoleHistory(CaptureConsoleHistoryRequest request); /** - * Creates a boot disk image for the specified instance or imports an exported image from the Oracle Bare Metal Cloud Object Storage Service. + * Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object Storage service. *

* When creating a new image, you must provide the OCID of the instance you want to use as the basis for the image, and * the OCID of the compartment containing that instance. For more information about images, * see [Managing Custom Images](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm). *

- * When importing an exported image from the Object Storage Service, you specify the source information + * When importing an exported image from Object Storage, you specify the source information * in {@link #imageSourceDetails(ImageSourceDetailsRequest) imageSourceDetails}. *

* When importing an image based on the namespace, bucket name, and object name, * use {@link #imageSourceViaObjectStorageTupleDetails(ImageSourceViaObjectStorageTupleDetailsRequest) imageSourceViaObjectStorageTupleDetails}. *

- * When importing an image based on the Object Storage Service URL, use + * When importing an image based on the Object Storage URL, use * {@link #imageSourceViaObjectStorageUriDetails(ImageSourceViaObjectStorageUriDetailsRequest) imageSourceViaObjectStorageUriDetails}. * See [Object Storage URLs](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) and [pre-authenticated requests](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth) * for constructing URLs for image import/export. @@ -184,12 +184,12 @@ DeleteInstanceConsoleConnectionResponse deleteInstanceConsoleConnection( DetachVolumeResponse detachVolume(DetachVolumeRequest request); /** - * Exports the specified image to the Oracle Bare Metal Cloud Object Storage Service. You can use the Object Storage Service URL, + * Exports the specified image to the Oracle Cloud Infrastructure Object Storage service. You can use the Object Storage URL, * or the namespace, bucket name, and object name when specifying the location to export to. *

* For more information about exporting images, see [Image Import/Export](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm). *

- * To perform an image export, you need write access to the Object Storage Service bucket for the image, + * To perform an image export, you need write access to the Object Storage bucket for the image, * see [Let Users Write Objects to Object Storage Buckets](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm#Let4). *

* See [Object Storage URLs](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) and [pre-authenticated requests](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth) @@ -314,7 +314,7 @@ GetWindowsInstanceInitialCredentialsResponse getWindowsInstanceInitialCredential * To get a list of Availability Domains, use the `ListAvailabilityDomains` operation * in the Identity and Access Management Service API. *

- * All Oracle Bare Metal Cloud Services resources, including instances, get an Oracle-assigned, + * All Oracle Cloud Infrastructure resources, including instances, get an Oracle-assigned, * unique ID called an Oracle Cloud Identifier (OCID). * When you create a resource, you can find its OCID in the response. You can * also retrieve a resource's OCID by using a List API operation @@ -348,7 +348,9 @@ GetWindowsInstanceInitialCredentialsResponse getWindowsInstanceInitialCredential ListConsoleHistoriesResponse listConsoleHistories(ListConsoleHistoriesRequest request); /** - * Lists the available images in the specified compartment. For more + * Lists the available images in the specified compartment. + * If you specify a value for the `sortBy` parameter, Oracle-provided images appear first in the list, followed by custom images. + * For more * information about images, see * [Managing Custom Images](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java index cfdc7bf326e..b09ea0a3dfc 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java @@ -103,19 +103,19 @@ java.util.concurrent.Future captureConsoleHistory handler); /** - * Creates a boot disk image for the specified instance or imports an exported image from the Oracle Bare Metal Cloud Object Storage Service. + * Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object Storage service. *

* When creating a new image, you must provide the OCID of the instance you want to use as the basis for the image, and * the OCID of the compartment containing that instance. For more information about images, * see [Managing Custom Images](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm). *

- * When importing an exported image from the Object Storage Service, you specify the source information + * When importing an exported image from Object Storage, you specify the source information * in {@link #imageSourceDetails(ImageSourceDetailsRequest, Consumer, Consumer) imageSourceDetails}. *

* When importing an image based on the namespace, bucket name, and object name, * use {@link #imageSourceViaObjectStorageTupleDetails(ImageSourceViaObjectStorageTupleDetailsRequest, Consumer, Consumer) imageSourceViaObjectStorageTupleDetails}. *

- * When importing an image based on the Object Storage Service URL, use + * When importing an image based on the Object Storage URL, use * {@link #imageSourceViaObjectStorageUriDetails(ImageSourceViaObjectStorageUriDetailsRequest, Consumer, Consumer) imageSourceViaObjectStorageUriDetails}. * See [Object Storage URLs](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) and [pre-authenticated requests](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth) * for constructing URLs for image import/export. @@ -256,12 +256,12 @@ java.util.concurrent.Future detachVolume( handler); /** - * Exports the specified image to the Oracle Bare Metal Cloud Object Storage Service. You can use the Object Storage Service URL, + * Exports the specified image to the Oracle Cloud Infrastructure Object Storage service. You can use the Object Storage URL, * or the namespace, bucket name, and object name when specifying the location to export to. *

* For more information about exporting images, see [Image Import/Export](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm). *

- * To perform an image export, you need write access to the Object Storage Service bucket for the image, + * To perform an image export, you need write access to the Object Storage bucket for the image, * see [Let Users Write Objects to Object Storage Buckets](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm#Let4). *

* See [Object Storage URLs](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) and [pre-authenticated requests](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth) @@ -459,7 +459,7 @@ java.util.concurrent.Future instanceAction( * To get a list of Availability Domains, use the `ListAvailabilityDomains` operation * in the Identity and Access Management Service API. *

- * All Oracle Bare Metal Cloud Services resources, including instances, get an Oracle-assigned, + * All Oracle Cloud Infrastructure resources, including instances, get an Oracle-assigned, * unique ID called an Oracle Cloud Identifier (OCID). * When you create a resource, you can find its OCID in the response. You can * also retrieve a resource's OCID by using a List API operation @@ -508,7 +508,9 @@ java.util.concurrent.Future listConsoleHistories( handler); /** - * Lists the available images in the specified compartment. For more + * Lists the available images in the specified compartment. + * If you specify a value for the `sortBy` parameter, Oracle-provided images appear first in the list, followed by custom images. + * For more * information about images, see * [Managing Custom Images](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java index 4220290dc87..53ae1ac0185 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java @@ -87,7 +87,7 @@ public interface VirtualNetwork extends AutoCloseable { CreateCrossConnectResponse createCrossConnect(CreateCrossConnectRequest request); /** - * Creates a new cross-connect group to use with Oracle Bare Metal Cloud Services + * Creates a new cross-connect group to use with Oracle Cloud Infrastructure * FastConnect. For more information, see * [FastConnect Overview](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). *

@@ -336,7 +336,7 @@ public interface VirtualNetwork extends AutoCloseable { * must not overlap with your on-premises network. You can't change the size of the VCN after creation. *

* For the purposes of access control, you must provide the OCID of the compartment where you want the VCN to - * reside. Consult an Oracle Bare Metal Cloud Services administrator in your organization if you're not sure which + * reside. Consult an Oracle Cloud Infrastructure administrator in your organization if you're not sure which * compartment to use. Notice that the VCN doesn't have to be in the same compartment as the subnets or other * Networking Service components. For more information about compartments and access control, see * [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see @@ -364,8 +364,8 @@ public interface VirtualNetwork extends AutoCloseable { CreateVcnResponse createVcn(CreateVcnRequest request); /** - * Creates a new virtual circuit to use with Oracle Bare Metal Cloud - * Services FastConnect. For more information, see + * Creates a new virtual circuit to use with Oracle Cloud + * Infrastructure FastConnect. For more information, see * [FastConnect Overview](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). *

* For the purposes of access control, you must provide the OCID of the @@ -918,11 +918,7 @@ ListFastConnectProviderServicesResponse listFastConnectProviderServices( * Lists the available bandwidth levels for virtual circuits. You need this * information so you can specify your desired bandwidth level (that is, shape) * when you create a virtual circuit. - *

* For the compartment ID, provide the OCID of your tenancy (the root compartment). - *

- * For more information about virtual circuits, see - * [FastConnect Overview](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java index c5ce1fd86eb..79e7e14865c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java @@ -101,7 +101,7 @@ java.util.concurrent.Future createCrossConnect( handler); /** - * Creates a new cross-connect group to use with Oracle Bare Metal Cloud Services + * Creates a new cross-connect group to use with Oracle Cloud Infrastructure * FastConnect. For more information, see * [FastConnect Overview](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). *

@@ -425,7 +425,7 @@ java.util.concurrent.Future createSubnet( * must not overlap with your on-premises network. You can't change the size of the VCN after creation. *

* For the purposes of access control, you must provide the OCID of the compartment where you want the VCN to - * reside. Consult an Oracle Bare Metal Cloud Services administrator in your organization if you're not sure which + * reside. Consult an Oracle Cloud Infrastructure administrator in your organization if you're not sure which * compartment to use. Notice that the VCN doesn't have to be in the same compartment as the subnets or other * Networking Service components. For more information about compartments and access control, see * [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see @@ -459,8 +459,8 @@ java.util.concurrent.Future createVcn( com.oracle.bmc.responses.AsyncHandler handler); /** - * Creates a new virtual circuit to use with Oracle Bare Metal Cloud - * Services FastConnect. For more information, see + * Creates a new virtual circuit to use with Oracle Cloud + * Infrastructure FastConnect. For more information, see * [FastConnect Overview](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). *

* For the purposes of access control, you must provide the OCID of the @@ -1381,11 +1381,7 @@ java.util.concurrent.Future listVcns( * Lists the available bandwidth levels for virtual circuits. You need this * information so you can specify your desired bandwidth level (that is, shape) * when you create a virtual circuit. - *

* For the compartment ID, provide the OCID of your tenancy (the root compartment). - *

- * For more information about virtual circuits, see - * [FastConnect Overview](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). * * * @param request The request object containing the details to send diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListConsoleHistoriesConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListConsoleHistoriesConverter.java index 84ce6bd7571..60a8be3e1dd 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListConsoleHistoriesConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListConsoleHistoriesConverter.java @@ -71,6 +71,30 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getInstanceId())); } + 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())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListCrossConnectGroupsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListCrossConnectGroupsConverter.java index 0f6527d411e..ac42dff5dd6 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListCrossConnectGroupsConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListCrossConnectGroupsConverter.java @@ -55,6 +55,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getPage())); } + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListCrossConnectsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListCrossConnectsConverter.java index 8ce835fbb92..b5404677f97 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListCrossConnectsConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListCrossConnectsConverter.java @@ -62,6 +62,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getPage())); } + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListDhcpOptionsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListDhcpOptionsConverter.java index fbd49310cfa..33cd635f5b0 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListDhcpOptionsConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListDhcpOptionsConverter.java @@ -64,6 +64,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getPage())); } + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListImagesConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListImagesConverter.java index 043106b18ec..2ef24ed20ef 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListImagesConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListImagesConverter.java @@ -78,6 +78,30 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( 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())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInstancesConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInstancesConverter.java index 892bad422a2..48afbecd8af 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInstancesConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInstancesConverter.java @@ -70,6 +70,30 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( 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())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInternetGatewaysConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInternetGatewaysConverter.java index 57c944b227a..fe8818d0983 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInternetGatewaysConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInternetGatewaysConverter.java @@ -65,6 +65,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getPage())); } + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListRouteTablesConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListRouteTablesConverter.java index 8411c1d839e..72f98ef81dd 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListRouteTablesConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListRouteTablesConverter.java @@ -64,6 +64,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getVcnId())); + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListSecurityListsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListSecurityListsConverter.java index f24c119c4b9..e03dce4cbbb 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListSecurityListsConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListSecurityListsConverter.java @@ -64,6 +64,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getVcnId())); + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListSubnetsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListSubnetsConverter.java index f5c71bed943..204198f1935 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListSubnetsConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListSubnetsConverter.java @@ -64,6 +64,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getVcnId())); + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVcnsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVcnsConverter.java index 2f17a4f209e..ba05bac970f 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVcnsConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVcnsConverter.java @@ -54,6 +54,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getPage())); } + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVirtualCircuitsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVirtualCircuitsConverter.java index 55427f95188..472a454cb4f 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVirtualCircuitsConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVirtualCircuitsConverter.java @@ -54,6 +54,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getPage())); } + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVolumeBackupsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVolumeBackupsConverter.java index 326572a2a35..06f65edbd6d 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVolumeBackupsConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVolumeBackupsConverter.java @@ -62,6 +62,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getPage())); } + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVolumesConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVolumesConverter.java index 59494d6da5f..dd339c61190 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVolumesConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVolumesConverter.java @@ -62,6 +62,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getPage())); } + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVirtualCircuitDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVirtualCircuitDetails.java index b746c24f65a..60a1d3962cd 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVirtualCircuitDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVirtualCircuitDetails.java @@ -206,8 +206,8 @@ public static Builder builder() { String providerName; /** - * The name of the service offered by the provider (if you're connecting - * via a provider). To get a list of the available service offerings, see + * The name of the provider (if you're connecting via a provider). + * To get a list of the provider names, see * {@link #listFastConnectProviderServices(ListFastConnectProviderServicesRequest) listFastConnectProviderServices}. * **/ @@ -215,9 +215,8 @@ public static Builder builder() { String providerServiceName; /** - * The Oracle Bare Metal Cloud Services region where this virtual + * The Oracle Cloud Infrastructure region where this virtual * circuit is located. - *

* Example: `phx` * **/ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeDetails.java index a8b7b888dc9..74a85e5b6a3 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeDetails.java @@ -58,6 +58,15 @@ public Builder sizeInMBs(Long sizeInMBs) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("sourceDetails") + private VolumeSourceDetails sourceDetails; + + public Builder sourceDetails(VolumeSourceDetails sourceDetails) { + this.sourceDetails = sourceDetails; + this.__explicitlySet__.add("sourceDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("volumeBackupId") private String volumeBackupId; @@ -78,6 +87,7 @@ public CreateVolumeDetails build() { displayName, sizeInGBs, sizeInMBs, + sourceDetails, volumeBackupId); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; @@ -90,6 +100,7 @@ public Builder copy(CreateVolumeDetails o) { .displayName(o.getDisplayName()) .sizeInGBs(o.getSizeInGBs()) .sizeInMBs(o.getSizeInMBs()) + .sourceDetails(o.getSourceDetails()) .volumeBackupId(o.getVolumeBackupId()); } } @@ -132,14 +143,25 @@ public static Builder builder() { /** * The size of the volume in MBs. The value must be a multiple of 1024. - * This field is deprecated. Please use sizeInGBs. + * This field is deprecated. Use sizeInGBs instead. * **/ @com.fasterxml.jackson.annotation.JsonProperty("sizeInMBs") Long sizeInMBs; + /** + * Specifies the volume source details for a new Block volume. The volume source is either another Block volume in the same Availability Domain or a Block volume backup. + * This is an optional field. If not specified or set to null, the new Block volume will be empty. + * When specified, the new Block volume will contain data from the source volume or backup. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceDetails") + VolumeSourceDetails sourceDetails; + /** * The OCID of the volume backup from which the data should be restored on the newly created volume. + * This field is deprecated. Use the sourceDetails field instead to specify the + * backup for the volume. * **/ @com.fasterxml.jackson.annotation.JsonProperty("volumeBackupId") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnect.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnect.java index 7cb8362ead8..6f0ccaea977 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnect.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnect.java @@ -4,7 +4,7 @@ package com.oracle.bmc.core.model; /** - * For use with Oracle Bare Metal Cloud Services FastConnect. A cross-connect represents a + * For use with Oracle Cloud Infrastructure FastConnect. A cross-connect represents a * physical connection between an existing network and Oracle. Customers who are colocated * with Oracle in a FastConnect location create and use cross-connects. For more * information, see [FastConnect Overview](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectGroup.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectGroup.java index 0ff6dd33c9e..fef0cf21354 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectGroup.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectGroup.java @@ -4,7 +4,7 @@ package com.oracle.bmc.core.model; /** - * For use with Oracle Bare Metal Cloud Services FastConnect. A cross-connect group + * For use with Oracle Cloud Infrastructure FastConnect. A cross-connect group * is a link aggregation group (LAG), which can contain one or more * {@link CrossConnect}. Customers who are colocated with * Oracle in a FastConnect location create and use cross-connect groups. For more diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectMapping.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectMapping.java index f546b598adb..32a0df149eb 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectMapping.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectMapping.java @@ -4,7 +4,7 @@ package com.oracle.bmc.core.model; /** - * For use with Oracle Bare Metal Cloud Services FastConnect. Each + * For use with Oracle Cloud Infrastructure FastConnect. Each * {@link VirtualCircuit} runs on one or * more cross-connects or cross-connect groups. A `CrossConnectMapping` * contains the properties for an individual cross-connect or cross-connect group diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Drg.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Drg.java index dfaaf869c55..9fd1e14986a 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Drg.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Drg.java @@ -7,7 +7,7 @@ * A Dynamic Routing Gateway (DRG), which is a virtual router that provides a path for private * network traffic between your VCN and your existing network. You use it with other Networking * Service components to create an IPSec VPN or a connection that uses - * Oracle Bare Metal Cloud Services FastConnect. For more information, see + * Oracle Cloud Infrastructure FastConnect. For more information, see * [Overview of the Networking Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm). *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ExportImageDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ExportImageDetails.java index fb0cbd03d14..6aa97d594f3 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/ExportImageDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ExportImageDetails.java @@ -12,7 +12,7 @@ *

* Set `destinationType` to `objectStorageUri` and * use {@link #exportImageViaObjectStorageUriDetails(ExportImageViaObjectStorageUriDetailsRequest) exportImageViaObjectStorageUriDetails} - * when specifying the Object Storage Service URL. + * when specifying the Object Storage URL. * **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ExportImageViaObjectStorageTupleDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ExportImageViaObjectStorageTupleDetails.java index 6bf93f290b7..af8062cd622 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/ExportImageViaObjectStorageTupleDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ExportImageViaObjectStorageTupleDetails.java @@ -82,19 +82,19 @@ public ExportImageViaObjectStorageTupleDetails( } /** - * The Object Storage Service bucket to export the image to. + * The Object Storage bucket to export the image to. **/ @com.fasterxml.jackson.annotation.JsonProperty("bucketName") String bucketName; /** - * The Object Storage Service namespace to export the image to. + * The Object Storage namespace to export the image to. **/ @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") String namespaceName; /** - * The Object Storage Service object name for the exported image. + * The Object Storage object name for the exported image. **/ @com.fasterxml.jackson.annotation.JsonProperty("objectName") String objectName; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ExportImageViaObjectStorageUriDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ExportImageViaObjectStorageUriDetails.java index 54b6b957287..5cf4656f4d7 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/ExportImageViaObjectStorageUriDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ExportImageViaObjectStorageUriDetails.java @@ -58,7 +58,7 @@ public ExportImageViaObjectStorageUriDetails(String destinationUri) { } /** - * The Object Storage Service URL to export the image to. See [Object Storage URLs](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) + * The Object Storage URL to export the image to. See [Object Storage URLs](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) * and [pre-authenticated requests](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth) for constructing URLs for image import/export. * **/ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ImageSourceViaObjectStorageTupleDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ImageSourceViaObjectStorageTupleDetails.java index 49d79a457f2..7ebf6ed82bf 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/ImageSourceViaObjectStorageTupleDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ImageSourceViaObjectStorageTupleDetails.java @@ -82,19 +82,19 @@ public ImageSourceViaObjectStorageTupleDetails( } /** - * The Object Storage Service bucket for the image. + * The Object Storage bucket for the image. **/ @com.fasterxml.jackson.annotation.JsonProperty("bucketName") String bucketName; /** - * The Object Storage Service namespace for the image. + * The Object Storage namespace for the image. **/ @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") String namespaceName; /** - * The Object Storage Service name for the image. + * The Object Storage name for the image. **/ @com.fasterxml.jackson.annotation.JsonProperty("objectName") String objectName; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ImageSourceViaObjectStorageUriDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ImageSourceViaObjectStorageUriDetails.java index 3eaef146a15..c427427ffb4 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/ImageSourceViaObjectStorageUriDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ImageSourceViaObjectStorageUriDetails.java @@ -58,7 +58,7 @@ public ImageSourceViaObjectStorageUriDetails(String sourceUri) { } /** - * The Object Storage Service URL for the image. + * The Object Storage URL for the image. **/ @com.fasterxml.jackson.annotation.JsonProperty("sourceUri") String sourceUri; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Instance.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Instance.java index 87dff9c617d..d7693f8ebd5 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Instance.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Instance.java @@ -227,7 +227,7 @@ public static Builder builder() { String imageId; /** - * When an Oracle Bare Metal Cloud Services or virtual machine + * When a bare metal or virtual machine * instance boots, the iPXE firmware that runs on the instance is * configured to run an iPXE script to continue the boot process. *

@@ -245,7 +245,7 @@ public static Builder builder() { * iqn.2015-02.oracle.boot. *

* For more information about the Bring Your Own Image feature of - * Oracle Bare Metal Cloud Services, see + * Oracle Cloud Infrastructure, see * [Bring Your Own Image](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/bringyourownimage.htm). *

* For more information about iPXE, see http://ipxe.org. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java index 63bad9f92f1..ef70f5cbe81 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java @@ -218,7 +218,7 @@ public static Builder builder() { /** * This is an advanced option. *

- * When an Oracle Bare Metal Cloud Services or virtual machine + * When a bare metal or virtual machine * instance boots, the iPXE firmware that runs on the instance is * configured to run an iPXE script to continue the boot process. *

@@ -236,7 +236,7 @@ public static Builder builder() { * iqn.2015-02.oracle.boot. *

* For more information about the Bring Your Own Image feature of - * Oracle Bare Metal Cloud Services, see + * Oracle Cloud Infrastructure, see * [Bring Your Own Image](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/bringyourownimage.htm). *

* For more information about iPXE, see http://ipxe.org. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityList.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityList.java index 854caa50711..ce1ffb6ef72 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityList.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityList.java @@ -9,7 +9,7 @@ * in the subnet. The rules can be stateful or stateless. For more information, see * [Security Lists](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/securitylists.htm). *

- **Important:** Oracle Bare Metal Cloud Services images automatically include firewall rules (for example, + **Important:** Oracle Cloud Infrastructure Compute service images automatically include firewall rules (for example, * Linux iptables, Windows firewall). If there are issues with some type of access to an instance, * make sure both the security lists associated with the instance's subnet and the instance's * firewall rules are set correctly. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVirtualCircuitDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVirtualCircuitDetails.java index ae2fbaf80c5..3299ba7f936 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVirtualCircuitDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVirtualCircuitDetails.java @@ -117,7 +117,6 @@ public static Builder builder() { * The provisioned data rate of the connection. To get a list of the * available bandwidth levels (that is, shapes), see * {@link #listVirtualCircuitBandwidthShapes(ListVirtualCircuitBandwidthShapesRequest) listVirtualCircuitBandwidthShapes}. - *

* To be updated only by the customer who owns the virtual circuit. * **/ 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 c1a4d30f4fd..8771d762b8e 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 @@ -4,7 +4,7 @@ package com.oracle.bmc.core.model; /** - * For use with Oracle Bare Metal Cloud Services FastConnect. + * For use with Oracle Cloud Infrastructure FastConnect. *

* A virtual circuit is an isolated network path that runs over one or more physical * network connections to provide a single, logical connection between the edge router @@ -420,14 +420,14 @@ public static LifecycleState create(String key) { Integer oracleBgpAsn; /** - * The name of the provider (if the customer is connecting via a provider). + * The name of the provider (if you're connecting via a provider). * **/ @com.fasterxml.jackson.annotation.JsonProperty("providerName") String providerName; /** - * The name of the service offered by the provider (if the customer is connecting via a provider). + * The name of the service offered by the provider. * **/ @com.fasterxml.jackson.annotation.JsonProperty("providerServiceName") @@ -503,7 +503,7 @@ public static ProviderState create(String key) { String referenceComment; /** - * The Oracle Bare Metal Cloud Services region where this virtual + * The Oracle Cloud Infrastructure region where this virtual * circuit is located. * **/ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Volume.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Volume.java index 18faeb391fc..6d52e5e774c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Volume.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Volume.java @@ -57,6 +57,15 @@ public Builder id(String id) { 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.JsonProperty("lifecycleState") private LifecycleState lifecycleState; @@ -84,6 +93,15 @@ public Builder sizeInMBs(Long sizeInMBs) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("sourceDetails") + private VolumeSourceDetails sourceDetails; + + public Builder sourceDetails(VolumeSourceDetails sourceDetails) { + this.sourceDetails = sourceDetails; + this.__explicitlySet__.add("sourceDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") private java.util.Date timeCreated; @@ -103,9 +121,11 @@ public Volume build() { compartmentId, displayName, id, + isHydrated, lifecycleState, sizeInGBs, sizeInMBs, + sourceDetails, timeCreated); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; @@ -117,9 +137,11 @@ public Builder copy(Volume o) { .compartmentId(o.getCompartmentId()) .displayName(o.getDisplayName()) .id(o.getId()) + .isHydrated(o.getIsHydrated()) .lifecycleState(o.getLifecycleState()) .sizeInGBs(o.getSizeInGBs()) .sizeInMBs(o.getSizeInMBs()) + .sourceDetails(o.getSourceDetails()) .timeCreated(o.getTimeCreated()); } } @@ -155,10 +177,16 @@ public static Builder builder() { String displayName; /** - * The volume's Oracle ID (OCID). + * The OCID of the volume. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") String id; + + /** + * Specifies whether the cloned volume's data has finished copying from the source volume or backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHydrated") + Boolean isHydrated; /** * The current state of a volume. **/ @@ -222,11 +250,19 @@ public static LifecycleState create(String key) { Long sizeInGBs; /** - * The size of the volume in MBs. This field is deprecated. Please use sizeInGBs. + * The size of the volume in MBs. This field is deprecated. Use sizeInGBs instead. **/ @com.fasterxml.jackson.annotation.JsonProperty("sizeInMBs") Long sizeInMBs; + /** + * The volume source, either an existing volume in the same Availability Domain or a volume backup. + * If null, an empty volume is created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceDetails") + VolumeSourceDetails sourceDetails; + /** * The date and time the volume was created. Format defined by RFC3339. **/ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceDetails.java new file mode 100644 index 00000000000..717275bfe7c --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceDetails.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@lombok.experimental.NonFinal +@lombok.AllArgsConstructor(access = lombok.AccessLevel.PROTECTED) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = VolumeSourceDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = VolumeSourceFromVolumeDetails.class, + name = "volume" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = VolumeSourceFromVolumeBackupDetails.class, + name = "volumeBackup" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class VolumeSourceDetails {} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceFromVolumeBackupDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceFromVolumeBackupDetails.java new file mode 100644 index 00000000000..ae897c51571 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceFromVolumeBackupDetails.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * Specifies the volume backup. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = VolumeSourceFromVolumeBackupDetails.Builder.class +) +@lombok.ToString(callSuper = true) +@lombok.EqualsAndHashCode(callSuper = true) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class VolumeSourceFromVolumeBackupDetails extends VolumeSourceDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VolumeSourceFromVolumeBackupDetails build() { + VolumeSourceFromVolumeBackupDetails __instance__ = + new VolumeSourceFromVolumeBackupDetails(id); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VolumeSourceFromVolumeBackupDetails o) { + return id(o.getId()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public VolumeSourceFromVolumeBackupDetails(String id) { + super(); + this.id = id; + } + + /** + * The OCID of the volume backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + @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/VolumeSourceFromVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceFromVolumeDetails.java new file mode 100644 index 00000000000..7bb4d785ab9 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceFromVolumeDetails.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * Specifies the source volume. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = VolumeSourceFromVolumeDetails.Builder.class +) +@lombok.ToString(callSuper = true) +@lombok.EqualsAndHashCode(callSuper = true) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class VolumeSourceFromVolumeDetails extends VolumeSourceDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VolumeSourceFromVolumeDetails build() { + VolumeSourceFromVolumeDetails __instance__ = new VolumeSourceFromVolumeDetails(id); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VolumeSourceFromVolumeDetails o) { + return id(o.getId()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public VolumeSourceFromVolumeDetails(String id) { + super(); + this.id = id; + } + + /** + * The OCID of the volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + @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/requests/ListConsoleHistoriesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListConsoleHistoriesRequest.java index 264239d8cc0..5d58af5cd89 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListConsoleHistoriesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListConsoleHistoriesRequest.java @@ -42,6 +42,114 @@ public class ListConsoleHistoriesRequest extends com.oracle.bmc.requests.BmcRequ */ private String instanceId; + /** + * 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private ConsoleHistory.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -68,6 +176,9 @@ public Builder copy(ListConsoleHistoriesRequest o) { limit(o.getLimit()); page(o.getPage()); instanceId(o.getInstanceId()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectGroupsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectGroupsRequest.java index f1afd78cbf9..02a134b67c1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectGroupsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectGroupsRequest.java @@ -29,6 +29,120 @@ public class ListCrossConnectGroupsRequest extends com.oracle.bmc.requests.BmcRe */ private String page; + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + /** + * 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to return only resources that match the specified lifecycle state. The value is case insensitive. + * + */ + private CrossConnectGroup.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -53,6 +167,10 @@ public Builder copy(ListCrossConnectGroupsRequest o) { compartmentId(o.getCompartmentId()); limit(o.getLimit()); page(o.getPage()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectsRequest.java index 01291209200..ce864885e5b 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectsRequest.java @@ -34,6 +34,120 @@ public class ListCrossConnectsRequest extends com.oracle.bmc.requests.BmcRequest */ private String page; + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + /** + * 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to return only resources that match the specified lifecycle state. The value is case insensitive. + * + */ + private CrossConnect.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -59,6 +173,10 @@ public Builder copy(ListCrossConnectsRequest o) { crossConnectGroupId(o.getCrossConnectGroupId()); limit(o.getLimit()); page(o.getPage()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDhcpOptionsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDhcpOptionsRequest.java index 860a819444d..4e5e28929d2 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDhcpOptionsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDhcpOptionsRequest.java @@ -34,6 +34,120 @@ public class ListDhcpOptionsRequest extends com.oracle.bmc.requests.BmcRequest { */ private String page; + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + /** + * 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private DhcpOptions.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -59,6 +173,10 @@ public Builder copy(ListDhcpOptionsRequest o) { vcnId(o.getVcnId()); limit(o.getLimit()); page(o.getPage()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListImagesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListImagesRequest.java index 0171a454276..9279d53e15a 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListImagesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListImagesRequest.java @@ -16,10 +16,7 @@ public class ListImagesRequest extends com.oracle.bmc.requests.BmcRequest { private String compartmentId; /** - * A user-friendly name. Does not have to be unique, and it's changeable. - * Avoid entering confidential information. - *

- * Example: `My new resource` + * A filter to return only resources that match the given display name exactly. * */ private String displayName; @@ -54,6 +51,114 @@ public class ListImagesRequest extends com.oracle.bmc.requests.BmcRequest { */ 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private Image.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -81,6 +186,9 @@ public Builder copy(ListImagesRequest o) { operatingSystemVersion(o.getOperatingSystemVersion()); limit(o.getLimit()); page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstancesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstancesRequest.java index a8385097417..c10a05821bc 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstancesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstancesRequest.java @@ -24,10 +24,7 @@ public class ListInstancesRequest extends com.oracle.bmc.requests.BmcRequest { private String availabilityDomain; /** - * A user-friendly name. Does not have to be unique, and it's changeable. - * Avoid entering confidential information. - *

- * Example: `My new resource` + * A filter to return only resources that match the given display name exactly. * */ private String displayName; @@ -46,6 +43,114 @@ public class ListInstancesRequest extends com.oracle.bmc.requests.BmcRequest { */ 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private Instance.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -72,6 +177,9 @@ public Builder copy(ListInstancesRequest o) { displayName(o.getDisplayName()); limit(o.getLimit()); page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInternetGatewaysRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInternetGatewaysRequest.java index 8c3c54882aa..e84ae44882f 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInternetGatewaysRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInternetGatewaysRequest.java @@ -34,6 +34,120 @@ public class ListInternetGatewaysRequest extends com.oracle.bmc.requests.BmcRequ */ private String page; + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + /** + * 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private InternetGateway.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -59,6 +173,10 @@ public Builder copy(ListInternetGatewaysRequest o) { vcnId(o.getVcnId()); limit(o.getLimit()); page(o.getPage()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListRouteTablesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListRouteTablesRequest.java index 469481d25a2..5a5eb320a6a 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListRouteTablesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListRouteTablesRequest.java @@ -34,6 +34,120 @@ public class ListRouteTablesRequest extends com.oracle.bmc.requests.BmcRequest { */ private String page; + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + /** + * 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private RouteTable.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -59,6 +173,10 @@ public Builder copy(ListRouteTablesRequest o) { vcnId(o.getVcnId()); limit(o.getLimit()); page(o.getPage()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSecurityListsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSecurityListsRequest.java index 2d8e30cf58b..63e75005ede 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSecurityListsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSecurityListsRequest.java @@ -34,6 +34,120 @@ public class ListSecurityListsRequest extends com.oracle.bmc.requests.BmcRequest */ private String page; + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + /** + * 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private SecurityList.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -59,6 +173,10 @@ public Builder copy(ListSecurityListsRequest o) { vcnId(o.getVcnId()); limit(o.getLimit()); page(o.getPage()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSubnetsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSubnetsRequest.java index c0cf168c011..2a600580e72 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSubnetsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSubnetsRequest.java @@ -34,6 +34,120 @@ public class ListSubnetsRequest extends com.oracle.bmc.requests.BmcRequest { */ private String page; + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + /** + * 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private Subnet.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -59,6 +173,10 @@ public Builder copy(ListSubnetsRequest o) { vcnId(o.getVcnId()); limit(o.getLimit()); page(o.getPage()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVcnsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVcnsRequest.java index a3dc786a87b..99bc5545d58 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVcnsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVcnsRequest.java @@ -29,6 +29,120 @@ public class ListVcnsRequest extends com.oracle.bmc.requests.BmcRequest { */ private String page; + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + /** + * 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private Vcn.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -53,6 +167,10 @@ public Builder copy(ListVcnsRequest o) { compartmentId(o.getCompartmentId()); limit(o.getLimit()); page(o.getPage()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVirtualCircuitsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVirtualCircuitsRequest.java index 0870a6215ca..60ab7fc502f 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVirtualCircuitsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVirtualCircuitsRequest.java @@ -29,6 +29,120 @@ public class ListVirtualCircuitsRequest extends com.oracle.bmc.requests.BmcReque */ private String page; + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + /** + * 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to return only resources that match the specified lifecycle state. The value is case insensitive. + * + */ + private VirtualCircuit.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -53,6 +167,10 @@ public Builder copy(ListVirtualCircuitsRequest o) { compartmentId(o.getCompartmentId()); limit(o.getLimit()); page(o.getPage()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeBackupsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeBackupsRequest.java index ced82359e71..612124a8bb4 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeBackupsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeBackupsRequest.java @@ -34,6 +34,120 @@ public class ListVolumeBackupsRequest extends com.oracle.bmc.requests.BmcRequest */ private String page; + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + /** + * 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private VolumeBackup.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -59,6 +173,10 @@ public Builder copy(ListVolumeBackupsRequest o) { volumeId(o.getVolumeId()); limit(o.getLimit()); page(o.getPage()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumesRequest.java index 24b7fc40b03..7f07c6b6240 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumesRequest.java @@ -37,6 +37,120 @@ public class ListVolumesRequest extends com.oracle.bmc.requests.BmcRequest { */ private String page; + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + /** + * 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:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these \"List\" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private Volume.LifecycleState lifecycleState; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -62,6 +176,10 @@ public Builder copy(ListVolumesRequest o) { availabilityDomain(o.getAvailabilityDomain()); limit(o.getLimit()); page(o.getPage()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); return this; } diff --git a/bmc-database/pom.xml b/bmc-database/pom.xml index f1613c0e78e..d465039e8b6 100644 --- a/bmc-database/pom.xml +++ b/bmc-database/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.16 + 1.2.17 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.16 + 1.2.17 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 a4047b40444..fcff73b4938 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,11 +36,20 @@ public interface Database extends AutoCloseable { */ void setRegion(String regionId); + /** + * 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. + * + * @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. + */ + CreateBackupResponse createBackup(CreateBackupRequest request); + /** * Creates a new Data Guard association. A Data Guard association represents the replication relationship between the * specified database and a peer database. For more information, see [Using Oracle Data Guard](https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Tasks/usingdataguard.htm). *

- * All Oracle Bare Metal Cloud Services resources, including Data Guard associations, get an Oracle-assigned, unique ID + * All Oracle Cloud Infrastructure resources, including Data Guard associations, get an Oracle-assigned, unique ID * called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. * You can also retrieve a resource's OCID by using a List API operation on that resource type, or by viewing the * resource in the Console. Fore more information, see @@ -85,6 +94,14 @@ CreateDataGuardAssociationResponse createDataGuardAssociation( */ DbNodeActionResponse dbNodeAction(DbNodeActionRequest request); + /** + * Deletes a full backup. You cannot delete automatic backups using this API. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + DeleteBackupResponse deleteBackup(DeleteBackupRequest request); + /** * Deletes a DB Home. The DB Home and its database data are local to the DB System and will be lost when it is deleted. Oracle recommends that you back up any data in the DB System prior to deleting it. * @@ -108,6 +125,14 @@ CreateDataGuardAssociationResponse createDataGuardAssociation( FailoverDataGuardAssociationResponse failoverDataGuardAssociation( FailoverDataGuardAssociationRequest request); + /** + * Gets information about the specified 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. + */ + GetBackupResponse getBackup(GetBackupRequest request); + /** * Gets the specified Data Guard association's configuration information. * @@ -205,6 +230,15 @@ GetDbSystemPatchHistoryEntryResponse getDbSystemPatchHistoryEntry( */ LaunchDbSystemResponse launchDbSystem(LaunchDbSystemRequest request); + /** + * Gets a list of backups based on the databaseId or compartmentId specified. Either one of the query parameters must be provided. + * + * @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. + */ + ListBackupsResponse listBackups(ListBackupsRequest request); + /** * Lists all Data Guard associations for the specified database. * @@ -316,6 +350,15 @@ ListDbSystemPatchHistoryEntriesResponse listDbSystemPatchHistoryEntries( ReinstateDataGuardAssociationResponse reinstateDataGuardAssociation( ReinstateDataGuardAssociationRequest request); + /** + * Restore a Database based on the request parameters you provide. + * + * @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. + */ + RestoreDatabaseResponse restoreDatabase(RestoreDatabaseRequest 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. @@ -337,6 +380,15 @@ SwitchoverDataGuardAssociationResponse switchoverDataGuardAssociation( */ TerminateDbSystemResponse terminateDbSystem(TerminateDbSystemRequest request); + /** + * Update a Database based on the request parameters you provide. + * + * @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. + */ + UpdateDatabaseResponse updateDatabase(UpdateDatabaseRequest request); + /** * Patches the specified dbHome. * @param request The request object containing the details to send 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 c9391b38390..c2e3bf65bda 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,11 +36,27 @@ public interface DatabaseAsync extends AutoCloseable { */ void setRegion(String regionId); + /** + * 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. + * + * + * @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 createBackup( + CreateBackupRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Creates a new Data Guard association. A Data Guard association represents the replication relationship between the * specified database and a peer database. For more information, see [Using Oracle Data Guard](https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Tasks/usingdataguard.htm). *

- * All Oracle Bare Metal Cloud Services resources, including Data Guard associations, get an Oracle-assigned, unique ID + * All Oracle Cloud Infrastructure resources, including Data Guard associations, get an Oracle-assigned, unique ID * called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. * You can also retrieve a resource's OCID by using a List API operation on that resource type, or by viewing the * resource in the Console. Fore more information, see @@ -106,6 +122,21 @@ java.util.concurrent.Future dbNodeAction( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Deletes a full backup. You cannot delete automatic backups using this API. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteBackup( + DeleteBackupRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Deletes a DB Home. The DB Home and its database data are local to the DB System and will be lost when it is deleted. Oracle recommends that you back up any data in the DB System prior to deleting it. * @@ -144,6 +175,20 @@ java.util.concurrent.Future failoverDataGu FailoverDataGuardAssociationResponse> handler); + /** + * Gets information about the specified 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 getBackup( + GetBackupRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + /** * Gets the specified Data Guard association's configuration information. * @@ -309,6 +354,21 @@ java.util.concurrent.Future launchDbSystem( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets a list of backups based on the databaseId or compartmentId specified. Either one of the query parameters must be provided. + * + * + * @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 listBackups( + ListBackupsRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + /** * Lists all Data Guard associations for the specified database. * @@ -511,6 +571,22 @@ java.util.concurrent.Future listDbVersions( ReinstateDataGuardAssociationResponse> handler); + /** + * Restore a Database based on the request parameters you provide. + * + * + * @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 restoreDatabase( + RestoreDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler + 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. @@ -549,6 +625,22 @@ java.util.concurrent.Future terminateDbSystem( TerminateDbSystemRequest, TerminateDbSystemResponse> handler); + /** + * Update a Database based on the request parameters you provide. + * + * + * @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 updateDatabase( + UpdateDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Patches the specified dbHome. * 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 79ba8efcce2..6be3357aa87 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 @@ -117,6 +117,28 @@ public void close() { client.close(); } + @Override + public java.util.concurrent.Future createBackup( + CreateBackupRequest request, + com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async createBackup"); + request = CreateBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateBackupConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = CreateBackupConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.post(ib, request.getCreateBackupDetails(), request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future createDataGuardAssociation( @@ -197,6 +219,28 @@ public java.util.concurrent.Future dbNodeAction( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future deleteBackup( + DeleteBackupRequest request, + com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async deleteBackup"); + request = DeleteBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteBackupConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = DeleteBackupConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.delete(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future deleteDbHome( DeleteDbHomeRequest request, @@ -250,6 +294,27 @@ public java.util.concurrent.Future deleteDbHome( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future getBackup( + GetBackupRequest request, + com.oracle.bmc.responses.AsyncHandler handler) { + LOG.trace("Called async getBackup"); + request = GetBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetBackupConverter.fromRequest(client, request); + com.google.common.base.Function transformer = + GetBackupConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.get(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future getDataGuardAssociation( GetDataGuardAssociationRequest request, @@ -477,6 +542,28 @@ public java.util.concurrent.Future launchDbSystem( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future listBackups( + ListBackupsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listBackups"); + request = ListBackupsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListBackupsConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListBackupsConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.get(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future listDataGuardAssociations( ListDataGuardAssociationsRequest request, @@ -763,6 +850,28 @@ public java.util.concurrent.Future listDbVersions( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future restoreDatabase( + RestoreDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async restoreDatabase"); + request = RestoreDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RestoreDatabaseConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = RestoreDatabaseConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.post(ib, request.getRestoreDatabaseDetails(), request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future switchoverDataGuardAssociation( @@ -817,6 +926,28 @@ public java.util.concurrent.Future terminateDbSystem( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future updateDatabase( + UpdateDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async updateDatabase"); + request = UpdateDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDatabaseConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = UpdateDatabaseConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.put(ib, request.getUpdateDatabaseDetails(), request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future updateDbHome( UpdateDbHomeRequest request, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseClient.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseClient.java index fd14b73f2c9..0151c47fecf 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 @@ -136,6 +136,20 @@ public void close() { client.close(); } + @Override + public CreateBackupResponse createBackup(CreateBackupRequest request) { + LOG.trace("Called createBackup"); + request = CreateBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateBackupConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = CreateBackupConverter.fromResponse(); + + javax.ws.rs.core.Response response = + client.post(ib, request.getCreateBackupDetails(), request); + return transformer.apply(response); + } + @Override public CreateDataGuardAssociationResponse createDataGuardAssociation( CreateDataGuardAssociationRequest request) { @@ -179,6 +193,19 @@ public DbNodeActionResponse dbNodeAction(DbNodeActionRequest request) { return transformer.apply(response); } + @Override + public DeleteBackupResponse deleteBackup(DeleteBackupRequest request) { + LOG.trace("Called deleteBackup"); + request = DeleteBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteBackupConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = DeleteBackupConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.delete(ib, request); + return transformer.apply(response); + } + @Override public DeleteDbHomeResponse deleteDbHome(DeleteDbHomeRequest request) { LOG.trace("Called deleteDbHome"); @@ -208,6 +235,19 @@ public FailoverDataGuardAssociationResponse failoverDataGuardAssociation( return transformer.apply(response); } + @Override + public GetBackupResponse getBackup(GetBackupRequest request) { + LOG.trace("Called getBackup"); + request = GetBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetBackupConverter.fromRequest(client, request); + com.google.common.base.Function transformer = + GetBackupConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } + @Override public GetDataGuardAssociationResponse getDataGuardAssociation( GetDataGuardAssociationRequest request) { @@ -344,6 +384,19 @@ public LaunchDbSystemResponse launchDbSystem(LaunchDbSystemRequest request) { return transformer.apply(response); } + @Override + public ListBackupsResponse listBackups(ListBackupsRequest request) { + LOG.trace("Called listBackups"); + request = ListBackupsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListBackupsConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListBackupsConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } + @Override public ListDataGuardAssociationsResponse listDataGuardAssociations( ListDataGuardAssociationsRequest request) { @@ -509,6 +562,20 @@ public ReinstateDataGuardAssociationResponse reinstateDataGuardAssociation( return transformer.apply(response); } + @Override + public RestoreDatabaseResponse restoreDatabase(RestoreDatabaseRequest request) { + LOG.trace("Called restoreDatabase"); + request = RestoreDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RestoreDatabaseConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = RestoreDatabaseConverter.fromResponse(); + + javax.ws.rs.core.Response response = + client.post(ib, request.getRestoreDatabaseDetails(), request); + return transformer.apply(response); + } + @Override public SwitchoverDataGuardAssociationResponse switchoverDataGuardAssociation( SwitchoverDataGuardAssociationRequest request) { @@ -538,6 +605,20 @@ public TerminateDbSystemResponse terminateDbSystem(TerminateDbSystemRequest requ return transformer.apply(response); } + @Override + public UpdateDatabaseResponse updateDatabase(UpdateDatabaseRequest request) { + LOG.trace("Called updateDatabase"); + request = UpdateDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDatabaseConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = UpdateDatabaseConverter.fromResponse(); + + javax.ws.rs.core.Response response = + client.put(ib, request.getUpdateDatabaseDetails(), request); + return transformer.apply(response); + } + @Override public UpdateDbHomeResponse updateDbHome(UpdateDbHomeRequest request) { LOG.trace("Called updateDbHome"); 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 ecdd4e17f49..0a99863523f 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,65 @@ 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 targetState The desired state to wait for. + * @return A new Waiter instance. + */ + public com.oracle.bmc.waiter.Waiter forBackup( + GetBackupRequest request, + com.oracle.bmc.database.model.Backup.LifecycleState targetState) { + return forBackup( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetState); + } + + /** + * 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 Waiter instance. + */ + public com.oracle.bmc.waiter.Waiter forBackup( + GetBackupRequest request, + com.oracle.bmc.database.model.Backup.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + return forBackup( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + // Helper method to create a new Waiter for Backup. + private com.oracle.bmc.waiter.Waiter forBackup( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetBackupRequest request, + final com.oracle.bmc.database.model.Backup.LifecycleState targetState) { + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + com.google.common.base.Suppliers.ofInstance(request), + new com.google.common.base.Function() { + @Override + public GetBackupResponse apply(GetBackupRequest request) { + return client.getBackup(request); + } + }, + new com.google.common.base.Predicate() { + @Override + public boolean apply(GetBackupResponse response) { + return response.getBackup().getLifecycleState() == targetState; + } + }, + targetState == com.oracle.bmc.database.model.Backup.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/CreateBackupConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateBackupConverter.java new file mode 100644 index 00000000000..b791e4dd461 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateBackupConverter.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2016, 2017, 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.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class CreateBackupConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateBackupRequest interceptRequest(CreateBackupRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, CreateBackupRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getCreateBackupDetails() == null) { + throw new NullPointerException("createBackupDetails is required"); + } + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("backups"); + + 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 + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, CreateBackupResponse>() { + @Override + public CreateBackupResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for CreateBackupResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = + RESPONSE_CONVERSION_FACTORY.create(Backup.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateBackupResponse.Builder builder = + CreateBackupResponse.builder(); + + builder.backup(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)); + } + + CreateBackupResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteBackupConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteBackupConverter.java new file mode 100644 index 00000000000..7d10baea45f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteBackupConverter.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2016, 2017, 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.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class DeleteBackupConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static DeleteBackupRequest interceptRequest(DeleteBackupRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, DeleteBackupRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getBackupId() == null) { + throw new NullPointerException("backupId is required"); + } + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("backups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBackupId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteBackupResponse>() { + @Override + public DeleteBackupResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for DeleteBackupResponse"); + 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(); + + DeleteBackupResponse.Builder builder = + DeleteBackupResponse.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)); + } + + DeleteBackupResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteDbHomeConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteDbHomeConverter.java index 0f8dadc86f8..de3edc9a4ee 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteDbHomeConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteDbHomeConverter.java @@ -37,6 +37,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getDbHomeId())); + if (request.getPerformFinalBackup() != null) { + target = + target.queryParam( + "performFinalBackup", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPerformFinalBackup())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetBackupConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetBackupConverter.java new file mode 100644 index 00000000000..ced0af5f447 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetBackupConverter.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2016, 2017, 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.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetBackupConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetBackupRequest interceptRequest(GetBackupRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetBackupRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getBackupId() == null) { + throw new NullPointerException("backupId is required"); + } + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("backups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBackupId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetBackupResponse>() { + @Override + public GetBackupResponse apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for GetBackupResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = + RESPONSE_CONVERSION_FACTORY.create(Backup.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetBackupResponse.Builder builder = GetBackupResponse.builder(); + + builder.backup(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)); + } + + GetBackupResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListBackupsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListBackupsConverter.java new file mode 100644 index 00000000000..cac2287da9a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListBackupsConverter.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2017, 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.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListBackupsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListBackupsRequest interceptRequest(ListBackupsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListBackupsRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("backups"); + + if (request.getDatabaseId() != null) { + target = + target.queryParam( + "databaseId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDatabaseId())); + } + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListBackupsResponse>() { + @Override + public ListBackupsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for ListBackupsResponse"); + 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< + BackupSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListBackupsResponse.Builder builder = ListBackupsResponse.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)); + } + + ListBackupsResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListDataGuardAssociationsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListDataGuardAssociationsConverter.java index c0bf051569c..af62234c74e 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListDataGuardAssociationsConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListDataGuardAssociationsConverter.java @@ -79,15 +79,16 @@ public ListDataGuardAssociationsResponse apply( com.google.common.base.Function< javax.ws.rs.core.Response, com.oracle.bmc.http.internal.WithHeaders< - java.util.List>> + java.util.List< + DataGuardAssociationSummary>>> responseFn = RESPONSE_CONVERSION_FACTORY.create( new javax.ws.rs.core.GenericType< java.util.List< - DataGuardAssociation>>() {}); + DataGuardAssociationSummary>>() {}); com.oracle.bmc.http.internal.WithHeaders< - java.util.List> + java.util.List> response = responseFn.apply(rawResponse); javax.ws.rs.core.MultivaluedMap headers = response.getHeaders(); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/RestoreDatabaseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/RestoreDatabaseConverter.java new file mode 100644 index 00000000000..12d57e7fe25 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/RestoreDatabaseConverter.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2016, 2017, 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.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class RestoreDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static RestoreDatabaseRequest interceptRequest(RestoreDatabaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, RestoreDatabaseRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getDatabaseId() == null) { + throw new NullPointerException("databaseId is required"); + } + + if (request.getRestoreDatabaseDetails() == null) { + throw new NullPointerException("restoreDatabaseDetails is required"); + } + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("databases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDatabaseId())) + .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, RestoreDatabaseResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, RestoreDatabaseResponse>() { + @Override + public RestoreDatabaseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for RestoreDatabaseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = + RESPONSE_CONVERSION_FACTORY.create(Database.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + RestoreDatabaseResponse.Builder builder = + RestoreDatabaseResponse.builder(); + + builder.database(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)); + } + + RestoreDatabaseResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateDatabaseConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateDatabaseConverter.java new file mode 100644 index 00000000000..ed26ef050ed --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateDatabaseConverter.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) 2016, 2017, 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.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class UpdateDatabaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateDatabaseRequest interceptRequest(UpdateDatabaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, UpdateDatabaseRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getDatabaseId() == null) { + throw new NullPointerException("databaseId is required"); + } + + if (request.getUpdateDatabaseDetails() == null) { + throw new NullPointerException("updateDatabaseDetails is required"); + } + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("databases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDatabaseId())); + + 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 + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateDatabaseResponse>() { + @Override + public UpdateDatabaseResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for UpdateDatabaseResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = + RESPONSE_CONVERSION_FACTORY.create(Database.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + UpdateDatabaseResponse.Builder builder = + UpdateDatabaseResponse.builder(); + + builder.database(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)); + } + + UpdateDatabaseResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/Backup.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/Backup.java new file mode 100644 index 00000000000..d1a86ed62d2 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/Backup.java @@ -0,0 +1,306 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * A 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). + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Backup.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class Backup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + 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("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 Backup build() { + Backup __instance__ = + new Backup( + availabilityDomain, + compartmentId, + databaseId, + displayName, + id, + lifecycleDetails, + lifecycleState, + timeEnded, + timeStarted, + type); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Backup o) { + return availabilityDomain(o.getAvailabilityDomain()) + .compartmentId(o.getCompartmentId()) + .databaseId(o.getDatabaseId()) + .displayName(o.getDisplayName()) + .id(o.getId()) + .lifecycleDetails(o.getLifecycleDetails()) + .lifecycleState(o.getLifecycleState()) + .timeEnded(o.getTimeEnded()) + .timeStarted(o.getTimeStarted()) + .type(o.getType()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The name of the Availability Domain that the backup is located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + String availabilityDomain; + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The OCID of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + String databaseId; + + /** + * The user-friendly name for the backup. It does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The OCID of the backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * Additional information about the current lifecycleState. + **/ + @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"), + Restoring("RESTORING"), + + /** + * 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 was completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + java.util.Date timeEnded; + + /** + * The date and time the backup starts. + **/ + @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/BackupSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/BackupSummary.java new file mode 100644 index 00000000000..4007738d026 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/BackupSummary.java @@ -0,0 +1,306 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * A 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). + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = BackupSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class BackupSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + 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("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 BackupSummary build() { + BackupSummary __instance__ = + new BackupSummary( + availabilityDomain, + compartmentId, + databaseId, + displayName, + id, + lifecycleDetails, + lifecycleState, + timeEnded, + timeStarted, + type); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BackupSummary o) { + return availabilityDomain(o.getAvailabilityDomain()) + .compartmentId(o.getCompartmentId()) + .databaseId(o.getDatabaseId()) + .displayName(o.getDisplayName()) + .id(o.getId()) + .lifecycleDetails(o.getLifecycleDetails()) + .lifecycleState(o.getLifecycleState()) + .timeEnded(o.getTimeEnded()) + .timeStarted(o.getTimeStarted()) + .type(o.getType()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The name of the Availability Domain that the backup is located in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + String availabilityDomain; + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The OCID of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + String databaseId; + + /** + * The user-friendly name for the backup. It does not have to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The OCID of the backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * Additional information about the current lifecycleState. + **/ + @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"), + Restoring("RESTORING"), + + /** + * 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 was completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + java.util.Date timeEnded; + + /** + * The date and time the backup starts. + **/ + @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/CreateBackupDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateBackupDetails.java new file mode 100644 index 00000000000..7ab940c91fc --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateBackupDetails.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateBackupDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateBackupDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + 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 CreateBackupDetails build() { + CreateBackupDetails __instance__ = new CreateBackupDetails(databaseId, displayName); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateBackupDetails o) { + return databaseId(o.getDatabaseId()).displayName(o.getDisplayName()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + String databaseId; + + /** + * The user-friendly name for the backup. It 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/CreateDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDatabaseDetails.java index c67dfd4fa32..8b5fc85e12a 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDatabaseDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDatabaseDetails.java @@ -31,6 +31,15 @@ public Builder characterSet(String characterSet) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private DbBackupConfig dbBackupConfig; + + public Builder dbBackupConfig(DbBackupConfig dbBackupConfig) { + this.dbBackupConfig = dbBackupConfig; + this.__explicitlySet__.add("dbBackupConfig"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("dbName") private String dbName; @@ -75,6 +84,7 @@ public CreateDatabaseDetails build() { new CreateDatabaseDetails( adminPassword, characterSet, + dbBackupConfig, dbName, dbWorkload, ncharacterSet, @@ -87,6 +97,7 @@ public CreateDatabaseDetails build() { public Builder copy(CreateDatabaseDetails o) { return adminPassword(o.getAdminPassword()) .characterSet(o.getCharacterSet()) + .dbBackupConfig(o.getDbBackupConfig()) .dbName(o.getDbName()) .dbWorkload(o.getDbWorkload()) .ncharacterSet(o.getNcharacterSet()) @@ -116,6 +127,9 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("characterSet") String characterSet; + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + DbBackupConfig dbBackupConfig; + /** * The database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. **/ diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DataGuardAssociationSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DataGuardAssociationSummary.java new file mode 100644 index 00000000000..814d10069ff --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DataGuardAssociationSummary.java @@ -0,0 +1,562 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * The properties that define a Data Guard association. + *

+ * 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). + *

+ * For information about endpoints and signing API requests, see + * [About the API](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). For information about available SDKs and tools, see + * [SDKS and Other Tools](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdks.htm). + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DataGuardAssociationSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class DataGuardAssociationSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("applyLag") + private String applyLag; + + public Builder applyLag(String applyLag) { + this.applyLag = applyLag; + this.__explicitlySet__.add("applyLag"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("applyRate") + private String applyRate; + + public Builder applyRate(String applyRate) { + this.applyRate = applyRate; + this.__explicitlySet__.add("applyRate"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + 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("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("peerDataGuardAssociationId") + private String peerDataGuardAssociationId; + + public Builder peerDataGuardAssociationId(String peerDataGuardAssociationId) { + this.peerDataGuardAssociationId = peerDataGuardAssociationId; + this.__explicitlySet__.add("peerDataGuardAssociationId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("peerDatabaseId") + private String peerDatabaseId; + + public Builder peerDatabaseId(String peerDatabaseId) { + this.peerDatabaseId = peerDatabaseId; + this.__explicitlySet__.add("peerDatabaseId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("peerDbHomeId") + private String peerDbHomeId; + + public Builder peerDbHomeId(String peerDbHomeId) { + this.peerDbHomeId = peerDbHomeId; + this.__explicitlySet__.add("peerDbHomeId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("peerDbSystemId") + private String peerDbSystemId; + + public Builder peerDbSystemId(String peerDbSystemId) { + this.peerDbSystemId = peerDbSystemId; + this.__explicitlySet__.add("peerDbSystemId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("peerRole") + private PeerRole peerRole; + + public Builder peerRole(PeerRole peerRole) { + this.peerRole = peerRole; + this.__explicitlySet__.add("peerRole"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + private ProtectionMode protectionMode; + + public Builder protectionMode(ProtectionMode protectionMode) { + this.protectionMode = protectionMode; + this.__explicitlySet__.add("protectionMode"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("role") + private Role role; + + public Builder role(Role role) { + this.role = role; + this.__explicitlySet__.add("role"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + private TransportType transportType; + + public Builder transportType(TransportType transportType) { + this.transportType = transportType; + this.__explicitlySet__.add("transportType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DataGuardAssociationSummary build() { + DataGuardAssociationSummary __instance__ = + new DataGuardAssociationSummary( + applyLag, + applyRate, + databaseId, + id, + lifecycleDetails, + lifecycleState, + peerDataGuardAssociationId, + peerDatabaseId, + peerDbHomeId, + peerDbSystemId, + peerRole, + protectionMode, + role, + timeCreated, + transportType); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DataGuardAssociationSummary o) { + return applyLag(o.getApplyLag()) + .applyRate(o.getApplyRate()) + .databaseId(o.getDatabaseId()) + .id(o.getId()) + .lifecycleDetails(o.getLifecycleDetails()) + .lifecycleState(o.getLifecycleState()) + .peerDataGuardAssociationId(o.getPeerDataGuardAssociationId()) + .peerDatabaseId(o.getPeerDatabaseId()) + .peerDbHomeId(o.getPeerDbHomeId()) + .peerDbSystemId(o.getPeerDbSystemId()) + .peerRole(o.getPeerRole()) + .protectionMode(o.getProtectionMode()) + .role(o.getRole()) + .timeCreated(o.getTimeCreated()) + .transportType(o.getTransportType()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The lag time between updates to the primary database and application of the redo data on the standby database, + * as computed by the reporting database. + *

+ * Example: `9 seconds` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applyLag") + String applyLag; + + /** + * The rate at which redo logs are synced between the associated databases. + *

+ * Example: `180 Mb per second` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applyRate") + String applyRate; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the reporting database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + String databaseId; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * Additional information about the current lifecycleState, if available. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + String lifecycleDetails; + /** + * The current state of the Data Guard association. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Provisioning("PROVISIONING"), + Available("AVAILABLE"), + Updating("UPDATING"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + 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 Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the peer database's Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerDataGuardAssociationId") + String peerDataGuardAssociationId; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the associated peer database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerDatabaseId") + String peerDatabaseId; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the database home containing the associated peer database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerDbHomeId") + String peerDbHomeId; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the DB System containing the associated + * peer database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerDbSystemId") + String peerDbSystemId; + /** + * The role of the peer database in this Data Guard association. + **/ + @lombok.extern.slf4j.Slf4j + public enum PeerRole { + Primary("PRIMARY"), + Standby("STANDBY"), + DisabledStandby("DISABLED_STANDBY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PeerRole v : PeerRole.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PeerRole(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PeerRole create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PeerRole', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The role of the peer database in this Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("peerRole") + PeerRole peerRole; + /** + * The protection mode of this Data Guard association. For more information, see + * [Oracle Data Guard Protection Modes](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + * in the Oracle Data Guard documentation. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum ProtectionMode { + MaximumAvailability("MAXIMUM_AVAILABILITY"), + MaximumPerformance("MAXIMUM_PERFORMANCE"), + MaximumProtection("MAXIMUM_PROTECTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ProtectionMode v : ProtectionMode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ProtectionMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ProtectionMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ProtectionMode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The protection mode of this Data Guard association. For more information, see + * [Oracle Data Guard Protection Modes](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + * in the Oracle Data Guard documentation. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionMode") + ProtectionMode protectionMode; + /** + * The role of the reporting database in this Data Guard association. + **/ + @lombok.extern.slf4j.Slf4j + public enum Role { + Primary("PRIMARY"), + Standby("STANDBY"), + DisabledStandby("DISABLED_STANDBY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Role v : Role.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Role(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Role create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Role', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The role of the reporting database in this Data Guard association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("role") + Role role; + + /** + * The date and time the Data Guard Association was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + /** + * The redo transport type used by this Data Guard association. For more information, see + * [Redo Transport Services](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) + * in the Oracle Data Guard documentation. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum TransportType { + Sync("SYNC"), + Async("ASYNC"), + Fastsync("FASTSYNC"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (TransportType v : TransportType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + TransportType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static TransportType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'TransportType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The redo transport type used by this Data Guard association. For more information, see + * [Redo Transport Services](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) + * in the Oracle Data Guard documentation. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transportType") + TransportType transportType; + + @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/Database.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/Database.java index 95a97f86b87..e1d0f534601 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/Database.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/Database.java @@ -35,6 +35,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private DbBackupConfig dbBackupConfig; + + public Builder dbBackupConfig(DbBackupConfig dbBackupConfig) { + this.dbBackupConfig = dbBackupConfig; + this.__explicitlySet__.add("dbBackupConfig"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") private String dbHomeId; @@ -133,6 +142,7 @@ public Database build() { new Database( characterSet, compartmentId, + dbBackupConfig, dbHomeId, dbName, dbUniqueName, @@ -151,6 +161,7 @@ public Database build() { public Builder copy(Database o) { return characterSet(o.getCharacterSet()) .compartmentId(o.getCompartmentId()) + .dbBackupConfig(o.getDbBackupConfig()) .dbHomeId(o.getDbHomeId()) .dbName(o.getDbName()) .dbUniqueName(o.getDbUniqueName()) @@ -183,6 +194,9 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") String compartmentId; + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + DbBackupConfig dbBackupConfig; + /** * The OCID of the database home. **/ @@ -227,8 +241,10 @@ public enum LifecycleState { Provisioning("PROVISIONING"), Available("AVAILABLE"), Updating("UPDATING"), + BackupInProgress("BACKUP_IN_PROGRESS"), Terminating("TERMINATING"), Terminated("TERMINATED"), + RestoreFailed("RESTORE_FAILED"), Failed("FAILED"), /** diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DatabaseSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DatabaseSummary.java index a3d68e0be07..306924a6b01 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DatabaseSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DatabaseSummary.java @@ -35,6 +35,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private DbBackupConfig dbBackupConfig; + + public Builder dbBackupConfig(DbBackupConfig dbBackupConfig) { + this.dbBackupConfig = dbBackupConfig; + this.__explicitlySet__.add("dbBackupConfig"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("dbHomeId") private String dbHomeId; @@ -133,6 +142,7 @@ public DatabaseSummary build() { new DatabaseSummary( characterSet, compartmentId, + dbBackupConfig, dbHomeId, dbName, dbUniqueName, @@ -151,6 +161,7 @@ public DatabaseSummary build() { public Builder copy(DatabaseSummary o) { return characterSet(o.getCharacterSet()) .compartmentId(o.getCompartmentId()) + .dbBackupConfig(o.getDbBackupConfig()) .dbHomeId(o.getDbHomeId()) .dbName(o.getDbName()) .dbUniqueName(o.getDbUniqueName()) @@ -183,6 +194,9 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") String compartmentId; + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + DbBackupConfig dbBackupConfig; + /** * The OCID of the database home. **/ @@ -227,8 +241,10 @@ public enum LifecycleState { Provisioning("PROVISIONING"), Available("AVAILABLE"), Updating("UPDATING"), + BackupInProgress("BACKUP_IN_PROGRESS"), Terminating("TERMINATING"), Terminated("TERMINATED"), + RestoreFailed("RESTORE_FAILED"), Failed("FAILED"), /** diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbBackupConfig.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbBackupConfig.java new file mode 100644 index 00000000000..279982616e0 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbBackupConfig.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +/** + * Backup Options + * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = DbBackupConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class DbBackupConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("autoBackupEnabled") + private Boolean autoBackupEnabled; + + public Builder autoBackupEnabled(Boolean autoBackupEnabled) { + this.autoBackupEnabled = autoBackupEnabled; + this.__explicitlySet__.add("autoBackupEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DbBackupConfig build() { + DbBackupConfig __instance__ = new DbBackupConfig(autoBackupEnabled); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DbBackupConfig o) { + return autoBackupEnabled(o.getAutoBackupEnabled()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * If set to true, configures automatic backups. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoBackupEnabled") + Boolean autoBackupEnabled; + + @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 b973a229747..0d14c653ba6 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 @@ -83,12 +83,12 @@ public Builder dataStoragePercentage(Integer dataStoragePercentage) { return this; } - @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGB") - private Integer dataStorageSizeInGB; + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") + private Integer dataStorageSizeInGBs; - public Builder dataStorageSizeInGB(Integer dataStorageSizeInGB) { - this.dataStorageSizeInGB = dataStorageSizeInGB; - this.__explicitlySet__.add("dataStorageSizeInGB"); + public Builder dataStorageSizeInGBs(Integer dataStorageSizeInGBs) { + this.dataStorageSizeInGBs = dataStorageSizeInGBs; + this.__explicitlySet__.add("dataStorageSizeInGBs"); return this; } @@ -293,7 +293,7 @@ public DbSystem build() { compartmentId, cpuCoreCount, dataStoragePercentage, - dataStorageSizeInGB, + dataStorageSizeInGBs, databaseEdition, diskRedundancy, displayName, @@ -327,7 +327,7 @@ public Builder copy(DbSystem o) { .compartmentId(o.getCompartmentId()) .cpuCoreCount(o.getCpuCoreCount()) .dataStoragePercentage(o.getDataStoragePercentage()) - .dataStorageSizeInGB(o.getDataStorageSizeInGB()) + .dataStorageSizeInGBs(o.getDataStorageSizeInGBs()) .databaseEdition(o.getDatabaseEdition()) .diskRedundancy(o.getDiskRedundancy()) .displayName(o.getDisplayName()) @@ -406,8 +406,8 @@ public static Builder builder() { * Data storage size, in GBs, that is currently available to the DB system. This is applicable only for VM-based DBs. * **/ - @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGB") - Integer dataStorageSizeInGB; + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") + Integer dataStorageSizeInGBs; /** * The Oracle Database Edition that applies to all the databases on the DB System. * 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 75d29b3fd61..9b2924f029c 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 @@ -83,12 +83,12 @@ public Builder dataStoragePercentage(Integer dataStoragePercentage) { return this; } - @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGB") - private Integer dataStorageSizeInGB; + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") + private Integer dataStorageSizeInGBs; - public Builder dataStorageSizeInGB(Integer dataStorageSizeInGB) { - this.dataStorageSizeInGB = dataStorageSizeInGB; - this.__explicitlySet__.add("dataStorageSizeInGB"); + public Builder dataStorageSizeInGBs(Integer dataStorageSizeInGBs) { + this.dataStorageSizeInGBs = dataStorageSizeInGBs; + this.__explicitlySet__.add("dataStorageSizeInGBs"); return this; } @@ -293,7 +293,7 @@ public DbSystemSummary build() { compartmentId, cpuCoreCount, dataStoragePercentage, - dataStorageSizeInGB, + dataStorageSizeInGBs, databaseEdition, diskRedundancy, displayName, @@ -327,7 +327,7 @@ public Builder copy(DbSystemSummary o) { .compartmentId(o.getCompartmentId()) .cpuCoreCount(o.getCpuCoreCount()) .dataStoragePercentage(o.getDataStoragePercentage()) - .dataStorageSizeInGB(o.getDataStorageSizeInGB()) + .dataStorageSizeInGBs(o.getDataStorageSizeInGBs()) .databaseEdition(o.getDatabaseEdition()) .diskRedundancy(o.getDiskRedundancy()) .displayName(o.getDisplayName()) @@ -406,8 +406,8 @@ public static Builder builder() { * Data storage size, in GBs, that is currently available to the DB system. This is applicable only for VM-based DBs. * **/ - @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGB") - Integer dataStorageSizeInGB; + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") + Integer dataStorageSizeInGBs; /** * The Oracle Database Edition that applies to all the databases on the DB System. * diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/Patch.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/Patch.java index 4a6a26425d1..bbf619ce302 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/Patch.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/Patch.java @@ -134,6 +134,7 @@ public static Builder builder() { @lombok.extern.slf4j.Slf4j public enum AvailableActions { Apply("APPLY"), + Precheck("PRECHECK"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -196,6 +197,7 @@ public static AvailableActions create(String key) { @lombok.extern.slf4j.Slf4j public enum LastAction { Apply("APPLY"), + Precheck("PRECHECK"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchDetails.java index 2858dcbcda6..e63e942f3f5 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchDetails.java @@ -62,6 +62,7 @@ public static Builder builder() { **/ public enum Action { Apply("APPLY"), + Precheck("PRECHECK"), ; private final String value; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchHistoryEntry.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchHistoryEntry.java index c15a0c3edd1..33e100aea66 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchHistoryEntry.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchHistoryEntry.java @@ -121,6 +121,7 @@ public static Builder builder() { @lombok.extern.slf4j.Slf4j public enum Action { Apply("APPLY"), + Precheck("PRECHECK"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchHistoryEntrySummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchHistoryEntrySummary.java index 3806d4fc550..f88418235cc 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchHistoryEntrySummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchHistoryEntrySummary.java @@ -121,6 +121,7 @@ public static Builder builder() { @lombok.extern.slf4j.Slf4j public enum Action { Apply("APPLY"), + Precheck("PRECHECK"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchSummary.java index bed26fb0198..1f70ffc33ee 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/PatchSummary.java @@ -134,6 +134,7 @@ public static Builder builder() { @lombok.extern.slf4j.Slf4j public enum AvailableActions { Apply("APPLY"), + Precheck("PRECHECK"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -196,6 +197,7 @@ public static AvailableActions create(String key) { @lombok.extern.slf4j.Slf4j public enum LastAction { Apply("APPLY"), + Precheck("PRECHECK"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/RestoreDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/RestoreDatabaseDetails.java new file mode 100644 index 00000000000..d8e2bc2890e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/RestoreDatabaseDetails.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RestoreDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class RestoreDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("databaseSCN") + private String databaseSCN; + + public Builder databaseSCN(String databaseSCN) { + this.databaseSCN = databaseSCN; + this.__explicitlySet__.add("databaseSCN"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("latest") + private Boolean latest; + + public Builder latest(Boolean latest) { + this.latest = latest; + this.__explicitlySet__.add("latest"); + return this; + } + + @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 RestoreDatabaseDetails build() { + RestoreDatabaseDetails __instance__ = + new RestoreDatabaseDetails(databaseSCN, latest, timestamp); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RestoreDatabaseDetails o) { + return databaseSCN(o.getDatabaseSCN()) + .latest(o.getLatest()) + .timestamp(o.getTimestamp()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Restores using the backup with the System Change Number (SCN) specified. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseSCN") + String databaseSCN; + + /** + * Restores to the last known good state with the least possible data loss. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("latest") + Boolean latest; + + /** + * Restores to the timestamp specified. + * + **/ + @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/UpdateDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDatabaseDetails.java new file mode 100644 index 00000000000..c1f4b3fd38a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDatabaseDetails.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.database.model; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateDatabaseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + private DbBackupConfig dbBackupConfig; + + public Builder dbBackupConfig(DbBackupConfig dbBackupConfig) { + this.dbBackupConfig = dbBackupConfig; + this.__explicitlySet__.add("dbBackupConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateDatabaseDetails build() { + UpdateDatabaseDetails __instance__ = new UpdateDatabaseDetails(dbBackupConfig); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateDatabaseDetails o) { + return dbBackupConfig(o.getDbBackupConfig()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbBackupConfig") + DbBackupConfig dbBackupConfig; + + @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/UpdateDbSystemDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDbSystemDetails.java index e1fae8aad80..bf07b015c13 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDbSystemDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDbSystemDetails.java @@ -26,12 +26,12 @@ public Builder cpuCoreCount(Integer cpuCoreCount) { return this; } - @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGB") - private Integer dataStorageSizeInGB; + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") + private Integer dataStorageSizeInGBs; - public Builder dataStorageSizeInGB(Integer dataStorageSizeInGB) { - this.dataStorageSizeInGB = dataStorageSizeInGB; - this.__explicitlySet__.add("dataStorageSizeInGB"); + public Builder dataStorageSizeInGBs(Integer dataStorageSizeInGBs) { + this.dataStorageSizeInGBs = dataStorageSizeInGBs; + this.__explicitlySet__.add("dataStorageSizeInGBs"); return this; } @@ -59,7 +59,7 @@ public Builder version(PatchDetails version) { public UpdateDbSystemDetails build() { UpdateDbSystemDetails __instance__ = new UpdateDbSystemDetails( - cpuCoreCount, dataStorageSizeInGB, sshPublicKeys, version); + cpuCoreCount, dataStorageSizeInGBs, sshPublicKeys, version); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -67,7 +67,7 @@ public UpdateDbSystemDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(UpdateDbSystemDetails o) { return cpuCoreCount(o.getCpuCoreCount()) - .dataStorageSizeInGB(o.getDataStorageSizeInGB()) + .dataStorageSizeInGBs(o.getDataStorageSizeInGBs()) .sshPublicKeys(o.getSshPublicKeys()) .version(o.getVersion()); } @@ -90,8 +90,8 @@ public static Builder builder() { * Size, in GBs, to which the currently attached storage needs to be scaled up to for VM based DB system. This must be greater than current storage size. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume. * **/ - @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGB") - Integer dataStorageSizeInGB; + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") + Integer dataStorageSizeInGBs; /** * The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters. diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateBackupRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateBackupRequest.java new file mode 100644 index 00000000000..bb418be9103 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateBackupRequest.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2016, 2017, 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 CreateBackupRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Request to create a new database backup. + */ + private CreateBackupDetails createBackupDetails; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due 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(CreateBackupRequest o) { + createBackupDetails(o.getCreateBackupDetails()); + opcRetryToken(o.getOpcRetryToken()); + return this; + } + + /** + * Build the instance of CreateBackupRequest 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 CreateBackupRequest + */ + public CreateBackupRequest build() { + CreateBackupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteBackupRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteBackupRequest.java new file mode 100644 index 00000000000..28a489d9514 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteBackupRequest.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2016, 2017, 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 DeleteBackupRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The backup OCID. + */ + private String backupId; + + /** + * 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(DeleteBackupRequest o) { + backupId(o.getBackupId()); + ifMatch(o.getIfMatch()); + return this; + } + + /** + * Build the instance of DeleteBackupRequest 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 DeleteBackupRequest + */ + public DeleteBackupRequest build() { + DeleteBackupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteDbHomeRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteDbHomeRequest.java index ec51399c7a1..6fd845379cd 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteDbHomeRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteDbHomeRequest.java @@ -23,6 +23,11 @@ public class DeleteDbHomeRequest extends com.oracle.bmc.requests.BmcRequest { */ private String ifMatch; + /** + * Whether to perform a final backup of the database or not. Default is false. 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. + */ + private Boolean performFinalBackup; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -46,6 +51,7 @@ public Builder invocationCallback( public Builder copy(DeleteDbHomeRequest o) { dbHomeId(o.getDbHomeId()); ifMatch(o.getIfMatch()); + performFinalBackup(o.getPerformFinalBackup()); return this; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetBackupRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetBackupRequest.java new file mode 100644 index 00000000000..5fa95fa3e4b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetBackupRequest.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2016, 2017, 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 GetBackupRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The backup OCID. + */ + private String backupId; + + 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(GetBackupRequest o) { + backupId(o.getBackupId()); + return this; + } + + /** + * Build the instance of GetBackupRequest 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 GetBackupRequest + */ + public GetBackupRequest build() { + GetBackupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListBackupsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListBackupsRequest.java new file mode 100644 index 00000000000..c60f1bdcf5e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListBackupsRequest.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2016, 2017, 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 ListBackupsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the database. + */ + private String databaseId; + + /** + * 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; + + 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(ListBackupsRequest o) { + databaseId(o.getDatabaseId()); + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + return this; + } + + /** + * Build the instance of ListBackupsRequest 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 ListBackupsRequest + */ + public ListBackupsRequest build() { + ListBackupsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/RestoreDatabaseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/RestoreDatabaseRequest.java new file mode 100644 index 00000000000..68384d40051 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/RestoreDatabaseRequest.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) 2016, 2017, 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 RestoreDatabaseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String databaseId; + + /** + * Request to perform database restore. + */ + private RestoreDatabaseDetails restoreDatabaseDetails; + + /** + * 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(RestoreDatabaseRequest o) { + databaseId(o.getDatabaseId()); + restoreDatabaseDetails(o.getRestoreDatabaseDetails()); + ifMatch(o.getIfMatch()); + return this; + } + + /** + * Build the instance of RestoreDatabaseRequest 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 RestoreDatabaseRequest + */ + public RestoreDatabaseRequest build() { + RestoreDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateDatabaseRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateDatabaseRequest.java new file mode 100644 index 00000000000..61a448b0636 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateDatabaseRequest.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) 2016, 2017, 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 UpdateDatabaseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String databaseId; + + /** + * Request to perform database update. + */ + private UpdateDatabaseDetails updateDatabaseDetails; + + /** + * 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(UpdateDatabaseRequest o) { + databaseId(o.getDatabaseId()); + updateDatabaseDetails(o.getUpdateDatabaseDetails()); + ifMatch(o.getIfMatch()); + return this; + } + + /** + * Build the instance of UpdateDatabaseRequest 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 UpdateDatabaseRequest + */ + public UpdateDatabaseRequest build() { + UpdateDatabaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateBackupResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateBackupResponse.java new file mode 100644 index 00000000000..709ae996a4d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateBackupResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2017, 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 CreateBackupResponse { + + /** + * 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 Backup instance. + */ + private Backup backup; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateBackupResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + backup(o.getBackup()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteBackupResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteBackupResponse.java new file mode 100644 index 00000000000..ec509ec9e2b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteBackupResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2016, 2017, 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 DeleteBackupResponse { + + /** + * Unique 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(DeleteBackupResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetBackupResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetBackupResponse.java new file mode 100644 index 00000000000..afca6d4f0a3 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetBackupResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2017, 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 GetBackupResponse { + + /** + * 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 Backup instance. + */ + private Backup backup; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetBackupResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + backup(o.getBackup()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListBackupsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListBackupsResponse.java new file mode 100644 index 00000000000..37ae6f51d6a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListBackupsResponse.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2016, 2017, 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 ListBackupsResponse { + + /** + * 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 BackupSummary 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(ListBackupsResponse 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/ListDataGuardAssociationsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListDataGuardAssociationsResponse.java index 10623a1d24c..8c200deb599 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListDataGuardAssociationsResponse.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListDataGuardAssociationsResponse.java @@ -27,9 +27,9 @@ public class ListDataGuardAssociationsResponse { private String opcRequestId; /** - * A list of DataGuardAssociation instances. + * A list of DataGuardAssociationSummary instances. */ - private java.util.List items; + private java.util.List items; public static class Builder { /** diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/RestoreDatabaseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/RestoreDatabaseResponse.java new file mode 100644 index 00000000000..ae02a3df596 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/RestoreDatabaseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2017, 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 RestoreDatabaseResponse { + + /** + * 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 Database instance. + */ + private Database database; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RestoreDatabaseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + database(o.getDatabase()); + + return this; + } + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateDatabaseResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateDatabaseResponse.java new file mode 100644 index 00000000000..8be094458da --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateDatabaseResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2017, 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 UpdateDatabaseResponse { + + /** + * 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 Database instance. + */ + private Database database; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateDatabaseResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + database(o.getDatabase()); + + return this; + } + } +} diff --git a/bmc-examples/pom.xml b/bmc-examples/pom.xml index 0968c0dd7c7..f129e0c4d2a 100644 --- a/bmc-examples/pom.xml +++ b/bmc-examples/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.16 + 1.2.17 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 1.2.16 + 1.2.17 pom import diff --git a/bmc-identity/pom.xml b/bmc-identity/pom.xml index 551afe1e775..b52edd3c8c0 100644 --- a/bmc-identity/pom.xml +++ b/bmc-identity/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.16 + 1.2.17 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.16 + 1.2.17 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 5e90d4e60c6..c2d67f4ff89 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 @@ -51,14 +51,14 @@ public interface Identity extends AutoCloseable { /** * Creates a new compartment in your tenancy. *

- **Important:** Compartments cannot be renamed or deleted. + **Important:** Compartments cannot be deleted. *

* You must specify your tenancy's OCID as the compartment ID in the request object. Remember that the tenancy * is simply the root compartment. For information about OCIDs, see * [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). *

* You must also specify a *name* for the compartment, which must be unique across all compartments in - * your tenancy and cannot be changed. You can use this name or the OCID when writing policies that apply + * your tenancy. You can use this name or the OCID when writing policies that apply * to the compartment. For more information about policies, see * [How Policies Work](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm). *

@@ -261,7 +261,7 @@ CreateRegionSubscriptionResponse createRegionSubscription( * {@link #addUserToGroup(AddUserToGroupRequest) addUserToGroup}). If the user needs to * access the Console, you need to provide the user a password (see * {@link #createOrResetUIPassword(CreateOrResetUIPasswordRequest) createOrResetUIPassword}). - * If the user needs to access the Oracle Bare Metal Cloud Services REST API, you need to upload a + * If the user needs to access the Oracle Cloud Infrastructure REST API, you need to upload a * public API signing key for that user (see * [Required Keys and OCIDs](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm) and also * {@link #uploadApiKey(UploadApiKeyRequest) uploadApiKey}). @@ -524,7 +524,7 @@ CreateRegionSubscriptionResponse createRegionSubscription( ListRegionSubscriptionsResponse listRegionSubscriptions(ListRegionSubscriptionsRequest request); /** - * Lists all the regions offered by Oracle Bare Metal Cloud Services. + * Lists all the regions offered by Oracle Cloud Infrastructure. * @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. @@ -579,7 +579,7 @@ ListUserGroupMembershipsResponse listUserGroupMemberships( RemoveUserFromGroupResponse removeUserFromGroup(RemoveUserFromGroupRequest request); /** - * Updates the specified compartment's description. + * Updates the specified compartment's description or name. You can't update the root compartment. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. 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 f2b0ac59464..c8ab527aec2 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 @@ -58,14 +58,14 @@ java.util.concurrent.Future addUserToGroup( /** * Creates a new compartment in your tenancy. *

- **Important:** Compartments cannot be renamed or deleted. + **Important:** Compartments cannot be deleted. *

* You must specify your tenancy's OCID as the compartment ID in the request object. Remember that the tenancy * is simply the root compartment. For information about OCIDs, see * [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). *

* You must also specify a *name* for the compartment, which must be unique across all compartments in - * your tenancy and cannot be changed. You can use this name or the OCID when writing policies that apply + * your tenancy. You can use this name or the OCID when writing policies that apply * to the compartment. For more information about policies, see * [How Policies Work](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm). *

@@ -336,7 +336,7 @@ java.util.concurrent.Future createSwiftPassword( * {@link #addUserToGroup(AddUserToGroupRequest, Consumer, Consumer) addUserToGroup}). If the user needs to * access the Console, you need to provide the user a password (see * {@link #createOrResetUIPassword(CreateOrResetUIPasswordRequest, Consumer, Consumer) createOrResetUIPassword}). - * If the user needs to access the Oracle Bare Metal Cloud Services REST API, you need to upload a + * If the user needs to access the Oracle Cloud Infrastructure REST API, you need to upload a * public API signing key for that user (see * [Required Keys and OCIDs](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm) and also * {@link #uploadApiKey(UploadApiKeyRequest, Consumer, Consumer) uploadApiKey}). @@ -784,7 +784,7 @@ java.util.concurrent.Future listRegionSubscript handler); /** - * Lists all the regions offered by Oracle Bare Metal Cloud Services. + * Lists all the regions offered by Oracle Cloud Infrastructure. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -874,7 +874,7 @@ java.util.concurrent.Future removeUserFromGroup( handler); /** - * Updates the specified compartment's description. + * Updates the specified compartment's description or name. You can't update the root compartment. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/ApiKey.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/ApiKey.java index 9adceb42507..c9d0201d4b5 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/ApiKey.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/ApiKey.java @@ -4,7 +4,7 @@ package com.oracle.bmc.identity.model; /** - * A PEM-format RSA credential for securing requests to the Oracle Bare Metal Cloud Services REST API. Also known + * A PEM-format RSA credential for securing requests to the Oracle Cloud Infrastructure REST API. Also known * as an *API signing key*. Specifically, this is the public key from the key pair. The private key remains with * the user calling the API. For information about generating a key pair * in the required PEM format, see [Required Keys and OCIDs](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm). diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Compartment.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Compartment.java index 90f50c2c37c..de2af15e00b 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Compartment.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Compartment.java @@ -4,7 +4,7 @@ package com.oracle.bmc.identity.model; /** - * A collection of related resources. Compartments are a fundamental component of Oracle Bare Metal Cloud Services + * A collection of related resources. Compartments are a fundamental component of Oracle Cloud Infrastructure * for organizing and isolating your cloud resources. You use them to clearly separate resources for the purposes * of measuring usage and billing, access (through the use of IAM Service policies), and isolation (separating the * resources for one project or business unit from another). A common approach is to create a compartment for each @@ -143,7 +143,7 @@ public static Builder builder() { /** * The name you assign to the compartment during creation. The name must be unique across all - * compartments in the tenancy and cannot be changed. + * compartments in the tenancy. * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/IdentityProvider.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/IdentityProvider.java index b1efb1f5679..e55b9384e5f 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/IdentityProvider.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/IdentityProvider.java @@ -50,8 +50,8 @@ public class IdentityProvider { * The name you assign to the `IdentityProvider` during creation. The name * must be unique across all `IdentityProvider` objects in the tenancy and * cannot be changed. This is the name federated users see when choosing - * which identity provider to use when signing in to the Oracle Bare Metal Cloud - * Services Console. + * which identity provider to use when signing in to the Oracle Cloud Infrastructure + * Console. * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/IdpGroupMapping.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/IdpGroupMapping.java index 9e5c93fb549..133dd183885 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/IdpGroupMapping.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/IdpGroupMapping.java @@ -5,8 +5,8 @@ /** * A mapping between a single group defined by the identity provider (IdP) you're federating with - * and a single IAM Service {@link Group} in Oracle Bare Metal Cloud - * Services. For more information about group mappings and what they're for, see + * and a single IAM Service {@link Group} in Oracle Cloud Infrastructure. + * For more information about group mappings and what they're for, see * [Identity Providers and Federation](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm). *

* A given IdP group can be mapped to zero, one, or multiple IAM Service groups, and vice versa. @@ -14,7 +14,7 @@ * Each `IdPGroupMapping` object has its own OCID. *

**Note:** Any users who are in more than 50 IdP groups cannot be authenticated to use the Oracle - * Bare Metal Cloud Services Console. + * Cloud Infrastructure Console. * **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Region.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Region.java index 95a88207de1..85aa12a1e6c 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Region.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Region.java @@ -4,7 +4,7 @@ package com.oracle.bmc.identity.model; /** - * A localized geographic area, such as Phoenix, AZ. Oracle Bare Metal Cloud Services is hosted in regions and Availability + * A localized geographic area, such as Phoenix, AZ. Oracle Cloud Infrastructure is hosted in regions and Availability * Domains. A region is composed of several Availability Domains. An Availability Domain is one or more data centers * located within a region. For more information, see [Regions and Availability Domains](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). *

@@ -67,7 +67,7 @@ public static Builder builder() { * Allowed values are: * - `PHX` * - `IAD` - * - 'FRA' + * - `FRA` * **/ @com.fasterxml.jackson.annotation.JsonProperty("key") @@ -79,7 +79,7 @@ public static Builder builder() { * Allowed values are: * - `us-phoenix-1` * - `us-ashburn-1` - * - 'de-frankfurt-1' + * - `eu-frankfurt-1` * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/RegionSubscription.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/RegionSubscription.java index 51eb766c9f4..2589a3b4365 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/RegionSubscription.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/RegionSubscription.java @@ -90,7 +90,7 @@ public static Builder builder() { * Allowed values are: * - `PHX` * - `IAD` - * - 'FRA' + * - `FRA` * **/ @com.fasterxml.jackson.annotation.JsonProperty("regionKey") @@ -102,7 +102,7 @@ public static Builder builder() { * Allowed values are: * - `us-phoenix-1` * - `us-ashburn-1` - * - 'de-frankfurt-1' + * - `eu-frankurt-1` * **/ @com.fasterxml.jackson.annotation.JsonProperty("regionName") diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/SwiftPassword.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/SwiftPassword.java index cbfa0f98f25..5dbe096ef59 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/SwiftPassword.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/SwiftPassword.java @@ -5,7 +5,7 @@ /** * Swift is the OpenStack object storage service. A `SwiftPassword` is an Oracle-provided password for using a - * Swift client with the Oracle Bare Metal Cloud Services Object Storage Service. This password is associated with + * Swift client with the Oracle Cloud Infrastructure Object Storage Service. This password is associated with * the user's Console login. Swift passwords never expire. A user can have up to two Swift passwords at a time. *

**Note:** The password is always an Oracle-generated string; you can't change it to a string of your choice. diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Tenancy.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Tenancy.java index 28d1636eb40..e910908c9f0 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Tenancy.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Tenancy.java @@ -5,7 +5,7 @@ /** * The root compartment that contains all of your organization's compartments and other - * Oracle Bare Metal Cloud Services cloud resources. When you sign up for Oracle Bare Metal Cloud Services, + * Oracle Cloud Infrastructure cloud resources. When you sign up for Oracle Cloud Infrastructure, * Oracle creates a tenancy for your company, which is a secure and isolated partition * where you can create, organize, and administer your cloud resources. *

diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UIPassword.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UIPassword.java index 6c18dce6656..ef9b333d8cd 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UIPassword.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UIPassword.java @@ -4,8 +4,8 @@ package com.oracle.bmc.identity.model; /** - * A text password that enables a user to sign in to the Console, the user interface for interacting with Oracle Bare - * Metal Cloud Services. + * A text password that enables a user to sign in to the Console, the user interface for interacting with Oracle + * Cloud Infrastructure. *

* For more information about user credentials, see [User Credentials](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/usercredentials.htm). * diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/User.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/User.java index 686dd719b87..41be04776a5 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/User.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/User.java @@ -4,7 +4,7 @@ package com.oracle.bmc.identity.model; /** - * An individual employee or system that needs to manage or use your company's Oracle Bare Metal Cloud Services + * An individual employee or system that needs to manage or use your company's Oracle Cloud Infrastructure * resources. Users might need to launch instances, manage remote disks, work with your cloud network, etc. Users * have one or more IAM Service credentials ({@link ApiKey}, * {@link UIPassword}, and {@link SwiftPassword}). @@ -12,9 +12,9 @@ * application are not typically IAM Service users. For conceptual information about users and other IAM Service * components, see [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). *

- * These users are created directly within the Oracle Bare Metal Cloud Services system, via the IAM service. - * They are different from *federated users*, who authenticate themselves to the Oracle Bare Metal - * Cloud Services Console via an identity provider. For more information, see + * These users are created directly within the Oracle Cloud Infrastructure system, via the IAM service. + * They are different from *federated users*, who authenticate themselves to the Oracle Cloud Infrastructure + * Console via an identity provider. For more information, see * [Identity Providers and Federation](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm). *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, diff --git a/bmc-loadbalancer/pom.xml b/bmc-loadbalancer/pom.xml index 3fa4fafc049..4984984e45b 100644 --- a/bmc-loadbalancer/pom.xml +++ b/bmc-loadbalancer/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.16 + 1.2.17 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.16 + 1.2.17 diff --git a/bmc-objectstorage/pom.xml b/bmc-objectstorage/pom.xml index b8e5cb23f7f..6bff5da09ee 100644 --- a/bmc-objectstorage/pom.xml +++ b/bmc-objectstorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.16 + 1.2.17 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.16 + 1.2.17 diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java index 51a465e6239..20540e8b710 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java @@ -73,7 +73,7 @@ public interface ObjectStorage extends AutoCloseable { CreateMultipartUploadResponse createMultipartUpload(CreateMultipartUploadRequest request); /** - * Create a pre-authenticated request specific to the bucket + * Creates a pre-authenticated request specific to the bucket. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -101,7 +101,7 @@ CreatePreauthenticatedRequestResponse createPreauthenticatedRequest( DeleteObjectResponse deleteObject(DeleteObjectRequest request); /** - * Deletes the bucket level pre-authenticateted request + * Deletes the pre-authenticated request for the bucket. * @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. @@ -128,6 +128,18 @@ DeletePreauthenticatedRequestResponse deletePreauthenticatedRequest( */ GetNamespaceResponse getNamespace(GetNamespaceRequest request); + /** + * Get the metadata for the namespace, which contains defaultS3CompartmentId and defaultSwiftCompartmentId. + * Any user with the NAMESPACE_READ permission will be able to see the current metadata. 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). + * + * @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. + */ + GetNamespaceMetadataResponse getNamespaceMetadata(GetNamespaceMetadataRequest request); + /** * Gets the metadata and body of an object. * @@ -138,7 +150,7 @@ DeletePreauthenticatedRequestResponse deletePreauthenticatedRequest( GetObjectResponse getObject(GetObjectRequest request); /** - * Get the bucket level pre-authenticateted request + * Gets the pre-authenticated request for the bucket. * @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. @@ -147,7 +159,7 @@ GetPreauthenticatedRequestResponse getPreauthenticatedRequest( GetPreauthenticatedRequestRequest request); /** - * Efficiently checks if a bucket exists and gets the current ETag for the bucket. + * Efficiently checks to see if a bucket exists and gets the current ETag for the bucket. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -167,6 +179,10 @@ GetPreauthenticatedRequestResponse getPreauthenticatedRequest( /** * Gets a list of all `BucketSummary`s in a compartment. A `BucketSummary` contains only summary fields for the bucket * and does not contain fields like the user-defined metadata. + *

+ * To use this and other 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). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -195,6 +211,10 @@ ListMultipartUploadPartsResponse listMultipartUploadParts( /** * Lists the objects in a bucket. + *

+ * To use this and other 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). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -203,7 +223,7 @@ ListMultipartUploadPartsResponse listMultipartUploadParts( ListObjectsResponse listObjects(ListObjectsRequest request); /** - * List pre-authenticated requests for the bucket + * Lists pre-authenticated requests for the bucket. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -221,6 +241,24 @@ ListPreauthenticatedRequestsResponse listPreauthenticatedRequests( */ PutObjectResponse putObject(PutObjectRequest request); + /** + * Rename an object from source key to target key in the given namespace. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + RenameObjectResponse renameObject(RenameObjectRequest request); + + /** + * Restore one or more objects specified by objectName 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. + */ + RestoreObjectsResponse restoreObjects(RestoreObjectsRequest request); + /** * Performs a partial or full update of a bucket's user-defined metadata. * @@ -230,6 +268,18 @@ ListPreauthenticatedRequestsResponse listPreauthenticatedRequests( */ UpdateBucketResponse updateBucket(UpdateBucketRequest request); + /** + * Change the default Swift/S3 compartmentId of user's namespace into the user-defined compartmentId. Upon doing + * this, all subsequent bucket creations will use the new default compartment, but no previously created + * buckets will be modified. A user must have the NAMESPACE_UPDATE permission to make changes to the default + * compartments for S3 and Swift. + * + * @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. + */ + UpdateNamespaceMetadataResponse updateNamespaceMetadata(UpdateNamespaceMetadataRequest request); + /** * Uploads a single part of a multipart upload. * diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java index 7ddff22c639..0bf0123c24f 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java @@ -104,7 +104,7 @@ java.util.concurrent.Future createMultipartUpload handler); /** - * Create a pre-authenticated request specific to the bucket + * Creates a pre-authenticated request specific to the bucket. * * * @param request The request object containing the details to send @@ -155,7 +155,7 @@ java.util.concurrent.Future deleteObject( handler); /** - * Deletes the bucket level pre-authenticateted request + * Deletes the pre-authenticated request for the bucket. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -204,6 +204,26 @@ java.util.concurrent.Future getNamespace( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Get the metadata for the namespace, which contains defaultS3CompartmentId and defaultSwiftCompartmentId. + * Any user with the NAMESPACE_READ permission will be able to see the current metadata. 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). + * + * + * @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 getNamespaceMetadata( + GetNamespaceMetadataRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetNamespaceMetadataRequest, GetNamespaceMetadataResponse> + handler); + /** * Gets the metadata and body of an object. * @@ -220,7 +240,7 @@ java.util.concurrent.Future getObject( com.oracle.bmc.responses.AsyncHandler handler); /** - * Get the bucket level pre-authenticateted request + * Gets the pre-authenticated request for the bucket. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -236,7 +256,7 @@ java.util.concurrent.Future getPreauthentica handler); /** - * Efficiently checks if a bucket exists and gets the current ETag for the bucket. + * Efficiently checks to see if a bucket exists and gets the current ETag for the bucket. * * * @param request The request object containing the details to send @@ -268,6 +288,10 @@ java.util.concurrent.Future headObject( /** * Gets a list of all `BucketSummary`s in a compartment. A `BucketSummary` contains only summary fields for the bucket * and does not contain fields like the user-defined metadata. + *

+ * To use this and other 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). * * * @param request The request object containing the details to send @@ -317,6 +341,10 @@ java.util.concurrent.Future listMultipartUploads( /** * Lists the objects in a bucket. + *

+ * To use this and other 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). * * * @param request The request object containing the details to send @@ -331,7 +359,7 @@ java.util.concurrent.Future listObjects( com.oracle.bmc.responses.AsyncHandler handler); /** - * List pre-authenticated requests for the bucket + * Lists pre-authenticated requests for the bucket. * * * @param request The request object containing the details to send @@ -363,6 +391,38 @@ java.util.concurrent.Future putObject( PutObjectRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Rename an object from source key to target key in the given namespace. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future renameObject( + RenameObjectRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Restore one or more objects specified by objectName 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 restoreObjects( + RestoreObjectsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Performs a partial or full update of a bucket's user-defined metadata. * @@ -379,6 +439,26 @@ java.util.concurrent.Future updateBucket( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Change the default Swift/S3 compartmentId of user's namespace into the user-defined compartmentId. Upon doing + * this, all subsequent bucket creations will use the new default compartment, but no previously created + * buckets will be modified. A user must have the NAMESPACE_UPDATE permission to make changes to the default + * compartments for S3 and Swift. + * + * + * @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 updateNamespaceMetadata( + UpdateNamespaceMetadataRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateNamespaceMetadataRequest, UpdateNamespaceMetadataResponse> + handler); + /** * Uploads a single part of a multipart upload. * diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java index 25705b2ebff..2436a77bf81 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java @@ -354,6 +354,29 @@ public java.util.concurrent.Future getNamespace( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future getNamespaceMetadata( + GetNamespaceMetadataRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetNamespaceMetadataRequest, GetNamespaceMetadataResponse> + handler) { + LOG.trace("Called async getNamespaceMetadata"); + request = GetNamespaceMetadataConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetNamespaceMetadataConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetNamespaceMetadataConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.get(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future getObject( GetObjectRequest request, @@ -580,6 +603,50 @@ public java.util.concurrent.Future putObject( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future renameObject( + RenameObjectRequest request, + com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async renameObject"); + request = RenameObjectConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RenameObjectConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = RenameObjectConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.post(ib, request.getRenameObjectDetails(), request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + + @Override + public java.util.concurrent.Future restoreObjects( + RestoreObjectsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async restoreObjects"); + request = RestoreObjectsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RestoreObjectsConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = RestoreObjectsConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.post(ib, request.getRestoreObjectsDetails(), request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future updateBucket( UpdateBucketRequest request, @@ -602,6 +669,34 @@ public java.util.concurrent.Future updateBucket( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future updateNamespaceMetadata( + UpdateNamespaceMetadataRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateNamespaceMetadataRequest, UpdateNamespaceMetadataResponse> + handler) { + LOG.trace("Called async updateNamespaceMetadata"); + request = UpdateNamespaceMetadataConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateNamespaceMetadataConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = UpdateNamespaceMetadataConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.put( + ib, + request.getUpdateNamespaceMetadataDetails(), + request, + onSuccess, + onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future uploadPart( UploadPartRequest request, diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java index a8a705cb473..003e62cd846 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java @@ -257,6 +257,19 @@ public GetNamespaceResponse getNamespace(GetNamespaceRequest request) { return transformer.apply(response); } + @Override + public GetNamespaceMetadataResponse getNamespaceMetadata(GetNamespaceMetadataRequest request) { + LOG.trace("Called getNamespaceMetadata"); + request = GetNamespaceMetadataConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetNamespaceMetadataConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetNamespaceMetadataConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } + @Override public GetObjectResponse getObject(GetObjectRequest request) { LOG.trace("Called getObject"); @@ -392,6 +405,34 @@ public PutObjectResponse putObject(PutObjectRequest request) { return transformer.apply(response); } + @Override + public RenameObjectResponse renameObject(RenameObjectRequest request) { + LOG.trace("Called renameObject"); + request = RenameObjectConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RenameObjectConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = RenameObjectConverter.fromResponse(); + + javax.ws.rs.core.Response response = + client.post(ib, request.getRenameObjectDetails(), request); + return transformer.apply(response); + } + + @Override + public RestoreObjectsResponse restoreObjects(RestoreObjectsRequest request) { + LOG.trace("Called restoreObjects"); + request = RestoreObjectsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RestoreObjectsConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = RestoreObjectsConverter.fromResponse(); + + javax.ws.rs.core.Response response = + client.post(ib, request.getRestoreObjectsDetails(), request); + return transformer.apply(response); + } + @Override public UpdateBucketResponse updateBucket(UpdateBucketRequest request) { LOG.trace("Called updateBucket"); @@ -406,6 +447,21 @@ public UpdateBucketResponse updateBucket(UpdateBucketRequest request) { return transformer.apply(response); } + @Override + public UpdateNamespaceMetadataResponse updateNamespaceMetadata( + UpdateNamespaceMetadataRequest request) { + LOG.trace("Called updateNamespaceMetadata"); + request = UpdateNamespaceMetadataConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateNamespaceMetadataConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = UpdateNamespaceMetadataConverter.fromResponse(); + + javax.ws.rs.core.Response response = + client.put(ib, request.getUpdateNamespaceMetadataDetails(), request); + return transformer.apply(response); + } + @Override public UploadPartResponse uploadPart(UploadPartRequest request) { LOG.trace("Called uploadPart"); diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetNamespaceMetadataConverter.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetNamespaceMetadataConverter.java new file mode 100644 index 00000000000..6cf16d45a13 --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetNamespaceMetadataConverter.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetNamespaceMetadataConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetNamespaceMetadataRequest interceptRequest( + GetNamespaceMetadataRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetNamespaceMetadataRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getNamespaceName() == null) { + throw new NullPointerException("namespaceName is required"); + } + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetNamespaceMetadataResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetNamespaceMetadataResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetNamespaceMetadataResponse>() { + @Override + public GetNamespaceMetadataResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetNamespaceMetadataResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + NamespaceMetadata>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + NamespaceMetadata.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetNamespaceMetadataResponse.Builder builder = + GetNamespaceMetadataResponse.builder(); + + builder.namespaceMetadata(response.getItem()); + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.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)); + } + + GetNamespaceMetadataResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectConverter.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectConverter.java index 63412223843..46ccc0ad31b 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectConverter.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectConverter.java @@ -246,6 +246,30 @@ public GetObjectResponse apply(javax.ws.rs.core.Response rawResponse) { java.util.Date.class)); } + com.google.common.base.Optional> + archivalStateHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "archival-state"); + if (archivalStateHeader.isPresent()) { + builder.archivalState( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "archival-state", + archivalStateHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + timeOfArchivalHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "time-of-archival"); + if (timeOfArchivalHeader.isPresent()) { + builder.timeOfArchival( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "time-of-archival", + timeOfArchivalHeader.get().get(0), + java.util.Date.class)); + } + GetObjectResponse responseWrapper = builder.build(); responseWrapper = ObjectMetadataInterceptor.intercept(responseWrapper); diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/HeadObjectConverter.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/HeadObjectConverter.java index 8a836a185a9..63c6316cd40 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/HeadObjectConverter.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/HeadObjectConverter.java @@ -226,6 +226,30 @@ public HeadObjectResponse apply(javax.ws.rs.core.Response rawResponse) { java.util.Date.class)); } + com.google.common.base.Optional> + archivalStateHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "archival-state"); + if (archivalStateHeader.isPresent()) { + builder.archivalState( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "archival-state", + archivalStateHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + timeOfArchivalHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "time-of-archival"); + if (timeOfArchivalHeader.isPresent()) { + builder.timeOfArchival( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "time-of-archival", + timeOfArchivalHeader.get().get(0), + java.util.Date.class)); + } + HeadObjectResponse responseWrapper = builder.build(); responseWrapper = ObjectMetadataInterceptor.intercept(responseWrapper); diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/RenameObjectConverter.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/RenameObjectConverter.java new file mode 100644 index 00000000000..2cb62cbab2f --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/RenameObjectConverter.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class RenameObjectConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static RenameObjectRequest interceptRequest(RenameObjectRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, RenameObjectRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getNamespaceName() == null) { + throw new NullPointerException("namespaceName is required"); + } + + if (request.getBucketName() == null) { + throw new NullPointerException("bucketName is required"); + } + + if (request.getRenameObjectDetails() == null) { + throw new NullPointerException("renameObjectDetails is required"); + } + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())) + .path("b") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBucketName())) + .path("actions") + .path("renameObject"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, RenameObjectResponse>() { + @Override + public RenameObjectResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for RenameObjectResponse"); + 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(); + + RenameObjectResponse.Builder builder = + RenameObjectResponse.builder(); + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.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)); + } + + 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> + lastModifiedHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "last-modified"); + if (lastModifiedHeader.isPresent()) { + builder.lastModified( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "last-modified", + lastModifiedHeader.get().get(0), + java.util.Date.class)); + } + + RenameObjectResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/RestoreObjectsConverter.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/RestoreObjectsConverter.java new file mode 100644 index 00000000000..33cf89da1a8 --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/RestoreObjectsConverter.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class RestoreObjectsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static RestoreObjectsRequest interceptRequest(RestoreObjectsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, RestoreObjectsRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getNamespaceName() == null) { + throw new NullPointerException("namespaceName is required"); + } + + if (request.getBucketName() == null) { + throw new NullPointerException("bucketName is required"); + } + + if (request.getRestoreObjectsDetails() == null) { + throw new NullPointerException("restoreObjectsDetails is required"); + } + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())) + .path("b") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBucketName())) + .path("actions") + .path("restoreObjects"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, RestoreObjectsResponse>() { + @Override + public RestoreObjectsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for RestoreObjectsResponse"); + 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(); + + RestoreObjectsResponse.Builder builder = + RestoreObjectsResponse.builder(); + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.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)); + } + + RestoreObjectsResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/UpdateNamespaceMetadataConverter.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/UpdateNamespaceMetadataConverter.java new file mode 100644 index 00000000000..888ca18c3e3 --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/internal/http/UpdateNamespaceMetadataConverter.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class UpdateNamespaceMetadataConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateNamespaceMetadataRequest interceptRequest( + UpdateNamespaceMetadataRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + UpdateNamespaceMetadataRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getNamespaceName() == null) { + throw new NullPointerException("namespaceName is required"); + } + + if (request.getUpdateNamespaceMetadataDetails() == null) { + throw new NullPointerException("updateNamespaceMetadataDetails is required"); + } + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateNamespaceMetadataResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateNamespaceMetadataResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateNamespaceMetadataResponse>() { + @Override + public UpdateNamespaceMetadataResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for UpdateNamespaceMetadataResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + NamespaceMetadata>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + NamespaceMetadata.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + UpdateNamespaceMetadataResponse.Builder builder = + UpdateNamespaceMetadataResponse.builder(); + + builder.namespaceMetadata(response.getItem()); + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.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)); + } + + UpdateNamespaceMetadataResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java index 3fd638e6fa9..81fe56c42d5 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java @@ -4,6 +4,10 @@ package com.oracle.bmc.objectstorage.model; /** + * A bucket is a container for storing objects in a compartment within a namespace. A bucket is associated with a single compartment. + * The compartment has policies that indicate what actions a user can perform on a bucket and all the objects in the bucket. For more + * information, see [Managing Buckets](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingbuckets.htm). + *

* 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). @@ -89,6 +93,15 @@ public Builder publicAccessType(PublicAccessType publicAccessType) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("storageTier") + private StorageTier storageTier; + + public Builder storageTier(StorageTier storageTier) { + this.storageTier = storageTier; + this.__explicitlySet__.add("storageTier"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -102,7 +115,8 @@ public Bucket build() { createdBy, timeCreated, etag, - publicAccessType); + publicAccessType, + storageTier); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -116,7 +130,8 @@ public Builder copy(Bucket o) { .createdBy(o.getCreatedBy()) .timeCreated(o.getTimeCreated()) .etag(o.getEtag()) - .publicAccessType(o.getPublicAccessType()); + .publicAccessType(o.getPublicAccessType()) + .storageTier(o.getStorageTier()); } } @@ -134,7 +149,9 @@ public static Builder builder() { String namespace; /** - * The name of the bucket. + * The name of the bucket. Avoid entering confidential information. + * Example: my-new-bucket1 + * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") String name; @@ -158,7 +175,7 @@ public static Builder builder() { String createdBy; /** - * The date and time at which the bucket was created. + * The date and time the bucket was created, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") java.util.Date timeCreated; @@ -169,10 +186,10 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("etag") String etag; /** - * The type of public access available on this bucket. Allows authenticated caller to access the bucket or - * contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess - * when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access. - * When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects. + * The type of public access enabled on this bucket. + * A bucket is set to `NoPublicAccess` by default, which only allows an authenticated caller to access the + * bucket and its contents. When `ObjectRead` is enabled on the bucket, public access is allowed for the + * `GetObject`, `HeadObject`, and `ListObjects` operations. * **/ @lombok.extern.slf4j.Slf4j @@ -219,14 +236,73 @@ public static PublicAccessType create(String key) { } }; /** - * The type of public access available on this bucket. Allows authenticated caller to access the bucket or - * contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess - * when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access. - * When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects. + * The type of public access enabled on this bucket. + * A bucket is set to `NoPublicAccess` by default, which only allows an authenticated caller to access the + * bucket and its contents. When `ObjectRead` is enabled on the bucket, public access is allowed for the + * `GetObject`, `HeadObject`, and `ListObjects` operations. * **/ @com.fasterxml.jackson.annotation.JsonProperty("publicAccessType") PublicAccessType publicAccessType; + /** + * The type of storage tier of this bucket. + * A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. + * When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' + * property is immutable once the bucket is created. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum StorageTier { + Standard("Standard"), + Archive("Archive"), + + /** + * 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 (StorageTier v : StorageTier.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + StorageTier(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static StorageTier create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'StorageTier', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of storage tier of this bucket. + * A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. + * When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' + * property is immutable once the bucket is created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("storageTier") + StorageTier storageTier; @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/BucketSummary.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/BucketSummary.java index d3a79d714a1..92f5f411047 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/BucketSummary.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/BucketSummary.java @@ -106,7 +106,9 @@ public static Builder builder() { String namespace; /** - * The name of the bucket. + * The name of the bucket. Avoid entering confidential information. + * Example: my-new-bucket1 + * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") String name; @@ -124,7 +126,7 @@ public static Builder builder() { String createdBy; /** - * The date and time at which the bucket was created. + * The date and time the bucket was created, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") java.util.Date timeCreated; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/CreateBucketDetails.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/CreateBucketDetails.java index 5d76ae29ba6..fc59ee20b71 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/CreateBucketDetails.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/CreateBucketDetails.java @@ -55,12 +55,22 @@ public Builder publicAccessType(PublicAccessType publicAccessType) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("storageTier") + private StorageTier storageTier; + + public Builder storageTier(StorageTier storageTier) { + this.storageTier = storageTier; + this.__explicitlySet__.add("storageTier"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public CreateBucketDetails build() { CreateBucketDetails __instance__ = - new CreateBucketDetails(name, compartmentId, metadata, publicAccessType); + new CreateBucketDetails( + name, compartmentId, metadata, publicAccessType, storageTier); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -70,7 +80,8 @@ public Builder copy(CreateBucketDetails o) { return name(o.getName()) .compartmentId(o.getCompartmentId()) .metadata(o.getMetadata()) - .publicAccessType(o.getPublicAccessType()); + .publicAccessType(o.getPublicAccessType()) + .storageTier(o.getStorageTier()); } } @@ -83,7 +94,8 @@ public static Builder builder() { /** * The name of the bucket. Valid characters are uppercase or lowercase letters, - * numbers, and dashes. Bucket names must be unique within the namespace. + * numbers, and dashes. Bucket names must be unique within the namespace. Avoid entering confidential information. + * example: Example: my-new-bucket1 * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") @@ -101,10 +113,10 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("metadata") java.util.Map metadata; /** - * The type of public access available on this bucket. Allows authenticated caller to access the bucket or - * contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess - * when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access. - * When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects. + * The type of public access enabled on this bucket. + * A bucket is set to `NoPublicAccess` by default, which only allows an authenticated caller to access the + * bucket and its contents. When `ObjectRead` is enabled on the bucket, public access is allowed for the + * `GetObject`, `HeadObject`, and `ListObjects` operations. * **/ public enum PublicAccessType { @@ -140,14 +152,62 @@ public static PublicAccessType create(String key) { } }; /** - * The type of public access available on this bucket. Allows authenticated caller to access the bucket or - * contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess - * when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access. - * When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects. + * The type of public access enabled on this bucket. + * A bucket is set to `NoPublicAccess` by default, which only allows an authenticated caller to access the + * bucket and its contents. When `ObjectRead` is enabled on the bucket, public access is allowed for the + * `GetObject`, `HeadObject`, and `ListObjects` operations. * **/ @com.fasterxml.jackson.annotation.JsonProperty("publicAccessType") PublicAccessType publicAccessType; + /** + * The type of storage tier of this bucket. + * A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. + * When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' + * property is immutable after bucket is created. + * + **/ + public enum StorageTier { + Standard("Standard"), + Archive("Archive"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (StorageTier v : StorageTier.values()) { + map.put(v.getValue(), v); + } + } + + StorageTier(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static StorageTier create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid StorageTier: " + key); + } + }; + /** + * The type of storage tier of this bucket. + * A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. + * When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' + * property is immutable after bucket is created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("storageTier") + StorageTier storageTier; @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/CreateMultipartUploadDetails.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/CreateMultipartUploadDetails.java index f938d4e3108..af32bad0591 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/CreateMultipartUploadDetails.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/CreateMultipartUploadDetails.java @@ -93,32 +93,34 @@ public static Builder builder() { } /** - * the name of the object to which this multi-part upload is targetted. + * The name of the object to which this multi-part upload is targeted. Avoid entering confidential information. + * Example: test/object1.log + * **/ @com.fasterxml.jackson.annotation.JsonProperty("object") String object; /** - * the content type of the object to upload. + * The content type of the object to upload. **/ @com.fasterxml.jackson.annotation.JsonProperty("contentType") String contentType; /** - * the content language of the object to upload. + * The content language of the object to upload. **/ @com.fasterxml.jackson.annotation.JsonProperty("contentLanguage") String contentLanguage; /** - * the content encoding of the object to upload. + * The content encoding of the object to upload. **/ @com.fasterxml.jackson.annotation.JsonProperty("contentEncoding") String contentEncoding; /** * Arbitrary string keys and values for the user-defined metadata for the object. - * Keys must be in \"opc-meta-*\" format. + * Keys must be in \"opc-meta-*\" format. Avoid entering confidential information. * **/ @com.fasterxml.jackson.annotation.JsonProperty("metadata") diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/CreatePreauthenticatedRequestDetails.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/CreatePreauthenticatedRequestDetails.java index e544085d522..c4a26fab38b 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/CreatePreauthenticatedRequestDetails.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/CreatePreauthenticatedRequestDetails.java @@ -77,18 +77,18 @@ public static Builder builder() { } /** - * user specified name for pre-authenticated request. Helpful for management purposes. + * A user-specified name for the pre-authenticated request. Helpful for management purposes. **/ @com.fasterxml.jackson.annotation.JsonProperty("name") String name; /** - * Name of object that is being granted access to by the pre-authenticated request. This can be null and that would mean that the pre-authenticated request is granting access to the entire bucket + * The name of object that is being granted access to by the pre-authenticated request. This can be null and if it is, the pre-authenticated request grants access to the entire bucket. **/ @com.fasterxml.jackson.annotation.JsonProperty("objectName") String objectName; /** - * the operation that can be performed on this resource e.g PUT or GET. + * The operation that can be performed on this resource. **/ public enum AccessType { ObjectRead("ObjectRead"), @@ -125,14 +125,13 @@ public static AccessType create(String key) { } }; /** - * the operation that can be performed on this resource e.g PUT or GET. + * The operation that can be performed on this resource. **/ @com.fasterxml.jackson.annotation.JsonProperty("accessType") AccessType accessType; /** - * The expiration date after which the pre-authenticated request will no longer be valid per spec - * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) + * The expiration date for the pre-authenticated request as per [RFC 3339](https://tools.ietf.org/rfc/rfc3339). After this date the pre-authenticated request will no longer be valid. * **/ @com.fasterxml.jackson.annotation.JsonProperty("timeExpires") diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/ListObjects.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/ListObjects.java index 3f2a765e916..3d9c0610a42 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/ListObjects.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/ListObjects.java @@ -84,7 +84,8 @@ public static Builder builder() { /** * The name of the object to use in the 'startWith' parameter to obtain the next page of - * a truncated ListObjects response. + * a truncated ListObjects response. Avoid entering confidential information. + * Example: test/object1.log * **/ @com.fasterxml.jackson.annotation.JsonProperty("nextStartWith") diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/MultipartUpload.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/MultipartUpload.java index 4c14dfc4591..2e31e9e82ca 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/MultipartUpload.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/MultipartUpload.java @@ -4,6 +4,12 @@ package com.oracle.bmc.objectstorage.model; /** + * Multipart uploads provide efficient and resilient uploads, especially for large objects. Multipart uploads also accommodate + * objects that are too large for a single upload operation. With multipart uploads, individual parts of an object can be + * uploaded in parallel to reduce the amount of time you spend uploading. Multipart uploads can also minimize the impact + * of network failures by letting you retry a failed part upload instead of requiring you to retry an entire object upload. + * See [Managing Multipart Uploads](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingmultipartuploads.htm). + *

* 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). @@ -114,7 +120,7 @@ public static Builder builder() { String uploadId; /** - * The date and time when the upload was created. + * The date and time the upload was created, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") java.util.Date timeCreated; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/MultipartUploadPartSummary.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/MultipartUploadPartSummary.java index 43dea5bcdf6..2e51fc7ca29 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/MultipartUploadPartSummary.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/MultipartUploadPartSummary.java @@ -4,9 +4,10 @@ package com.oracle.bmc.objectstorage.model; /** + * Get summary information about multipart uploads. * 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). + * 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). * **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") @@ -82,25 +83,25 @@ public static Builder builder() { } /** - * the current entity tag for the part. + * The current entity tag for the part. **/ @com.fasterxml.jackson.annotation.JsonProperty("etag") String etag; /** - * the MD5 hash of the bytes of the part. + * The MD5 hash of the bytes of the part. **/ @com.fasterxml.jackson.annotation.JsonProperty("md5") String md5; /** - * the size of the part in bytes. + * The size of the part in bytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("size") Long size; /** - * the part number for this part. + * The part number for this part. **/ @com.fasterxml.jackson.annotation.JsonProperty("partNumber") Integer partNumber; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/NamespaceMetadata.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/NamespaceMetadata.java new file mode 100644 index 00000000000..6f206255a0d --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/NamespaceMetadata.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * A NamespaceMetadta is a map for storing namespace and defaultS3CompartmentId, defaultSwiftCompartmentId. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = NamespaceMetadata.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class NamespaceMetadata { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private String namespace; + + public Builder namespace(String namespace) { + this.namespace = namespace; + this.__explicitlySet__.add("namespace"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("defaultS3CompartmentId") + private String defaultS3CompartmentId; + + public Builder defaultS3CompartmentId(String defaultS3CompartmentId) { + this.defaultS3CompartmentId = defaultS3CompartmentId; + this.__explicitlySet__.add("defaultS3CompartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("defaultSwiftCompartmentId") + private String defaultSwiftCompartmentId; + + public Builder defaultSwiftCompartmentId(String defaultSwiftCompartmentId) { + this.defaultSwiftCompartmentId = defaultSwiftCompartmentId; + this.__explicitlySet__.add("defaultSwiftCompartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public NamespaceMetadata build() { + NamespaceMetadata __instance__ = + new NamespaceMetadata( + namespace, defaultS3CompartmentId, defaultSwiftCompartmentId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(NamespaceMetadata o) { + return namespace(o.getNamespace()) + .defaultS3CompartmentId(o.getDefaultS3CompartmentId()) + .defaultSwiftCompartmentId(o.getDefaultSwiftCompartmentId()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The namespace to which the metadata belongs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + String namespace; + + /** + * The default compartment ID for an S3 client. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultS3CompartmentId") + String defaultS3CompartmentId; + + /** + * The default compartment ID for a Swift client. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultSwiftCompartmentId") + String defaultSwiftCompartmentId; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/ObjectSummary.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/ObjectSummary.java index 08a09c761dd..ebd7707088c 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/ObjectSummary.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/ObjectSummary.java @@ -79,7 +79,9 @@ public static Builder builder() { } /** - * The name of the object. + * The name of the object. Avoid entering confidential information. + * Example: test/object1.log + * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") String name; @@ -97,7 +99,7 @@ public static Builder builder() { String md5; /** - * Date and time of object creation. + * The date and time the object was created, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") java.util.Date timeCreated; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/PreauthenticatedRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/PreauthenticatedRequest.java index 1e76c2f7892..e2c38d4ce3d 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/PreauthenticatedRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/PreauthenticatedRequest.java @@ -3,6 +3,15 @@ */ package com.oracle.bmc.objectstorage.model; +/** + * Pre-authenticated requests provide a way to let users access a bucket or an object without having their own credentials. + * When you create a pre-authenticated request, a unique URL is generated. Users in your organization, partners, or third + * parties can use this URL to access the targets identified in the pre-authenticated request. See [Managing Access to Buckets and Objects](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm). + *

+ * 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). + * + **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") @lombok.Value @com.fasterxml.jackson.databind.annotation.JsonDeserialize( @@ -107,30 +116,33 @@ public static Builder builder() { } /** - * the unique identifier to use when directly addressing the pre-authenticated request + * The unique identifier to use when directly addressing the pre-authenticated request. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") String id; /** - * the user supplied name of the pre-authenticated request. + * The user-provided name of the pre-authenticated request. **/ @com.fasterxml.jackson.annotation.JsonProperty("name") String name; /** - * the uri to embed in the url when using the pre-authenticated request. + * The URI to embed in the URL when using the pre-authenticated request. **/ @com.fasterxml.jackson.annotation.JsonProperty("accessUri") String accessUri; /** - * Name of object that is being granted access to by the pre-authenticated request. This can be null and that would mean that the pre-authenticated request is granting access to the entire bucket + * The name of the object that is being granted access to by the pre-authenticated request. This can be null and + * if so, the pre-authenticated request grants access to the entire bucket. Avoid entering confidential information. + * Example: test/object1.log + * **/ @com.fasterxml.jackson.annotation.JsonProperty("objectName") String objectName; /** - * the operation that can be performed on this resource e.g PUT or GET. + * The operation that can be performed on this resource. **/ @lombok.extern.slf4j.Slf4j public enum AccessType { @@ -178,22 +190,21 @@ public static AccessType create(String key) { } }; /** - * the operation that can be performed on this resource e.g PUT or GET. + * The operation that can be performed on this resource. **/ @com.fasterxml.jackson.annotation.JsonProperty("accessType") AccessType accessType; /** - * the expiration date after which the pre authenticated request will no longer be valid as per spec - * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) + * The expiration date for the pre-authenticated request as per [RFC 3339](https://tools.ietf.org/rfc/rfc3339). After this date the pre-authenticated request will no longer be valid. * **/ @com.fasterxml.jackson.annotation.JsonProperty("timeExpires") java.util.Date timeExpires; /** - * the date when the pre-authenticated request was created as per spec - * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) + * The date when the pre-authenticated request was created as per specification + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). * **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/PreauthenticatedRequestSummary.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/PreauthenticatedRequestSummary.java index e71675bb3cd..1ee73c097eb 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/PreauthenticatedRequestSummary.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/PreauthenticatedRequestSummary.java @@ -3,6 +3,10 @@ */ package com.oracle.bmc.objectstorage.model; +/** + * Get summary information about pre-authenticated requests. + * + **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") @lombok.Value @com.fasterxml.jackson.databind.annotation.JsonDeserialize( @@ -97,24 +101,24 @@ public static Builder builder() { } /** - * the unique identifier to use when directly addressing the pre-authenticated request + * The unique identifier to use when directly addressing the pre-authenticated request. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") String id; /** - * the user supplied name of the pre-authenticated request + * The user-provided name of the pre-authenticated request. **/ @com.fasterxml.jackson.annotation.JsonProperty("name") String name; /** - * Name of object that is being granted access to by the pre-authenticated request. This can be null and that would mean that the pre-authenticated request is granting access to the entire bucket + * The name of object that is being granted access to by the pre-authenticated request. This can be null and if it is, the pre-authenticated request grants access to the entire bucket. **/ @com.fasterxml.jackson.annotation.JsonProperty("objectName") String objectName; /** - * the operation that can be performed on this resource e.g PUT or GET. + * The operation that can be performed on this resource. **/ @lombok.extern.slf4j.Slf4j public enum AccessType { @@ -162,22 +166,20 @@ public static AccessType create(String key) { } }; /** - * the operation that can be performed on this resource e.g PUT or GET. + * The operation that can be performed on this resource. **/ @com.fasterxml.jackson.annotation.JsonProperty("accessType") AccessType accessType; /** - * the expiration date after which the pre authenticated request will no longer be valid as per spec - * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) + * The expiration date for the pre-authenticated request as per [RFC 3339](https://tools.ietf.org/rfc/rfc3339). After this date the pre-authenticated request will no longer be valid. * **/ @com.fasterxml.jackson.annotation.JsonProperty("timeExpires") java.util.Date timeExpires; /** - * the date when the pre-authenticated request was created as per spec - * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) + * The date when the pre-authenticated request was created as per [RFC 3339](https://tools.ietf.org/rfc/rfc3339). * **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/RenameObjectDetails.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/RenameObjectDetails.java new file mode 100644 index 00000000000..9d69f1ebf73 --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/RenameObjectDetails.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * 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). + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RenameObjectDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class RenameObjectDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("sourceName") + private String sourceName; + + public Builder sourceName(String sourceName) { + this.sourceName = sourceName; + this.__explicitlySet__.add("sourceName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("newName") + private String newName; + + public Builder newName(String newName) { + this.newName = newName; + this.__explicitlySet__.add("newName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("srcObjIfMatchETag") + private String srcObjIfMatchETag; + + public Builder srcObjIfMatchETag(String srcObjIfMatchETag) { + this.srcObjIfMatchETag = srcObjIfMatchETag; + this.__explicitlySet__.add("srcObjIfMatchETag"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("newObjIfMatchETag") + private String newObjIfMatchETag; + + public Builder newObjIfMatchETag(String newObjIfMatchETag) { + this.newObjIfMatchETag = newObjIfMatchETag; + this.__explicitlySet__.add("newObjIfMatchETag"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("newObjIfNoneMatchETag") + private String newObjIfNoneMatchETag; + + public Builder newObjIfNoneMatchETag(String newObjIfNoneMatchETag) { + this.newObjIfNoneMatchETag = newObjIfNoneMatchETag; + this.__explicitlySet__.add("newObjIfNoneMatchETag"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RenameObjectDetails build() { + RenameObjectDetails __instance__ = + new RenameObjectDetails( + sourceName, + newName, + srcObjIfMatchETag, + newObjIfMatchETag, + newObjIfNoneMatchETag); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RenameObjectDetails o) { + return sourceName(o.getSourceName()) + .newName(o.getNewName()) + .srcObjIfMatchETag(o.getSrcObjIfMatchETag()) + .newObjIfMatchETag(o.getNewObjIfMatchETag()) + .newObjIfNoneMatchETag(o.getNewObjIfNoneMatchETag()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The name of the source object to be renamed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceName") + String sourceName; + + /** + * The new name of the source object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("newName") + String newName; + + /** + * The if-match entity tag of the source object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("srcObjIfMatchETag") + String srcObjIfMatchETag; + + /** + * The if-match entity tag of the new object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("newObjIfMatchETag") + String newObjIfMatchETag; + + /** + * The if-none-match entity tag of the new object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("newObjIfNoneMatchETag") + String newObjIfNoneMatchETag; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/RestoreObjectsDetails.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/RestoreObjectsDetails.java new file mode 100644 index 00000000000..f0f17d8b118 --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/RestoreObjectsDetails.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RestoreObjectsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class RestoreObjectsDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("objectName") + private String objectName; + + public Builder objectName(String objectName) { + this.objectName = objectName; + this.__explicitlySet__.add("objectName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RestoreObjectsDetails build() { + RestoreObjectsDetails __instance__ = new RestoreObjectsDetails(objectName); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RestoreObjectsDetails o) { + return objectName(o.getObjectName()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A object which was in an archived state and need to be restored. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectName") + String objectName; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/UpdateBucketDetails.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/UpdateBucketDetails.java index b910817299c..3739a6720e3 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/UpdateBucketDetails.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/UpdateBucketDetails.java @@ -28,6 +28,15 @@ public Builder namespace(String namespace) { 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("name") private String name; @@ -60,7 +69,8 @@ public Builder publicAccessType(PublicAccessType publicAccessType) { public UpdateBucketDetails build() { UpdateBucketDetails __instance__ = - new UpdateBucketDetails(namespace, name, metadata, publicAccessType); + new UpdateBucketDetails( + namespace, compartmentId, name, metadata, publicAccessType); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -68,6 +78,7 @@ public UpdateBucketDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(UpdateBucketDetails o) { return namespace(o.getNamespace()) + .compartmentId(o.getCompartmentId()) .name(o.getName()) .metadata(o.getMetadata()) .publicAccessType(o.getPublicAccessType()); @@ -88,7 +99,15 @@ public static Builder builder() { String namespace; /** - * The name of the bucket. + * The compartmentId for the compartment to which the bucket is targeted to move to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The name of the bucket. Avoid entering confidential information. + * Example: my-new-bucket1 + * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") String name; @@ -99,10 +118,9 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("metadata") java.util.Map metadata; /** - * The type of public access available on this bucket. Allows authenticated caller to access the bucket or - * contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess - * when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access. - * When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects. + * The type of public access enabled on this bucket. A bucket is set to `NoPublicAccess` by default, which only allows an + * authenticated caller to access the bucket and its contents. When `ObjectRead` is enabled on the bucket, public access + * is allowed for the `GetObject`, `HeadObject`, and `ListObjects` operations. * **/ public enum PublicAccessType { @@ -138,10 +156,9 @@ public static PublicAccessType create(String key) { } }; /** - * The type of public access available on this bucket. Allows authenticated caller to access the bucket or - * contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess - * when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access. - * When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects. + * The type of public access enabled on this bucket. A bucket is set to `NoPublicAccess` by default, which only allows an + * authenticated caller to access the bucket and its contents. When `ObjectRead` is enabled on the bucket, public access + * is allowed for the `GetObject`, `HeadObject`, and `ListObjects` operations. * **/ @com.fasterxml.jackson.annotation.JsonProperty("publicAccessType") diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/UpdateNamespaceMetadataDetails.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/UpdateNamespaceMetadataDetails.java new file mode 100644 index 00000000000..247d5de6988 --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/model/UpdateNamespaceMetadataDetails.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * An UpdateNamespaceMetadataDetails is used for update NamespaceMetadata. To be able to upate the NamespaceMetadata, a user + * must have NAMESPACE_UPDATE permission. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateNamespaceMetadataDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateNamespaceMetadataDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("defaultS3CompartmentId") + private String defaultS3CompartmentId; + + public Builder defaultS3CompartmentId(String defaultS3CompartmentId) { + this.defaultS3CompartmentId = defaultS3CompartmentId; + this.__explicitlySet__.add("defaultS3CompartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("defaultSwiftCompartmentId") + private String defaultSwiftCompartmentId; + + public Builder defaultSwiftCompartmentId(String defaultSwiftCompartmentId) { + this.defaultSwiftCompartmentId = defaultSwiftCompartmentId; + this.__explicitlySet__.add("defaultSwiftCompartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateNamespaceMetadataDetails build() { + UpdateNamespaceMetadataDetails __instance__ = + new UpdateNamespaceMetadataDetails( + defaultS3CompartmentId, defaultSwiftCompartmentId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateNamespaceMetadataDetails o) { + return defaultS3CompartmentId(o.getDefaultS3CompartmentId()) + .defaultSwiftCompartmentId(o.getDefaultSwiftCompartmentId()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The update compartment id for an S3 client if this field is set. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultS3CompartmentId") + String defaultS3CompartmentId; + + /** + * The update compartment id for a Swift client if this field is set. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultSwiftCompartmentId") + String defaultSwiftCompartmentId; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/AbortMultipartUploadRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/AbortMultipartUploadRequest.java index 69b39224b02..6aafced3b01 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/AbortMultipartUploadRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/AbortMultipartUploadRequest.java @@ -16,16 +16,14 @@ public class AbortMultipartUploadRequest extends com.oracle.bmc.requests.BmcRequ private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ private String bucketName; /** - * The name of the object. - *

+ * The name of the object. Avoid entering confidential information. * Example: `test/object1.log` * */ diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/CommitMultipartUploadRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/CommitMultipartUploadRequest.java index 3dc2469b4d7..9b449db8be0 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/CommitMultipartUploadRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/CommitMultipartUploadRequest.java @@ -16,16 +16,14 @@ public class CommitMultipartUploadRequest extends com.oracle.bmc.requests.BmcReq private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ private String bucketName; /** - * The name of the object. - *

+ * The name of the object. Avoid entering confidential information. * Example: `test/object1.log` * */ @@ -50,8 +48,7 @@ public class CommitMultipartUploadRequest extends com.oracle.bmc.requests.BmcReq /** * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. - * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - * of the target part. + * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ private String ifNoneMatch; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/CreateMultipartUploadRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/CreateMultipartUploadRequest.java index f9a7204da22..d081bdbba50 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/CreateMultipartUploadRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/CreateMultipartUploadRequest.java @@ -16,8 +16,7 @@ public class CreateMultipartUploadRequest extends com.oracle.bmc.requests.BmcReq private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ @@ -37,8 +36,7 @@ public class CreateMultipartUploadRequest extends com.oracle.bmc.requests.BmcReq /** * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. - * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - * of the target part. + * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ private String ifNoneMatch; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/CreatePreauthenticatedRequestRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/CreatePreauthenticatedRequestRequest.java index 6e618456206..4d68c904175 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/CreatePreauthenticatedRequestRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/CreatePreauthenticatedRequestRequest.java @@ -16,15 +16,14 @@ public class CreatePreauthenticatedRequestRequest extends com.oracle.bmc.request private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ private String bucketName; /** - * details for creating the pre-authenticated request. + * Information needed to create the pre-authenticated request. */ private CreatePreauthenticatedRequestDetails createPreauthenticatedRequestDetails; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/DeleteBucketRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/DeleteBucketRequest.java index eb3674a0bb0..737bec55aa4 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/DeleteBucketRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/DeleteBucketRequest.java @@ -16,8 +16,7 @@ public class DeleteBucketRequest extends com.oracle.bmc.requests.BmcRequest { private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/DeleteObjectRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/DeleteObjectRequest.java index 741eca34fcc..96df134dd78 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/DeleteObjectRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/DeleteObjectRequest.java @@ -16,16 +16,14 @@ public class DeleteObjectRequest extends com.oracle.bmc.requests.BmcRequest { private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ private String bucketName; /** - * The name of the object. - *

+ * The name of the object. Avoid entering confidential information. * Example: `test/object1.log` * */ diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/DeletePreauthenticatedRequestRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/DeletePreauthenticatedRequestRequest.java index 617ab6e7b07..c808f76395c 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/DeletePreauthenticatedRequestRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/DeletePreauthenticatedRequestRequest.java @@ -16,16 +16,15 @@ public class DeletePreauthenticatedRequestRequest extends com.oracle.bmc.request private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ private String bucketName; /** - * The unique identifier for the pre-authenticated request (PAR). This can be used to manage the PAR - * such as GET or DELETE the PAR + * The unique identifier for the pre-authenticated request. This can be used to manage operations against + * the pre-authenticated request, such as GET or DELETE. * */ private String parId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetBucketRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetBucketRequest.java index 3dbfa6452e9..85c0ea6597a 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetBucketRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetBucketRequest.java @@ -16,8 +16,7 @@ public class GetBucketRequest extends com.oracle.bmc.requests.BmcRequest { private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ @@ -32,8 +31,7 @@ public class GetBucketRequest extends com.oracle.bmc.requests.BmcRequest { /** * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. - * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - * of the target part. + * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ private String ifNoneMatch; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetNamespaceMetadataRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetNamespaceMetadataRequest.java new file mode 100644 index 00000000000..1b111e13a85 --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetNamespaceMetadataRequest.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetNamespaceMetadataRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The top-level namespace used for the request. + */ + private String namespaceName; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + 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(GetNamespaceMetadataRequest o) { + namespaceName(o.getNamespaceName()); + opcClientRequestId(o.getOpcClientRequestId()); + return this; + } + + /** + * Build the instance of GetNamespaceMetadataRequest 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 GetNamespaceMetadataRequest + */ + public GetNamespaceMetadataRequest build() { + GetNamespaceMetadataRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetObjectRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetObjectRequest.java index d3c6f386d81..70750d583c8 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetObjectRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetObjectRequest.java @@ -16,16 +16,14 @@ public class GetObjectRequest extends com.oracle.bmc.requests.BmcRequest { private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ private String bucketName; /** - * The name of the object. - *

+ * The name of the object. Avoid entering confidential information. * Example: `test/object1.log` * */ @@ -40,8 +38,7 @@ public class GetObjectRequest extends com.oracle.bmc.requests.BmcRequest { /** * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. - * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - * of the target part. + * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ private String ifNoneMatch; @@ -53,7 +50,7 @@ public class GetObjectRequest extends com.oracle.bmc.requests.BmcRequest { /** * Optional byte range to fetch, as described in [RFC 7233](https://tools.ietf.org/rfc/rfc7233), section 2.1. - * Note, only a single range of bytes is supported. + * Note that only a single range of bytes is supported. * */ private com.oracle.bmc.model.Range range; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetPreauthenticatedRequestRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetPreauthenticatedRequestRequest.java index 0a188135427..306e345ed15 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetPreauthenticatedRequestRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/GetPreauthenticatedRequestRequest.java @@ -16,16 +16,15 @@ public class GetPreauthenticatedRequestRequest extends com.oracle.bmc.requests.B private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ private String bucketName; /** - * The unique identifier for the pre-authenticated request (PAR). This can be used to manage the PAR - * such as GET or DELETE the PAR + * The unique identifier for the pre-authenticated request. This can be used to manage operations against + * the pre-authenticated request, such as GET or DELETE. * */ private String parId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/HeadBucketRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/HeadBucketRequest.java index 4742d9d1d0a..40337dd6120 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/HeadBucketRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/HeadBucketRequest.java @@ -16,8 +16,7 @@ public class HeadBucketRequest extends com.oracle.bmc.requests.BmcRequest { private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ @@ -32,8 +31,7 @@ public class HeadBucketRequest extends com.oracle.bmc.requests.BmcRequest { /** * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. - * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - * of the target part. + * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ private String ifNoneMatch; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/HeadObjectRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/HeadObjectRequest.java index 0925716de0a..b7ba94db9d0 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/HeadObjectRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/HeadObjectRequest.java @@ -16,16 +16,14 @@ public class HeadObjectRequest extends com.oracle.bmc.requests.BmcRequest { private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ private String bucketName; /** - * The name of the object. - *

+ * The name of the object. Avoid entering confidential information. * Example: `test/object1.log` * */ @@ -40,8 +38,7 @@ public class HeadObjectRequest extends com.oracle.bmc.requests.BmcRequest { /** * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. - * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - * of the target part. + * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ private String ifNoneMatch; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListMultipartUploadPartsRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListMultipartUploadPartsRequest.java index 32d6f4c2a8d..01014b885fa 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListMultipartUploadPartsRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListMultipartUploadPartsRequest.java @@ -16,16 +16,14 @@ public class ListMultipartUploadPartsRequest extends com.oracle.bmc.requests.Bmc private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ private String bucketName; /** - * The name of the object. - *

+ * The name of the object. Avoid entering confidential information. * Example: `test/object1.log` * */ diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListMultipartUploadsRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListMultipartUploadsRequest.java index 944a06e6d97..4c63edf5493 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListMultipartUploadsRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListMultipartUploadsRequest.java @@ -16,8 +16,7 @@ public class ListMultipartUploadsRequest extends com.oracle.bmc.requests.BmcRequ private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectsRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectsRequest.java index c2d589f2c01..a2e75073e38 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectsRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectsRequest.java @@ -16,8 +16,7 @@ public class ListObjectsRequest extends com.oracle.bmc.requests.BmcRequest { private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListPreauthenticatedRequestsRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListPreauthenticatedRequestsRequest.java index 713eba569ce..3632d4a2352 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListPreauthenticatedRequestsRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/ListPreauthenticatedRequestsRequest.java @@ -16,15 +16,14 @@ public class ListPreauthenticatedRequestsRequest extends com.oracle.bmc.requests private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ private String bucketName; /** - * Pre-authenticated requests returned by the list must have object names starting with prefix + * User-specified object name prefixes can be used to query and return a list of pre-authenticated requests. */ private String objectNamePrefix; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java index 175965090aa..f2460359348 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java @@ -16,16 +16,14 @@ public class PutObjectRequest extends com.oracle.bmc.requests.BmcRequest { private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ private String bucketName; /** - * The name of the object. - *

+ * The name of the object. Avoid entering confidential information. * Example: `test/object1.log` * */ @@ -50,8 +48,7 @@ public class PutObjectRequest extends com.oracle.bmc.requests.BmcRequest { /** * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. - * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - * of the target part. + * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ private String ifNoneMatch; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/RenameObjectRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/RenameObjectRequest.java new file mode 100644 index 00000000000..907241598f5 --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/RenameObjectRequest.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class RenameObjectRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The top-level namespace used for the request. + */ + private String namespaceName; + + /** + * The name of the bucket. Avoid entering confidential information. + * Example: `my-new-bucket1` + * + */ + private String bucketName; + + /** + * The sourceName and newName of rename operation. + */ + private RenameObjectDetails renameObjectDetails; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + 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(RenameObjectRequest o) { + namespaceName(o.getNamespaceName()); + bucketName(o.getBucketName()); + renameObjectDetails(o.getRenameObjectDetails()); + opcClientRequestId(o.getOpcClientRequestId()); + return this; + } + + /** + * Build the instance of RenameObjectRequest 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 RenameObjectRequest + */ + public RenameObjectRequest build() { + RenameObjectRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/RestoreObjectsRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/RestoreObjectsRequest.java new file mode 100644 index 00000000000..335c7c76248 --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/RestoreObjectsRequest.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class RestoreObjectsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The top-level namespace used for the request. + */ + private String namespaceName; + + /** + * The name of the bucket. Avoid entering confidential information. + * Example: `my-new-bucket1` + * + */ + private String bucketName; + + /** + * Request to restore objects. + */ + private RestoreObjectsDetails restoreObjectsDetails; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + 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(RestoreObjectsRequest o) { + namespaceName(o.getNamespaceName()); + bucketName(o.getBucketName()); + restoreObjectsDetails(o.getRestoreObjectsDetails()); + opcClientRequestId(o.getOpcClientRequestId()); + return this; + } + + /** + * Build the instance of RestoreObjectsRequest 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 RestoreObjectsRequest + */ + public RestoreObjectsRequest build() { + RestoreObjectsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/UpdateBucketRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/UpdateBucketRequest.java index 3c6a98cd1f6..f0d98c11e91 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/UpdateBucketRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/UpdateBucketRequest.java @@ -16,8 +16,7 @@ public class UpdateBucketRequest extends com.oracle.bmc.requests.BmcRequest { private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/UpdateNamespaceMetadataRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/UpdateNamespaceMetadataRequest.java new file mode 100644 index 00000000000..026039d9d01 --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/UpdateNamespaceMetadataRequest.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class UpdateNamespaceMetadataRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The top-level namespace used for the request. + */ + private String namespaceName; + + /** + * Request object for update NamespaceMetadata. + */ + private UpdateNamespaceMetadataDetails updateNamespaceMetadataDetails; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + 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(UpdateNamespaceMetadataRequest o) { + namespaceName(o.getNamespaceName()); + updateNamespaceMetadataDetails(o.getUpdateNamespaceMetadataDetails()); + opcClientRequestId(o.getOpcClientRequestId()); + return this; + } + + /** + * Build the instance of UpdateNamespaceMetadataRequest 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 UpdateNamespaceMetadataRequest + */ + public UpdateNamespaceMetadataRequest build() { + UpdateNamespaceMetadataRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/UploadPartRequest.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/UploadPartRequest.java index ca8ed7ac16f..bc074f35806 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/UploadPartRequest.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/requests/UploadPartRequest.java @@ -16,16 +16,14 @@ public class UploadPartRequest extends com.oracle.bmc.requests.BmcRequest { private String namespaceName; /** - * The name of the bucket. - *

+ * The name of the bucket. Avoid entering confidential information. * Example: `my-new-bucket1` * */ private String bucketName; /** - * The name of the object. - *

+ * The name of the object. Avoid entering confidential information. * Example: `test/object1.log` * */ @@ -65,8 +63,7 @@ public class UploadPartRequest extends com.oracle.bmc.requests.BmcRequest { /** * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. - * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag - * of the target part. + * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ private String ifNoneMatch; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/AbortMultipartUploadResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/AbortMultipartUploadResponse.java index b258fc5331b..dbb0c741e5f 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/AbortMultipartUploadResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/AbortMultipartUploadResponse.java @@ -17,7 +17,7 @@ public class AbortMultipartUploadResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CommitMultipartUploadResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CommitMultipartUploadResponse.java index 1fcfe7cc797..a8f479c1a63 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CommitMultipartUploadResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CommitMultipartUploadResponse.java @@ -17,7 +17,7 @@ public class CommitMultipartUploadResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CreateBucketResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CreateBucketResponse.java index fd63115bdd6..9dd34c12a24 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CreateBucketResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CreateBucketResponse.java @@ -17,7 +17,7 @@ public class CreateBucketResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CreateMultipartUploadResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CreateMultipartUploadResponse.java index dd64ac3c1a9..69e98c5961b 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CreateMultipartUploadResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CreateMultipartUploadResponse.java @@ -17,7 +17,7 @@ public class CreateMultipartUploadResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CreatePreauthenticatedRequestResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CreatePreauthenticatedRequestResponse.java index a3dd6ff4f8c..a9bc902f1fd 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CreatePreauthenticatedRequestResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/CreatePreauthenticatedRequestResponse.java @@ -17,7 +17,7 @@ public class CreatePreauthenticatedRequestResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/DeleteBucketResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/DeleteBucketResponse.java index d4f9cdc061a..174698e6d7d 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/DeleteBucketResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/DeleteBucketResponse.java @@ -17,7 +17,7 @@ public class DeleteBucketResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/DeleteObjectResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/DeleteObjectResponse.java index 3b459fc9418..b3f9fd4f0a6 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/DeleteObjectResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/DeleteObjectResponse.java @@ -17,7 +17,7 @@ public class DeleteObjectResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/DeletePreauthenticatedRequestResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/DeletePreauthenticatedRequestResponse.java index 27dc8646344..eec898d6a8b 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/DeletePreauthenticatedRequestResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/DeletePreauthenticatedRequestResponse.java @@ -17,7 +17,7 @@ public class DeletePreauthenticatedRequestResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetBucketResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetBucketResponse.java index 66769042761..716db7316a5 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetBucketResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetBucketResponse.java @@ -17,7 +17,7 @@ public class GetBucketResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetNamespaceMetadataResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetNamespaceMetadataResponse.java new file mode 100644 index 00000000000..5f495b17655 --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetNamespaceMetadataResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetNamespaceMetadataResponse { + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * The returned NamespaceMetadata instance. + */ + private NamespaceMetadata namespaceMetadata; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetNamespaceMetadataResponse o) { + opcClientRequestId(o.getOpcClientRequestId()); + opcRequestId(o.getOpcRequestId()); + namespaceMetadata(o.getNamespaceMetadata()); + + return this; + } + } +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectResponse.java index 3c15e289576..3d9edc47b69 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectResponse.java @@ -17,7 +17,7 @@ public class GetObjectResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; @@ -79,6 +79,16 @@ public class GetObjectResponse { */ private java.util.Date lastModified; + /** + * The current state of the object. + */ + private String archivalState; + + /** + * Time that the object is returned to the archived state. This field is only present for restored objects. + */ + private java.util.Date timeOfArchival; + /** * The returned java.io.InputStream instance, or null if {@link #isNotModified()} is true. */ @@ -110,6 +120,8 @@ public Builder copy(GetObjectResponse o) { contentLanguage(o.getContentLanguage()); contentEncoding(o.getContentEncoding()); lastModified(o.getLastModified()); + archivalState(o.getArchivalState()); + timeOfArchival(o.getTimeOfArchival()); inputStream(o.getInputStream()); isNotModified(o.isNotModified()); return this; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetPreauthenticatedRequestResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetPreauthenticatedRequestResponse.java index d229ab33271..e736d9c6f44 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetPreauthenticatedRequestResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/GetPreauthenticatedRequestResponse.java @@ -17,7 +17,7 @@ public class GetPreauthenticatedRequestResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/HeadBucketResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/HeadBucketResponse.java index 4c3e50b8c71..559ba94b77d 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/HeadBucketResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/HeadBucketResponse.java @@ -17,7 +17,7 @@ public class HeadBucketResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/HeadObjectResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/HeadObjectResponse.java index 3b0273dfa16..3984500b56f 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/HeadObjectResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/HeadObjectResponse.java @@ -17,7 +17,7 @@ public class HeadObjectResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; @@ -74,6 +74,16 @@ public class HeadObjectResponse { */ private java.util.Date lastModified; + /** + * The current state of the object. + */ + private String archivalState; + + /** + * Time that the object is returned to the archived state. This field is only present for restored objects. + */ + private java.util.Date timeOfArchival; + /** * Flag to indicate whether or not the object was modified. If this is true, * the getter for the object itself will return null. Callers should check this @@ -99,6 +109,8 @@ public Builder copy(HeadObjectResponse o) { contentLanguage(o.getContentLanguage()); contentEncoding(o.getContentEncoding()); lastModified(o.getLastModified()); + archivalState(o.getArchivalState()); + timeOfArchival(o.getTimeOfArchival()); isNotModified(o.isNotModified()); return this; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListBucketsResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListBucketsResponse.java index d50dc01013e..8f4f41c4fba 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListBucketsResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListBucketsResponse.java @@ -17,7 +17,7 @@ public class ListBucketsResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadPartsResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadPartsResponse.java index 71d235f418a..566c4256a1b 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadPartsResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadPartsResponse.java @@ -17,7 +17,7 @@ public class ListMultipartUploadPartsResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadsResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadsResponse.java index ce0b23d5bd3..f231f499246 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadsResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadsResponse.java @@ -17,7 +17,7 @@ public class ListMultipartUploadsResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; @@ -25,8 +25,7 @@ public class ListMultipartUploadsResponse { /** * For pagination of a list of `MultipartUpload`s. If this header appears in the response, then * this is a partial list of multipart uploads. Include this value as the `page` parameter in a subsequent - * GET request. For information about pagination, see - * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). + * GET request. For information about pagination, see [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). * */ private String opcNextPage; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListObjectsResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListObjectsResponse.java index e6b75ccb5ba..0c2aecd8425 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListObjectsResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListObjectsResponse.java @@ -17,7 +17,7 @@ public class ListObjectsResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListPreauthenticatedRequestsResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListPreauthenticatedRequestsResponse.java index 12c26a01e13..ed7806eb2ef 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListPreauthenticatedRequestsResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/ListPreauthenticatedRequestsResponse.java @@ -17,7 +17,7 @@ public class ListPreauthenticatedRequestsResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/PutObjectResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/PutObjectResponse.java index ba5dc4f9ca4..f55b11ae66e 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/PutObjectResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/PutObjectResponse.java @@ -17,7 +17,7 @@ public class PutObjectResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/RenameObjectResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/RenameObjectResponse.java new file mode 100644 index 00000000000..6657f95815a --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/RenameObjectResponse.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class RenameObjectResponse { + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * The entity tag for the object. + */ + private String eTag; + + /** + * The time the object was modified, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. + */ + private java.util.Date lastModified; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RenameObjectResponse o) { + opcClientRequestId(o.getOpcClientRequestId()); + opcRequestId(o.getOpcRequestId()); + eTag(o.getETag()); + lastModified(o.getLastModified()); + + return this; + } + } +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/RestoreObjectsResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/RestoreObjectsResponse.java new file mode 100644 index 00000000000..889af1e75c6 --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/RestoreObjectsResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class RestoreObjectsResponse { + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this 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(RestoreObjectsResponse o) { + opcClientRequestId(o.getOpcClientRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/UpdateBucketResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/UpdateBucketResponse.java index 0dbce17d16c..dc0396123b5 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/UpdateBucketResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/UpdateBucketResponse.java @@ -17,7 +17,7 @@ public class UpdateBucketResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/UpdateNamespaceMetadataResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/UpdateNamespaceMetadataResponse.java new file mode 100644 index 00000000000..2025c40b2fa --- /dev/null +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/UpdateNamespaceMetadataResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateNamespaceMetadataResponse { + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * The returned NamespaceMetadata instance. + */ + private NamespaceMetadata namespaceMetadata; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateNamespaceMetadataResponse o) { + opcClientRequestId(o.getOpcClientRequestId()); + opcRequestId(o.getOpcRequestId()); + namespaceMetadata(o.getNamespaceMetadata()); + + return this; + } + } +} diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/UploadPartResponse.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/UploadPartResponse.java index 68c78f54021..7c000169460 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/UploadPartResponse.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/responses/UploadPartResponse.java @@ -17,7 +17,7 @@ public class UploadPartResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular - * request, please provide this request ID. + * request, provide this request ID. * */ private String opcRequestId; diff --git a/pom.xml b/pom.xml index 443a8fcfcbf..92e48247bc6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.16 + 1.2.17 pom Oracle Cloud Infrastructure SDK @@ -31,8 +31,8 @@ 2.24.1 19.0 4.11 - 1.16.8 - 1.16.8.0 + 1.16.16 + 1.16.16.0 @@ -381,7 +381,7 @@ com.google.code.findbugs jsr305 - 3.0.1 + 3.0.2 com.google.guava