* For the purposes of access control, you must provide the OCID of the compartment where you want * the CPE to reside. Notice that the CPE doesn't have to be in the same compartment as the IPSec * connection or other Networking Service components. If you're not sure which compartment to - * use, put the CPE in the same compartment as the IPSec connection. For more information about + * use, put the CPE in the same compartment as the DRG. For more information about * compartments and access control, see [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). * For information about OCIDs, see [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). *
@@ -105,8 +105,9 @@ public interface VirtualNetwork extends AutoCloseable { CreateDrgResponse createDrg(CreateDrgRequest request); /** - * Attaches the specified DRG to the specified VCN. A VCN can be attached to only one DRG at a time. - * The response includes a `DrgAttachment` object with its own OCID. For more information about DRGs, see + * Attaches the specified DRG to the specified VCN. A VCN can be attached to only one DRG at a time, + * and vice versa. The response includes a `DrgAttachment` object with its own OCID. For more + * information about DRGs, see * [Managing Dynamic Routing Gateways (DRGs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDRGs.htm). *
* You may optionally specify a *display name* for the attachment, otherwise a default is provided. @@ -133,7 +134,7 @@ public interface VirtualNetwork extends AutoCloseable { * For the purposes of access control, you must provide the OCID of the compartment where you want the * IPSec connection to reside. Notice that the IPSec connection doesn't have to be in the same compartment * as the DRG, CPE, or other Networking Service components. If you're not sure which compartment to - * use, put the IPSec connection in the same compartment as the CPE. For more information about + * use, put the IPSec connection in the same compartment as the DRG. For more information about * compartments and access control, see * [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). * For information about OCIDs, see [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). @@ -301,9 +302,9 @@ public interface VirtualNetwork extends AutoCloseable { * The OCID for each is returned in the response. You can't delete these default objects, but you can change their * contents (i.e., route rules, etc.) *
- * The VCN and subnets you create are not accessible until you attach an Internet Gateway or set up a VPN. - * For more information, see - * [Typical Networking Service Scenarios](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm#three). + * The VCN and subnets you create are not accessible until you attach an Internet Gateway or set up an IPSec VPN + * or FastConnect. For more information, see + * [Overview of the Networking Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm). * * * @param request The request object containing the details to send @@ -312,6 +313,36 @@ public interface VirtualNetwork extends AutoCloseable { */ CreateVcnResponse createVcn(CreateVcnRequest request); + /** + * Creates a new virtual circuit to use with Oracle Bare Metal Cloud + * Services FastConnect. For more information, see + * [FastConnect](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). + *
+ * For the purposes of access control, you must provide the OCID of the + * compartment where you want the virtual circuit to reside. If you're + * not sure which compartment to use, put the virtual circuit in the + * same compartment with the DRG it's using. For more information about + * compartments and access control, see + * [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). + * For information about OCIDs, see + * [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + *
+ * You may optionally specify a *display name* for the virtual circuit. + * It does not have to be unique, and you can change it. + *
+ **Important:** When creating a virtual circuit, you specify a DRG for + * the traffic to flow through. Make sure you attach the DRG to your + * VCN and confirm the VCN's routing sends traffic to the DRG. Otherwise + * traffic will not flow. For more information, see + * [Managing Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.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. + */ + CreateVirtualCircuitResponse createVirtualCircuit(CreateVirtualCircuitRequest request); + /** * Deletes the specified CPE object. The CPE must not be connected to a DRG. This is an asynchronous * operation; the CPE's `lifecycleState` will change to TERMINATING temporarily until the CPE is completely @@ -364,9 +395,9 @@ public interface VirtualNetwork extends AutoCloseable { DeleteDrgAttachmentResponse deleteDrgAttachment(DeleteDrgAttachmentRequest request); /** - * Deletes the specified IPSec connection. If your goal is to disable the VPN between your VCN and - * on-premise network, it's easiest to simply detach the DRG but keep all the VPN components intact. - * If you were to delete all the components and then later need to create a VPN again, you would + * Deletes the specified IPSec connection. If your goal is to disable the IPSec VPN between your VCN and + * on-premise network, it's easiest to simply detach the DRG but keep all the IPSec VPN components intact. + * If you were to delete all the components and then later need to create an IPSec VPN again, you would * need to configure your on-premise router again with the new information returned from * {@link #createIPSecConnection(CreateIPSecConnectionRequest) createIPSecConnection}. *
@@ -446,6 +477,19 @@ public interface VirtualNetwork extends AutoCloseable { */ DeleteVcnResponse deleteVcn(DeleteVcnRequest request); + /** + * Deletes the specified virtual circuit. + *
+ **Important:** Make sure to also terminate the connection with + * the provider, or else the provider may continue to bill you. + * + * + * @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. + */ + DeleteVirtualCircuitResponse deleteVirtualCircuit(DeleteVirtualCircuitRequest request); + /** * Gets the specified CPE's information. * @@ -562,6 +606,15 @@ GetIPSecConnectionDeviceStatusResponse getIPSecConnectionDeviceStatus( */ GetVcnResponse getVcn(GetVcnRequest request); + /** + * Gets the specified virtual circuit'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. + */ + GetVirtualCircuitResponse getVirtualCircuit(GetVirtualCircuitRequest request); + /** * Gets the information for the specified Virtual Network Interface Card (VNIC), including the attached * instance's public and private IP addresses. You can get the instance's VNIC OCID from the @@ -575,7 +628,7 @@ GetIPSecConnectionDeviceStatusResponse getIPSecConnectionDeviceStatus( GetVnicResponse getVnic(GetVnicRequest request); /** - * Lists the Customer-Premise Equipment objects (CPEs) in the specified compartment. + * Lists the Customer-Premises Equipment objects (CPEs) in the specified compartment. * * * @param request The request object containing the details to send @@ -617,6 +670,23 @@ GetIPSecConnectionDeviceStatusResponse getIPSecConnectionDeviceStatus( */ ListDrgsResponse listDrgs(ListDrgsRequest request); + /** + * Lists the service offerings from supported providers. You need this + * information so you can specify your desired provider and service + * offering when you create a virtual circuit. + *
+ * For the compartment ID, provide the OCID of your tenancy (the root compartment). + *
+ * For more information, see [FastConnect](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). + * + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListFastConnectProviderServicesResponse listFastConnectProviderServices( + ListFastConnectProviderServicesRequest request); + /** * Lists the IPSec connections for the specified compartment. You can filter the * results by DRG or CPE. @@ -680,6 +750,34 @@ GetIPSecConnectionDeviceStatusResponse getIPSecConnectionDeviceStatus( */ ListVcnsResponse listVcns(ListVcnsRequest request); + /** + * Lists the available bandwidth levels for virtual circuits. You need this + * information so you can specify your desired bandwidth level (i.e., shape) + * when you create a virtual circuit. + *
+ * For the compartment ID, provide the OCID of your tenancy (the root compartment). + *
+ * For more information about virtual circuits, see + * [FastConnect](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). + * + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListVirtualCircuitBandwidthShapesResponse listVirtualCircuitBandwidthShapes( + ListVirtualCircuitBandwidthShapesRequest request); + + /** + * Lists the virtual circuits in the specified compartment. + * + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListVirtualCircuitsResponse listVirtualCircuits(ListVirtualCircuitsRequest request); + /** * Updates the specified CPE's display name. * @@ -787,6 +885,31 @@ GetIPSecConnectionDeviceStatusResponse getIPSecConnectionDeviceStatus( */ UpdateVcnResponse updateVcn(UpdateVcnRequest request); + /** + * Updates the specified virtual circuit. This can be called by + * either the customer who owns the virtual circuit, or the + * provider (when provisioning or de-provisioning the virtual + * circuit from their end). The documentation for + * {@link #updateVirtualCircuitDetails(UpdateVirtualCircuitDetailsRequest) updateVirtualCircuitDetails} + * indicates who can update each property of the virtual circuit. + *
+ **Important:** If the virtual circuit is working and in the + * PROVISIONED state, updating any of the network-related properties + * (such as the DRG being used, the BGP ASN, etc.) will cause the virtual + * circuit's state to switch to PROVISIONING and the related BGP + * session to go down. After Oracle re-provisions the virtual circuit, + * its state will return to PROVISIONED. Make sure you confirm that + * the associated BGP session is back up. For more information + * about the various states and how to test connectivity, see + * [FastConnect](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). + * + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + UpdateVirtualCircuitResponse updateVirtualCircuit(UpdateVirtualCircuitRequest request); + /** * Gets the pre-configured waiters available for resources for this service. * 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 20d666b1156..462c6f1bcc9 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 @@ -43,13 +43,13 @@ public interface VirtualNetworkAsync extends AutoCloseable { void setRegion(String regionId); /** - * Creates a new virtual Customer-Premise Equipment (CPE) object in the specified compartment. For - * more information, see [Managing Customer-Premise Equipment (CPE)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingCPEs.htm). + * Creates a new virtual Customer-Premises Equipment (CPE) object in the specified compartment. For + * more information, see [Managing IPSec VPNs](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm). *
* For the purposes of access control, you must provide the OCID of the compartment where you want * the CPE to reside. Notice that the CPE doesn't have to be in the same compartment as the IPSec * connection or other Networking Service components. If you're not sure which compartment to - * use, put the CPE in the same compartment as the IPSec connection. For more information about + * use, put the CPE in the same compartment as the DRG. For more information about * compartments and access control, see [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). * For information about OCIDs, see [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). *
@@ -122,8 +122,9 @@ Future
* You may optionally specify a *display name* for the attachment, otherwise a default is provided.
@@ -155,7 +156,7 @@ Future
- * The VCN and subnets you create are not accessible until you attach an Internet Gateway or set up a VPN.
- * For more information, see
- * [Typical Networking Service Scenarios](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm#three).
+ * The VCN and subnets you create are not accessible until you attach an Internet Gateway or set up an IPSec VPN
+ * or FastConnect. For more information, see
+ * [Overview of the Networking Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm).
*
*
* @param request The request object containing the details to send
@@ -363,6 +364,41 @@ Future
+ * For the purposes of access control, you must provide the OCID of the
+ * compartment where you want the virtual circuit to reside. If you're
+ * not sure which compartment to use, put the virtual circuit in the
+ * same compartment with the DRG it's using. For more information about
+ * compartments and access control, see
+ * [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm).
+ * For information about OCIDs, see
+ * [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
+ *
+ * You may optionally specify a *display name* for the virtual circuit.
+ * It does not have to be unique, and you can change it.
+ *
+ **Important:** When creating a virtual circuit, you specify a DRG for
+ * the traffic to flow through. Make sure you attach the DRG to your
+ * VCN and confirm the VCN's routing sends traffic to the DRG. Otherwise
+ * traffic will not flow. For more information, see
+ * [Managing Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.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 InputStream) may not be able to be read in
+ * both places as the underlying stream may only be consumed once.
+ */
+ Future
@@ -544,6 +580,24 @@ Future
+ **Important:** Make sure to also terminate the connection with
+ * the provider, or else the provider may continue to bill you.
+ *
+ *
+ * @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 InputStream) may not be able to be read in
+ * both places as the underlying stream may only be consumed once.
+ */
+ Future
+ * For the compartment ID, provide the OCID of your tenancy (the root compartment).
+ *
+ * For more information, see [FastConnect](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.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 InputStream) may not be able to be read in
+ * both places as the underlying stream may only be consumed once.
+ */
+ Future
+ * For the compartment ID, provide the OCID of your tenancy (the root compartment).
+ *
+ * For more information about virtual circuits, see
+ * [FastConnect](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.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 InputStream) may not be able to be read in
+ * both places as the underlying stream may only be consumed once.
+ */
+ Future
+ **Important:** If the virtual circuit is working and in the
+ * PROVISIONED state, updating any of the network-related properties
+ * (such as the DRG being used, the BGP ASN, etc.) will cause the virtual
+ * circuit's state to switch to PROVISIONING and the related BGP
+ * session to go down. After Oracle re-provisions the virtual circuit,
+ * its state will return to PROVISIONED. Make sure you confirm that
+ * the associated BGP session is back up. For more information
+ * about the various states and how to test connectivity, see
+ * [FastConnect](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.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 InputStream) may not be able to be read in
+ * both places as the underlying stream may only be consumed once.
+ */
+ Future> etagHeader = HeaderUtils.get(headers, "etag");
+ if (etagHeader.isPresent()) {
+ builder.etag(
+ HeaderUtils.toValue(
+ "etag", etagHeader.get().get(0), String.class));
+ }
+
+ Optional
> opcRequestIdHeader =
+ HeaderUtils.get(headers, "opc-request-id");
+ if (opcRequestIdHeader.isPresent()) {
+ builder.opcRequestId(
+ HeaderUtils.toValue(
+ "opc-request-id",
+ opcRequestIdHeader.get().get(0),
+ String.class));
+ }
+
+ CreateVirtualCircuitResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteVirtualCircuitConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteVirtualCircuitConverter.java
new file mode 100644
index 00000000000..c901d5ad050
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteVirtualCircuitConverter.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 java.io.InputStream;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+
+import javax.ws.rs.client.*;
+import javax.ws.rs.core.*;
+
+import com.oracle.bmc.http.internal.*;
+import static com.oracle.bmc.util.internal.HttpUtils.*;
+import com.oracle.bmc.model.*;
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+
+import lombok.extern.slf4j.Slf4j;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@Slf4j
+public class DeleteVirtualCircuitConverter {
+ private static final ResponseConversionFunctionFactory RESPONSE_CONVERSION_FACTORY =
+ new ResponseConversionFunctionFactory();
+
+ public static DeleteVirtualCircuitRequest interceptRequest(
+ DeleteVirtualCircuitRequest request) {
+
+ return request;
+ }
+
+ public static Invocation.Builder fromRequest(
+ RestClient client, DeleteVirtualCircuitRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getVirtualCircuitId() == null) {
+ throw new NullPointerException("virtualCircuitId is required");
+ }
+
+ WebTarget target =
+ client.getBaseTarget()
+ .path("/20160918")
+ .path("virtualCircuits")
+ .path(encodePathSegment(request.getVirtualCircuitId()));
+
+ Invocation.Builder ib = target.request();
+
+ ib.accept(MediaType.APPLICATION_JSON);
+
+ if (request.getIfMatch() != null) {
+ ib.header("if-match", request.getIfMatch());
+ }
+
+ return ib;
+ }
+
+ public static Function
> opcRequestIdHeader =
+ HeaderUtils.get(headers, "opc-request-id");
+ if (opcRequestIdHeader.isPresent()) {
+ builder.opcRequestId(
+ HeaderUtils.toValue(
+ "opc-request-id",
+ opcRequestIdHeader.get().get(0),
+ String.class));
+ }
+
+ DeleteVirtualCircuitResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetVirtualCircuitConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetVirtualCircuitConverter.java
new file mode 100644
index 00000000000..69bc0ab9851
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetVirtualCircuitConverter.java
@@ -0,0 +1,102 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import java.io.InputStream;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+
+import javax.ws.rs.client.*;
+import javax.ws.rs.core.*;
+
+import com.oracle.bmc.http.internal.*;
+import static com.oracle.bmc.util.internal.HttpUtils.*;
+import com.oracle.bmc.model.*;
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+
+import lombok.extern.slf4j.Slf4j;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@Slf4j
+public class GetVirtualCircuitConverter {
+ private static final ResponseConversionFunctionFactory RESPONSE_CONVERSION_FACTORY =
+ new ResponseConversionFunctionFactory();
+
+ public static GetVirtualCircuitRequest interceptRequest(GetVirtualCircuitRequest request) {
+
+ return request;
+ }
+
+ public static Invocation.Builder fromRequest(
+ RestClient client, GetVirtualCircuitRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getVirtualCircuitId() == null) {
+ throw new NullPointerException("virtualCircuitId is required");
+ }
+
+ WebTarget target =
+ client.getBaseTarget()
+ .path("/20160918")
+ .path("virtualCircuits")
+ .path(encodePathSegment(request.getVirtualCircuitId()));
+
+ Invocation.Builder ib = target.request();
+
+ ib.accept(MediaType.APPLICATION_JSON);
+
+ return ib;
+ }
+
+ public static Function
> etagHeader = HeaderUtils.get(headers, "etag");
+ if (etagHeader.isPresent()) {
+ builder.etag(
+ HeaderUtils.toValue(
+ "etag", etagHeader.get().get(0), String.class));
+ }
+
+ Optional
> opcRequestIdHeader =
+ HeaderUtils.get(headers, "opc-request-id");
+ if (opcRequestIdHeader.isPresent()) {
+ builder.opcRequestId(
+ HeaderUtils.toValue(
+ "opc-request-id",
+ opcRequestIdHeader.get().get(0),
+ String.class));
+ }
+
+ GetVirtualCircuitResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListFastConnectProviderServicesConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListFastConnectProviderServicesConverter.java
new file mode 100644
index 00000000000..bc6c90f8b5b
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListFastConnectProviderServicesConverter.java
@@ -0,0 +1,120 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import java.io.InputStream;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+
+import javax.ws.rs.client.*;
+import javax.ws.rs.core.*;
+
+import com.oracle.bmc.http.internal.*;
+import static com.oracle.bmc.util.internal.HttpUtils.*;
+import com.oracle.bmc.model.*;
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+
+import lombok.extern.slf4j.Slf4j;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@Slf4j
+public class ListFastConnectProviderServicesConverter {
+ private static final ResponseConversionFunctionFactory RESPONSE_CONVERSION_FACTORY =
+ new ResponseConversionFunctionFactory();
+
+ public static ListFastConnectProviderServicesRequest interceptRequest(
+ ListFastConnectProviderServicesRequest request) {
+
+ return request;
+ }
+
+ public static Invocation.Builder fromRequest(
+ RestClient client, ListFastConnectProviderServicesRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getCompartmentId() == null) {
+ throw new NullPointerException("compartmentId is required");
+ }
+
+ WebTarget target =
+ client.getBaseTarget().path("/20160918").path("fastConnectProviderServices");
+
+ target =
+ target.queryParam(
+ "compartmentId", attemptEncodeQueryParam(request.getCompartmentId()));
+
+ if (request.getLimit() != null) {
+ target = target.queryParam("limit", attemptEncodeQueryParam(request.getLimit()));
+ }
+
+ if (request.getPage() != null) {
+ target = target.queryParam("page", attemptEncodeQueryParam(request.getPage()));
+ }
+
+ Invocation.Builder ib = target.request();
+
+ ib.accept(MediaType.APPLICATION_JSON);
+
+ return ib;
+ }
+
+ public static Function
> response =
+ responseFn.apply(rawResponse);
+ MultivaluedMap
> opcNextPageHeader =
+ HeaderUtils.get(headers, "opc-next-page");
+ if (opcNextPageHeader.isPresent()) {
+ builder.opcNextPage(
+ HeaderUtils.toValue(
+ "opc-next-page",
+ opcNextPageHeader.get().get(0),
+ String.class));
+ }
+
+ Optional
> opcRequestIdHeader =
+ HeaderUtils.get(headers, "opc-request-id");
+ if (opcRequestIdHeader.isPresent()) {
+ builder.opcRequestId(
+ HeaderUtils.toValue(
+ "opc-request-id",
+ opcRequestIdHeader.get().get(0),
+ String.class));
+ }
+
+ ListFastConnectProviderServicesResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVirtualCircuitBandwidthShapesConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVirtualCircuitBandwidthShapesConverter.java
new file mode 100644
index 00000000000..5eabce37707
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVirtualCircuitBandwidthShapesConverter.java
@@ -0,0 +1,120 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import java.io.InputStream;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+
+import javax.ws.rs.client.*;
+import javax.ws.rs.core.*;
+
+import com.oracle.bmc.http.internal.*;
+import static com.oracle.bmc.util.internal.HttpUtils.*;
+import com.oracle.bmc.model.*;
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+
+import lombok.extern.slf4j.Slf4j;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@Slf4j
+public class ListVirtualCircuitBandwidthShapesConverter {
+ private static final ResponseConversionFunctionFactory RESPONSE_CONVERSION_FACTORY =
+ new ResponseConversionFunctionFactory();
+
+ public static ListVirtualCircuitBandwidthShapesRequest interceptRequest(
+ ListVirtualCircuitBandwidthShapesRequest request) {
+
+ return request;
+ }
+
+ public static Invocation.Builder fromRequest(
+ RestClient client, ListVirtualCircuitBandwidthShapesRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getCompartmentId() == null) {
+ throw new NullPointerException("compartmentId is required");
+ }
+
+ WebTarget target =
+ client.getBaseTarget().path("/20160918").path("virtualCircuitBandwidthShapes");
+
+ target =
+ target.queryParam(
+ "compartmentId", attemptEncodeQueryParam(request.getCompartmentId()));
+
+ if (request.getLimit() != null) {
+ target = target.queryParam("limit", attemptEncodeQueryParam(request.getLimit()));
+ }
+
+ if (request.getPage() != null) {
+ target = target.queryParam("page", attemptEncodeQueryParam(request.getPage()));
+ }
+
+ Invocation.Builder ib = target.request();
+
+ ib.accept(MediaType.APPLICATION_JSON);
+
+ return ib;
+ }
+
+ public static Function
> response =
+ responseFn.apply(rawResponse);
+ MultivaluedMap
> opcNextPageHeader =
+ HeaderUtils.get(headers, "opc-next-page");
+ if (opcNextPageHeader.isPresent()) {
+ builder.opcNextPage(
+ HeaderUtils.toValue(
+ "opc-next-page",
+ opcNextPageHeader.get().get(0),
+ String.class));
+ }
+
+ Optional
> opcRequestIdHeader =
+ HeaderUtils.get(headers, "opc-request-id");
+ if (opcRequestIdHeader.isPresent()) {
+ builder.opcRequestId(
+ HeaderUtils.toValue(
+ "opc-request-id",
+ opcRequestIdHeader.get().get(0),
+ String.class));
+ }
+
+ ListVirtualCircuitBandwidthShapesResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVirtualCircuitsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVirtualCircuitsConverter.java
new file mode 100644
index 00000000000..8306e8adf77
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListVirtualCircuitsConverter.java
@@ -0,0 +1,114 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import java.io.InputStream;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+
+import javax.ws.rs.client.*;
+import javax.ws.rs.core.*;
+
+import com.oracle.bmc.http.internal.*;
+import static com.oracle.bmc.util.internal.HttpUtils.*;
+import com.oracle.bmc.model.*;
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+
+import lombok.extern.slf4j.Slf4j;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@Slf4j
+public class ListVirtualCircuitsConverter {
+ private static final ResponseConversionFunctionFactory RESPONSE_CONVERSION_FACTORY =
+ new ResponseConversionFunctionFactory();
+
+ public static ListVirtualCircuitsRequest interceptRequest(ListVirtualCircuitsRequest request) {
+
+ return request;
+ }
+
+ public static Invocation.Builder fromRequest(
+ RestClient client, ListVirtualCircuitsRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getCompartmentId() == null) {
+ throw new NullPointerException("compartmentId is required");
+ }
+
+ WebTarget target = client.getBaseTarget().path("/20160918").path("virtualCircuits");
+
+ target =
+ target.queryParam(
+ "compartmentId", attemptEncodeQueryParam(request.getCompartmentId()));
+
+ if (request.getLimit() != null) {
+ target = target.queryParam("limit", attemptEncodeQueryParam(request.getLimit()));
+ }
+
+ if (request.getPage() != null) {
+ target = target.queryParam("page", attemptEncodeQueryParam(request.getPage()));
+ }
+
+ Invocation.Builder ib = target.request();
+
+ ib.accept(MediaType.APPLICATION_JSON);
+
+ return ib;
+ }
+
+ public static Function
>() {});
+
+ WithHeaders
> response = responseFn.apply(rawResponse);
+ MultivaluedMap
> opcNextPageHeader =
+ HeaderUtils.get(headers, "opc-next-page");
+ if (opcNextPageHeader.isPresent()) {
+ builder.opcNextPage(
+ HeaderUtils.toValue(
+ "opc-next-page",
+ opcNextPageHeader.get().get(0),
+ String.class));
+ }
+
+ Optional
> opcRequestIdHeader =
+ HeaderUtils.get(headers, "opc-request-id");
+ if (opcRequestIdHeader.isPresent()) {
+ builder.opcRequestId(
+ HeaderUtils.toValue(
+ "opc-request-id",
+ opcRequestIdHeader.get().get(0),
+ String.class));
+ }
+
+ ListVirtualCircuitsResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateVirtualCircuitConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateVirtualCircuitConverter.java
new file mode 100644
index 00000000000..6922c4b3375
--- /dev/null
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateVirtualCircuitConverter.java
@@ -0,0 +1,111 @@
+/**
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ */
+package com.oracle.bmc.core.internal.http;
+
+import java.io.InputStream;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+
+import javax.ws.rs.client.*;
+import javax.ws.rs.core.*;
+
+import com.oracle.bmc.http.internal.*;
+import static com.oracle.bmc.util.internal.HttpUtils.*;
+import com.oracle.bmc.model.*;
+import com.oracle.bmc.core.model.*;
+import com.oracle.bmc.core.requests.*;
+import com.oracle.bmc.core.responses.*;
+
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+
+import lombok.extern.slf4j.Slf4j;
+
+@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
+@Slf4j
+public class UpdateVirtualCircuitConverter {
+ private static final ResponseConversionFunctionFactory RESPONSE_CONVERSION_FACTORY =
+ new ResponseConversionFunctionFactory();
+
+ public static UpdateVirtualCircuitRequest interceptRequest(
+ UpdateVirtualCircuitRequest request) {
+
+ return request;
+ }
+
+ public static Invocation.Builder fromRequest(
+ RestClient client, UpdateVirtualCircuitRequest request) {
+ if (request == null) {
+ throw new NullPointerException("request instance is required");
+ }
+
+ if (request.getVirtualCircuitId() == null) {
+ throw new NullPointerException("virtualCircuitId is required");
+ }
+
+ if (request.getUpdateVirtualCircuitDetails() == null) {
+ throw new NullPointerException("updateVirtualCircuitDetails is required");
+ }
+
+ WebTarget target =
+ client.getBaseTarget()
+ .path("/20160918")
+ .path("virtualCircuits")
+ .path(encodePathSegment(request.getVirtualCircuitId()));
+
+ Invocation.Builder ib = target.request();
+
+ ib.accept(MediaType.APPLICATION_JSON);
+
+ if (request.getIfMatch() != null) {
+ ib.header("if-match", request.getIfMatch());
+ }
+
+ return ib;
+ }
+
+ public static Function
> etagHeader = HeaderUtils.get(headers, "etag");
+ if (etagHeader.isPresent()) {
+ builder.etag(
+ HeaderUtils.toValue(
+ "etag", etagHeader.get().get(0), String.class));
+ }
+
+ Optional
> opcRequestIdHeader =
+ HeaderUtils.get(headers, "opc-request-id");
+ if (opcRequestIdHeader.isPresent()) {
+ builder.opcRequestId(
+ HeaderUtils.toValue(
+ "opc-request-id",
+ opcRequestIdHeader.get().get(0),
+ String.class));
+ }
+
+ UpdateVirtualCircuitResponse responseWrapper = builder.build();
+
+ return responseWrapper;
+ }
+ };
+ return transformer;
+ }
+}
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ConsoleHistory.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ConsoleHistory.java
index 3a54b1d514d..07eb3d77c18 100644
--- a/bmc-core/src/main/java/com/oracle/bmc/core/model/ConsoleHistory.java
+++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ConsoleHistory.java
@@ -130,12 +130,18 @@ public static Builder builder() {
/**
* The current state of the console history.
**/
+ @lombok.extern.slf4j.Slf4j
public enum LifecycleState {
Requested("REQUESTED"),
GettingHistory("GETTING-HISTORY"),
Succeeded("SUCCEEDED"),
Failed("FAILED"),
- ;
+
+ /**
+ * This value is used if a service returns a value for this enum that is not recognized by this
+ * version of the SDK.
+ */
+ UnknownEnumValue(null);
private final String value;
private static Map