() {
+ @Override
+ public boolean apply(GetBootVolumeResponse response) {
+ return response.getBootVolume().getLifecycleState() == targetState;
+ }
+ },
+ targetState
+ == com.oracle.bmc.core.model.BootVolume.LifecycleState.Terminated),
+ request);
+ }
+
/**
* Creates a new {@link Waiter} using default configuration.
*
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 501f5fdf18c..f61f4cb395d 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
@@ -36,6 +36,15 @@ public interface Compute extends AutoCloseable {
*/
void setRegion(String regionId);
+ /**
+ * Attaches the specified boot volume to the specified instance.
+ *
+ * @param request The request object containing the details to send
+ * @return A response object containing details about the completed operation
+ * @throws BmcException when an error occurs.
+ */
+ AttachBootVolumeResponse attachBootVolume(AttachBootVolumeRequest request);
+
/**
* Creates a secondary VNIC and attaches it to the specified instance.
* For more information about secondary VNICs, see
@@ -113,13 +122,11 @@ public interface Compute extends AutoCloseable {
CreateImageResponse createImage(CreateImageRequest request);
/**
- * Creates a new serial console connection to the specified instance.
- * Once the serial console connection has been created and is available,
- * you connect to the serial console using an SSH client.
- *
- * The default number of enabled serial console connections per tenancy is 10.
+ * Creates a new console connection to the specified instance.
+ * Once the console connection has been created and is available,
+ * you connect to the console using SSH.
*
- * For more information about serial console access, see [Accessing the Serial Console](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm).
+ * For more information about console access, see [Accessing the Console](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm).
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
@@ -145,7 +152,7 @@ CreateInstanceConsoleConnectionResponse createInstanceConsoleConnection(
DeleteImageResponse deleteImage(DeleteImageRequest request);
/**
- * Deletes the specified serial console connection.
+ * Deletes the specified instance console connection.
* @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.
@@ -153,6 +160,18 @@ CreateInstanceConsoleConnectionResponse createInstanceConsoleConnection(
DeleteInstanceConsoleConnectionResponse deleteInstanceConsoleConnection(
DeleteInstanceConsoleConnectionRequest request);
+ /**
+ * Detaches a boot volume from an instance. You must specify the OCID of the boot volume attachment.
+ *
+ * This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily
+ * until the attachment is completely removed.
+ *
+ * @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.
+ */
+ DetachBootVolumeResponse detachBootVolume(DetachBootVolumeRequest request);
+
/**
* Detaches and deletes the specified secondary VNIC.
* This operation cannot be used on the instance's primary VNIC.
@@ -201,6 +220,14 @@ DeleteInstanceConsoleConnectionResponse deleteInstanceConsoleConnection(
*/
ExportImageResponse exportImage(ExportImageRequest request);
+ /**
+ * Gets information about the specified boot volume attachment.
+ * @param request The request object containing the details to send
+ * @return A response object containing details about the completed operation
+ * @throws BmcException when an error occurs.
+ */
+ GetBootVolumeAttachmentResponse getBootVolumeAttachment(GetBootVolumeAttachmentRequest request);
+
/**
* Shows the metadata for the specified console history.
* See {@link #captureConsoleHistory(CaptureConsoleHistoryRequest) captureConsoleHistory}
@@ -241,7 +268,7 @@ GetConsoleHistoryContentResponse getConsoleHistoryContent(
GetInstanceResponse getInstance(GetInstanceRequest request);
/**
- * Gets the specified serial console connection's information.
+ * Gets the specified instance console connection's information.
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException when an error occurs.
@@ -338,6 +365,17 @@ GetWindowsInstanceInitialCredentialsResponse getWindowsInstanceInitialCredential
*/
LaunchInstanceResponse launchInstance(LaunchInstanceRequest request);
+ /**
+ * Lists the boot volume attachments in the specified compartment. You can filter the
+ * list by specifying an instance OCID, boot volume OCID, or both.
+ *
+ * @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.
+ */
+ ListBootVolumeAttachmentsResponse listBootVolumeAttachments(
+ ListBootVolumeAttachmentsRequest request);
+
/**
* Lists the console history metadata for the specified compartment or instance.
*
@@ -361,9 +399,9 @@ GetWindowsInstanceInitialCredentialsResponse getWindowsInstanceInitialCredential
ListImagesResponse listImages(ListImagesRequest request);
/**
- * Lists the serial console connections for the specified compartment or instance.
+ * Lists the console connections for the specified compartment or instance.
*
- * For more information about serial console access, see [Accessing the Serial Console](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm).
+ * For more information about console access, see [Accessing the Instance Console](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm).
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
@@ -420,6 +458,9 @@ ListInstanceConsoleConnectionsResponse listInstanceConsoleConnections(
* Terminates the specified instance. Any attached VNICs and volumes are automatically detached
* when the instance terminates.
*
+ * To preserve the boot volume associated with the instance, specify `true` for `PreserveBootVolumeQueryParam`.
+ * To delete the boot volume when the instance is deleted, specify `false` or do not specify a value for `PreserveBootVolumeQueryParam`.
+ *
* This is an asynchronous operation. The instance's `lifecycleState` will change to TERMINATING temporarily
* until the instance is completely removed.
*
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 b09ea0a3dfc..51f9aa96e94 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
@@ -36,6 +36,22 @@ public interface ComputeAsync extends AutoCloseable {
*/
void setRegion(String regionId);
+ /**
+ * Attaches the specified boot volume to the specified instance.
+ *
+ *
+ * @param request The request object containing the details to send
+ * @param handler The request handler to invoke upon completion, may be null.
+ * @return A Future that can be used to get the response if no AsyncHandler was
+ * provided. Note, if you provide an AsyncHandler and use the Future, some
+ * types of responses (like java.io.InputStream) may not be able to be read in
+ * both places as the underlying stream may only be consumed once.
+ */
+ java.util.concurrent.Future attachBootVolume(
+ AttachBootVolumeRequest request,
+ com.oracle.bmc.responses.AsyncHandler
+ handler);
+
/**
* Creates a secondary VNIC and attaches it to the specified instance.
* For more information about secondary VNICs, see
@@ -140,13 +156,11 @@ java.util.concurrent.Future createImage(
com.oracle.bmc.responses.AsyncHandler handler);
/**
- * Creates a new serial console connection to the specified instance.
- * Once the serial console connection has been created and is available,
- * you connect to the serial console using an SSH client.
- *
- * The default number of enabled serial console connections per tenancy is 10.
+ * Creates a new console connection to the specified instance.
+ * Once the console connection has been created and is available,
+ * you connect to the console using SSH.
*
- * For more information about serial console access, see [Accessing the Serial Console](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm).
+ * For more information about console access, see [Accessing the Console](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm).
*
*
* @param request The request object containing the details to send
@@ -195,7 +209,7 @@ java.util.concurrent.Future deleteImage(
com.oracle.bmc.responses.AsyncHandler handler);
/**
- * Deletes the specified serial console connection.
+ * Deletes the specified instance console connection.
*
* @param request The request object containing the details to send
* @param handler The request handler to invoke upon completion, may be null.
@@ -212,6 +226,25 @@ java.util.concurrent.Future deleteImage(
DeleteInstanceConsoleConnectionResponse>
handler);
+ /**
+ * Detaches a boot volume from an instance. You must specify the OCID of the boot volume attachment.
+ *
+ * This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily
+ * until the attachment is completely removed.
+ *
+ *
+ * @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 detachBootVolume(
+ DetachBootVolumeRequest request,
+ com.oracle.bmc.responses.AsyncHandler
+ handler);
+
/**
* Detaches and deletes the specified secondary VNIC.
* This operation cannot be used on the instance's primary VNIC.
@@ -279,6 +312,22 @@ java.util.concurrent.Future exportImage(
ExportImageRequest request,
com.oracle.bmc.responses.AsyncHandler handler);
+ /**
+ * Gets information about the specified boot volume attachment.
+ *
+ * @param request The request object containing the details to send
+ * @param handler The request handler to invoke upon completion, may be null.
+ * @return A Future that can be used to get the response if no AsyncHandler was
+ * provided. Note, if you provide an AsyncHandler and use the Future, some
+ * types of responses (like java.io.InputStream) may not be able to be read in
+ * both places as the underlying stream may only be consumed once.
+ */
+ java.util.concurrent.Future getBootVolumeAttachment(
+ GetBootVolumeAttachmentRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ GetBootVolumeAttachmentRequest, GetBootVolumeAttachmentResponse>
+ handler);
+
/**
* Shows the metadata for the specified console history.
* See {@link #captureConsoleHistory(CaptureConsoleHistoryRequest, Consumer, Consumer) captureConsoleHistory}
@@ -346,7 +395,7 @@ java.util.concurrent.Future getInstance(
com.oracle.bmc.responses.AsyncHandler handler);
/**
- * Gets the specified serial console connection's information.
+ * Gets the specified instance console connection's information.
*
* @param request The request object containing the details to send
* @param handler The request handler to invoke upon completion, may be null.
@@ -490,6 +539,24 @@ java.util.concurrent.Future launchInstance(
com.oracle.bmc.responses.AsyncHandler
handler);
+ /**
+ * Lists the boot volume attachments in the specified compartment. You can filter the
+ * list by specifying an instance OCID, boot volume OCID, or both.
+ *
+ *
+ * @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 listBootVolumeAttachments(
+ ListBootVolumeAttachmentsRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ ListBootVolumeAttachmentsRequest, ListBootVolumeAttachmentsResponse>
+ handler);
+
/**
* Lists the console history metadata for the specified compartment or instance.
*
@@ -527,9 +594,9 @@ java.util.concurrent.Future listImages(
com.oracle.bmc.responses.AsyncHandler handler);
/**
- * Lists the serial console connections for the specified compartment or instance.
+ * Lists the console connections for the specified compartment or instance.
*
- * For more information about serial console access, see [Accessing the Serial Console](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm).
+ * For more information about console access, see [Accessing the Instance Console](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm).
*
*
* @param request The request object containing the details to send
@@ -624,6 +691,9 @@ java.util.concurrent.Future listVolumeAttachments
* Terminates the specified instance. Any attached VNICs and volumes are automatically detached
* when the instance terminates.
*
+ * To preserve the boot volume associated with the instance, specify `true` for `PreserveBootVolumeQueryParam`.
+ * To delete the boot volume when the instance is deleted, specify `false` or do not specify a value for `PreserveBootVolumeQueryParam`.
+ *
* This is an asynchronous operation. The instance's `lifecycleState` will change to TERMINATING temporarily
* until the instance is completely removed.
*
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java
index 4e8d2483b8f..6cc2d2652d3 100644
--- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java
@@ -3,6 +3,7 @@
*/
package com.oracle.bmc.core;
+import java.util.Locale;
import com.oracle.bmc.core.internal.http.*;
import com.oracle.bmc.core.requests.*;
import com.oracle.bmc.core.responses.*;
@@ -101,7 +102,7 @@ public void setRegion(com.oracle.bmc.Region region) {
@Override
public void setRegion(String regionId) {
- regionId = regionId.toLowerCase();
+ regionId = regionId.toLowerCase(Locale.ENGLISH);
try {
com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId);
setRegion(region);
@@ -117,6 +118,28 @@ public void close() {
client.close();
}
+ @Override
+ public java.util.concurrent.Future attachBootVolume(
+ AttachBootVolumeRequest request,
+ com.oracle.bmc.responses.AsyncHandler
+ handler) {
+ LOG.trace("Called async attachBootVolume");
+ request = AttachBootVolumeConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ AttachBootVolumeConverter.fromRequest(client, request);
+ com.google.common.base.Function
+ transformer = AttachBootVolumeConverter.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.getAttachBootVolumeDetails(), request, onSuccess, onError);
+ return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer);
+ }
+
@Override
public java.util.concurrent.Future attachVnic(
AttachVnicRequest request,
@@ -308,6 +331,28 @@ public java.util.concurrent.Future deleteImage(
return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer);
}
+ @Override
+ public java.util.concurrent.Future detachBootVolume(
+ DetachBootVolumeRequest request,
+ com.oracle.bmc.responses.AsyncHandler
+ handler) {
+ LOG.trace("Called async detachBootVolume");
+ request = DetachBootVolumeConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ DetachBootVolumeConverter.fromRequest(client, request);
+ com.google.common.base.Function
+ transformer = DetachBootVolumeConverter.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 detachVnic(
DetachVnicRequest request,
@@ -373,6 +418,29 @@ public java.util.concurrent.Future exportImage(
return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer);
}
+ @Override
+ public java.util.concurrent.Future getBootVolumeAttachment(
+ GetBootVolumeAttachmentRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ GetBootVolumeAttachmentRequest, GetBootVolumeAttachmentResponse>
+ handler) {
+ LOG.trace("Called async getBootVolumeAttachment");
+ request = GetBootVolumeAttachmentConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ GetBootVolumeAttachmentConverter.fromRequest(client, request);
+ com.google.common.base.Function
+ transformer = GetBootVolumeAttachmentConverter.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 getConsoleHistory(
GetConsoleHistoryRequest request,
@@ -604,6 +672,30 @@ public java.util.concurrent.Future launchInstance(
return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer);
}
+ @Override
+ public java.util.concurrent.Future listBootVolumeAttachments(
+ ListBootVolumeAttachmentsRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ ListBootVolumeAttachmentsRequest, ListBootVolumeAttachmentsResponse>
+ handler) {
+ LOG.trace("Called async listBootVolumeAttachments");
+ request = ListBootVolumeAttachmentsConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ ListBootVolumeAttachmentsConverter.fromRequest(client, request);
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response, ListBootVolumeAttachmentsResponse>
+ transformer = ListBootVolumeAttachmentsConverter.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 listConsoleHistories(
ListConsoleHistoriesRequest request,
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java
index 314941e64cc..c6f3f265b3d 100644
--- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java
@@ -3,6 +3,7 @@
*/
package com.oracle.bmc.core;
+import java.util.Locale;
import com.oracle.bmc.core.internal.http.*;
import com.oracle.bmc.core.requests.*;
import com.oracle.bmc.core.responses.*;
@@ -120,7 +121,7 @@ public void setRegion(com.oracle.bmc.Region region) {
@Override
public void setRegion(String regionId) {
- regionId = regionId.toLowerCase();
+ regionId = regionId.toLowerCase(Locale.ENGLISH);
try {
com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId);
setRegion(region);
@@ -136,6 +137,20 @@ public void close() {
client.close();
}
+ @Override
+ public AttachBootVolumeResponse attachBootVolume(AttachBootVolumeRequest request) {
+ LOG.trace("Called attachBootVolume");
+ request = AttachBootVolumeConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ AttachBootVolumeConverter.fromRequest(client, request);
+ com.google.common.base.Function
+ transformer = AttachBootVolumeConverter.fromResponse();
+
+ javax.ws.rs.core.Response response =
+ client.post(ib, request.getAttachBootVolumeDetails(), request);
+ return transformer.apply(response);
+ }
+
@Override
public AttachVnicResponse attachVnic(AttachVnicRequest request) {
LOG.trace("Called attachVnic");
@@ -250,6 +265,19 @@ public DeleteInstanceConsoleConnectionResponse deleteInstanceConsoleConnection(
return transformer.apply(response);
}
+ @Override
+ public DetachBootVolumeResponse detachBootVolume(DetachBootVolumeRequest request) {
+ LOG.trace("Called detachBootVolume");
+ request = DetachBootVolumeConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ DetachBootVolumeConverter.fromRequest(client, request);
+ com.google.common.base.Function
+ transformer = DetachBootVolumeConverter.fromResponse();
+
+ javax.ws.rs.core.Response response = client.delete(ib, request);
+ return transformer.apply(response);
+ }
+
@Override
public DetachVnicResponse detachVnic(DetachVnicRequest request) {
LOG.trace("Called detachVnic");
@@ -290,6 +318,20 @@ public ExportImageResponse exportImage(ExportImageRequest request) {
return transformer.apply(response);
}
+ @Override
+ public GetBootVolumeAttachmentResponse getBootVolumeAttachment(
+ GetBootVolumeAttachmentRequest request) {
+ LOG.trace("Called getBootVolumeAttachment");
+ request = GetBootVolumeAttachmentConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ GetBootVolumeAttachmentConverter.fromRequest(client, request);
+ com.google.common.base.Function
+ transformer = GetBootVolumeAttachmentConverter.fromResponse();
+
+ javax.ws.rs.core.Response response = client.get(ib, request);
+ return transformer.apply(response);
+ }
+
@Override
public GetConsoleHistoryResponse getConsoleHistory(GetConsoleHistoryRequest request) {
LOG.trace("Called getConsoleHistory");
@@ -426,6 +468,21 @@ public LaunchInstanceResponse launchInstance(LaunchInstanceRequest request) {
return transformer.apply(response);
}
+ @Override
+ public ListBootVolumeAttachmentsResponse listBootVolumeAttachments(
+ ListBootVolumeAttachmentsRequest request) {
+ LOG.trace("Called listBootVolumeAttachments");
+ request = ListBootVolumeAttachmentsConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ ListBootVolumeAttachmentsConverter.fromRequest(client, request);
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response, ListBootVolumeAttachmentsResponse>
+ transformer = ListBootVolumeAttachmentsConverter.fromResponse();
+
+ javax.ws.rs.core.Response response = client.get(ib, request);
+ return transformer.apply(response);
+ }
+
@Override
public ListConsoleHistoriesResponse listConsoleHistories(ListConsoleHistoriesRequest request) {
LOG.trace("Called listConsoleHistories");
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java
index 00e8f2a0713..798dbc03940 100644
--- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java
@@ -18,6 +18,75 @@ public class ComputeWaiters {
private final java.util.concurrent.ExecutorService executorService;
private final Compute 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<
+ GetBootVolumeAttachmentRequest, GetBootVolumeAttachmentResponse>
+ forBootVolumeAttachment(
+ GetBootVolumeAttachmentRequest request,
+ com.oracle.bmc.core.model.BootVolumeAttachment.LifecycleState targetState) {
+ return forBootVolumeAttachment(
+ 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<
+ GetBootVolumeAttachmentRequest, GetBootVolumeAttachmentResponse>
+ forBootVolumeAttachment(
+ GetBootVolumeAttachmentRequest request,
+ com.oracle.bmc.core.model.BootVolumeAttachment.LifecycleState targetState,
+ com.oracle.bmc.waiter.TerminationStrategy terminationStrategy,
+ com.oracle.bmc.waiter.DelayStrategy delayStrategy) {
+ return forBootVolumeAttachment(
+ com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy),
+ request,
+ targetState);
+ }
+
+ // Helper method to create a new Waiter for BootVolumeAttachment.
+ private com.oracle.bmc.waiter.Waiter<
+ GetBootVolumeAttachmentRequest, GetBootVolumeAttachmentResponse>
+ forBootVolumeAttachment(
+ com.oracle.bmc.waiter.BmcGenericWaiter waiter,
+ final GetBootVolumeAttachmentRequest request,
+ final com.oracle.bmc.core.model.BootVolumeAttachment.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<
+ GetBootVolumeAttachmentRequest, GetBootVolumeAttachmentResponse>() {
+ @Override
+ public GetBootVolumeAttachmentResponse apply(
+ GetBootVolumeAttachmentRequest request) {
+ return client.getBootVolumeAttachment(request);
+ }
+ },
+ new com.google.common.base.Predicate() {
+ @Override
+ public boolean apply(GetBootVolumeAttachmentResponse response) {
+ return response.getBootVolumeAttachment().getLifecycleState()
+ == targetState;
+ }
+ },
+ false),
+ request);
+ }
+
/**
* Creates a new {@link Waiter} using default configuration.
*
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 53ae1ac0185..85c9cbdf441 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
@@ -36,6 +36,23 @@ public interface VirtualNetwork extends AutoCloseable {
*/
void setRegion(String regionId);
+ /**
+ * Connects this local peering gateway (LPG) to another one in the same region.
+ *
+ * This operation must be called by the VCN administrator who is designated as
+ * the *requestor* in the peering relationship. The *acceptor* must implement
+ * an Identity and Access Management (IAM) policy that gives the requestor permission
+ * to connect to LPGs in the acceptor's compartment. Without that permission, this
+ * operation will fail. For more information, see
+ * [VCN Peering](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/VCNpeering.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.
+ */
+ ConnectLocalPeeringGatewaysResponse connectLocalPeeringGateways(
+ ConnectLocalPeeringGatewaysRequest request);
+
/**
* Creates a new virtual Customer-Premises Equipment (CPE) object in the specified compartment. For
* more information, see [IPSec VPNs](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm).
@@ -231,6 +248,16 @@ public interface VirtualNetwork extends AutoCloseable {
*/
CreateInternetGatewayResponse createInternetGateway(CreateInternetGatewayRequest request);
+ /**
+ * Creates a new local peering gateway (LPG) for the specified VCN.
+ *
+ * @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.
+ */
+ CreateLocalPeeringGatewayResponse createLocalPeeringGateway(
+ CreateLocalPeeringGatewayRequest request);
+
/**
* Creates a secondary private IP for the specified VNIC.
* For more information about secondary private IPs, see
@@ -489,6 +516,19 @@ public interface VirtualNetwork extends AutoCloseable {
*/
DeleteInternetGatewayResponse deleteInternetGateway(DeleteInternetGatewayRequest request);
+ /**
+ * Deletes the specified local peering gateway (LPG).
+ *
+ * This is an asynchronous operation; the local peering gateway's `lifecycleState` changes to TERMINATING temporarily
+ * until the local peering gateway is completely removed.
+ *
+ * @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.
+ */
+ DeleteLocalPeeringGatewayResponse deleteLocalPeeringGateway(
+ DeleteLocalPeeringGatewayRequest request);
+
/**
* Unassigns and deletes the specified private IP. You must
* specify the object's OCID. The private IP address is returned to
@@ -675,6 +715,14 @@ GetIPSecConnectionDeviceStatusResponse getIPSecConnectionDeviceStatus(
*/
GetInternetGatewayResponse getInternetGateway(GetInternetGatewayRequest request);
+ /**
+ * Gets the specified local peering gateway's information.
+ * @param request The request object containing the details to send
+ * @return A response object containing details about the completed operation
+ * @throws BmcException when an error occurs.
+ */
+ GetLocalPeeringGatewayResponse getLocalPeeringGateway(GetLocalPeeringGatewayRequest request);
+
/**
* Gets the specified private IP. You must specify the object's OCID.
* Alternatively, you can get the object by using
@@ -855,6 +903,17 @@ ListFastConnectProviderServicesResponse listFastConnectProviderServices(
*/
ListInternetGatewaysResponse listInternetGateways(ListInternetGatewaysRequest request);
+ /**
+ * Lists the local peering gateways (LPGs) for the specified VCN and compartment
+ * (the LPG's compartment).
+ *
+ * @param request The request object containing the details to send
+ * @return A response object containing details about the completed operation
+ * @throws BmcException when an error occurs.
+ */
+ ListLocalPeeringGatewaysResponse listLocalPeeringGateways(
+ ListLocalPeeringGatewaysRequest request);
+
/**
* Lists the {@link PrivateIp} objects based
* on one of these filters:
@@ -1018,6 +1077,16 @@ ListVirtualCircuitBandwidthShapesResponse listVirtualCircuitBandwidthShapes(
*/
UpdateInternetGatewayResponse updateInternetGateway(UpdateInternetGatewayRequest request);
+ /**
+ * Updates the specified local peering gateway (LPG).
+ *
+ * @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.
+ */
+ UpdateLocalPeeringGatewayResponse updateLocalPeeringGateway(
+ UpdateLocalPeeringGatewayRequest request);
+
/**
* Updates the specified private IP. You must specify the object's OCID.
* Use this operation if you want to:
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 79e7e14865c..3c40e65e41b 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
@@ -36,6 +36,30 @@ public interface VirtualNetworkAsync extends AutoCloseable {
*/
void setRegion(String regionId);
+ /**
+ * Connects this local peering gateway (LPG) to another one in the same region.
+ *
+ * This operation must be called by the VCN administrator who is designated as
+ * the *requestor* in the peering relationship. The *acceptor* must implement
+ * an Identity and Access Management (IAM) policy that gives the requestor permission
+ * to connect to LPGs in the acceptor's compartment. Without that permission, this
+ * operation will fail. For more information, see
+ * [VCN Peering](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/VCNpeering.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 connectLocalPeeringGateways(
+ ConnectLocalPeeringGatewaysRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ ConnectLocalPeeringGatewaysRequest, ConnectLocalPeeringGatewaysResponse>
+ handler);
+
/**
* Creates a new virtual Customer-Premises Equipment (CPE) object in the specified compartment. For
* more information, see [IPSec VPNs](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm).
@@ -291,6 +315,23 @@ java.util.concurrent.Future createInternetGateway
CreateInternetGatewayRequest, CreateInternetGatewayResponse>
handler);
+ /**
+ * Creates a new local peering gateway (LPG) for the specified VCN.
+ *
+ *
+ * @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 createLocalPeeringGateway(
+ CreateLocalPeeringGatewayRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ CreateLocalPeeringGatewayRequest, CreateLocalPeeringGatewayResponse>
+ handler);
+
/**
* Creates a secondary private IP for the specified VNIC.
* For more information about secondary private IPs, see
@@ -652,6 +693,26 @@ java.util.concurrent.Future deleteInternetGateway
DeleteInternetGatewayRequest, DeleteInternetGatewayResponse>
handler);
+ /**
+ * Deletes the specified local peering gateway (LPG).
+ *
+ * This is an asynchronous operation; the local peering gateway's `lifecycleState` changes to TERMINATING temporarily
+ * until the local peering gateway is completely removed.
+ *
+ *
+ * @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 deleteLocalPeeringGateway(
+ DeleteLocalPeeringGatewayRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ DeleteLocalPeeringGatewayRequest, DeleteLocalPeeringGatewayResponse>
+ handler);
+
/**
* Unassigns and deletes the specified private IP. You must
* specify the object's OCID. The private IP address is returned to
@@ -973,6 +1034,22 @@ java.util.concurrent.Future getInternetGateway(
GetInternetGatewayRequest, GetInternetGatewayResponse>
handler);
+ /**
+ * Gets the specified local peering gateway's information.
+ *
+ * @param request The request object containing the details to send
+ * @param handler The request handler to invoke upon completion, may be null.
+ * @return A Future that can be used to get the response if no AsyncHandler was
+ * provided. Note, if you provide an AsyncHandler and use the Future, some
+ * types of responses (like java.io.InputStream) may not be able to be read in
+ * both places as the underlying stream may only be consumed once.
+ */
+ java.util.concurrent.Future getLocalPeeringGateway(
+ GetLocalPeeringGatewayRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ GetLocalPeeringGatewayRequest, GetLocalPeeringGatewayResponse>
+ handler);
+
/**
* Gets the specified private IP. You must specify the object's OCID.
* Alternatively, you can get the object by using
@@ -1284,6 +1361,24 @@ java.util.concurrent.Future listInternetGateways(
ListInternetGatewaysRequest, ListInternetGatewaysResponse>
handler);
+ /**
+ * Lists the local peering gateways (LPGs) for the specified VCN and compartment
+ * (the LPG's compartment).
+ *
+ *
+ * @param request The request object containing the details to send
+ * @param handler The request handler to invoke upon completion, may be null.
+ * @return A Future that can be used to get the response if no AsyncHandler was
+ * provided. Note, if you provide an AsyncHandler and use the Future, some
+ * types of responses (like java.io.InputStream) may not be able to be read in
+ * both places as the underlying stream may only be consumed once.
+ */
+ java.util.concurrent.Future listLocalPeeringGateways(
+ ListLocalPeeringGatewaysRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ ListLocalPeeringGatewaysRequest, ListLocalPeeringGatewaysResponse>
+ handler);
+
/**
* Lists the {@link PrivateIp} objects based
* on one of these filters:
@@ -1558,6 +1653,23 @@ java.util.concurrent.Future updateInternetGateway
UpdateInternetGatewayRequest, UpdateInternetGatewayResponse>
handler);
+ /**
+ * Updates the specified local peering gateway (LPG).
+ *
+ *
+ * @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 updateLocalPeeringGateway(
+ UpdateLocalPeeringGatewayRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ UpdateLocalPeeringGatewayRequest, UpdateLocalPeeringGatewayResponse>
+ handler);
+
/**
* Updates the specified private IP. You must specify the object's OCID.
* Use this operation if you want to:
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java
index fbb225f228d..dd6f48e2602 100644
--- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java
@@ -3,6 +3,7 @@
*/
package com.oracle.bmc.core;
+import java.util.Locale;
import com.oracle.bmc.core.internal.http.*;
import com.oracle.bmc.core.requests.*;
import com.oracle.bmc.core.responses.*;
@@ -101,7 +102,7 @@ public void setRegion(com.oracle.bmc.Region region) {
@Override
public void setRegion(String regionId) {
- regionId = regionId.toLowerCase();
+ regionId = regionId.toLowerCase(Locale.ENGLISH);
try {
com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId);
setRegion(region);
@@ -117,6 +118,37 @@ public void close() {
client.close();
}
+ @Override
+ public java.util.concurrent.Future
+ connectLocalPeeringGateways(
+ ConnectLocalPeeringGatewaysRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ ConnectLocalPeeringGatewaysRequest,
+ ConnectLocalPeeringGatewaysResponse>
+ handler) {
+ LOG.trace("Called async connectLocalPeeringGateways");
+ request = ConnectLocalPeeringGatewaysConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ ConnectLocalPeeringGatewaysConverter.fromRequest(client, request);
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response, ConnectLocalPeeringGatewaysResponse>
+ transformer = ConnectLocalPeeringGatewaysConverter.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.getConnectLocalPeeringGatewaysDetails(),
+ request,
+ onSuccess,
+ onError);
+ return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer);
+ }
+
@Override
public java.util.concurrent.Future createCpe(
CreateCpeRequest request,
@@ -306,6 +338,35 @@ public java.util.concurrent.Future createInternet
return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer);
}
+ @Override
+ public java.util.concurrent.Future createLocalPeeringGateway(
+ CreateLocalPeeringGatewayRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ CreateLocalPeeringGatewayRequest, CreateLocalPeeringGatewayResponse>
+ handler) {
+ LOG.trace("Called async createLocalPeeringGateway");
+ request = CreateLocalPeeringGatewayConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ CreateLocalPeeringGatewayConverter.fromRequest(client, request);
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response, CreateLocalPeeringGatewayResponse>
+ transformer = CreateLocalPeeringGatewayConverter.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.getCreateLocalPeeringGatewayDetails(),
+ request,
+ onSuccess,
+ onError);
+ return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer);
+ }
+
@Override
public java.util.concurrent.Future createPrivateIp(
CreatePrivateIpRequest request,
@@ -621,6 +682,30 @@ public java.util.concurrent.Future deleteInternet
return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer);
}
+ @Override
+ public java.util.concurrent.Future deleteLocalPeeringGateway(
+ DeleteLocalPeeringGatewayRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ DeleteLocalPeeringGatewayRequest, DeleteLocalPeeringGatewayResponse>
+ handler) {
+ LOG.trace("Called async deleteLocalPeeringGateway");
+ request = DeleteLocalPeeringGatewayConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ DeleteLocalPeeringGatewayConverter.fromRequest(client, request);
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response, DeleteLocalPeeringGatewayResponse>
+ transformer = DeleteLocalPeeringGatewayConverter.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 deletePrivateIp(
DeletePrivateIpRequest request,
@@ -1032,6 +1117,29 @@ public java.util.concurrent.Future getInternetGatewa
return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer);
}
+ @Override
+ public java.util.concurrent.Future getLocalPeeringGateway(
+ GetLocalPeeringGatewayRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ GetLocalPeeringGatewayRequest, GetLocalPeeringGatewayResponse>
+ handler) {
+ LOG.trace("Called async getLocalPeeringGateway");
+ request = GetLocalPeeringGatewayConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ GetLocalPeeringGatewayConverter.fromRequest(client, request);
+ com.google.common.base.Function
+ transformer = GetLocalPeeringGatewayConverter.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 getPrivateIp(
GetPrivateIpRequest request,
@@ -1439,6 +1547,29 @@ public java.util.concurrent.Future listInternetGat
return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer);
}
+ @Override
+ public java.util.concurrent.Future listLocalPeeringGateways(
+ ListLocalPeeringGatewaysRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ ListLocalPeeringGatewaysRequest, ListLocalPeeringGatewaysResponse>
+ handler) {
+ LOG.trace("Called async listLocalPeeringGateways");
+ request = ListLocalPeeringGatewaysConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ ListLocalPeeringGatewaysConverter.fromRequest(client, request);
+ com.google.common.base.Function
+ transformer = ListLocalPeeringGatewaysConverter.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 listPrivateIps(
ListPrivateIpsRequest request,
@@ -1786,6 +1917,35 @@ public java.util.concurrent.Future updateInternet
return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer);
}
+ @Override
+ public java.util.concurrent.Future updateLocalPeeringGateway(
+ UpdateLocalPeeringGatewayRequest request,
+ com.oracle.bmc.responses.AsyncHandler<
+ UpdateLocalPeeringGatewayRequest, UpdateLocalPeeringGatewayResponse>
+ handler) {
+ LOG.trace("Called async updateLocalPeeringGateway");
+ request = UpdateLocalPeeringGatewayConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ UpdateLocalPeeringGatewayConverter.fromRequest(client, request);
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response, UpdateLocalPeeringGatewayResponse>
+ transformer = UpdateLocalPeeringGatewayConverter.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.getUpdateLocalPeeringGatewayDetails(),
+ request,
+ onSuccess,
+ onError);
+ return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer);
+ }
+
@Override
public java.util.concurrent.Future updatePrivateIp(
UpdatePrivateIpRequest request,
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java
index 7560600626a..123557b9197 100644
--- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java
@@ -3,6 +3,7 @@
*/
package com.oracle.bmc.core;
+import java.util.Locale;
import com.oracle.bmc.core.internal.http.*;
import com.oracle.bmc.core.requests.*;
import com.oracle.bmc.core.responses.*;
@@ -120,7 +121,7 @@ public void setRegion(com.oracle.bmc.Region region) {
@Override
public void setRegion(String regionId) {
- regionId = regionId.toLowerCase();
+ regionId = regionId.toLowerCase(Locale.ENGLISH);
try {
com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId);
setRegion(region);
@@ -136,6 +137,22 @@ public void close() {
client.close();
}
+ @Override
+ public ConnectLocalPeeringGatewaysResponse connectLocalPeeringGateways(
+ ConnectLocalPeeringGatewaysRequest request) {
+ LOG.trace("Called connectLocalPeeringGateways");
+ request = ConnectLocalPeeringGatewaysConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ ConnectLocalPeeringGatewaysConverter.fromRequest(client, request);
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response, ConnectLocalPeeringGatewaysResponse>
+ transformer = ConnectLocalPeeringGatewaysConverter.fromResponse();
+
+ javax.ws.rs.core.Response response =
+ client.post(ib, request.getConnectLocalPeeringGatewaysDetails(), request);
+ return transformer.apply(response);
+ }
+
@Override
public CreateCpeResponse createCpe(CreateCpeRequest request) {
LOG.trace("Called createCpe");
@@ -251,6 +268,22 @@ public CreateInternetGatewayResponse createInternetGateway(
return transformer.apply(response);
}
+ @Override
+ public CreateLocalPeeringGatewayResponse createLocalPeeringGateway(
+ CreateLocalPeeringGatewayRequest request) {
+ LOG.trace("Called createLocalPeeringGateway");
+ request = CreateLocalPeeringGatewayConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ CreateLocalPeeringGatewayConverter.fromRequest(client, request);
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response, CreateLocalPeeringGatewayResponse>
+ transformer = CreateLocalPeeringGatewayConverter.fromResponse();
+
+ javax.ws.rs.core.Response response =
+ client.post(ib, request.getCreateLocalPeeringGatewayDetails(), request);
+ return transformer.apply(response);
+ }
+
@Override
public CreatePrivateIpResponse createPrivateIp(CreatePrivateIpRequest request) {
LOG.trace("Called createPrivateIp");
@@ -442,6 +475,21 @@ public DeleteInternetGatewayResponse deleteInternetGateway(
return transformer.apply(response);
}
+ @Override
+ public DeleteLocalPeeringGatewayResponse deleteLocalPeeringGateway(
+ DeleteLocalPeeringGatewayRequest request) {
+ LOG.trace("Called deleteLocalPeeringGateway");
+ request = DeleteLocalPeeringGatewayConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ DeleteLocalPeeringGatewayConverter.fromRequest(client, request);
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response, DeleteLocalPeeringGatewayResponse>
+ transformer = DeleteLocalPeeringGatewayConverter.fromResponse();
+
+ javax.ws.rs.core.Response response = client.delete(ib, request);
+ return transformer.apply(response);
+ }
+
@Override
public DeletePrivateIpResponse deletePrivateIp(DeletePrivateIpRequest request) {
LOG.trace("Called deletePrivateIp");
@@ -683,6 +731,20 @@ public GetInternetGatewayResponse getInternetGateway(GetInternetGatewayRequest r
return transformer.apply(response);
}
+ @Override
+ public GetLocalPeeringGatewayResponse getLocalPeeringGateway(
+ GetLocalPeeringGatewayRequest request) {
+ LOG.trace("Called getLocalPeeringGateway");
+ request = GetLocalPeeringGatewayConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ GetLocalPeeringGatewayConverter.fromRequest(client, request);
+ com.google.common.base.Function
+ transformer = GetLocalPeeringGatewayConverter.fromResponse();
+
+ javax.ws.rs.core.Response response = client.get(ib, request);
+ return transformer.apply(response);
+ }
+
@Override
public GetPrivateIpResponse getPrivateIp(GetPrivateIpRequest request) {
LOG.trace("Called getPrivateIp");
@@ -924,6 +986,20 @@ public ListInternetGatewaysResponse listInternetGateways(ListInternetGatewaysReq
return transformer.apply(response);
}
+ @Override
+ public ListLocalPeeringGatewaysResponse listLocalPeeringGateways(
+ ListLocalPeeringGatewaysRequest request) {
+ LOG.trace("Called listLocalPeeringGateways");
+ request = ListLocalPeeringGatewaysConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ ListLocalPeeringGatewaysConverter.fromRequest(client, request);
+ com.google.common.base.Function
+ transformer = ListLocalPeeringGatewaysConverter.fromResponse();
+
+ javax.ws.rs.core.Response response = client.get(ib, request);
+ return transformer.apply(response);
+ }
+
@Override
public ListPrivateIpsResponse listPrivateIps(ListPrivateIpsRequest request) {
LOG.trace("Called listPrivateIps");
@@ -1130,6 +1206,22 @@ public UpdateInternetGatewayResponse updateInternetGateway(
return transformer.apply(response);
}
+ @Override
+ public UpdateLocalPeeringGatewayResponse updateLocalPeeringGateway(
+ UpdateLocalPeeringGatewayRequest request) {
+ LOG.trace("Called updateLocalPeeringGateway");
+ request = UpdateLocalPeeringGatewayConverter.interceptRequest(request);
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib =
+ UpdateLocalPeeringGatewayConverter.fromRequest(client, request);
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response, UpdateLocalPeeringGatewayResponse>
+ transformer = UpdateLocalPeeringGatewayConverter.fromResponse();
+
+ javax.ws.rs.core.Response response =
+ client.put(ib, request.getUpdateLocalPeeringGatewayDetails(), request);
+ return transformer.apply(response);
+ }
+
@Override
public UpdatePrivateIpResponse updatePrivateIp(UpdatePrivateIpRequest request) {
LOG.trace("Called updatePrivateIp");
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkWaiters.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkWaiters.java
index 56ab35b6509..4e8cb9132ed 100644
--- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkWaiters.java
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkWaiters.java
@@ -471,6 +471,77 @@ public boolean apply(GetInternetGatewayResponse response) {
request);
}
+ /**
+ * 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<
+ GetLocalPeeringGatewayRequest, GetLocalPeeringGatewayResponse>
+ forLocalPeeringGateway(
+ GetLocalPeeringGatewayRequest request,
+ com.oracle.bmc.core.model.LocalPeeringGateway.LifecycleState targetState) {
+ return forLocalPeeringGateway(
+ 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<
+ GetLocalPeeringGatewayRequest, GetLocalPeeringGatewayResponse>
+ forLocalPeeringGateway(
+ GetLocalPeeringGatewayRequest request,
+ com.oracle.bmc.core.model.LocalPeeringGateway.LifecycleState targetState,
+ com.oracle.bmc.waiter.TerminationStrategy terminationStrategy,
+ com.oracle.bmc.waiter.DelayStrategy delayStrategy) {
+ return forLocalPeeringGateway(
+ com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy),
+ request,
+ targetState);
+ }
+
+ // Helper method to create a new Waiter for LocalPeeringGateway.
+ private com.oracle.bmc.waiter.Waiter<
+ GetLocalPeeringGatewayRequest, GetLocalPeeringGatewayResponse>
+ forLocalPeeringGateway(
+ com.oracle.bmc.waiter.BmcGenericWaiter waiter,
+ final GetLocalPeeringGatewayRequest request,
+ final com.oracle.bmc.core.model.LocalPeeringGateway.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<
+ GetLocalPeeringGatewayRequest, GetLocalPeeringGatewayResponse>() {
+ @Override
+ public GetLocalPeeringGatewayResponse apply(
+ GetLocalPeeringGatewayRequest request) {
+ return client.getLocalPeeringGateway(request);
+ }
+ },
+ new com.google.common.base.Predicate() {
+ @Override
+ public boolean apply(GetLocalPeeringGatewayResponse response) {
+ return response.getLocalPeeringGateway().getLifecycleState()
+ == targetState;
+ }
+ },
+ targetState
+ == com.oracle.bmc.core.model.LocalPeeringGateway.LifecycleState
+ .Terminated),
+ request);
+ }
+
/**
* Creates a new {@link Waiter} using default configuration.
*
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/AttachBootVolumeConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/AttachBootVolumeConverter.java
new file mode 100644
index 00000000000..8aeaf57cccb
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/AttachBootVolumeConverter.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class AttachBootVolumeConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static AttachBootVolumeRequest interceptRequest(AttachBootVolumeRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client, AttachBootVolumeRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getAttachBootVolumeDetails() == null) {
+ throw new NullPointerException("attachBootVolumeDetails is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget().path("/20160918").path("bootVolumeAttachments");
+
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request();
+
+ ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON);
+
+ if (request.getOpcRetryToken() != null) {
+ ib.header("opc-retry-token", request.getOpcRetryToken());
+ }
+
+ return ib;
+ }
+
+ public static com.google.common.base.Function<
+ javax.ws.rs.core.Response, AttachBootVolumeResponse>
+ fromResponse() {
+ final com.google.common.base.Function
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, AttachBootVolumeResponse>() {
+ @Override
+ public AttachBootVolumeResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace(
+ "Transform function invoked for AttachBootVolumeResponse");
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response,
+ com.oracle.bmc.http.internal.WithHeaders<
+ BootVolumeAttachment>>
+ responseFn =
+ RESPONSE_CONVERSION_FACTORY.create(
+ BootVolumeAttachment.class);
+
+ com.oracle.bmc.http.internal.WithHeaders
+ response = responseFn.apply(rawResponse);
+ javax.ws.rs.core.MultivaluedMap headers =
+ response.getHeaders();
+
+ AttachBootVolumeResponse.Builder builder =
+ AttachBootVolumeResponse.builder();
+
+ builder.bootVolumeAttachment(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));
+ }
+
+ AttachBootVolumeResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ConnectLocalPeeringGatewaysConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ConnectLocalPeeringGatewaysConverter.java
new file mode 100644
index 00000000000..00d4fff018e
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ConnectLocalPeeringGatewaysConverter.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class ConnectLocalPeeringGatewaysConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static ConnectLocalPeeringGatewaysRequest interceptRequest(
+ ConnectLocalPeeringGatewaysRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client,
+ ConnectLocalPeeringGatewaysRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getLocalPeeringGatewayId() == null) {
+ throw new NullPointerException("localPeeringGatewayId is required");
+ }
+
+ if (request.getConnectLocalPeeringGatewaysDetails() == null) {
+ throw new NullPointerException("connectLocalPeeringGatewaysDetails is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget()
+ .path("/20160918")
+ .path("localPeeringGateways")
+ .path(
+ com.oracle.bmc.util.internal.HttpUtils.encodePathSegment(
+ request.getLocalPeeringGatewayId()))
+ .path("actions")
+ .path("connect");
+
+ 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, ConnectLocalPeeringGatewaysResponse>
+ fromResponse() {
+ final com.google.common.base.Function<
+ javax.ws.rs.core.Response, ConnectLocalPeeringGatewaysResponse>
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, ConnectLocalPeeringGatewaysResponse>() {
+ @Override
+ public ConnectLocalPeeringGatewaysResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace(
+ "Transform function invoked for ConnectLocalPeeringGatewaysResponse");
+ 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();
+
+ ConnectLocalPeeringGatewaysResponse.Builder builder =
+ ConnectLocalPeeringGatewaysResponse.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));
+ }
+
+ ConnectLocalPeeringGatewaysResponse responseWrapper =
+ builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateLocalPeeringGatewayConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateLocalPeeringGatewayConverter.java
new file mode 100644
index 00000000000..0162489ab24
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateLocalPeeringGatewayConverter.java
@@ -0,0 +1,107 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class CreateLocalPeeringGatewayConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static CreateLocalPeeringGatewayRequest interceptRequest(
+ CreateLocalPeeringGatewayRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client,
+ CreateLocalPeeringGatewayRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getCreateLocalPeeringGatewayDetails() == null) {
+ throw new NullPointerException("createLocalPeeringGatewayDetails is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget().path("/20160918").path("localPeeringGateways");
+
+ com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request();
+
+ ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON);
+
+ if (request.getOpcRetryToken() != null) {
+ ib.header("opc-retry-token", request.getOpcRetryToken());
+ }
+
+ return ib;
+ }
+
+ public static com.google.common.base.Function<
+ javax.ws.rs.core.Response, CreateLocalPeeringGatewayResponse>
+ fromResponse() {
+ final com.google.common.base.Function<
+ javax.ws.rs.core.Response, CreateLocalPeeringGatewayResponse>
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, CreateLocalPeeringGatewayResponse>() {
+ @Override
+ public CreateLocalPeeringGatewayResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace(
+ "Transform function invoked for CreateLocalPeeringGatewayResponse");
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response,
+ com.oracle.bmc.http.internal.WithHeaders<
+ LocalPeeringGateway>>
+ responseFn =
+ RESPONSE_CONVERSION_FACTORY.create(
+ LocalPeeringGateway.class);
+
+ com.oracle.bmc.http.internal.WithHeaders
+ response = responseFn.apply(rawResponse);
+ javax.ws.rs.core.MultivaluedMap headers =
+ response.getHeaders();
+
+ CreateLocalPeeringGatewayResponse.Builder builder =
+ CreateLocalPeeringGatewayResponse.builder();
+
+ builder.localPeeringGateway(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));
+ }
+
+ CreateLocalPeeringGatewayResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteBootVolumeConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteBootVolumeConverter.java
new file mode 100644
index 00000000000..84a7473d41c
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteBootVolumeConverter.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class DeleteBootVolumeConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static DeleteBootVolumeRequest interceptRequest(DeleteBootVolumeRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client, DeleteBootVolumeRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getBootVolumeId() == null) {
+ throw new NullPointerException("bootVolumeId is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget()
+ .path("/20160918")
+ .path("bootVolumes")
+ .path(
+ com.oracle.bmc.util.internal.HttpUtils.encodePathSegment(
+ request.getBootVolumeId()));
+
+ 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, DeleteBootVolumeResponse>
+ fromResponse() {
+ final com.google.common.base.Function
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, DeleteBootVolumeResponse>() {
+ @Override
+ public DeleteBootVolumeResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace(
+ "Transform function invoked for DeleteBootVolumeResponse");
+ 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();
+
+ DeleteBootVolumeResponse.Builder builder =
+ DeleteBootVolumeResponse.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));
+ }
+
+ DeleteBootVolumeResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteLocalPeeringGatewayConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteLocalPeeringGatewayConverter.java
new file mode 100644
index 00000000000..b26b2ee7a1b
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteLocalPeeringGatewayConverter.java
@@ -0,0 +1,98 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class DeleteLocalPeeringGatewayConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static DeleteLocalPeeringGatewayRequest interceptRequest(
+ DeleteLocalPeeringGatewayRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client,
+ DeleteLocalPeeringGatewayRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getLocalPeeringGatewayId() == null) {
+ throw new NullPointerException("localPeeringGatewayId is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget()
+ .path("/20160918")
+ .path("localPeeringGateways")
+ .path(
+ com.oracle.bmc.util.internal.HttpUtils.encodePathSegment(
+ request.getLocalPeeringGatewayId()));
+
+ 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, DeleteLocalPeeringGatewayResponse>
+ fromResponse() {
+ final com.google.common.base.Function<
+ javax.ws.rs.core.Response, DeleteLocalPeeringGatewayResponse>
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, DeleteLocalPeeringGatewayResponse>() {
+ @Override
+ public DeleteLocalPeeringGatewayResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace(
+ "Transform function invoked for DeleteLocalPeeringGatewayResponse");
+ 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();
+
+ DeleteLocalPeeringGatewayResponse.Builder builder =
+ DeleteLocalPeeringGatewayResponse.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));
+ }
+
+ DeleteLocalPeeringGatewayResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DetachBootVolumeConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DetachBootVolumeConverter.java
new file mode 100644
index 00000000000..15c792cfee7
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DetachBootVolumeConverter.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class DetachBootVolumeConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static DetachBootVolumeRequest interceptRequest(DetachBootVolumeRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client, DetachBootVolumeRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getBootVolumeAttachmentId() == null) {
+ throw new NullPointerException("bootVolumeAttachmentId is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget()
+ .path("/20160918")
+ .path("bootVolumeAttachments")
+ .path(
+ com.oracle.bmc.util.internal.HttpUtils.encodePathSegment(
+ request.getBootVolumeAttachmentId()));
+
+ 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, DetachBootVolumeResponse>
+ fromResponse() {
+ final com.google.common.base.Function
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, DetachBootVolumeResponse>() {
+ @Override
+ public DetachBootVolumeResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace(
+ "Transform function invoked for DetachBootVolumeResponse");
+ 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();
+
+ DetachBootVolumeResponse.Builder builder =
+ DetachBootVolumeResponse.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));
+ }
+
+ DetachBootVolumeResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetBootVolumeAttachmentConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetBootVolumeAttachmentConverter.java
new file mode 100644
index 00000000000..8d08b00fb19
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetBootVolumeAttachmentConverter.java
@@ -0,0 +1,108 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class GetBootVolumeAttachmentConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static GetBootVolumeAttachmentRequest interceptRequest(
+ GetBootVolumeAttachmentRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client,
+ GetBootVolumeAttachmentRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getBootVolumeAttachmentId() == null) {
+ throw new NullPointerException("bootVolumeAttachmentId is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget()
+ .path("/20160918")
+ .path("bootVolumeAttachments")
+ .path(
+ com.oracle.bmc.util.internal.HttpUtils.encodePathSegment(
+ request.getBootVolumeAttachmentId()));
+
+ 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, GetBootVolumeAttachmentResponse>
+ fromResponse() {
+ final com.google.common.base.Function<
+ javax.ws.rs.core.Response, GetBootVolumeAttachmentResponse>
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, GetBootVolumeAttachmentResponse>() {
+ @Override
+ public GetBootVolumeAttachmentResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace(
+ "Transform function invoked for GetBootVolumeAttachmentResponse");
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response,
+ com.oracle.bmc.http.internal.WithHeaders<
+ BootVolumeAttachment>>
+ responseFn =
+ RESPONSE_CONVERSION_FACTORY.create(
+ BootVolumeAttachment.class);
+
+ com.oracle.bmc.http.internal.WithHeaders
+ response = responseFn.apply(rawResponse);
+ javax.ws.rs.core.MultivaluedMap headers =
+ response.getHeaders();
+
+ GetBootVolumeAttachmentResponse.Builder builder =
+ GetBootVolumeAttachmentResponse.builder();
+
+ builder.bootVolumeAttachment(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));
+ }
+
+ GetBootVolumeAttachmentResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetBootVolumeConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetBootVolumeConverter.java
new file mode 100644
index 00000000000..f98c43daf3f
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetBootVolumeConverter.java
@@ -0,0 +1,103 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class GetBootVolumeConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static GetBootVolumeRequest interceptRequest(GetBootVolumeRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client, GetBootVolumeRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getBootVolumeId() == null) {
+ throw new NullPointerException("bootVolumeId is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget()
+ .path("/20160918")
+ .path("bootVolumes")
+ .path(
+ com.oracle.bmc.util.internal.HttpUtils.encodePathSegment(
+ request.getBootVolumeId()));
+
+ 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, GetBootVolumeResponse>() {
+ @Override
+ public GetBootVolumeResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace("Transform function invoked for GetBootVolumeResponse");
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response,
+ com.oracle.bmc.http.internal.WithHeaders<
+ BootVolume>>
+ responseFn =
+ RESPONSE_CONVERSION_FACTORY.create(
+ BootVolume.class);
+
+ com.oracle.bmc.http.internal.WithHeaders response =
+ responseFn.apply(rawResponse);
+ javax.ws.rs.core.MultivaluedMap headers =
+ response.getHeaders();
+
+ GetBootVolumeResponse.Builder builder =
+ GetBootVolumeResponse.builder();
+
+ builder.bootVolume(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));
+ }
+
+ GetBootVolumeResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetLocalPeeringGatewayConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetLocalPeeringGatewayConverter.java
new file mode 100644
index 00000000000..9af39279253
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetLocalPeeringGatewayConverter.java
@@ -0,0 +1,107 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class GetLocalPeeringGatewayConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static GetLocalPeeringGatewayRequest interceptRequest(
+ GetLocalPeeringGatewayRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client, GetLocalPeeringGatewayRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getLocalPeeringGatewayId() == null) {
+ throw new NullPointerException("localPeeringGatewayId is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget()
+ .path("/20160918")
+ .path("localPeeringGateways")
+ .path(
+ com.oracle.bmc.util.internal.HttpUtils.encodePathSegment(
+ request.getLocalPeeringGatewayId()));
+
+ 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, GetLocalPeeringGatewayResponse>
+ fromResponse() {
+ final com.google.common.base.Function<
+ javax.ws.rs.core.Response, GetLocalPeeringGatewayResponse>
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, GetLocalPeeringGatewayResponse>() {
+ @Override
+ public GetLocalPeeringGatewayResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace(
+ "Transform function invoked for GetLocalPeeringGatewayResponse");
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response,
+ com.oracle.bmc.http.internal.WithHeaders<
+ LocalPeeringGateway>>
+ responseFn =
+ RESPONSE_CONVERSION_FACTORY.create(
+ LocalPeeringGateway.class);
+
+ com.oracle.bmc.http.internal.WithHeaders
+ response = responseFn.apply(rawResponse);
+ javax.ws.rs.core.MultivaluedMap headers =
+ response.getHeaders();
+
+ GetLocalPeeringGatewayResponse.Builder builder =
+ GetLocalPeeringGatewayResponse.builder();
+
+ builder.localPeeringGateway(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));
+ }
+
+ GetLocalPeeringGatewayResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListBootVolumeAttachmentsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListBootVolumeAttachmentsConverter.java
new file mode 100644
index 00000000000..14f00f28df9
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListBootVolumeAttachmentsConverter.java
@@ -0,0 +1,157 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class ListBootVolumeAttachmentsConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static ListBootVolumeAttachmentsRequest interceptRequest(
+ ListBootVolumeAttachmentsRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client,
+ ListBootVolumeAttachmentsRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getAvailabilityDomain() == null) {
+ throw new NullPointerException("availabilityDomain is required");
+ }
+
+ if (request.getCompartmentId() == null) {
+ throw new NullPointerException("compartmentId is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget().path("/20160918").path("bootVolumeAttachments");
+
+ target =
+ target.queryParam(
+ "availabilityDomain",
+ com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam(
+ request.getAvailabilityDomain()));
+
+ target =
+ target.queryParam(
+ "compartmentId",
+ com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam(
+ request.getCompartmentId()));
+
+ if (request.getLimit() != null) {
+ target =
+ target.queryParam(
+ "limit",
+ com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam(
+ request.getLimit()));
+ }
+
+ if (request.getPage() != null) {
+ target =
+ target.queryParam(
+ "page",
+ com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam(
+ request.getPage()));
+ }
+
+ if (request.getInstanceId() != null) {
+ target =
+ target.queryParam(
+ "instanceId",
+ com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam(
+ request.getInstanceId()));
+ }
+
+ if (request.getBootVolumeId() != null) {
+ target =
+ target.queryParam(
+ "bootVolumeId",
+ com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam(
+ request.getBootVolumeId()));
+ }
+
+ 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, ListBootVolumeAttachmentsResponse>
+ fromResponse() {
+ final com.google.common.base.Function<
+ javax.ws.rs.core.Response, ListBootVolumeAttachmentsResponse>
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, ListBootVolumeAttachmentsResponse>() {
+ @Override
+ public ListBootVolumeAttachmentsResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace(
+ "Transform function invoked for ListBootVolumeAttachmentsResponse");
+ 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<
+ BootVolumeAttachment>>() {});
+
+ com.oracle.bmc.http.internal.WithHeaders<
+ java.util.List>
+ response = responseFn.apply(rawResponse);
+ javax.ws.rs.core.MultivaluedMap headers =
+ response.getHeaders();
+
+ ListBootVolumeAttachmentsResponse.Builder builder =
+ ListBootVolumeAttachmentsResponse.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));
+ }
+
+ ListBootVolumeAttachmentsResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListBootVolumesConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListBootVolumesConverter.java
new file mode 100644
index 00000000000..975aff874ea
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListBootVolumesConverter.java
@@ -0,0 +1,135 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class ListBootVolumesConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static ListBootVolumesRequest interceptRequest(ListBootVolumesRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client, ListBootVolumesRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getAvailabilityDomain() == null) {
+ throw new NullPointerException("availabilityDomain is required");
+ }
+
+ if (request.getCompartmentId() == null) {
+ throw new NullPointerException("compartmentId is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget().path("/20160918").path("bootVolumes");
+
+ target =
+ target.queryParam(
+ "availabilityDomain",
+ com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam(
+ request.getAvailabilityDomain()));
+
+ target =
+ target.queryParam(
+ "compartmentId",
+ com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam(
+ request.getCompartmentId()));
+
+ if (request.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<
+ javax.ws.rs.core.Response, ListBootVolumesResponse>
+ fromResponse() {
+ final com.google.common.base.Function
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, ListBootVolumesResponse>() {
+ @Override
+ public ListBootVolumesResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace("Transform function invoked for ListBootVolumesResponse");
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response,
+ com.oracle.bmc.http.internal.WithHeaders<
+ java.util.List>>
+ responseFn =
+ RESPONSE_CONVERSION_FACTORY.create(
+ new javax.ws.rs.core.GenericType<
+ java.util.List>() {});
+
+ com.oracle.bmc.http.internal.WithHeaders>
+ response = responseFn.apply(rawResponse);
+ javax.ws.rs.core.MultivaluedMap headers =
+ response.getHeaders();
+
+ ListBootVolumesResponse.Builder builder =
+ ListBootVolumesResponse.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));
+ }
+
+ ListBootVolumesResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListLocalPeeringGatewaysConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListLocalPeeringGatewaysConverter.java
new file mode 100644
index 00000000000..f5e4a52dc6d
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListLocalPeeringGatewaysConverter.java
@@ -0,0 +1,141 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class ListLocalPeeringGatewaysConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static ListLocalPeeringGatewaysRequest interceptRequest(
+ ListLocalPeeringGatewaysRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client,
+ ListLocalPeeringGatewaysRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getCompartmentId() == null) {
+ throw new NullPointerException("compartmentId is required");
+ }
+
+ if (request.getVcnId() == null) {
+ throw new NullPointerException("vcnId is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget().path("/20160918").path("localPeeringGateways");
+
+ 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()));
+ }
+
+ target =
+ target.queryParam(
+ "vcnId",
+ com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam(
+ request.getVcnId()));
+
+ 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, ListLocalPeeringGatewaysResponse>
+ fromResponse() {
+ final com.google.common.base.Function<
+ javax.ws.rs.core.Response, ListLocalPeeringGatewaysResponse>
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, ListLocalPeeringGatewaysResponse>() {
+ @Override
+ public ListLocalPeeringGatewaysResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace(
+ "Transform function invoked for ListLocalPeeringGatewaysResponse");
+ 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<
+ LocalPeeringGateway>>() {});
+
+ com.oracle.bmc.http.internal.WithHeaders<
+ java.util.List>
+ response = responseFn.apply(rawResponse);
+ javax.ws.rs.core.MultivaluedMap headers =
+ response.getHeaders();
+
+ ListLocalPeeringGatewaysResponse.Builder builder =
+ ListLocalPeeringGatewaysResponse.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));
+ }
+
+ ListLocalPeeringGatewaysResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/TerminateInstanceConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/TerminateInstanceConverter.java
index f32af4f5f34..08bd5b4e81e 100644
--- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/TerminateInstanceConverter.java
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/TerminateInstanceConverter.java
@@ -37,6 +37,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
com.oracle.bmc.util.internal.HttpUtils.encodePathSegment(
request.getInstanceId()));
+ if (request.getPreserveBootVolume() != null) {
+ target =
+ target.queryParam(
+ "preserveBootVolume",
+ com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam(
+ request.getPreserveBootVolume()));
+ }
+
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/UpdateBootVolumeConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateBootVolumeConverter.java
new file mode 100644
index 00000000000..6b3df7b45c5
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateBootVolumeConverter.java
@@ -0,0 +1,113 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class UpdateBootVolumeConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static UpdateBootVolumeRequest interceptRequest(UpdateBootVolumeRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client, UpdateBootVolumeRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getBootVolumeId() == null) {
+ throw new NullPointerException("bootVolumeId is required");
+ }
+
+ if (request.getUpdateBootVolumeDetails() == null) {
+ throw new NullPointerException("updateBootVolumeDetails is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget()
+ .path("/20160918")
+ .path("bootVolumes")
+ .path(
+ com.oracle.bmc.util.internal.HttpUtils.encodePathSegment(
+ request.getBootVolumeId()));
+
+ 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, UpdateBootVolumeResponse>
+ fromResponse() {
+ final com.google.common.base.Function
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, UpdateBootVolumeResponse>() {
+ @Override
+ public UpdateBootVolumeResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace(
+ "Transform function invoked for UpdateBootVolumeResponse");
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response,
+ com.oracle.bmc.http.internal.WithHeaders<
+ BootVolume>>
+ responseFn =
+ RESPONSE_CONVERSION_FACTORY.create(
+ BootVolume.class);
+
+ com.oracle.bmc.http.internal.WithHeaders response =
+ responseFn.apply(rawResponse);
+ javax.ws.rs.core.MultivaluedMap headers =
+ response.getHeaders();
+
+ UpdateBootVolumeResponse.Builder builder =
+ UpdateBootVolumeResponse.builder();
+
+ builder.bootVolume(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));
+ }
+
+ UpdateBootVolumeResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateLocalPeeringGatewayConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateLocalPeeringGatewayConverter.java
new file mode 100644
index 00000000000..009fe7512ec
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateLocalPeeringGatewayConverter.java
@@ -0,0 +1,116 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@lombok.extern.slf4j.Slf4j
+public class UpdateLocalPeeringGatewayConverter {
+ private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory
+ RESPONSE_CONVERSION_FACTORY =
+ new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory();
+
+ public static UpdateLocalPeeringGatewayRequest interceptRequest(
+ UpdateLocalPeeringGatewayRequest request) {
+
+ return request;
+ }
+
+ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
+ com.oracle.bmc.http.internal.RestClient client,
+ UpdateLocalPeeringGatewayRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getLocalPeeringGatewayId() == null) {
+ throw new NullPointerException("localPeeringGatewayId is required");
+ }
+
+ if (request.getUpdateLocalPeeringGatewayDetails() == null) {
+ throw new NullPointerException("updateLocalPeeringGatewayDetails is required");
+ }
+
+ com.oracle.bmc.http.internal.WrappedWebTarget target =
+ client.getBaseTarget()
+ .path("/20160918")
+ .path("localPeeringGateways")
+ .path(
+ com.oracle.bmc.util.internal.HttpUtils.encodePathSegment(
+ request.getLocalPeeringGatewayId()));
+
+ 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, UpdateLocalPeeringGatewayResponse>
+ fromResponse() {
+ final com.google.common.base.Function<
+ javax.ws.rs.core.Response, UpdateLocalPeeringGatewayResponse>
+ transformer =
+ new com.google.common.base.Function<
+ javax.ws.rs.core.Response, UpdateLocalPeeringGatewayResponse>() {
+ @Override
+ public UpdateLocalPeeringGatewayResponse apply(
+ javax.ws.rs.core.Response rawResponse) {
+ LOG.trace(
+ "Transform function invoked for UpdateLocalPeeringGatewayResponse");
+ com.google.common.base.Function<
+ javax.ws.rs.core.Response,
+ com.oracle.bmc.http.internal.WithHeaders<
+ LocalPeeringGateway>>
+ responseFn =
+ RESPONSE_CONVERSION_FACTORY.create(
+ LocalPeeringGateway.class);
+
+ com.oracle.bmc.http.internal.WithHeaders
+ response = responseFn.apply(rawResponse);
+ javax.ws.rs.core.MultivaluedMap headers =
+ response.getHeaders();
+
+ UpdateLocalPeeringGatewayResponse.Builder builder =
+ UpdateLocalPeeringGatewayResponse.builder();
+
+ builder.localPeeringGateway(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));
+ }
+
+ UpdateLocalPeeringGatewayResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachBootVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachBootVolumeDetails.java
new file mode 100644
index 00000000000..49fef5585d8
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachBootVolumeDetails.java
@@ -0,0 +1,93 @@
+/**
+ * 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
+@com.fasterxml.jackson.databind.annotation.JsonDeserialize(
+ builder = AttachBootVolumeDetails.Builder.class
+)
+@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME)
+public class AttachBootVolumeDetails {
+ @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "")
+ @lombok.experimental.Accessors(fluent = true)
+ public static class Builder {
+ @com.fasterxml.jackson.annotation.JsonProperty("bootVolumeId")
+ private String bootVolumeId;
+
+ public Builder bootVolumeId(String bootVolumeId) {
+ this.bootVolumeId = bootVolumeId;
+ this.__explicitlySet__.add("bootVolumeId");
+ 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("instanceId")
+ private String instanceId;
+
+ public Builder instanceId(String instanceId) {
+ this.instanceId = instanceId;
+ this.__explicitlySet__.add("instanceId");
+ return this;
+ }
+
+ @com.fasterxml.jackson.annotation.JsonIgnore
+ private final java.util.Set __explicitlySet__ = new java.util.HashSet();
+
+ public AttachBootVolumeDetails build() {
+ AttachBootVolumeDetails __instance__ =
+ new AttachBootVolumeDetails(bootVolumeId, displayName, instanceId);
+ __instance__.__explicitlySet__.addAll(__explicitlySet__);
+ return __instance__;
+ }
+
+ @com.fasterxml.jackson.annotation.JsonIgnore
+ public Builder copy(AttachBootVolumeDetails o) {
+ Builder copiedBuilder =
+ bootVolumeId(o.getBootVolumeId())
+ .displayName(o.getDisplayName())
+ .instanceId(o.getInstanceId());
+
+ copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__);
+ return copiedBuilder;
+ }
+ }
+
+ /**
+ * Create a new builder.
+ */
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * The OCID of the boot volume.
+ **/
+ @com.fasterxml.jackson.annotation.JsonProperty("bootVolumeId")
+ String bootVolumeId;
+
+ /**
+ * A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information.
+ *
+ **/
+ @com.fasterxml.jackson.annotation.JsonProperty("displayName")
+ String displayName;
+
+ /**
+ * The OCID of the instance.
+ **/
+ @com.fasterxml.jackson.annotation.JsonProperty("instanceId")
+ String instanceId;
+
+ @com.fasterxml.jackson.annotation.JsonIgnore
+ private final java.util.Set __explicitlySet__ = new java.util.HashSet