diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f606298b80..98a19319869 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/). + +## 1.11.0 - 2019-12-10 +### Added +- Support for etags on results of the List Objects API in the Object Storage service +- Support for OCIDs on buckets in the Object Storage service +- Support for content-disposition and cache-control headers on objects in the Object Storage service +- Support for recovering deleted compartments in the Identity service +- Support for sharing volumes across multiple instances in the Block Storage service +- Support for connect harnesses and stream pools in the Streaming service +- Support for associating file storage mount targets with network security groups in the File Storage service +- Support for calling Oracle Cloud Infrastructure services in the uk-gov-london-1 region + +### Breaking changes +- The `com.oracle.bmc.streaming.model.ArchiverLifecycleState` enum in the Streaming service has been replaced by the `com.oracle.bmc.streaming.model.Archiver.LifecycleState` enum + ## 1.10.0 - 2019-11-26 ### Added - Support for maintenance windows on autonomous databases in the Database service diff --git a/bmc-addons/bmc-apache-connector-provider/pom.xml b/bmc-addons/bmc-apache-connector-provider/pom.xml index 46d21513cb6..b3343d75ad8 100644 --- a/bmc-addons/bmc-apache-connector-provider/pom.xml +++ b/bmc-addons/bmc-apache-connector-provider/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 1.10.0 + 1.11.0 ../pom.xml @@ -43,7 +43,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 com.oracle.oci.sdk oci-java-sdk-audit - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-containerengine - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-core - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-database - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-dns - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-email - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-filestorage - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-identity - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-loadbalancer - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-objectstorage - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-addons-resteasy-client-configurator - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-resourcesearch - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-addons-apache - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-keymanagement - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-announcementsservice - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-healthchecks - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-waas - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-streaming - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-resourcemanager - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-monitoring - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-ons - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-autoscaling - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-budget - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-workrequests - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-limits - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-functions - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-events - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-dts - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-oce - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-oda - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-analytics - 1.10.0 + 1.11.0 false com.oracle.oci.sdk oci-java-sdk-integration - 1.10.0 + 1.11.0 false diff --git a/bmc-budget/pom.xml b/bmc-budget/pom.xml index bad10ea22e7..75a89be94d4 100644 --- a/bmc-budget/pom.xml +++ b/bmc-budget/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-budget @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 \ No newline at end of file diff --git a/bmc-common/pom.xml b/bmc-common/pom.xml index dfdf5431b94..c8e40f93a8e 100644 --- a/bmc-common/pom.xml +++ b/bmc-common/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml @@ -86,7 +86,7 @@ com.nimbusds nimbus-jose-jwt - 8.2 + 8.2.1 diff --git a/bmc-containerengine/pom.xml b/bmc-containerengine/pom.xml index 48bb83a00ed..d2ee5c12b61 100644 --- a/bmc-containerengine/pom.xml +++ b/bmc-containerengine/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/bmc-core/pom.xml b/bmc-core/pom.xml index fa14bd3e620..75bc9f489f6 100644 --- a/bmc-core/pom.xml +++ b/bmc-core/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 1.10.0 + 1.11.0 diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachEmulatedVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachEmulatedVolumeDetails.java index f0a11ede860..5d37f8197b8 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachEmulatedVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachEmulatedVolumeDetails.java @@ -66,6 +66,15 @@ public Builder isReadOnly(Boolean isReadOnly) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("isShareable") + private Boolean isShareable; + + public Builder isShareable(Boolean isShareable) { + this.isShareable = isShareable; + this.__explicitlySet__.add("isShareable"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("volumeId") private String volumeId; @@ -81,7 +90,7 @@ public Builder volumeId(String volumeId) { public AttachEmulatedVolumeDetails build() { AttachEmulatedVolumeDetails __instance__ = new AttachEmulatedVolumeDetails( - device, displayName, instanceId, isReadOnly, volumeId); + device, displayName, instanceId, isReadOnly, isShareable, volumeId); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -93,6 +102,7 @@ public Builder copy(AttachEmulatedVolumeDetails o) { .displayName(o.getDisplayName()) .instanceId(o.getInstanceId()) .isReadOnly(o.getIsReadOnly()) + .isShareable(o.getIsShareable()) .volumeId(o.getVolumeId()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); @@ -113,8 +123,9 @@ public AttachEmulatedVolumeDetails( String displayName, String instanceId, Boolean isReadOnly, + Boolean isShareable, String volumeId) { - super(device, displayName, instanceId, isReadOnly, volumeId); + super(device, displayName, instanceId, isReadOnly, isShareable, volumeId); } @com.fasterxml.jackson.annotation.JsonIgnore diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachIScsiVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachIScsiVolumeDetails.java index 443332d24d5..408ca5d36f9 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachIScsiVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachIScsiVolumeDetails.java @@ -66,6 +66,15 @@ public Builder isReadOnly(Boolean isReadOnly) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("isShareable") + private Boolean isShareable; + + public Builder isShareable(Boolean isShareable) { + this.isShareable = isShareable; + this.__explicitlySet__.add("isShareable"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("volumeId") private String volumeId; @@ -90,7 +99,13 @@ public Builder useChap(Boolean useChap) { public AttachIScsiVolumeDetails build() { AttachIScsiVolumeDetails __instance__ = new AttachIScsiVolumeDetails( - device, displayName, instanceId, isReadOnly, volumeId, useChap); + device, + displayName, + instanceId, + isReadOnly, + isShareable, + volumeId, + useChap); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -102,6 +117,7 @@ public Builder copy(AttachIScsiVolumeDetails o) { .displayName(o.getDisplayName()) .instanceId(o.getInstanceId()) .isReadOnly(o.getIsReadOnly()) + .isShareable(o.getIsShareable()) .volumeId(o.getVolumeId()) .useChap(o.getUseChap()); @@ -123,9 +139,10 @@ public AttachIScsiVolumeDetails( String displayName, String instanceId, Boolean isReadOnly, + Boolean isShareable, String volumeId, Boolean useChap) { - super(device, displayName, instanceId, isReadOnly, volumeId); + super(device, displayName, instanceId, isReadOnly, isShareable, volumeId); this.useChap = useChap; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachParavirtualizedVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachParavirtualizedVolumeDetails.java index 4de88f1a641..21cf1abc1e0 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachParavirtualizedVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachParavirtualizedVolumeDetails.java @@ -66,6 +66,15 @@ public Builder isReadOnly(Boolean isReadOnly) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("isShareable") + private Boolean isShareable; + + public Builder isShareable(Boolean isShareable) { + this.isShareable = isShareable; + this.__explicitlySet__.add("isShareable"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("volumeId") private String volumeId; @@ -94,6 +103,7 @@ public AttachParavirtualizedVolumeDetails build() { displayName, instanceId, isReadOnly, + isShareable, volumeId, isPvEncryptionInTransitEnabled); __instance__.__explicitlySet__.addAll(__explicitlySet__); @@ -107,6 +117,7 @@ public Builder copy(AttachParavirtualizedVolumeDetails o) { .displayName(o.getDisplayName()) .instanceId(o.getInstanceId()) .isReadOnly(o.getIsReadOnly()) + .isShareable(o.getIsShareable()) .volumeId(o.getVolumeId()) .isPvEncryptionInTransitEnabled(o.getIsPvEncryptionInTransitEnabled()); @@ -128,9 +139,10 @@ public AttachParavirtualizedVolumeDetails( String displayName, String instanceId, Boolean isReadOnly, + Boolean isShareable, String volumeId, Boolean isPvEncryptionInTransitEnabled) { - super(device, displayName, instanceId, isReadOnly, volumeId); + super(device, displayName, instanceId, isReadOnly, isShareable, volumeId); this.isPvEncryptionInTransitEnabled = isPvEncryptionInTransitEnabled; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachServiceDeterminedVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachServiceDeterminedVolumeDetails.java index f2f5f5282d1..157be988fe1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachServiceDeterminedVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachServiceDeterminedVolumeDetails.java @@ -66,6 +66,15 @@ public Builder isReadOnly(Boolean isReadOnly) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("isShareable") + private Boolean isShareable; + + public Builder isShareable(Boolean isShareable) { + this.isShareable = isShareable; + this.__explicitlySet__.add("isShareable"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("volumeId") private String volumeId; @@ -81,7 +90,7 @@ public Builder volumeId(String volumeId) { public AttachServiceDeterminedVolumeDetails build() { AttachServiceDeterminedVolumeDetails __instance__ = new AttachServiceDeterminedVolumeDetails( - device, displayName, instanceId, isReadOnly, volumeId); + device, displayName, instanceId, isReadOnly, isShareable, volumeId); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -93,6 +102,7 @@ public Builder copy(AttachServiceDeterminedVolumeDetails o) { .displayName(o.getDisplayName()) .instanceId(o.getInstanceId()) .isReadOnly(o.getIsReadOnly()) + .isShareable(o.getIsShareable()) .volumeId(o.getVolumeId()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); @@ -113,8 +123,9 @@ public AttachServiceDeterminedVolumeDetails( String displayName, String instanceId, Boolean isReadOnly, + Boolean isShareable, String volumeId) { - super(device, displayName, instanceId, isReadOnly, volumeId); + super(device, displayName, instanceId, isReadOnly, isShareable, volumeId); } @com.fasterxml.jackson.annotation.JsonIgnore diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachVolumeDetails.java index f9bba5530e5..7bdb5cad5ce 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachVolumeDetails.java @@ -72,6 +72,16 @@ public class AttachVolumeDetails { @com.fasterxml.jackson.annotation.JsonProperty("isReadOnly") Boolean isReadOnly; + /** + * Whether the attachment should be created in shareable mode. If an attachment + * is created in shareable mode, then other instances can attach the same volume, provided + * that they also create their attachments in shareable mode. Only certain volume types can + * be attached in shareable mode. Defaults to false if not specified. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isShareable") + Boolean isShareable; + /** * The OCID of the volume. **/ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/EmulatedVolumeAttachment.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/EmulatedVolumeAttachment.java index 0860633a88b..637be872b9a 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/EmulatedVolumeAttachment.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/EmulatedVolumeAttachment.java @@ -93,6 +93,15 @@ public Builder isReadOnly(Boolean isReadOnly) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("isShareable") + private Boolean isShareable; + + public Builder isShareable(Boolean isShareable) { + this.isShareable = isShareable; + this.__explicitlySet__.add("isShareable"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private LifecycleState lifecycleState; @@ -142,6 +151,7 @@ public EmulatedVolumeAttachment build() { id, instanceId, isReadOnly, + isShareable, lifecycleState, timeCreated, volumeId, @@ -160,6 +170,7 @@ public Builder copy(EmulatedVolumeAttachment o) { .id(o.getId()) .instanceId(o.getInstanceId()) .isReadOnly(o.getIsReadOnly()) + .isShareable(o.getIsShareable()) .lifecycleState(o.getLifecycleState()) .timeCreated(o.getTimeCreated()) .volumeId(o.getVolumeId()) @@ -186,6 +197,7 @@ public EmulatedVolumeAttachment( String id, String instanceId, Boolean isReadOnly, + Boolean isShareable, LifecycleState lifecycleState, java.util.Date timeCreated, String volumeId, @@ -198,6 +210,7 @@ public EmulatedVolumeAttachment( id, instanceId, isReadOnly, + isShareable, lifecycleState, timeCreated, volumeId, diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/IScsiVolumeAttachment.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/IScsiVolumeAttachment.java index eb64ce19d90..b6a9f07b2e1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/IScsiVolumeAttachment.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/IScsiVolumeAttachment.java @@ -93,6 +93,15 @@ public Builder isReadOnly(Boolean isReadOnly) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("isShareable") + private Boolean isShareable; + + public Builder isShareable(Boolean isShareable) { + this.isShareable = isShareable; + this.__explicitlySet__.add("isShareable"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private LifecycleState lifecycleState; @@ -187,6 +196,7 @@ public IScsiVolumeAttachment build() { id, instanceId, isReadOnly, + isShareable, lifecycleState, timeCreated, volumeId, @@ -210,6 +220,7 @@ public Builder copy(IScsiVolumeAttachment o) { .id(o.getId()) .instanceId(o.getInstanceId()) .isReadOnly(o.getIsReadOnly()) + .isShareable(o.getIsShareable()) .lifecycleState(o.getLifecycleState()) .timeCreated(o.getTimeCreated()) .volumeId(o.getVolumeId()) @@ -241,6 +252,7 @@ public IScsiVolumeAttachment( String id, String instanceId, Boolean isReadOnly, + Boolean isShareable, LifecycleState lifecycleState, java.util.Date timeCreated, String volumeId, @@ -258,6 +270,7 @@ public IScsiVolumeAttachment( id, instanceId, isReadOnly, + isShareable, lifecycleState, timeCreated, volumeId, diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ParavirtualizedVolumeAttachment.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ParavirtualizedVolumeAttachment.java index 80c5daeaccc..1661dad8bec 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/ParavirtualizedVolumeAttachment.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ParavirtualizedVolumeAttachment.java @@ -93,6 +93,15 @@ public Builder isReadOnly(Boolean isReadOnly) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("isShareable") + private Boolean isShareable; + + public Builder isShareable(Boolean isShareable) { + this.isShareable = isShareable; + this.__explicitlySet__.add("isShareable"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private LifecycleState lifecycleState; @@ -142,6 +151,7 @@ public ParavirtualizedVolumeAttachment build() { id, instanceId, isReadOnly, + isShareable, lifecycleState, timeCreated, volumeId, @@ -160,6 +170,7 @@ public Builder copy(ParavirtualizedVolumeAttachment o) { .id(o.getId()) .instanceId(o.getInstanceId()) .isReadOnly(o.getIsReadOnly()) + .isShareable(o.getIsShareable()) .lifecycleState(o.getLifecycleState()) .timeCreated(o.getTimeCreated()) .volumeId(o.getVolumeId()) @@ -186,6 +197,7 @@ public ParavirtualizedVolumeAttachment( String id, String instanceId, Boolean isReadOnly, + Boolean isShareable, LifecycleState lifecycleState, java.util.Date timeCreated, String volumeId, @@ -198,6 +210,7 @@ public ParavirtualizedVolumeAttachment( id, instanceId, isReadOnly, + isShareable, lifecycleState, timeCreated, volumeId, diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeAttachment.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeAttachment.java index cc16994b7c8..dc81384a197 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeAttachment.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeAttachment.java @@ -100,6 +100,12 @@ public class VolumeAttachment { **/ @com.fasterxml.jackson.annotation.JsonProperty("isReadOnly") Boolean isReadOnly; + + /** + * Whether the attachment should be created in shareable mode. If an attachment is created in shareable mode, then other instances can attach the same volume, provided that they also create their attachments in shareable mode. Only certain volume types can be attached in shareable mode. Defaults to false if not specified. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isShareable") + Boolean isShareable; /** * The current state of the volume attachment. **/ diff --git a/bmc-database/pom.xml b/bmc-database/pom.xml index 6868a8daac1..496f297039b 100644 --- a/bmc-database/pom.xml +++ b/bmc-database/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 1.10.0 + 1.11.0 diff --git a/bmc-dns/pom.xml b/bmc-dns/pom.xml index bf4aa31797c..8b83e379d8a 100644 --- a/bmc-dns/pom.xml +++ b/bmc-dns/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/bmc-dts/pom.xml b/bmc-dts/pom.xml index 9e028c06d96..c2c2add482e 100644 --- a/bmc-dts/pom.xml +++ b/bmc-dts/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-dts @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 \ No newline at end of file diff --git a/bmc-email/pom.xml b/bmc-email/pom.xml index 66ac5593685..b2995a2bf4f 100644 --- a/bmc-email/pom.xml +++ b/bmc-email/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/bmc-events/pom.xml b/bmc-events/pom.xml index 7a8ea8c6ff5..35f28cc0639 100644 --- a/bmc-events/pom.xml +++ b/bmc-events/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-events @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 \ No newline at end of file diff --git a/bmc-examples/pom.xml b/bmc-examples/pom.xml index 3c3ddb06f36..5cc911607ab 100644 --- a/bmc-examples/pom.xml +++ b/bmc-examples/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-examples @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 1.10.0 + 1.11.0 pom import diff --git a/bmc-filestorage/pom.xml b/bmc-filestorage/pom.xml index 44ade3a46af..3ac29973967 100644 --- a/bmc-filestorage/pom.xml +++ b/bmc-filestorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/bmc-full/pom.xml b/bmc-full/pom.xml index 514f462d326..d27fc6f8194 100644 --- a/bmc-full/pom.xml +++ b/bmc-full/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-full @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 1.10.0 + 1.11.0 pom import diff --git a/bmc-functions/pom.xml b/bmc-functions/pom.xml index b99c5d40207..a5dabd71633 100644 --- a/bmc-functions/pom.xml +++ b/bmc-functions/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-functions @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 \ No newline at end of file diff --git a/bmc-healthchecks/pom.xml b/bmc-healthchecks/pom.xml index 136f7db5cfc..a5e044f9dc8 100644 --- a/bmc-healthchecks/pom.xml +++ b/bmc-healthchecks/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-healthchecks @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/bmc-identity/pom.xml b/bmc-identity/pom.xml index b79e82492ef..49c985c148a 100644 --- a/bmc-identity/pom.xml +++ b/bmc-identity/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/Identity.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/Identity.java index ce0e197b773..388de13f8c6 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/Identity.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/Identity.java @@ -337,21 +337,26 @@ CreateRegionSubscriptionResponse createRegionSubscription( /** * Creates a new tag in the specified tag namespace. *

- * You must specify either the OCID or the name of the tag namespace that will contain this tag definition. + * The tag requires either the OCID or the name of the tag namespace that will contain this + * tag definition. *

- * You must also specify a *name* for the tag, which must be unique across all tags in the tag namespace + * You must specify a *name* for the tag, which must be unique across all tags in the tag namespace * and cannot be changed. The name can contain any ASCII character except the space (_) or period (.) characters. * Names are case insensitive. That means, for example, \"myTag\" and \"mytag\" are not allowed in the same namespace. * If you specify a name that's already in use in the tag namespace, a 409 error is returned. *

- * You must also specify a *description* for the tag. - * It does not have to be unique, and you can change it with + * The tag must have a *description*. It does not have to be unique, and you can change it with * {@link #updateTag(UpdateTagRequest) updateTag}. *

- * If no 'validator' is set on this tag definition, then any (valid) value can be set for this definedTag. + * The tag must have a value type, which is specified with a validator. Tags can use either a + * static value or a list of possible values. Static values are entered by a user applying the tag + * to a resource. Lists are created by you and the user must apply a value from the list. Lists + * are validiated. *

- * If a 'validator' is set on this tag definition, then the only valid values that can be set for this - * definedTag those that pass the additional validation imposed by the set 'validator'. + * If no `validator` is set, the user applying the tag to a resource can type in a static + * value or leave the tag value empty. + * * If a `validator` is set, the user applying the tag to a resource must select from a list + * of values that you supply with {@link #enumTagDefinitionValidator(EnumTagDefinitionValidatorRequest) enumTagDefinitionValidator}. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -1051,7 +1056,7 @@ ListTaggingWorkRequestLogsResponse listTaggingWorkRequestLogs( * - Similarly, you can limit the results to just the memberships for a given group by specifying a `groupId`. * - You can set both the `userId` and `groupId` to determine if the specified user is in the specified group. * If the answer is no, the response is an empty list. - * - Although`userId` and `groupId` are not indvidually required, you must set one of them. + * - Although`userId` and `groupId` are not individually required, you must set one of them. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -1096,6 +1101,15 @@ ListUserGroupMembershipsResponse listUserGroupMemberships( */ MoveCompartmentResponse moveCompartment(MoveCompartmentRequest request); + /** + * Recover the compartment from DELETED state to ACTIVE state. + * + * @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. + */ + RecoverCompartmentResponse recoverCompartment(RecoverCompartmentRequest request); + /** * Removes a user from a group by deleting the corresponding `UserGroupMembership`. * @param request The request object containing the details to send @@ -1215,9 +1229,14 @@ UpdateAuthenticationPolicyResponse updateAuthenticationPolicy( /** * Updates the specified tag definition. *

- * Setting a 'validator' will enable enforcement of additional validation on values contained in the specified for - * this definedTag. Any values that were previously set will not be changed, but any new value set for the - * definedTag must pass validation. + * Setting `validator` determines the value type. Tags can use either a static value or a + * list of possible values. Static values are entered by a user applying the tag to a resource. + * Lists are created by you and the user must apply a value from the list. On update, any values + * in a list that were previously set do not change, but new values must pass validation. Values + * already applied to a resource do not change. + *

+ * You cannot remove list values that appear in a TagDefault. To remove a list value that + * appears in a TagDefault, first update the TagDefault to use a different value. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -1244,7 +1263,7 @@ UpdateAuthenticationPolicyResponse updateAuthenticationPolicy( *

* Updating `isRetired` to 'true' retires the namespace and all the tag definitions in the namespace. Reactivating a * namespace (changing `isRetired` from 'true' to 'false') does not reactivate tag definitions. - * To reactivate the tag definitions, you must reactivate each one indvidually *after* you reactivate the namespace, + * To reactivate the tag definitions, you must reactivate each one individually *after* you reactivate the namespace, * using {@link #updateTag(UpdateTagRequest) updateTag}. For more information about retiring tag namespaces, see * [Retiring Key Definitions and Namespace Definitions](https://docs.cloud.oracle.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). *

diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsync.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsync.java index d49d0a5a469..147a8c81b59 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsync.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsync.java @@ -468,21 +468,26 @@ java.util.concurrent.Future createSwiftPassword( /** * Creates a new tag in the specified tag namespace. *

- * You must specify either the OCID or the name of the tag namespace that will contain this tag definition. + * The tag requires either the OCID or the name of the tag namespace that will contain this + * tag definition. *

- * You must also specify a *name* for the tag, which must be unique across all tags in the tag namespace + * You must specify a *name* for the tag, which must be unique across all tags in the tag namespace * and cannot be changed. The name can contain any ASCII character except the space (_) or period (.) characters. * Names are case insensitive. That means, for example, \"myTag\" and \"mytag\" are not allowed in the same namespace. * If you specify a name that's already in use in the tag namespace, a 409 error is returned. *

- * You must also specify a *description* for the tag. - * It does not have to be unique, and you can change it with + * The tag must have a *description*. It does not have to be unique, and you can change it with * {@link #updateTag(UpdateTagRequest, Consumer, Consumer) updateTag}. *

- * If no 'validator' is set on this tag definition, then any (valid) value can be set for this definedTag. + * The tag must have a value type, which is specified with a validator. Tags can use either a + * static value or a list of possible values. Static values are entered by a user applying the tag + * to a resource. Lists are created by you and the user must apply a value from the list. Lists + * are validiated. *

- * If a 'validator' is set on this tag definition, then the only valid values that can be set for this - * definedTag those that pass the additional validation imposed by the set 'validator'. + * If no `validator` is set, the user applying the tag to a resource can type in a static + * value or leave the tag value empty. + * * If a `validator` is set, the user applying the tag to a resource must select from a list + * of values that you supply with {@link #enumTagDefinitionValidator(EnumTagDefinitionValidatorRequest, Consumer, Consumer) enumTagDefinitionValidator}. * * * @param request The request object containing the details to send @@ -1631,7 +1636,7 @@ java.util.concurrent.Future listTags( * - Similarly, you can limit the results to just the memberships for a given group by specifying a `groupId`. * - You can set both the `userId` and `groupId` to determine if the specified user is in the specified group. * If the answer is no, the response is an empty list. - * - Although`userId` and `groupId` are not indvidually required, you must set one of them. + * - Although`userId` and `groupId` are not individually required, you must set one of them. * * * @param request The request object containing the details to send @@ -1703,6 +1708,23 @@ java.util.concurrent.Future moveCompartment( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Recover the compartment from DELETED state to ACTIVE state. + * + * + * @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 recoverCompartment( + RecoverCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + RecoverCompartmentRequest, RecoverCompartmentResponse> + handler); + /** * Removes a user from a group by deleting the corresponding `UserGroupMembership`. * @@ -1921,9 +1943,14 @@ java.util.concurrent.Future updateSwiftPassword( /** * Updates the specified tag definition. *

- * Setting a 'validator' will enable enforcement of additional validation on values contained in the specified for - * this definedTag. Any values that were previously set will not be changed, but any new value set for the - * definedTag must pass validation. + * Setting `validator` determines the value type. Tags can use either a static value or a + * list of possible values. Static values are entered by a user applying the tag to a resource. + * Lists are created by you and the user must apply a value from the list. On update, any values + * in a list that were previously set do not change, but new values must pass validation. Values + * already applied to a resource do not change. + *

+ * You cannot remove list values that appear in a TagDefault. To remove a list value that + * appears in a TagDefault, first update the TagDefault to use a different value. * * * @param request The request object containing the details to send @@ -1963,7 +1990,7 @@ java.util.concurrent.Future updateTagDefault( *

* Updating `isRetired` to 'true' retires the namespace and all the tag definitions in the namespace. Reactivating a * namespace (changing `isRetired` from 'true' to 'false') does not reactivate tag definitions. - * To reactivate the tag definitions, you must reactivate each one indvidually *after* you reactivate the namespace, + * To reactivate the tag definitions, you must reactivate each one individually *after* you reactivate the namespace, * using {@link #updateTag(UpdateTagRequest, Consumer, Consumer) updateTag}. For more information about retiring tag namespaces, see * [Retiring Key Definitions and Namespace Definitions](https://docs.cloud.oracle.com/Content/Identity/Concepts/taggingoverview.htm#Retiring). *

diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsyncClient.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsyncClient.java index e61e9623cc9..8e2e7f1125f 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsyncClient.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsyncClient.java @@ -6773,6 +6773,80 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future recoverCompartment( + final RecoverCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RecoverCompartmentRequest, RecoverCompartmentResponse> + handler) { + LOG.trace("Called async recoverCompartment"); + final RecoverCompartmentRequest interceptedRequest = + RecoverCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RecoverCompartmentConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = RecoverCompartmentConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + RecoverCompartmentRequest, RecoverCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, RecoverCompartmentResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future removeUserFromGroup( final RemoveUserFromGroupRequest request, diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityClient.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityClient.java index 46fe528309c..d4faf75ed1c 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityClient.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityClient.java @@ -2812,6 +2812,35 @@ public MoveCompartmentResponse moveCompartment(MoveCompartmentRequest request) { }); } + @Override + public RecoverCompartmentResponse recoverCompartment(RecoverCompartmentRequest request) { + LOG.trace("Called recoverCompartment"); + final RecoverCompartmentRequest interceptedRequest = + RecoverCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RecoverCompartmentConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = RecoverCompartmentConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public RemoveUserFromGroupResponse removeUserFromGroup(RemoveUserFromGroupRequest request) { LOG.trace("Called removeUserFromGroup"); diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/GetUserUIPasswordInformationConverter.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/GetUserUIPasswordInformationConverter.java index 547996f942d..65ba3c9bd00 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/GetUserUIPasswordInformationConverter.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/GetUserUIPasswordInformationConverter.java @@ -87,6 +87,15 @@ public GetUserUIPasswordInformationResponse apply( String.class)); } + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + GetUserUIPasswordInformationResponse responseWrapper = builder.build(); diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/RecoverCompartmentConverter.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/RecoverCompartmentConverter.java new file mode 100644 index 00000000000..20ca413583c --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/RecoverCompartmentConverter.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.identity.model.*; +import com.oracle.bmc.identity.requests.*; +import com.oracle.bmc.identity.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class RecoverCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static RecoverCompartmentRequest interceptRequest(RecoverCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, RecoverCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getCompartmentId(), "compartmentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("compartments") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCompartmentId())) + .path("actions") + .path("recoverCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, RecoverCompartmentResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, RecoverCompartmentResponse>() { + @Override + public RecoverCompartmentResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for RecoverCompartmentResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + Compartment>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + Compartment.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + RecoverCompartmentResponse.Builder builder = + RecoverCompartmentResponse.builder(); + + builder.compartment(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + 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)); + } + + RecoverCompartmentResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/BaseTagDefinitionValidator.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/BaseTagDefinitionValidator.java index c564517208d..fe8025d94b9 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/BaseTagDefinitionValidator.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/BaseTagDefinitionValidator.java @@ -4,15 +4,17 @@ package com.oracle.bmc.identity.model; /** - * Validates a definedTag value. Each validator performs validation steps in addition to the standard validation - * for definedTag values (See [Limits on Tags](https://docs.cloud.oracle.com/Content/Identity/Concepts/taggingoverview.htm#Limits). + * Validates a definedTag value. Each validator performs validation steps in addition to the standard + * validation for definedTag values. For more information, see + * [Limits on Tags](https://docs.cloud.oracle.com/Content/Identity/Concepts/taggingoverview.htm#Limits). *

- * If a validator is defined after a value has been set for a definedTag, then any UPDATE operation that attempts - * to change the value must pass the additional validation defined by this rule. Previously set values, that would - * fail validation, are not updated and it is possible to update other attributes of an OCI resource that contains - * a non-valid definedTag. + * If you define a validator after a value has been set for a defined tag, then any updates that + * attempt to change the value must pass the additional validation defined by the current rule. + * Previously set values (even those that would fail the current validation) are not updated. You can + * still update other attributes to resources that contain a non-valid defined tag. *

- * To clear the validator call the UPDATE operation with DefaultTagDefinitionValidator. + * To clear the validator call UpdateTag with + * [DefaultTagDefinitionValidator](https://docs.cloud.oracle.com/api/#/en/identity/latest/datatypes/DefaultTagDefinitionValidator). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -49,7 +51,7 @@ public class BaseTagDefinitionValidator { /** - * The primitive that any value set for this definedTag must be parseable as. + * Specifies the type of validation: a static value (no validation) or a list. * **/ @lombok.extern.slf4j.Slf4j diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateTagDetails.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateTagDetails.java index c9c108b7569..b45c1d71eaa 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateTagDetails.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateTagDetails.java @@ -132,6 +132,7 @@ public static Builder builder() { /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

* Example: `{\"Department\": \"Finance\"}` * **/ @@ -141,6 +142,7 @@ public static Builder builder() { /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

* Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` * **/ @@ -155,11 +157,16 @@ public static Builder builder() { Boolean isCostTracking; /** - * Additional validation rule for values specified for the tag definition. + * The tag must have a value type, which is specified with a validator. Tags can use either a + * static value or a list of possible values. Static values are entered by a user applying the tag + * to a resource. Lists are created by you and the user must apply a value from the list. Lists + * are validiated. *

- * If no validator is defined for a tag definition, then any (valid) value will be accepted. + * If you use the default validiator (or don't define a validator), the user applying the tag + * enters a value. No additional validation is performed. *

- * The default value for `validator` is an empty map (no additional validation). + * To clear the validator, call UpdateTag with + * [DefaultTagDefinitionValidator](https://docs.cloud.oracle.com/api/#/en/identity/latest/datatypes/DefaultTagDefinitionValidator). * **/ @com.fasterxml.jackson.annotation.JsonProperty("validator") diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateTagNamespaceDetails.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateTagNamespaceDetails.java index f235f7bec81..35431020c74 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateTagNamespaceDetails.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateTagNamespaceDetails.java @@ -124,6 +124,7 @@ public static Builder builder() { /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

* Example: `{\"Department\": \"Finance\"}` * **/ @@ -133,6 +134,7 @@ public static Builder builder() { /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

* Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` * **/ diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/DefaultTagDefinitionValidator.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/DefaultTagDefinitionValidator.java index 857c94d732d..ab4d888b413 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/DefaultTagDefinitionValidator.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/DefaultTagDefinitionValidator.java @@ -4,8 +4,9 @@ package com.oracle.bmc.identity.model; /** - * This is the default validatorType for definedTag. This is same as not setting any value on the validator field. - * By default only string value can be set for this definedTag. + * Use this validator to clear any existing validator on the tag key definition with the UpdateTag + * operation. Using this `validatorType` is the same as not setting any value on the validator field. + * The resultant value for `validatorType` returned in the response body is `null`. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/EnumTagDefinitionValidator.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/EnumTagDefinitionValidator.java index fb10032b5c4..8678b603680 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/EnumTagDefinitionValidator.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/EnumTagDefinitionValidator.java @@ -4,9 +4,10 @@ package com.oracle.bmc.identity.model; /** - * Validates the 'value' set for a definedTag is contained in the list of allowable 'values'. + * Used to validate the value set for a defined tag and contains the list of allowable `values`. *

- * If the 'validatorType' is 'ENUM', then at least one valid value must be specified in the 'values' array. + * You must specify at least one valid value in the `values` array. You can't have blank or + * or empty strings (`\"\"`). Duplicate values are not allowed. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Tag.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Tag.java index 4f2ff3a3e01..c814a9eeee7 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Tag.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Tag.java @@ -240,6 +240,7 @@ public static Builder builder() { /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

* Example: `{\"Department\": \"Finance\"}` * **/ @@ -249,7 +250,8 @@ public static Builder builder() { /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). - * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`` + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` * **/ @com.fasterxml.jackson.annotation.JsonProperty("definedTags") @@ -318,6 +320,7 @@ public static LifecycleState create(String key) { /** * Date and time the tag was created, in the format defined by RFC3339. + *

* Example: `2016-08-25T21:10:29.600Z` * **/ @@ -332,11 +335,16 @@ public static LifecycleState create(String key) { Boolean isCostTracking; /** - * Additional validation rule for values specified for the tag definition. + * The tag must have a value type, which is specified with a validator. Tags can use either a + * static value or a list of possible values. Static values are entered by a user applying the tag + * to a resource. Lists are created by you and the user must apply a value from the list. Lists + * are validiated. *

- * If no validator is defined for a tag definition, then any (valid) value will be accepted. + * If you use the default validiator (or don't define a validator), the user applying the tag + * enters a value. No additional validation is performed. *

- * To clear the validator call the UPDATE operation with DefaultTagDefinitionValidator + * To clear the validator, call UpdateTag with + * [DefaultTagDefinitionValidator](https://docs.cloud.oracle.com/api/#/en/identity/latest/datatypes/DefaultTagDefinitionValidator). * **/ @com.fasterxml.jackson.annotation.JsonProperty("validator") diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UpdateTagDetails.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UpdateTagDetails.java index 52c8b393510..c7e0ac2821a 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UpdateTagDetails.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UpdateTagDetails.java @@ -132,6 +132,7 @@ public static Builder builder() { /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

* Example: `{\"Department\": \"Finance\"}` * **/ @@ -141,6 +142,7 @@ public static Builder builder() { /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

* Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` * **/ @@ -155,11 +157,16 @@ public static Builder builder() { Boolean isCostTracking; /** - * Additional validation rule for values specified for the tag definition. + * The tag must have a value type, which is specified with a validator. Tags can use either a + * static value or a list of possible values. Static values are entered by a user applying the tag + * to a resource. Lists are created by you and the user must apply a value from the list. Lists + * are validiated. *

- * If no validator is defined for a tag definition, then any (valid) value will be accepted. + * If you use the default validiator (or don't define a validator), the user applying the tag + * enters a value. No additional validation is performed. *

- * The default value for `validator` is an empty map (no additional validation). + * To clear the validator, call UpdateTag with + * [DefaultTagDefinitionValidator](https://docs.cloud.oracle.com/api/#/en/identity/latest/datatypes/DefaultTagDefinitionValidator). * **/ @com.fasterxml.jackson.annotation.JsonProperty("validator") diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/User.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/User.java index 43ddb4a2316..c98d010616e 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/User.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/User.java @@ -351,6 +351,7 @@ public static LifecycleState create(String key) { /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

* Example: `{\"Department\": \"Finance\"}` * **/ diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/RecoverCompartmentRequest.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/RecoverCompartmentRequest.java new file mode 100644 index 00000000000..738dd2c5546 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/RecoverCompartmentRequest.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.requests; + +import com.oracle.bmc.identity.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class RecoverCompartmentRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compartment. + */ + private String compartmentId; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RecoverCompartmentRequest o) { + compartmentId(o.getCompartmentId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RecoverCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RecoverCompartmentRequest + */ + public RecoverCompartmentRequest build() { + RecoverCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/GetUserUIPasswordInformationResponse.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/GetUserUIPasswordInformationResponse.java index efb43d6542d..8a1b63c3ea1 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/GetUserUIPasswordInformationResponse.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/GetUserUIPasswordInformationResponse.java @@ -17,6 +17,11 @@ public class GetUserUIPasswordInformationResponse { */ private String opcRequestId; + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + /** * The returned UIPasswordInformation instance. */ @@ -29,6 +34,7 @@ public static class Builder { */ public Builder copy(GetUserUIPasswordInformationResponse o) { opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); uIPasswordInformation(o.getUIPasswordInformation()); return this; diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/RecoverCompartmentResponse.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/RecoverCompartmentResponse.java new file mode 100644 index 00000000000..65204863dc8 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/RecoverCompartmentResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.responses; + +import com.oracle.bmc.identity.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class RecoverCompartmentResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned Compartment instance. + */ + private Compartment compartment; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RecoverCompartmentResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + compartment(o.getCompartment()); + + return this; + } + } +} diff --git a/bmc-integration/pom.xml b/bmc-integration/pom.xml index bac42958efd..259c04c97fc 100644 --- a/bmc-integration/pom.xml +++ b/bmc-integration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-integration @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 \ No newline at end of file diff --git a/bmc-keymanagement/pom.xml b/bmc-keymanagement/pom.xml index c79fa97165a..d754ecbe5a7 100644 --- a/bmc-keymanagement/pom.xml +++ b/bmc-keymanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-keymanagement @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/bmc-limits/pom.xml b/bmc-limits/pom.xml index afd666a106d..a614e48dc90 100644 --- a/bmc-limits/pom.xml +++ b/bmc-limits/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-limits @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 \ No newline at end of file diff --git a/bmc-loadbalancer/pom.xml b/bmc-loadbalancer/pom.xml index a954863177a..b018a963a20 100644 --- a/bmc-loadbalancer/pom.xml +++ b/bmc-loadbalancer/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/bmc-monitoring/pom.xml b/bmc-monitoring/pom.xml index ff22830b206..01030d7ca27 100644 --- a/bmc-monitoring/pom.xml +++ b/bmc-monitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-monitoring @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 \ No newline at end of file diff --git a/bmc-objectstorage/bmc-objectstorage-combined/pom.xml b/bmc-objectstorage/bmc-objectstorage-combined/pom.xml index 4528f6f0944..757979543c6 100644 --- a/bmc-objectstorage/bmc-objectstorage-combined/pom.xml +++ b/bmc-objectstorage/bmc-objectstorage-combined/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-parent - 1.10.0 + 1.11.0 ../pom.xml @@ -18,12 +18,12 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 1.10.0 + 1.11.0 com.oracle.oci.sdk oci-java-sdk-objectstorage-extensions - 1.10.0 + 1.11.0 diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml b/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml index c723ebb4b43..603e2977e1f 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml +++ b/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-parent - 1.10.0 + 1.11.0 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 1.10.0 + 1.11.0 diff --git a/bmc-objectstorage/bmc-objectstorage-generated/pom.xml b/bmc-objectstorage/bmc-objectstorage-generated/pom.xml index 5603bd01c8b..8faca6dbc6e 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/pom.xml +++ b/bmc-objectstorage/bmc-objectstorage-generated/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-parent - 1.10.0 + 1.11.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java index e26887fb2fe..42d5eac1c21 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java @@ -336,15 +336,20 @@ PutObjectLifecyclePolicyResponse putObjectLifecyclePolicy( PutObjectLifecyclePolicyRequest request); /** - * Reencrypts the data encryption key of the bucket and objects in the bucket. This is an asynchronous call, the - * system will start a work request task to reencrypt the data encryption key of the objects and chunks in the bucket. - * Only the objects created before the time the API call will be reencrypted. The call can take long time depending - * on how many objects in the bucket and how big the objects are. This API will return a work request id, so the user - * can use this id to retrieve the status of the work request task. + * Re-encrypts the unique data encryption key that encrypts each object written to the bucket by using the most recent + * version of the master encryption key assigned to the bucket. (All data encryption keys are encrypted by a master + * encryption key. Master encryption keys are assigned to buckets and managed by Oracle by default, but you can assign + * a key that you created and control through the Oracle Cloud Infrastructure Key Management service.) The kmsKeyId property + * of the bucket determines which master encryption key is assigned to the bucket. If you assigned a different Key Management + * master encryption key to the bucket, you can call this API to re-encrypt all data encryption keys with the newly + * assigned key. Similarly, you might want to re-encrypt all data encryption keys if the assigned key has been rotated to + * a new key version since objects were last added to the bucket. If you call this API and there is no kmsKeyId associated + * with the bucket, the call will fail. *

- * A user can update kmsKeyId of the bucket, and then call this API, so the data encryption key of the bucket and - * objects in the bucket will be reencryped by the new kmsKeyId. Note that the system doesn't maintain what - * ksmKeyId is used to encrypt the object, the user has to maintain the mapping if they want. + * Calling this API starts a work request task to re-encrypt the data encryption key of all objects in the bucket. Only + * objects created before the time of the API call will be re-encrypted. The call can take a long time, depending on how many + * objects are in the bucket and how big they are. This API returns a work request ID that you can use to retrieve the status + * of the work request task. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java index c4167bd9ad4..cd572da8531 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java @@ -551,15 +551,20 @@ java.util.concurrent.Future putObjectLifecycle handler); /** - * Reencrypts the data encryption key of the bucket and objects in the bucket. This is an asynchronous call, the - * system will start a work request task to reencrypt the data encryption key of the objects and chunks in the bucket. - * Only the objects created before the time the API call will be reencrypted. The call can take long time depending - * on how many objects in the bucket and how big the objects are. This API will return a work request id, so the user - * can use this id to retrieve the status of the work request task. + * Re-encrypts the unique data encryption key that encrypts each object written to the bucket by using the most recent + * version of the master encryption key assigned to the bucket. (All data encryption keys are encrypted by a master + * encryption key. Master encryption keys are assigned to buckets and managed by Oracle by default, but you can assign + * a key that you created and control through the Oracle Cloud Infrastructure Key Management service.) The kmsKeyId property + * of the bucket determines which master encryption key is assigned to the bucket. If you assigned a different Key Management + * master encryption key to the bucket, you can call this API to re-encrypt all data encryption keys with the newly + * assigned key. Similarly, you might want to re-encrypt all data encryption keys if the assigned key has been rotated to + * a new key version since objects were last added to the bucket. If you call this API and there is no kmsKeyId associated + * with the bucket, the call will fail. *

- * A user can update kmsKeyId of the bucket, and then call this API, so the data encryption key of the bucket and - * objects in the bucket will be reencryped by the new kmsKeyId. Note that the system doesn't maintain what - * ksmKeyId is used to encrypt the object, the user has to maintain the mapping if they want. + * Calling this API starts a work request task to re-encrypt the data encryption key of all objects in the bucket. Only + * objects created before the time of the API call will be re-encrypted. The call can take a long time, depending on how many + * objects are in the bucket and how big they are. This API returns a work request ID that you can use to retrieve the status + * of the work request task. * * * @param request The request object containing the details to send diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectConverter.java index 0fb6c7b9ce4..9ccc417c74b 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectConverter.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectConverter.java @@ -229,6 +229,30 @@ public GetObjectResponse apply(javax.ws.rs.core.Response rawResponse) { String.class)); } + com.google.common.base.Optional> + cacheControlHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "cache-control"); + if (cacheControlHeader.isPresent()) { + builder.cacheControl( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "cache-control", + cacheControlHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + contentDispositionHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "content-disposition"); + if (contentDispositionHeader.isPresent()) { + builder.contentDisposition( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-disposition", + contentDispositionHeader.get().get(0), + String.class)); + } + com.google.common.base.Optional> lastModifiedHeader = com.oracle.bmc.http.internal.HeaderUtils.get( diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/HeadObjectConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/HeadObjectConverter.java index 7a78bb09004..6221c4c5902 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/HeadObjectConverter.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/HeadObjectConverter.java @@ -210,6 +210,30 @@ public HeadObjectResponse apply(javax.ws.rs.core.Response rawResponse) { String.class)); } + com.google.common.base.Optional> + cacheControlHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "cache-control"); + if (cacheControlHeader.isPresent()) { + builder.cacheControl( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "cache-control", + cacheControlHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + contentDispositionHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "content-disposition"); + if (contentDispositionHeader.isPresent()) { + builder.contentDisposition( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-disposition", + contentDispositionHeader.get().get(0), + String.class)); + } + com.google.common.base.Optional> lastModifiedHeader = com.oracle.bmc.http.internal.HeaderUtils.get( diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/PutObjectConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/PutObjectConverter.java index 1971ce0aed2..4c6cac69ec4 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/PutObjectConverter.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/PutObjectConverter.java @@ -85,6 +85,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( ib.header("Content-Encoding", request.getContentEncoding()); } + if (request.getContentDisposition() != null) { + ib.header("Content-Disposition", request.getContentDisposition()); + } + + if (request.getCacheControl() != null) { + ib.header("Cache-Control", request.getCacheControl()); + } + if (request.getOpcMeta() != null) { for (java.util.Map.Entry header : request.getOpcMeta().entrySet()) { ib.header(header.getKey(), header.getValue()); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java index 3ff432f9673..74099a2c8fb 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java @@ -174,6 +174,15 @@ public Builder approximateSize(Long approximateSize) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -195,7 +204,8 @@ public Bucket build() { kmsKeyId, objectLifecyclePolicyEtag, approximateCount, - approximateSize); + approximateSize, + id); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -218,7 +228,8 @@ public Builder copy(Bucket o) { .kmsKeyId(o.getKmsKeyId()) .objectLifecyclePolicyEtag(o.getObjectLifecyclePolicyEtag()) .approximateCount(o.getApproximateCount()) - .approximateSize(o.getApproximateSize()); + .approximateSize(o.getApproximateSize()) + .id(o.getId()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -398,8 +409,9 @@ public static StorageTier create(String key) { StorageTier storageTier; /** - * A property that determines whether events will be generated for operations on objects in this bucket. - * This is false by default. + * Whether or not events are emitted for object state changes in this bucket. By default, `objectEventsEnabled` is + * set to `false`. Set `objectEventsEnabled` to `true` to emit events for object state changes. For more information + * about events, see [Overview of Events](https://docs.cloud.oracle.com/Content/Events/Concepts/eventsoverview.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("objectEventsEnabled") @@ -424,7 +436,8 @@ public static StorageTier create(String key) { java.util.Map> definedTags; /** - * The OCID of a KMS key id used to call KMS to generate data key or decrypt the encrypted data key. + * The OCID of a master encryption key used to call the Key Management service to generate a data encryption key + * or to encrypt or decrypt a data encryption key. * **/ @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") @@ -452,6 +465,13 @@ public static StorageTier create(String key) { @com.fasterxml.jackson.annotation.JsonProperty("approximateSize") Long approximateSize; + /** + * The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); } diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreateBucketDetails.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreateBucketDetails.java index 4450325fe28..8bbd5659b26 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreateBucketDetails.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreateBucketDetails.java @@ -274,8 +274,9 @@ public static StorageTier create(String key) { StorageTier storageTier; /** - * A property that determines whether events will be generated for operations on objects in this bucket. - * This is false by default. + * Whether or not events are emitted for object state changes in this bucket. By default, `objectEventsEnabled` is + * set to `false`. Set `objectEventsEnabled` to `true` to emit events for object state changes. For more information + * about events, see [Overview of Events](https://docs.cloud.oracle.com/Content/Events/Concepts/eventsoverview.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("objectEventsEnabled") @@ -300,7 +301,9 @@ public static StorageTier create(String key) { java.util.Map> definedTags; /** - * The OCID of a KMS key id used to call KMS to generate the data key or decrypt the encrypted data key. + * The OCID of a master encryption key used to call the Key Management service to generate a data + * encryption key or to encrypt or decrypt a data encryption key. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") String kmsKeyId; diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreateMultipartUploadDetails.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreateMultipartUploadDetails.java index 5dc4ad054bb..8e26d002db0 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreateMultipartUploadDetails.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreateMultipartUploadDetails.java @@ -63,6 +63,24 @@ public Builder contentEncoding(String contentEncoding) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("contentDisposition") + private String contentDisposition; + + public Builder contentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + this.__explicitlySet__.add("contentDisposition"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cacheControl") + private String cacheControl; + + public Builder cacheControl(String cacheControl) { + this.cacheControl = cacheControl; + this.__explicitlySet__.add("cacheControl"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("metadata") private java.util.Map metadata; @@ -78,7 +96,13 @@ public Builder metadata(java.util.Map metadata) { public CreateMultipartUploadDetails build() { CreateMultipartUploadDetails __instance__ = new CreateMultipartUploadDetails( - object, contentType, contentLanguage, contentEncoding, metadata); + object, + contentType, + contentLanguage, + contentEncoding, + contentDisposition, + cacheControl, + metadata); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -90,6 +114,8 @@ public Builder copy(CreateMultipartUploadDetails o) { .contentType(o.getContentType()) .contentLanguage(o.getContentLanguage()) .contentEncoding(o.getContentEncoding()) + .contentDisposition(o.getContentDisposition()) + .cacheControl(o.getCacheControl()) .metadata(o.getMetadata()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); @@ -130,6 +156,18 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("contentEncoding") String contentEncoding; + /** + * The Content-Disposition header value to be returned in GetObjectReponse. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("contentDisposition") + String contentDisposition; + + /** + * The cache-control header value to be returned in GetObjectReponse. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cacheControl") + String cacheControl; + /** * Arbitrary string keys and values for the user-defined metadata for the object. * Keys must be in \"opc-meta-*\" format. Avoid entering confidential information. diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectLifecycleRule.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectLifecycleRule.java index 67ae8536118..0ec088fe1f9 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectLifecycleRule.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectLifecycleRule.java @@ -194,7 +194,7 @@ public static TimeUnit create(String key) { TimeUnit timeUnit; /** - * A boolean that determines whether this rule is currently enabled. + * A Boolean that determines whether this rule is currently enabled. **/ @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") Boolean isEnabled; diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectSummary.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectSummary.java index 532fe20bfa0..3e849c5cff5 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectSummary.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectSummary.java @@ -61,11 +61,20 @@ public Builder timeCreated(java.util.Date timeCreated) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("etag") + private String etag; + + public Builder etag(String etag) { + this.etag = etag; + this.__explicitlySet__.add("etag"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public ObjectSummary build() { - ObjectSummary __instance__ = new ObjectSummary(name, size, md5, timeCreated); + ObjectSummary __instance__ = new ObjectSummary(name, size, md5, timeCreated, etag); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -76,7 +85,8 @@ public Builder copy(ObjectSummary o) { name(o.getName()) .size(o.getSize()) .md5(o.getMd5()) - .timeCreated(o.getTimeCreated()); + .timeCreated(o.getTimeCreated()) + .etag(o.getEtag()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -116,6 +126,12 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") java.util.Date timeCreated; + /** + * The current entity tag (ETag) for the object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("etag") + String etag; + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); } diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/UpdateBucketDetails.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/UpdateBucketDetails.java index c9ad67139d5..5467c64adf9 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/UpdateBucketDetails.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/UpdateBucketDetails.java @@ -229,8 +229,9 @@ public static PublicAccessType create(String key) { PublicAccessType publicAccessType; /** - * A property that determines whether events will be generated for operations on objects in this bucket. - * This is false by default. + * Whether or not events are emitted for object state changes in this bucket. By default, `objectEventsEnabled` is + * set to `false`. Set `objectEventsEnabled` to `true` to emit events for object state changes. For more information + * about events, see [Overview of Events](https://docs.cloud.oracle.com/Content/Events/Concepts/eventsoverview.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("objectEventsEnabled") @@ -255,10 +256,9 @@ public static PublicAccessType create(String key) { java.util.Map> definedTags; /** - * A KMS key OCID that will be associated with the given bucket. If it is empty the Update operation will - * actually remove the KMS key, if there is one, from the given bucket. Note that the old kms key should - * still be enbaled in KMS otherwise all the objects in the bucket encrypted with the old KMS key will no - * longer be accessible. + * The OCID of the Key Management master encryption key to associate with the specified bucket. If this value + * is empty, the Update operation will remove the associated key, if there is one, from the bucket. (The bucket + * will continue to be encrypted, but with an encryption key managed by Oracle.) * **/ @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectsRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectsRequest.java index 63960bc3c42..1a9214de55f 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectsRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectsRequest.java @@ -54,9 +54,9 @@ public class ListObjectsRequest extends com.oracle.bmc.requests.BmcRequest { /** * Object summary in list of objects includes the 'name' field. This parameter can also include 'size' - * (object size in bytes), 'md5', and 'timeCreated' (object creation date and time) fields. + * (object size in bytes), 'etag', 'md5', and 'timeCreated' (object creation date and time) fields. * Value of this parameter should be a comma-separated, case-insensitive list of those field names. - * For example 'name,timeCreated,md5'. + * For example 'name,etag,timeCreated,md5'. * */ private String fields; diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java index bfeee67c2be..7578fe2a072 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java @@ -89,6 +89,16 @@ public class PutObjectRequest extends com.oracle.bmc.requests.BmcRequest { */ private String contentEncoding; + /** + * The Content-Disposition header value to be returned in GetObjectReponse. + */ + private String contentDisposition; + + /** + * The cache-control header value to be returned in GetObjectReponse. + */ + private String cacheControl; + /** * Optional user-defined metadata key and value. */ @@ -140,6 +150,8 @@ public Builder copy(PutObjectRequest o) { contentType(o.getContentType()); contentLanguage(o.getContentLanguage()); contentEncoding(o.getContentEncoding()); + contentDisposition(o.getContentDisposition()); + cacheControl(o.getCacheControl()); opcMeta(o.getOpcMeta()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectResponse.java index 097750e3571..37f7cdbe4da 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectResponse.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectResponse.java @@ -74,6 +74,16 @@ public class GetObjectResponse { */ private String contentEncoding; + /** + * Cache-Control header, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.9. + */ + private String cacheControl; + + /** + * Content-Disposition header, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1 + */ + private String contentDisposition; + /** * The object modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. */ @@ -119,6 +129,8 @@ public Builder copy(GetObjectResponse o) { contentType(o.getContentType()); contentLanguage(o.getContentLanguage()); contentEncoding(o.getContentEncoding()); + cacheControl(o.getCacheControl()); + contentDisposition(o.getContentDisposition()); lastModified(o.getLastModified()); archivalState(o.getArchivalState()); timeOfArchival(o.getTimeOfArchival()); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/HeadObjectResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/HeadObjectResponse.java index 3956bd40cc6..143277a200e 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/HeadObjectResponse.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/HeadObjectResponse.java @@ -69,6 +69,16 @@ public class HeadObjectResponse { */ private String contentEncoding; + /** + * Cache-Control header, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.9. + */ + private String cacheControl; + + /** + * Content-Disposition header, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 19.5.1 + */ + private String contentDisposition; + /** * The object modification time, as described in [RFC 2616](https://tools.ietf.org/rfc/rfc2616), section 14.29. */ @@ -108,6 +118,8 @@ public Builder copy(HeadObjectResponse o) { contentType(o.getContentType()); contentLanguage(o.getContentLanguage()); contentEncoding(o.getContentEncoding()); + cacheControl(o.getCacheControl()); + contentDisposition(o.getContentDisposition()); lastModified(o.getLastModified()); archivalState(o.getArchivalState()); timeOfArchival(o.getTimeOfArchival()); diff --git a/bmc-objectstorage/pom.xml b/bmc-objectstorage/pom.xml index 5808bf4f57c..e5583f32e0d 100644 --- a/bmc-objectstorage/pom.xml +++ b/bmc-objectstorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml diff --git a/bmc-oce/pom.xml b/bmc-oce/pom.xml index 04d0fc8aa6c..657de311734 100644 --- a/bmc-oce/pom.xml +++ b/bmc-oce/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-oce @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 \ No newline at end of file diff --git a/bmc-oda/pom.xml b/bmc-oda/pom.xml index fa34f3b1788..dd1e446ca64 100644 --- a/bmc-oda/pom.xml +++ b/bmc-oda/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-oda @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/bmc-ons/pom.xml b/bmc-ons/pom.xml index a838b273650..3751b6bbc4c 100644 --- a/bmc-ons/pom.xml +++ b/bmc-ons/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-ons @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 \ No newline at end of file diff --git a/bmc-resourcemanager/pom.xml b/bmc-resourcemanager/pom.xml index ed542b3b80d..9fdd126fb89 100644 --- a/bmc-resourcemanager/pom.xml +++ b/bmc-resourcemanager/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-resourcemanager @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 \ No newline at end of file diff --git a/bmc-resourcesearch/pom.xml b/bmc-resourcesearch/pom.xml index 8bce801f7ce..9bb0c40b832 100644 --- a/bmc-resourcesearch/pom.xml +++ b/bmc-resourcesearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-resourcesearch @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/bmc-shaded/bmc-shaded-full/pom.xml b/bmc-shaded/bmc-shaded-full/pom.xml index 3a7af19da0f..52a58477b00 100644 --- a/bmc-shaded/bmc-shaded-full/pom.xml +++ b/bmc-shaded/bmc-shaded-full/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk-shaded - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-shaded-full diff --git a/bmc-shaded/pom.xml b/bmc-shaded/pom.xml index 90d855d43ae..b6d4ec93ec2 100644 --- a/bmc-shaded/pom.xml +++ b/bmc-shaded/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml diff --git a/bmc-streaming/pom.xml b/bmc-streaming/pom.xml index 11e255ada97..104f47df705 100644 --- a/bmc-streaming/pom.xml +++ b/bmc-streaming/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-streaming @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 \ No newline at end of file diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdmin.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdmin.java index f3753cf3ccd..70bb571b2a8 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdmin.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdmin.java @@ -42,8 +42,29 @@ public interface StreamAdmin extends AutoCloseable { * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. */ + ChangeConnectHarnessCompartmentResponse changeConnectHarnessCompartment( + ChangeConnectHarnessCompartmentRequest request); + + /** + * Moves a resource into a different compartment. + * When provided, If-Match is checked against ETag values of the resource. + * The stream will also be moved into the default stream pool in the destination 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. + */ ChangeStreamCompartmentResponse changeStreamCompartment(ChangeStreamCompartmentRequest request); + /** + * Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ChangeStreamPoolCompartmentResponse changeStreamPoolCompartment( + ChangeStreamPoolCompartmentRequest request); + /** * Starts the provisioning of a new stream archiver. * To track the progress of the provisioning, you can periodically call {@link #getArchiver(GetArchiverRequest) getArchiver}. @@ -55,8 +76,20 @@ public interface StreamAdmin extends AutoCloseable { */ CreateArchiverResponse createArchiver(CreateArchiverRequest request); + /** + * Starts the provisioning of a new connect harness. + * To track the progress of the provisioning, you can periodically call {@link ConnectHarness} object tells you its current state. + * + * @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. + */ + CreateConnectHarnessResponse createConnectHarness(CreateConnectHarnessRequest request); + /** * Starts the provisioning of a new stream. + * The stream will be created in the given compartment id or stream pool id, depending on which parameter is specified. + * Compartment id and stream pool id cannot be specified at the same time. * To track the progress of the provisioning, you can periodically call {@link #getStream(GetStreamRequest) getStream}. * In the response, the `lifecycleState` parameter of the {@link Stream} object tells you its current state. * @@ -66,6 +99,30 @@ public interface StreamAdmin extends AutoCloseable { */ CreateStreamResponse createStream(CreateStreamRequest request); + /** + * Starts the provisioning of a new stream pool. + * To track the progress of the provisioning, you can periodically call GetStreamPool. + * In the response, the `lifecycleState` parameter of the object tells you its current state. + * + * @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. + */ + CreateStreamPoolResponse createStreamPool(CreateStreamPoolRequest request); + + /** + * Deletes a connect harness and its content. Connect harness contents are deleted immediately. The service retains records of the connect harness itself for 90 days after deletion. + * The `lifecycleState` parameter of the `ConnectHarness` object changes to `DELETING` and the connect harness becomes inaccessible for read or write operations. + * To verify that a connect harness has been deleted, make a {@link #getConnectHarness(GetConnectHarnessRequest) getConnectHarness} request. If the call returns the connect harness's + * lifecycle state as `DELETED`, then the connect harness has been deleted. If the call returns a \"404 Not Found\" error, that means all records of the + * connect harness have been deleted. + * + * @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. + */ + DeleteConnectHarnessResponse deleteConnectHarness(DeleteConnectHarnessRequest request); + /** * Deletes a stream and its content. Stream contents are deleted immediately. The service retains records of the stream itself for 90 days after deletion. * The `lifecycleState` parameter of the `Stream` object changes to `DELETING` and the stream becomes inaccessible for read or write operations. @@ -79,6 +136,16 @@ public interface StreamAdmin extends AutoCloseable { */ DeleteStreamResponse deleteStream(DeleteStreamRequest request); + /** + * Deletes a stream pool. All containing streams will also be deleted. + * The default stream pool of a compartment cannot be deleted. + * + * @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. + */ + DeleteStreamPoolResponse deleteStreamPool(DeleteStreamPoolRequest request); + /** * Returns the current state of the stream archiver. * @@ -88,6 +155,14 @@ public interface StreamAdmin extends AutoCloseable { */ GetArchiverResponse getArchiver(GetArchiverRequest request); + /** + * Gets detailed information about a connect harness. + * @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. + */ + GetConnectHarnessResponse getConnectHarness(GetConnectHarnessRequest request); + /** * Gets detailed information about a stream, including the number of partitions. * @param request The request object containing the details to send @@ -97,7 +172,35 @@ public interface StreamAdmin extends AutoCloseable { GetStreamResponse getStream(GetStreamRequest request); /** - * Lists the streams. + * Gets detailed information about the stream pool, such as Kafka settings. + * @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. + */ + GetStreamPoolResponse getStreamPool(GetStreamPoolRequest request); + + /** + * Lists the connectharness. + * @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. + */ + ListConnectHarnessesResponse listConnectHarnesses(ListConnectHarnessesRequest request); + + /** + * List the stream pools for a given compartment ID. + * @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. + */ + ListStreamPoolsResponse listStreamPools(ListStreamPoolsRequest request); + + /** + * Lists the streams in the given compartment id. + * If the compartment id is specified, it will list streams in the compartment, regardless of their stream pool. + * If the stream pool id is specified, the action will be scoped to that stream pool. + * The compartment id and stream pool id cannot be specified at the same time. + * * @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. @@ -132,7 +235,16 @@ public interface StreamAdmin extends AutoCloseable { UpdateArchiverResponse updateArchiver(UpdateArchiverRequest request); /** - * Updates the tags applied to the stream. + * Updates the tags applied to the connect harness. + * + * @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. + */ + UpdateConnectHarnessResponse updateConnectHarness(UpdateConnectHarnessRequest request); + + /** + * Updates the stream. Only specified values will be updated. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -140,6 +252,15 @@ public interface StreamAdmin extends AutoCloseable { */ UpdateStreamResponse updateStream(UpdateStreamRequest request); + /** + * Updates the specified stream pool. + * + * @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. + */ + UpdateStreamPoolResponse updateStreamPool(UpdateStreamPoolRequest request); + /** * Gets the pre-configured waiters available for resources for this service. * diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsync.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsync.java index f646c4c6c77..88a5bc53956 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsync.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsync.java @@ -46,12 +46,49 @@ public interface StreamAdminAsync extends AutoCloseable { * 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 + changeConnectHarnessCompartment( + ChangeConnectHarnessCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeConnectHarnessCompartmentRequest, + ChangeConnectHarnessCompartmentResponse> + handler); + + /** + * Moves a resource into a different compartment. + * When provided, If-Match is checked against ETag values of the resource. + * The stream will also be moved into the default stream pool in the destination 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 changeStreamCompartment( ChangeStreamCompartmentRequest request, com.oracle.bmc.responses.AsyncHandler< ChangeStreamCompartmentRequest, ChangeStreamCompartmentResponse> handler); + /** + * Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future changeStreamPoolCompartment( + ChangeStreamPoolCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeStreamPoolCompartmentRequest, ChangeStreamPoolCompartmentResponse> + handler); + /** * Starts the provisioning of a new stream archiver. * To track the progress of the provisioning, you can periodically call {@link #getArchiver(GetArchiverRequest, Consumer, Consumer) getArchiver}. @@ -70,8 +107,28 @@ java.util.concurrent.Future createArchiver( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Starts the provisioning of a new connect harness. + * To track the progress of the provisioning, you can periodically call {@link ConnectHarness} object tells you its current state. + * + * + * @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 createConnectHarness( + CreateConnectHarnessRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateConnectHarnessRequest, CreateConnectHarnessResponse> + handler); + /** * Starts the provisioning of a new stream. + * The stream will be created in the given compartment id or stream pool id, depending on which parameter is specified. + * Compartment id and stream pool id cannot be specified at the same time. * To track the progress of the provisioning, you can periodically call {@link #getStream(GetStreamRequest, Consumer, Consumer) getStream}. * In the response, the `lifecycleState` parameter of the {@link Stream} object tells you its current state. * @@ -88,6 +145,45 @@ java.util.concurrent.Future createStream( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Starts the provisioning of a new stream pool. + * To track the progress of the provisioning, you can periodically call GetStreamPool. + * In the response, the `lifecycleState` parameter of the object tells you its current state. + * + * + * @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 createStreamPool( + CreateStreamPoolRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Deletes a connect harness and its content. Connect harness contents are deleted immediately. The service retains records of the connect harness itself for 90 days after deletion. + * The `lifecycleState` parameter of the `ConnectHarness` object changes to `DELETING` and the connect harness becomes inaccessible for read or write operations. + * To verify that a connect harness has been deleted, make a {@link #getConnectHarness(GetConnectHarnessRequest, Consumer, Consumer) getConnectHarness} request. If the call returns the connect harness's + * lifecycle state as `DELETED`, then the connect harness has been deleted. If the call returns a \"404 Not Found\" error, that means all records of the + * connect harness have been deleted. + * + * + * @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 deleteConnectHarness( + DeleteConnectHarnessRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteConnectHarnessRequest, DeleteConnectHarnessResponse> + handler); + /** * Deletes a stream and its content. Stream contents are deleted immediately. The service retains records of the stream itself for 90 days after deletion. * The `lifecycleState` parameter of the `Stream` object changes to `DELETING` and the stream becomes inaccessible for read or write operations. @@ -108,6 +204,23 @@ java.util.concurrent.Future deleteStream( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Deletes a stream pool. All containing streams will also be deleted. + * The default stream pool of a compartment cannot be deleted. + * + * + * @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 deleteStreamPool( + DeleteStreamPoolRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Returns the current state of the stream archiver. * @@ -123,6 +236,22 @@ java.util.concurrent.Future getArchiver( GetArchiverRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets detailed information about a connect harness. + * + * @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 getConnectHarness( + GetConnectHarnessRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetConnectHarnessRequest, GetConnectHarnessResponse> + handler); + /** * Gets detailed information about a stream, including the number of partitions. * @@ -138,7 +267,57 @@ java.util.concurrent.Future getStream( com.oracle.bmc.responses.AsyncHandler handler); /** - * Lists the streams. + * Gets detailed information about the stream pool, such as Kafka settings. + * + * @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 getStreamPool( + GetStreamPoolRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Lists the connectharness. + * + * @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 listConnectHarnesses( + ListConnectHarnessesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListConnectHarnessesRequest, ListConnectHarnessesResponse> + handler); + + /** + * List the stream pools for a given compartment ID. + * + * @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 listStreamPools( + ListStreamPoolsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Lists the streams in the given compartment id. + * If the compartment id is specified, it will list streams in the compartment, regardless of their stream pool. + * If the stream pool id is specified, the action will be scoped to that stream pool. + * The compartment id and stream pool id cannot be specified at the same time. + * * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -200,7 +379,24 @@ java.util.concurrent.Future updateArchiver( handler); /** - * Updates the tags applied to the stream. + * Updates the tags applied to the connect harness. + * + * + * @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 updateConnectHarness( + UpdateConnectHarnessRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateConnectHarnessRequest, UpdateConnectHarnessResponse> + handler); + + /** + * Updates the stream. Only specified values will be updated. * * * @param request The request object containing the details to send @@ -214,4 +410,20 @@ java.util.concurrent.Future updateStream( UpdateStreamRequest request, com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Updates the specified stream pool. + * + * + * @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 updateStreamPool( + UpdateStreamPoolRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); } diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsyncClient.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsyncClient.java index aa5a678bc28..171950bf2a2 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsyncClient.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsyncClient.java @@ -302,6 +302,101 @@ public void close() { client.close(); } + @Override + public java.util.concurrent.Future + changeConnectHarnessCompartment( + final ChangeConnectHarnessCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeConnectHarnessCompartmentRequest, + ChangeConnectHarnessCompartmentResponse> + handler) { + LOG.trace("Called async changeConnectHarnessCompartment"); + final ChangeConnectHarnessCompartmentRequest interceptedRequest = + ChangeConnectHarnessCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeConnectHarnessCompartmentConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeConnectHarnessCompartmentResponse> + transformer = ChangeConnectHarnessCompartmentConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ChangeConnectHarnessCompartmentRequest, + ChangeConnectHarnessCompartmentResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ChangeConnectHarnessCompartmentRequest, + ChangeConnectHarnessCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post( + ib, + interceptedRequest.getChangeConnectHarnessCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getChangeConnectHarnessCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ChangeConnectHarnessCompartmentResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getChangeConnectHarnessCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future changeStreamCompartment( final ChangeStreamCompartmentRequest request, @@ -393,6 +488,100 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future + changeStreamPoolCompartment( + final ChangeStreamPoolCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeStreamPoolCompartmentRequest, + ChangeStreamPoolCompartmentResponse> + handler) { + LOG.trace("Called async changeStreamPoolCompartment"); + final ChangeStreamPoolCompartmentRequest interceptedRequest = + ChangeStreamPoolCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeStreamPoolCompartmentConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeStreamPoolCompartmentResponse> + transformer = ChangeStreamPoolCompartmentConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ChangeStreamPoolCompartmentRequest, ChangeStreamPoolCompartmentResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ChangeStreamPoolCompartmentRequest, + ChangeStreamPoolCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post( + ib, + interceptedRequest.getChangeStreamPoolCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getChangeStreamPoolCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ChangeStreamPoolCompartmentResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getChangeStreamPoolCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future createArchiver( final CreateArchiverRequest request, @@ -459,7 +648,650 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, CreateArchiverResponse>( + javax.ws.rs.core.Response, CreateArchiverResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getCreateArchiverDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future createConnectHarness( + final CreateConnectHarnessRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateConnectHarnessRequest, CreateConnectHarnessResponse> + handler) { + LOG.trace("Called async createConnectHarness"); + final CreateConnectHarnessRequest interceptedRequest = + CreateConnectHarnessConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateConnectHarnessConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateConnectHarnessResponse> + transformer = CreateConnectHarnessConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + CreateConnectHarnessRequest, CreateConnectHarnessResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + CreateConnectHarnessRequest, CreateConnectHarnessResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post( + ib, + interceptedRequest.getCreateConnectHarnessDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getCreateConnectHarnessDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, CreateConnectHarnessResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getCreateConnectHarnessDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future createStream( + final CreateStreamRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async createStream"); + final CreateStreamRequest interceptedRequest = + CreateStreamConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateStreamConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = CreateStreamConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + CreateStreamRequest, CreateStreamResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post( + ib, + interceptedRequest.getCreateStreamDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getCreateStreamDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, CreateStreamResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getCreateStreamDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future createStreamPool( + final CreateStreamPoolRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateStreamPoolRequest, CreateStreamPoolResponse> + handler) { + LOG.trace("Called async createStreamPool"); + final CreateStreamPoolRequest interceptedRequest = + CreateStreamPoolConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateStreamPoolConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = CreateStreamPoolConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + CreateStreamPoolRequest, CreateStreamPoolResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post( + ib, + interceptedRequest.getCreateStreamPoolDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getCreateStreamPoolDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, CreateStreamPoolResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getCreateStreamPoolDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future deleteConnectHarness( + final DeleteConnectHarnessRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteConnectHarnessRequest, DeleteConnectHarnessResponse> + handler) { + LOG.trace("Called async deleteConnectHarness"); + final DeleteConnectHarnessRequest interceptedRequest = + DeleteConnectHarnessConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteConnectHarnessConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteConnectHarnessResponse> + transformer = DeleteConnectHarnessConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + DeleteConnectHarnessRequest, DeleteConnectHarnessResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + DeleteConnectHarnessRequest, DeleteConnectHarnessResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.delete(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.delete(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, DeleteConnectHarnessResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.delete(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future deleteStream( + final DeleteStreamRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async deleteStream"); + final DeleteStreamRequest interceptedRequest = + DeleteStreamConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteStreamConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = DeleteStreamConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + DeleteStreamRequest, DeleteStreamResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.delete(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.delete(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, DeleteStreamResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.delete(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future deleteStreamPool( + final DeleteStreamPoolRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteStreamPoolRequest, DeleteStreamPoolResponse> + handler) { + LOG.trace("Called async deleteStreamPool"); + final DeleteStreamPoolRequest interceptedRequest = + DeleteStreamPoolConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteStreamPoolConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = DeleteStreamPoolConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + DeleteStreamPoolRequest, DeleteStreamPoolResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.delete(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.delete(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, DeleteStreamPoolResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.delete(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future getArchiver( + final GetArchiverRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getArchiver"); + final GetArchiverRequest interceptedRequest = + GetArchiverConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetArchiverConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetArchiverConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetArchiverRequest, GetArchiverResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, GetArchiverResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future getConnectHarness( + final GetConnectHarnessRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetConnectHarnessRequest, GetConnectHarnessResponse> + handler) { + LOG.trace("Called async getConnectHarness"); + final GetConnectHarnessRequest interceptedRequest = + GetConnectHarnessConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetConnectHarnessConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetConnectHarnessConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetConnectHarnessRequest, GetConnectHarnessResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, GetConnectHarnessResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -468,12 +1300,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.post( - ib, - interceptedRequest.getCreateArchiverDetails(), - interceptedRequest, - onSuccess, - onError); + return client.get(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -483,26 +1310,25 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future createStream( - final CreateStreamRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future getStream( + final GetStreamRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async createStream"); - final CreateStreamRequest interceptedRequest = - CreateStreamConverter.interceptRequest(request); + LOG.trace("Called async getStream"); + final GetStreamRequest interceptedRequest = GetStreamConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateStreamConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = CreateStreamConverter.fromResponse(); + GetStreamConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetStreamConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler - handlerToUse = handler; + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - CreateStreamRequest, CreateStreamResponse>( + GetStreamRequest, GetStreamResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -515,12 +1341,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.post( - ib, - interceptedRequest.getCreateStreamDetails(), - interceptedRequest, - onSuccess, - onError); + client.get(ib, interceptedRequest, onSuccess, onError); } }; } @@ -537,17 +1358,12 @@ public void retryCall() { handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.post( - ib, - interceptedRequest.getCreateStreamDetails(), - interceptedRequest, - onSuccess, - onError); + client.get(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, CreateStreamResponse>( + javax.ws.rs.core.Response, GetStreamResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -556,12 +1372,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.post( - ib, - interceptedRequest.getCreateStreamDetails(), - interceptedRequest, - onSuccess, - onError); + return client.get(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -571,26 +1382,26 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future deleteStream( - final DeleteStreamRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future getStreamPool( + final GetStreamPoolRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async deleteStream"); - final DeleteStreamRequest interceptedRequest = - DeleteStreamConverter.interceptRequest(request); + LOG.trace("Called async getStreamPool"); + final GetStreamPoolRequest interceptedRequest = + GetStreamPoolConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteStreamConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = DeleteStreamConverter.fromResponse(); + GetStreamPoolConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetStreamPoolConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - DeleteStreamRequest, DeleteStreamResponse>( + GetStreamPoolRequest, GetStreamPoolResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -603,7 +1414,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.delete(ib, interceptedRequest, onSuccess, onError); + client.get(ib, interceptedRequest, onSuccess, onError); } }; } @@ -620,12 +1431,12 @@ public void retryCall() { handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.delete(ib, interceptedRequest, onSuccess, onError); + client.get(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, DeleteStreamResponse>( + javax.ws.rs.core.Response, GetStreamPoolResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -634,7 +1445,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.delete(ib, interceptedRequest, onSuccess, onError); + return client.get(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -644,26 +1455,29 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getArchiver( - final GetArchiverRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listConnectHarnesses( + final ListConnectHarnessesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListConnectHarnessesRequest, ListConnectHarnessesResponse> handler) { - LOG.trace("Called async getArchiver"); - final GetArchiverRequest interceptedRequest = - GetArchiverConverter.interceptRequest(request); + LOG.trace("Called async listConnectHarnesses"); + final ListConnectHarnessesRequest interceptedRequest = + ListConnectHarnessesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetArchiverConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetArchiverConverter.fromResponse(); + ListConnectHarnessesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListConnectHarnessesResponse> + transformer = ListConnectHarnessesConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + ListConnectHarnessesRequest, ListConnectHarnessesResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetArchiverRequest, GetArchiverResponse>( + ListConnectHarnessesRequest, ListConnectHarnessesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -698,7 +1512,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetArchiverResponse>( + javax.ws.rs.core.Response, ListConnectHarnessesResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -717,25 +1531,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getStream( - final GetStreamRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listStreamPools( + final ListStreamPoolsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListStreamPoolsRequest, ListStreamPoolsResponse> handler) { - LOG.trace("Called async getStream"); - final GetStreamRequest interceptedRequest = GetStreamConverter.interceptRequest(request); + LOG.trace("Called async listStreamPools"); + final ListStreamPoolsRequest interceptedRequest = + ListStreamPoolsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetStreamConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetStreamConverter.fromResponse(); + ListStreamPoolsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListStreamPoolsConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler handlerToUse = - handler; + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetStreamRequest, GetStreamResponse>( + ListStreamPoolsRequest, ListStreamPoolsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -770,7 +1586,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetStreamResponse>( + javax.ws.rs.core.Response, ListStreamPoolsResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1096,6 +1912,97 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future updateConnectHarness( + final UpdateConnectHarnessRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateConnectHarnessRequest, UpdateConnectHarnessResponse> + handler) { + LOG.trace("Called async updateConnectHarness"); + final UpdateConnectHarnessRequest interceptedRequest = + UpdateConnectHarnessConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateConnectHarnessConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateConnectHarnessResponse> + transformer = UpdateConnectHarnessConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + UpdateConnectHarnessRequest, UpdateConnectHarnessResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + UpdateConnectHarnessRequest, UpdateConnectHarnessResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.put( + ib, + interceptedRequest.getUpdateConnectHarnessDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.put( + ib, + interceptedRequest.getUpdateConnectHarnessDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, UpdateConnectHarnessResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.put( + ib, + interceptedRequest.getUpdateConnectHarnessDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future updateStream( final UpdateStreamRequest request, @@ -1183,4 +2090,93 @@ public java.util.concurrent.Future get() { responseFuture, transformer); } } + + @Override + public java.util.concurrent.Future updateStreamPool( + final UpdateStreamPoolRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateStreamPoolRequest, UpdateStreamPoolResponse> + handler) { + LOG.trace("Called async updateStreamPool"); + final UpdateStreamPoolRequest interceptedRequest = + UpdateStreamPoolConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateStreamPoolConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = UpdateStreamPoolConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + UpdateStreamPoolRequest, UpdateStreamPoolResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.put( + ib, + interceptedRequest.getUpdateStreamPoolDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.put( + ib, + interceptedRequest.getUpdateStreamPoolDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, UpdateStreamPoolResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.put( + ib, + interceptedRequest.getUpdateStreamPoolDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } } diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminClient.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminClient.java index 0b2b806e3cf..17a0278197c 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminClient.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminClient.java @@ -376,6 +376,41 @@ public void close() { client.close(); } + @Override + public ChangeConnectHarnessCompartmentResponse changeConnectHarnessCompartment( + ChangeConnectHarnessCompartmentRequest request) { + LOG.trace("Called changeConnectHarnessCompartment"); + final ChangeConnectHarnessCompartmentRequest interceptedRequest = + ChangeConnectHarnessCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeConnectHarnessCompartmentConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeConnectHarnessCompartmentResponse> + transformer = ChangeConnectHarnessCompartmentConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeConnectHarnessCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeStreamCompartmentResponse changeStreamCompartment( ChangeStreamCompartmentRequest request) { @@ -409,6 +444,41 @@ public ChangeStreamCompartmentResponse changeStreamCompartment( }); } + @Override + public ChangeStreamPoolCompartmentResponse changeStreamPoolCompartment( + ChangeStreamPoolCompartmentRequest request) { + LOG.trace("Called changeStreamPoolCompartment"); + final ChangeStreamPoolCompartmentRequest interceptedRequest = + ChangeStreamPoolCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeStreamPoolCompartmentConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeStreamPoolCompartmentResponse> + transformer = ChangeStreamPoolCompartmentConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeStreamPoolCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateArchiverResponse createArchiver(CreateArchiverRequest request) { LOG.trace("Called createArchiver"); @@ -441,6 +511,38 @@ public CreateArchiverResponse createArchiver(CreateArchiverRequest request) { }); } + @Override + public CreateConnectHarnessResponse createConnectHarness(CreateConnectHarnessRequest request) { + LOG.trace("Called createConnectHarness"); + final CreateConnectHarnessRequest interceptedRequest = + CreateConnectHarnessConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateConnectHarnessConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = CreateConnectHarnessConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateConnectHarnessDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateStreamResponse createStream(CreateStreamRequest request) { LOG.trace("Called createStream"); @@ -473,6 +575,67 @@ public CreateStreamResponse createStream(CreateStreamRequest request) { }); } + @Override + public CreateStreamPoolResponse createStreamPool(CreateStreamPoolRequest request) { + LOG.trace("Called createStreamPool"); + final CreateStreamPoolRequest interceptedRequest = + CreateStreamPoolConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateStreamPoolConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = CreateStreamPoolConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateStreamPoolDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteConnectHarnessResponse deleteConnectHarness(DeleteConnectHarnessRequest request) { + LOG.trace("Called deleteConnectHarness"); + final DeleteConnectHarnessRequest interceptedRequest = + DeleteConnectHarnessConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteConnectHarnessConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = DeleteConnectHarnessConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteStreamResponse deleteStream(DeleteStreamRequest request) { LOG.trace("Called deleteStream"); @@ -502,6 +665,35 @@ public DeleteStreamResponse deleteStream(DeleteStreamRequest request) { }); } + @Override + public DeleteStreamPoolResponse deleteStreamPool(DeleteStreamPoolRequest request) { + LOG.trace("Called deleteStreamPool"); + final DeleteStreamPoolRequest interceptedRequest = + DeleteStreamPoolConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteStreamPoolConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = DeleteStreamPoolConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetArchiverResponse getArchiver(GetArchiverRequest request) { LOG.trace("Called getArchiver"); @@ -530,6 +722,34 @@ public GetArchiverResponse getArchiver(GetArchiverRequest request) { }); } + @Override + public GetConnectHarnessResponse getConnectHarness(GetConnectHarnessRequest request) { + LOG.trace("Called getConnectHarness"); + final GetConnectHarnessRequest interceptedRequest = + GetConnectHarnessConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetConnectHarnessConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = GetConnectHarnessConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetStreamResponse getStream(GetStreamRequest request) { LOG.trace("Called getStream"); @@ -557,6 +777,90 @@ public GetStreamResponse getStream(GetStreamRequest request) { }); } + @Override + public GetStreamPoolResponse getStreamPool(GetStreamPoolRequest request) { + LOG.trace("Called getStreamPool"); + final GetStreamPoolRequest interceptedRequest = + GetStreamPoolConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetStreamPoolConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = GetStreamPoolConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListConnectHarnessesResponse listConnectHarnesses(ListConnectHarnessesRequest request) { + LOG.trace("Called listConnectHarnesses"); + final ListConnectHarnessesRequest interceptedRequest = + ListConnectHarnessesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListConnectHarnessesConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = ListConnectHarnessesConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListStreamPoolsResponse listStreamPools(ListStreamPoolsRequest request) { + LOG.trace("Called listStreamPools"); + final ListStreamPoolsRequest interceptedRequest = + ListStreamPoolsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListStreamPoolsConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = ListStreamPoolsConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListStreamsResponse listStreams(ListStreamsRequest request) { LOG.trace("Called listStreams"); @@ -675,6 +979,38 @@ public UpdateArchiverResponse updateArchiver(UpdateArchiverRequest request) { }); } + @Override + public UpdateConnectHarnessResponse updateConnectHarness(UpdateConnectHarnessRequest request) { + LOG.trace("Called updateConnectHarness"); + final UpdateConnectHarnessRequest interceptedRequest = + UpdateConnectHarnessConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateConnectHarnessConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = UpdateConnectHarnessConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateConnectHarnessDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateStreamResponse updateStream(UpdateStreamRequest request) { LOG.trace("Called updateStream"); @@ -707,6 +1043,38 @@ public UpdateStreamResponse updateStream(UpdateStreamRequest request) { }); } + @Override + public UpdateStreamPoolResponse updateStreamPool(UpdateStreamPoolRequest request) { + LOG.trace("Called updateStreamPool"); + final UpdateStreamPoolRequest interceptedRequest = + UpdateStreamPoolConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateStreamPoolConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = UpdateStreamPoolConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateStreamPoolDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public StreamAdminWaiters getWaiters() { return waiters; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminPaginators.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminPaginators.java index a3ec14cf185..f7023610f85 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminPaginators.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminPaginators.java @@ -29,6 +29,231 @@ public class StreamAdminPaginators { private final StreamAdmin client; + /** + * Creates a new iterable which will iterate over the responses received from the listConnectHarnesses operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listConnectHarnessesResponseIterator( + final ListConnectHarnessesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListConnectHarnessesRequest.Builder, ListConnectHarnessesRequest, + ListConnectHarnessesResponse>( + new com.google.common.base.Supplier() { + @Override + public ListConnectHarnessesRequest.Builder get() { + return ListConnectHarnessesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListConnectHarnessesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListConnectHarnessesRequest.Builder>, + ListConnectHarnessesRequest>() { + @Override + public ListConnectHarnessesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListConnectHarnessesRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListConnectHarnessesRequest, ListConnectHarnessesResponse>() { + @Override + public ListConnectHarnessesResponse apply(ListConnectHarnessesRequest request) { + return client.listConnectHarnesses(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.streaming.model.ConnectHarnessSummary} objects + * contained in responses from the listConnectHarnesses operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.streaming.model.ConnectHarnessSummary} objects + * contained in responses received from the service. + */ + public Iterable + listConnectHarnessesRecordIterator(final ListConnectHarnessesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListConnectHarnessesRequest.Builder, ListConnectHarnessesRequest, + ListConnectHarnessesResponse, com.oracle.bmc.streaming.model.ConnectHarnessSummary>( + new com.google.common.base.Supplier() { + @Override + public ListConnectHarnessesRequest.Builder get() { + return ListConnectHarnessesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListConnectHarnessesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListConnectHarnessesRequest.Builder>, + ListConnectHarnessesRequest>() { + @Override + public ListConnectHarnessesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListConnectHarnessesRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListConnectHarnessesRequest, ListConnectHarnessesResponse>() { + @Override + public ListConnectHarnessesResponse apply(ListConnectHarnessesRequest request) { + return client.listConnectHarnesses(request); + } + }, + new com.google.common.base.Function< + ListConnectHarnessesResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListConnectHarnessesResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listStreamPools operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listStreamPoolsResponseIterator( + final ListStreamPoolsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListStreamPoolsRequest.Builder, ListStreamPoolsRequest, ListStreamPoolsResponse>( + new com.google.common.base.Supplier() { + @Override + public ListStreamPoolsRequest.Builder get() { + return ListStreamPoolsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListStreamPoolsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListStreamPoolsRequest.Builder>, + ListStreamPoolsRequest>() { + @Override + public ListStreamPoolsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListStreamPoolsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListStreamPoolsRequest, ListStreamPoolsResponse>() { + @Override + public ListStreamPoolsResponse apply(ListStreamPoolsRequest request) { + return client.listStreamPools(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.streaming.model.StreamPoolSummary} objects + * contained in responses from the listStreamPools operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.streaming.model.StreamPoolSummary} objects + * contained in responses received from the service. + */ + public Iterable listStreamPoolsRecordIterator( + final ListStreamPoolsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListStreamPoolsRequest.Builder, ListStreamPoolsRequest, ListStreamPoolsResponse, + com.oracle.bmc.streaming.model.StreamPoolSummary>( + new com.google.common.base.Supplier() { + @Override + public ListStreamPoolsRequest.Builder get() { + return ListStreamPoolsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListStreamPoolsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListStreamPoolsRequest.Builder>, + ListStreamPoolsRequest>() { + @Override + public ListStreamPoolsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListStreamPoolsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListStreamPoolsRequest, ListStreamPoolsResponse>() { + @Override + public ListStreamPoolsResponse apply(ListStreamPoolsRequest request) { + return client.listStreamPools(request); + } + }, + new com.google.common.base.Function< + ListStreamPoolsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListStreamPoolsResponse response) { + return response.getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listStreams operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminWaiters.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminWaiters.java index 5cfc9752e0d..faff6b3867f 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminWaiters.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminWaiters.java @@ -22,12 +22,12 @@ public class StreamAdminWaiters { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetState the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance */ public com.oracle.bmc.waiter.Waiter forArchiver( GetArchiverRequest request, - com.oracle.bmc.streaming.model.ArchiverLifecycleState... targetStates) { + com.oracle.bmc.streaming.model.Archiver.LifecycleState... targetStates) { org.apache.commons.lang3.Validate.notEmpty( targetStates, "At least one targetState must be provided"); org.apache.commons.lang3.Validate.noNullElements( @@ -48,7 +48,7 @@ public com.oracle.bmc.waiter.Waiter for */ public com.oracle.bmc.waiter.Waiter forArchiver( GetArchiverRequest request, - com.oracle.bmc.streaming.model.ArchiverLifecycleState targetState, + com.oracle.bmc.streaming.model.Archiver.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { org.apache.commons.lang3.Validate.notNull(targetState, "The targetState cannot be null"); @@ -66,17 +66,17 @@ public com.oracle.bmc.waiter.Waiter for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter forArchiver( GetArchiverRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.streaming.model.ArchiverLifecycleState... targetStates) { + com.oracle.bmc.streaming.model.Archiver.LifecycleState... targetStates) { org.apache.commons.lang3.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); + targetStates, "At least one target state must be provided"); org.apache.commons.lang3.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); + targetStates, "Null target states are not permitted"); return forArchiver( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), @@ -88,9 +88,9 @@ public com.oracle.bmc.waiter.Waiter for private com.oracle.bmc.waiter.Waiter forArchiver( com.oracle.bmc.waiter.BmcGenericWaiter waiter, final GetArchiverRequest request, - final com.oracle.bmc.streaming.model.ArchiverLifecycleState... targetStates) { - final java.util.Set targetStatesSet = - new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + final com.oracle.bmc.streaming.model.Archiver.LifecycleState... targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, @@ -114,6 +114,110 @@ public boolean apply(GetArchiverResponse response) { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConnectHarness( + GetConnectHarnessRequest request, + com.oracle.bmc.streaming.model.ConnectHarness.LifecycleState... targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forConnectHarness( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConnectHarness( + GetConnectHarnessRequest request, + com.oracle.bmc.streaming.model.ConnectHarness.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + org.apache.commons.lang3.Validate.notNull(targetState, "The targetState cannot be null"); + + return forConnectHarness( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConnectHarness( + GetConnectHarnessRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.streaming.model.ConnectHarness.LifecycleState... targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forConnectHarness( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for ConnectHarness. + private com.oracle.bmc.waiter.Waiter + forConnectHarness( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetConnectHarnessRequest request, + final com.oracle.bmc.streaming.model.ConnectHarness.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + com.google.common.base.Suppliers.ofInstance(request), + new com.google.common.base.Function< + GetConnectHarnessRequest, GetConnectHarnessResponse>() { + @Override + public GetConnectHarnessResponse apply( + GetConnectHarnessRequest request) { + return client.getConnectHarness(request); + } + }, + new com.google.common.base.Predicate() { + @Override + public boolean apply(GetConnectHarnessResponse response) { + return targetStatesSet.contains( + response.getConnectHarness().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.streaming.model.ConnectHarness.LifecycleState + .Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -209,4 +313,101 @@ public boolean apply(GetStreamResponse response) { com.oracle.bmc.streaming.model.Stream.LifecycleState.Deleted)), request); } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forStreamPool( + GetStreamPoolRequest request, + com.oracle.bmc.streaming.model.StreamPool.LifecycleState... targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forStreamPool( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forStreamPool( + GetStreamPoolRequest request, + com.oracle.bmc.streaming.model.StreamPool.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + org.apache.commons.lang3.Validate.notNull(targetState, "The targetState cannot be null"); + + return forStreamPool( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forStreamPool( + GetStreamPoolRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.streaming.model.StreamPool.LifecycleState... targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forStreamPool( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for StreamPool. + private com.oracle.bmc.waiter.Waiter forStreamPool( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetStreamPoolRequest request, + final com.oracle.bmc.streaming.model.StreamPool.LifecycleState... targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + com.google.common.base.Suppliers.ofInstance(request), + new com.google.common.base.Function< + GetStreamPoolRequest, GetStreamPoolResponse>() { + @Override + public GetStreamPoolResponse apply(GetStreamPoolRequest request) { + return client.getStreamPool(request); + } + }, + new com.google.common.base.Predicate() { + @Override + public boolean apply(GetStreamPoolResponse response) { + return targetStatesSet.contains( + response.getStreamPool().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.streaming.model.StreamPool.LifecycleState.Deleted)), + request); + } } diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ChangeConnectHarnessCompartmentConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ChangeConnectHarnessCompartmentConverter.java new file mode 100644 index 00000000000..ad14cbfdb75 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ChangeConnectHarnessCompartmentConverter.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class ChangeConnectHarnessCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ChangeConnectHarnessCompartmentRequest interceptRequest( + ChangeConnectHarnessCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ChangeConnectHarnessCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getConnectHarnessId(), "connectHarnessId must not be blank"); + Validate.notNull( + request.getChangeConnectHarnessCompartmentDetails(), + "changeConnectHarnessCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("connectharnesses") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getConnectHarnessId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeConnectHarnessCompartmentResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeConnectHarnessCompartmentResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + ChangeConnectHarnessCompartmentResponse>() { + @Override + public ChangeConnectHarnessCompartmentResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ChangeConnectHarnessCompartmentResponse"); + 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(); + + ChangeConnectHarnessCompartmentResponse.Builder builder = + ChangeConnectHarnessCompartmentResponse.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)); + } + + ChangeConnectHarnessCompartmentResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ChangeStreamPoolCompartmentConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ChangeStreamPoolCompartmentConverter.java new file mode 100644 index 00000000000..452d35d34e8 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ChangeStreamPoolCompartmentConverter.java @@ -0,0 +1,106 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class ChangeStreamPoolCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ChangeStreamPoolCompartmentRequest interceptRequest( + ChangeStreamPoolCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ChangeStreamPoolCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getStreamPoolId(), "streamPoolId must not be blank"); + Validate.notNull( + request.getChangeStreamPoolCompartmentDetails(), + "changeStreamPoolCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("streampools") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getStreamPoolId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeStreamPoolCompartmentResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeStreamPoolCompartmentResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeStreamPoolCompartmentResponse>() { + @Override + public ChangeStreamPoolCompartmentResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ChangeStreamPoolCompartmentResponse"); + 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(); + + ChangeStreamPoolCompartmentResponse.Builder builder = + ChangeStreamPoolCompartmentResponse.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)); + } + + ChangeStreamPoolCompartmentResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateConnectHarnessConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateConnectHarnessConverter.java new file mode 100644 index 00000000000..a379b6e7b1e --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateConnectHarnessConverter.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class CreateConnectHarnessConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateConnectHarnessRequest interceptRequest( + CreateConnectHarnessRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, CreateConnectHarnessRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateConnectHarnessDetails(), + "createConnectHarnessDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20180418").path("connectharnesses"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, CreateConnectHarnessResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateConnectHarnessResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, CreateConnectHarnessResponse>() { + @Override + public CreateConnectHarnessResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CreateConnectHarnessResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + ConnectHarness>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + ConnectHarness.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateConnectHarnessResponse.Builder builder = + CreateConnectHarnessResponse.builder(); + + builder.connectHarness(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + 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)); + } + + CreateConnectHarnessResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateStreamPoolConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateStreamPoolConverter.java new file mode 100644 index 00000000000..e525d9c19bb --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateStreamPoolConverter.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class CreateStreamPoolConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateStreamPoolRequest interceptRequest(CreateStreamPoolRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, CreateStreamPoolRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateStreamPoolDetails(), "createStreamPoolDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20180418").path("streampools"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, CreateStreamPoolResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, CreateStreamPoolResponse>() { + @Override + public CreateStreamPoolResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CreateStreamPoolResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + StreamPool>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + StreamPool.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateStreamPoolResponse.Builder builder = + CreateStreamPoolResponse.builder(); + + builder.streamPool(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + 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)); + } + + CreateStreamPoolResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/DeleteConnectHarnessConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/DeleteConnectHarnessConverter.java new file mode 100644 index 00000000000..d27e14621bb --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/DeleteConnectHarnessConverter.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class DeleteConnectHarnessConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static DeleteConnectHarnessRequest interceptRequest( + DeleteConnectHarnessRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, DeleteConnectHarnessRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getConnectHarnessId(), "connectHarnessId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("connectharnesses") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getConnectHarnessId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteConnectHarnessResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteConnectHarnessResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteConnectHarnessResponse>() { + @Override + public DeleteConnectHarnessResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for DeleteConnectHarnessResponse"); + 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(); + + DeleteConnectHarnessResponse.Builder builder = + DeleteConnectHarnessResponse.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)); + } + + DeleteConnectHarnessResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/DeleteStreamPoolConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/DeleteStreamPoolConverter.java new file mode 100644 index 00000000000..574d7518a39 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/DeleteStreamPoolConverter.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class DeleteStreamPoolConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static DeleteStreamPoolRequest interceptRequest(DeleteStreamPoolRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, DeleteStreamPoolRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getStreamPoolId(), "streamPoolId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("streampools") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getStreamPoolId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteStreamPoolResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteStreamPoolResponse>() { + @Override + public DeleteStreamPoolResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for DeleteStreamPoolResponse"); + 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(); + + DeleteStreamPoolResponse.Builder builder = + DeleteStreamPoolResponse.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)); + } + + DeleteStreamPoolResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetConnectHarnessConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetConnectHarnessConverter.java new file mode 100644 index 00000000000..5e8d0912da6 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetConnectHarnessConverter.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class GetConnectHarnessConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetConnectHarnessRequest interceptRequest(GetConnectHarnessRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetConnectHarnessRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getConnectHarnessId(), "connectHarnessId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("connectharnesses") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getConnectHarnessId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetConnectHarnessResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetConnectHarnessResponse>() { + @Override + public GetConnectHarnessResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetConnectHarnessResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + ConnectHarness>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + ConnectHarness.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetConnectHarnessResponse.Builder builder = + GetConnectHarnessResponse.builder(); + + builder.connectHarness(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + 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)); + } + + GetConnectHarnessResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetStreamPoolConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetStreamPoolConverter.java new file mode 100644 index 00000000000..c5f0e06d87d --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetStreamPoolConverter.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class GetStreamPoolConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetStreamPoolRequest interceptRequest(GetStreamPoolRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetStreamPoolRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getStreamPoolId(), "streamPoolId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("streampools") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getStreamPoolId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, GetStreamPoolResponse>() { + @Override + public GetStreamPoolResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for GetStreamPoolResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + StreamPool>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + StreamPool.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetStreamPoolResponse.Builder builder = + GetStreamPoolResponse.builder(); + + builder.streamPool(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + 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)); + } + + GetStreamPoolResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ListConnectHarnessesConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ListConnectHarnessesConverter.java new file mode 100644 index 00000000000..a752ff70132 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ListConnectHarnessesConverter.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class ListConnectHarnessesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListConnectHarnessesRequest interceptRequest( + ListConnectHarnessesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListConnectHarnessesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20180418").path("connectharnesses"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getName() != null) { + target = + target.queryParam( + "name", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListConnectHarnessesResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListConnectHarnessesResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListConnectHarnessesResponse>() { + @Override + public ListConnectHarnessesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListConnectHarnessesResponse"); + 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< + ConnectHarnessSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListConnectHarnessesResponse.Builder builder = + ListConnectHarnessesResponse.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> + opcPrevPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-prev-page"); + if (opcPrevPageHeader.isPresent()) { + builder.opcPrevPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-prev-page", + opcPrevPageHeader.get().get(0), + String.class)); + } + + com.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)); + } + + ListConnectHarnessesResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ListStreamPoolsConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ListStreamPoolsConverter.java new file mode 100644 index 00000000000..298da973e20 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ListStreamPoolsConverter.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class ListStreamPoolsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListStreamPoolsRequest interceptRequest(ListStreamPoolsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListStreamPoolsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20180418").path("streampools"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getName() != null) { + target = + target.queryParam( + "name", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListStreamPoolsResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListStreamPoolsResponse>() { + @Override + public ListStreamPoolsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for ListStreamPoolsResponse"); + 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< + StreamPoolSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListStreamPoolsResponse.Builder builder = + ListStreamPoolsResponse.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> + opcPrevPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-prev-page"); + if (opcPrevPageHeader.isPresent()) { + builder.opcPrevPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-prev-page", + opcPrevPageHeader.get().get(0), + String.class)); + } + + com.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)); + } + + ListStreamPoolsResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ListStreamsConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ListStreamsConverter.java index 722745720ba..6341d38d5a8 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ListStreamsConverter.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/ListStreamsConverter.java @@ -35,6 +35,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getCompartmentId())); + if (request.getStreamPoolId() != null) { + target = + target.queryParam( + "streamPoolId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStreamPoolId())); + } + if (request.getId() != null) { target = target.queryParam( diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateConnectHarnessConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateConnectHarnessConverter.java new file mode 100644 index 00000000000..62bb1317bd4 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateConnectHarnessConverter.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class UpdateConnectHarnessConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateConnectHarnessRequest interceptRequest( + UpdateConnectHarnessRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, UpdateConnectHarnessRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getConnectHarnessId(), "connectHarnessId must not be blank"); + Validate.notNull( + request.getUpdateConnectHarnessDetails(), + "updateConnectHarnessDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("connectharnesses") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getConnectHarnessId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateConnectHarnessResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateConnectHarnessResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateConnectHarnessResponse>() { + @Override + public UpdateConnectHarnessResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for UpdateConnectHarnessResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + ConnectHarness>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + ConnectHarness.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + UpdateConnectHarnessResponse.Builder builder = + UpdateConnectHarnessResponse.builder(); + + builder.connectHarness(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + 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)); + } + + UpdateConnectHarnessResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateStreamPoolConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateStreamPoolConverter.java new file mode 100644 index 00000000000..9119870cd4f --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateStreamPoolConverter.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class UpdateStreamPoolConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateStreamPoolRequest interceptRequest(UpdateStreamPoolRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, UpdateStreamPoolRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getStreamPoolId(), "streamPoolId must not be blank"); + Validate.notNull( + request.getUpdateStreamPoolDetails(), "updateStreamPoolDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("streampools") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getStreamPoolId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateStreamPoolResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateStreamPoolResponse>() { + @Override + public UpdateStreamPoolResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for UpdateStreamPoolResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + StreamPool>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + StreamPool.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + UpdateStreamPoolResponse.Builder builder = + UpdateStreamPoolResponse.builder(); + + builder.streamPool(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + 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)); + } + + UpdateStreamPoolResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/Archiver.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/Archiver.java index d3c5b4036e0..36c96cf9cdb 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/Archiver.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/Archiver.java @@ -33,9 +33,9 @@ public Builder timeCreated(java.util.Date timeCreated) { } @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") - private ArchiverLifecycleState lifecycleState; + private LifecycleState lifecycleState; - public Builder lifecycleState(ArchiverLifecycleState lifecycleState) { + public Builder lifecycleState(LifecycleState lifecycleState) { this.lifecycleState = lifecycleState; this.__explicitlySet__.add("lifecycleState"); return this; @@ -142,12 +142,61 @@ public static Builder builder() { **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") java.util.Date timeCreated; + /** + * The state of the stream archiver. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Creating("CREATING"), + Stopped("STOPPED"), + Starting("STARTING"), + Running("RUNNING"), + Stopping("STOPPING"), + Updating("UPDATING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; /** * The state of the stream archiver. **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") - ArchiverLifecycleState lifecycleState; + LifecycleState lifecycleState; /** * The name of the bucket. @@ -179,9 +228,6 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverTimeInSeconds") Integer batchRolloverTimeInSeconds; - /** - * If an operation failed this property contained the last error occurred. - **/ @com.fasterxml.jackson.annotation.JsonProperty("error") ArchiverError error; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverLifecycleState.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverLifecycleState.java deleted file mode 100644 index c27989c23b8..00000000000 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverLifecycleState.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. - */ -package com.oracle.bmc.streaming.model; - -/** - * The state of the stream archiver. - **/ -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") -@lombok.extern.slf4j.Slf4j -public enum ArchiverLifecycleState { - Creating("CREATING"), - Stopped("STOPPED"), - Starting("STARTING"), - Running("RUNNING"), - Stopping("STOPPING"), - Updating("UPDATING"), - - /** - * This value is used if a service returns a value for this enum that is not recognized by this - * version of the SDK. - */ - UnknownEnumValue(null); - - private final String value; - private static java.util.Map map; - - static { - map = new java.util.HashMap<>(); - for (ArchiverLifecycleState v : ArchiverLifecycleState.values()) { - if (v != UnknownEnumValue) { - map.put(v.getValue(), v); - } - } - } - - ArchiverLifecycleState(String value) { - this.value = value; - } - - @com.fasterxml.jackson.annotation.JsonValue - public String getValue() { - return value; - } - - @com.fasterxml.jackson.annotation.JsonCreator - public static ArchiverLifecycleState create(String key) { - if (map.containsKey(key)) { - return map.get(key); - } - LOG.warn( - "Received unknown value '{}' for enum 'ArchiverLifecycleState', returning UnknownEnumValue", - key); - return UnknownEnumValue; - } -} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ChangeConnectHarnessCompartmentDetails.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ChangeConnectHarnessCompartmentDetails.java new file mode 100644 index 00000000000..4c3d70ef4b3 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ChangeConnectHarnessCompartmentDetails.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * Detailed representation of a change connect harness compartment operation. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeConnectHarnessCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ChangeConnectHarnessCompartmentDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeConnectHarnessCompartmentDetails build() { + ChangeConnectHarnessCompartmentDetails __instance__ = + new ChangeConnectHarnessCompartmentDetails(compartmentId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeConnectHarnessCompartmentDetails o) { + Builder copiedBuilder = compartmentId(o.getCompartmentId()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment + * into which the resource should be moved. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ChangeStreamPoolCompartmentDetails.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ChangeStreamPoolCompartmentDetails.java new file mode 100644 index 00000000000..4b736649e68 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ChangeStreamPoolCompartmentDetails.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * Detailed representation of a change stream pool compartment operation. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeStreamPoolCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ChangeStreamPoolCompartmentDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeStreamPoolCompartmentDetails build() { + ChangeStreamPoolCompartmentDetails __instance__ = + new ChangeStreamPoolCompartmentDetails(compartmentId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeStreamPoolCompartmentDetails o) { + Builder copiedBuilder = compartmentId(o.getCompartmentId()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment + * into which the resource should be moved. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ConnectHarness.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ConnectHarness.java new file mode 100644 index 00000000000..9feb74b2dc0 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ConnectHarness.java @@ -0,0 +1,251 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * Detailed representation of a connect harness. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ConnectHarness.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ConnectHarness { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private String lifecycleStateDetails; + + public Builder lifecycleStateDetails(String lifecycleStateDetails) { + this.lifecycleStateDetails = lifecycleStateDetails; + this.__explicitlySet__.add("lifecycleStateDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConnectHarness build() { + ConnectHarness __instance__ = + new ConnectHarness( + name, + id, + compartmentId, + lifecycleState, + lifecycleStateDetails, + timeCreated, + freeformTags, + definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ConnectHarness o) { + Builder copiedBuilder = + name(o.getName()) + .id(o.getId()) + .compartmentId(o.getCompartmentId()) + .lifecycleState(o.getLifecycleState()) + .lifecycleStateDetails(o.getLifecycleStateDetails()) + .timeCreated(o.getTimeCreated()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The name of the connect harness. Avoid entering confidential information. + *

+ * Example: `JDBCConnector` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + + /** + * The OCID of the connect harness. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The OCID of the compartment that contains the connect harness. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + /** + * The current state of the connect harness. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the connect harness. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * Any additional details about the current state of the connect harness. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + String lifecycleStateDetails; + + /** + * The date and time the connect harness was created, expressed in in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: `2018-04-20T00:00:07.405Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ConnectHarnessSummary.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ConnectHarnessSummary.java new file mode 100644 index 00000000000..b0b4d0072bb --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ConnectHarnessSummary.java @@ -0,0 +1,236 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * Summary representation of a ConnectHarness. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ConnectHarnessSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ConnectHarnessSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConnectHarnessSummary build() { + ConnectHarnessSummary __instance__ = + new ConnectHarnessSummary( + name, + id, + compartmentId, + lifecycleState, + timeCreated, + freeformTags, + definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ConnectHarnessSummary o) { + Builder copiedBuilder = + name(o.getName()) + .id(o.getId()) + .compartmentId(o.getCompartmentId()) + .lifecycleState(o.getLifecycleState()) + .timeCreated(o.getTimeCreated()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The name of the connect harness. + *

+ * Example: `TelemetryEvents` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + + /** + * The OCID of the connect harness. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The OCID of the compartment that contains the connect harness. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + /** + * The current state of the connect harness. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the connect harness. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * The date and time the connect harness was created, expressed in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: `2018-04-20T00:00:07.405Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateConnectHarnessDetails.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateConnectHarnessDetails.java new file mode 100644 index 00000000000..ddb9654953c --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateConnectHarnessDetails.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * Object used to create a connect harness. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateConnectHarnessDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateConnectHarnessDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateConnectHarnessDetails build() { + CreateConnectHarnessDetails __instance__ = + new CreateConnectHarnessDetails(name, compartmentId, freeformTags, definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateConnectHarnessDetails o) { + Builder copiedBuilder = + name(o.getName()) + .compartmentId(o.getCompartmentId()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The name of the connect harness. Avoid entering confidential information. + *

+ * Example: `JDBCConnector` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + + /** + * The OCID of the compartment that contains the connect harness. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateStreamDetails.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateStreamDetails.java index 690939af52d..233bb4750c8 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateStreamDetails.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateStreamDetails.java @@ -51,6 +51,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("streamPoolId") + private String streamPoolId; + + public Builder streamPoolId(String streamPoolId) { + this.streamPoolId = streamPoolId; + this.__explicitlySet__.add("streamPoolId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("retentionInHours") private Integer retentionInHours; @@ -88,6 +97,7 @@ public CreateStreamDetails build() { name, partitions, compartmentId, + streamPoolId, retentionInHours, freeformTags, definedTags); @@ -101,6 +111,7 @@ public Builder copy(CreateStreamDetails o) { name(o.getName()) .partitions(o.getPartitions()) .compartmentId(o.getCompartmentId()) + .streamPoolId(o.getStreamPoolId()) .retentionInHours(o.getRetentionInHours()) .freeformTags(o.getFreeformTags()) .definedTags(o.getDefinedTags()); @@ -138,6 +149,12 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") String compartmentId; + /** + * The OCID of the stream pool that contains the stream. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamPoolId") + String streamPoolId; + /** * The retention period of the stream, in hours. Accepted values are between 24 and 168 (7 days). * If not specified, the stream will have a retention period of 24 hours. diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateStreamPoolDetails.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateStreamPoolDetails.java new file mode 100644 index 00000000000..c7698a007fc --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateStreamPoolDetails.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * Object used to create a stream pool. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateStreamPoolDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateStreamPoolDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("kafkaSettings") + private KafkaSettings kafkaSettings; + + public Builder kafkaSettings(KafkaSettings kafkaSettings) { + this.kafkaSettings = kafkaSettings; + this.__explicitlySet__.add("kafkaSettings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateStreamPoolDetails build() { + CreateStreamPoolDetails __instance__ = + new CreateStreamPoolDetails( + compartmentId, name, kafkaSettings, freeformTags, definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateStreamPoolDetails o) { + Builder copiedBuilder = + compartmentId(o.getCompartmentId()) + .name(o.getName()) + .kafkaSettings(o.getKafkaSettings()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the compartment that contains the stream. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The name of the stream pool. Avoid entering confidential information. + *

+ * Example: `MyStreamPool` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + + @com.fasterxml.jackson.annotation.JsonProperty("kafkaSettings") + KafkaSettings kafkaSettings; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/KafkaSettings.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/KafkaSettings.java new file mode 100644 index 00000000000..01e2c8fd9fd --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/KafkaSettings.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * Settings for the Kafka compatibility layer. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = KafkaSettings.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class KafkaSettings { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("bootstrapServers") + private String bootstrapServers; + + public Builder bootstrapServers(String bootstrapServers) { + this.bootstrapServers = bootstrapServers; + this.__explicitlySet__.add("bootstrapServers"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autoCreateTopicsEnable") + private Boolean autoCreateTopicsEnable; + + public Builder autoCreateTopicsEnable(Boolean autoCreateTopicsEnable) { + this.autoCreateTopicsEnable = autoCreateTopicsEnable; + this.__explicitlySet__.add("autoCreateTopicsEnable"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("logRetentionHours") + private Integer logRetentionHours; + + public Builder logRetentionHours(Integer logRetentionHours) { + this.logRetentionHours = logRetentionHours; + this.__explicitlySet__.add("logRetentionHours"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("numPartitions") + private Integer numPartitions; + + public Builder numPartitions(Integer numPartitions) { + this.numPartitions = numPartitions; + this.__explicitlySet__.add("numPartitions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public KafkaSettings build() { + KafkaSettings __instance__ = + new KafkaSettings( + bootstrapServers, + autoCreateTopicsEnable, + logRetentionHours, + numPartitions); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(KafkaSettings o) { + Builder copiedBuilder = + bootstrapServers(o.getBootstrapServers()) + .autoCreateTopicsEnable(o.getAutoCreateTopicsEnable()) + .logRetentionHours(o.getLogRetentionHours()) + .numPartitions(o.getNumPartitions()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Bootstrap servers. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bootstrapServers") + String bootstrapServers; + + /** + * Enable auto creation of topic on the server. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoCreateTopicsEnable") + Boolean autoCreateTopicsEnable; + + /** + * The number of hours to keep a log file before deleting it (in hours). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("logRetentionHours") + Integer logRetentionHours; + + /** + * The default number of log partitions per topic. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numPartitions") + Integer numPartitions; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/Stream.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/Stream.java index da20733bbbd..5223be94959 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/Stream.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/Stream.java @@ -67,6 +67,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("streamPoolId") + private String streamPoolId; + + public Builder streamPoolId(String streamPoolId) { + this.streamPoolId = streamPoolId; + this.__explicitlySet__.add("streamPoolId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private LifecycleState lifecycleState; @@ -133,6 +142,7 @@ public Stream build() { partitions, retentionInHours, compartmentId, + streamPoolId, lifecycleState, lifecycleStateDetails, timeCreated, @@ -151,6 +161,7 @@ public Builder copy(Stream o) { .partitions(o.getPartitions()) .retentionInHours(o.getRetentionInHours()) .compartmentId(o.getCompartmentId()) + .streamPoolId(o.getStreamPoolId()) .lifecycleState(o.getLifecycleState()) .lifecycleStateDetails(o.getLifecycleStateDetails()) .timeCreated(o.getTimeCreated()) @@ -202,6 +213,12 @@ public static Builder builder() { **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") String compartmentId; + + /** + * The OCID of the stream pool that contains the stream. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamPoolId") + String streamPoolId; /** * The current state of the stream. **/ @@ -212,6 +229,7 @@ public enum LifecycleState { Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), + Updating("UPDATING"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/StreamPool.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/StreamPool.java new file mode 100644 index 00000000000..1b31125b370 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/StreamPool.java @@ -0,0 +1,263 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * The details of a stream pool. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = StreamPool.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class StreamPool { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private String lifecycleStateDetails; + + public Builder lifecycleStateDetails(String lifecycleStateDetails) { + this.lifecycleStateDetails = lifecycleStateDetails; + this.__explicitlySet__.add("lifecycleStateDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("kafkaSettings") + private KafkaSettings kafkaSettings; + + public Builder kafkaSettings(KafkaSettings kafkaSettings) { + this.kafkaSettings = kafkaSettings; + this.__explicitlySet__.add("kafkaSettings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public StreamPool build() { + StreamPool __instance__ = + new StreamPool( + id, + compartmentId, + name, + lifecycleState, + lifecycleStateDetails, + timeCreated, + kafkaSettings, + freeformTags, + definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(StreamPool o) { + Builder copiedBuilder = + id(o.getId()) + .compartmentId(o.getCompartmentId()) + .name(o.getName()) + .lifecycleState(o.getLifecycleState()) + .lifecycleStateDetails(o.getLifecycleStateDetails()) + .timeCreated(o.getTimeCreated()) + .kafkaSettings(o.getKafkaSettings()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the stream pool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * Compartment OCID that the pool belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The name of the stream pool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + /** + * The current state of the stream pool. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + Updating("UPDATING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the stream pool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * Any additional details about the current state of the stream. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + String lifecycleStateDetails; + + /** + * The date and time the stream pool was created, expressed in in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: `2018-04-20T00:00:07.405Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + @com.fasterxml.jackson.annotation.JsonProperty("kafkaSettings") + KafkaSettings kafkaSettings; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/StreamPoolSummary.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/StreamPoolSummary.java new file mode 100644 index 00000000000..2bc32ed7845 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/StreamPoolSummary.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * The summary representation of a stream pool. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = StreamPoolSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class StreamPoolSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public StreamPoolSummary build() { + StreamPoolSummary __instance__ = + new StreamPoolSummary( + id, + compartmentId, + name, + lifecycleState, + timeCreated, + freeformTags, + definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(StreamPoolSummary o) { + Builder copiedBuilder = + id(o.getId()) + .compartmentId(o.getCompartmentId()) + .name(o.getName()) + .lifecycleState(o.getLifecycleState()) + .timeCreated(o.getTimeCreated()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the stream pool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * Compartment OCID that the pool belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The name of the stream pool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + /** + * The current state of the stream pool. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + Updating("UPDATING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the stream pool. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * The date and time the stream pool was created, expressed in in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: `2018-04-20T00:00:07.405Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/StreamSummary.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/StreamSummary.java index d3c33428795..f4b9dbe4a62 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/StreamSummary.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/StreamSummary.java @@ -58,6 +58,15 @@ public Builder compartmentId(String compartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("streamPoolId") + private String streamPoolId; + + public Builder streamPoolId(String streamPoolId) { + this.streamPoolId = streamPoolId; + this.__explicitlySet__.add("streamPoolId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private LifecycleState lifecycleState; @@ -114,6 +123,7 @@ public StreamSummary build() { id, partitions, compartmentId, + streamPoolId, lifecycleState, timeCreated, messagesEndpoint, @@ -130,6 +140,7 @@ public Builder copy(StreamSummary o) { .id(o.getId()) .partitions(o.getPartitions()) .compartmentId(o.getCompartmentId()) + .streamPoolId(o.getStreamPoolId()) .lifecycleState(o.getLifecycleState()) .timeCreated(o.getTimeCreated()) .messagesEndpoint(o.getMessagesEndpoint()) @@ -174,6 +185,12 @@ public static Builder builder() { **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") String compartmentId; + + /** + * The OCID of the stream pool that contains the stream. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamPoolId") + String streamPoolId; /** * The current state of the stream. **/ @@ -184,6 +201,7 @@ public enum LifecycleState { Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), + Updating("UPDATING"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateConnectHarnessDetails.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateConnectHarnessDetails.java new file mode 100644 index 00000000000..3c2fde53888 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateConnectHarnessDetails.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * Object used to update a connect harness. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateConnectHarnessDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateConnectHarnessDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateConnectHarnessDetails build() { + UpdateConnectHarnessDetails __instance__ = + new UpdateConnectHarnessDetails(freeformTags, definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateConnectHarnessDetails o) { + Builder copiedBuilder = + freeformTags(o.getFreeformTags()).definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateStreamDetails.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateStreamDetails.java index a5f3d1d9f4a..b5b22e158f8 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateStreamDetails.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateStreamDetails.java @@ -24,6 +24,15 @@ public class UpdateStreamDetails { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @lombok.experimental.Accessors(fluent = true) public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("streamPoolId") + private String streamPoolId; + + public Builder streamPoolId(String streamPoolId) { + this.streamPoolId = streamPoolId; + this.__explicitlySet__.add("streamPoolId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") private java.util.Map freeformTags; @@ -47,7 +56,8 @@ public Builder definedTags( private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public UpdateStreamDetails build() { - UpdateStreamDetails __instance__ = new UpdateStreamDetails(freeformTags, definedTags); + UpdateStreamDetails __instance__ = + new UpdateStreamDetails(streamPoolId, freeformTags, definedTags); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -55,7 +65,9 @@ public UpdateStreamDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(UpdateStreamDetails o) { Builder copiedBuilder = - freeformTags(o.getFreeformTags()).definedTags(o.getDefinedTags()); + streamPoolId(o.getStreamPoolId()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -69,6 +81,13 @@ public static Builder builder() { return new Builder(); } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the stream pool where the stream should be moved. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("streamPoolId") + String streamPoolId; + /** * Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateStreamPoolDetails.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateStreamPoolDetails.java new file mode 100644 index 00000000000..97a86720ae5 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateStreamPoolDetails.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * Object used to update the stream pool's details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateStreamPoolDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateStreamPoolDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("kafkaSettings") + private KafkaSettings kafkaSettings; + + public Builder kafkaSettings(KafkaSettings kafkaSettings) { + this.kafkaSettings = kafkaSettings; + this.__explicitlySet__.add("kafkaSettings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateStreamPoolDetails build() { + UpdateStreamPoolDetails __instance__ = + new UpdateStreamPoolDetails(kafkaSettings, freeformTags, definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateStreamPoolDetails o) { + Builder copiedBuilder = + kafkaSettings(o.getKafkaSettings()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + @com.fasterxml.jackson.annotation.JsonProperty("kafkaSettings") + KafkaSettings kafkaSettings; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ChangeConnectHarnessCompartmentRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ChangeConnectHarnessCompartmentRequest.java new file mode 100644 index 00000000000..62996bc4443 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ChangeConnectHarnessCompartmentRequest.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ChangeConnectHarnessCompartmentRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the connect harness. + * + */ + private String connectHarnessId; + + /** + * The connect harness will be moved into the compartment specified within this entity. + */ + private ChangeConnectHarnessCompartmentDetails changeConnectHarnessCompartmentDetails; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeConnectHarnessCompartmentRequest o) { + connectHarnessId(o.getConnectHarnessId()); + changeConnectHarnessCompartmentDetails(o.getChangeConnectHarnessCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeConnectHarnessCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeConnectHarnessCompartmentRequest + */ + public ChangeConnectHarnessCompartmentRequest build() { + ChangeConnectHarnessCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ChangeStreamCompartmentRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ChangeStreamCompartmentRequest.java index 0a0bf9e79b8..3b3987932ae 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ChangeStreamCompartmentRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ChangeStreamCompartmentRequest.java @@ -11,7 +11,8 @@ public class ChangeStreamCompartmentRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the stream to change compatment for. + * The OCID of the stream. + * */ private String streamId; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ChangeStreamPoolCompartmentRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ChangeStreamPoolCompartmentRequest.java new file mode 100644 index 00000000000..dee64d1ef07 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ChangeStreamPoolCompartmentRequest.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ChangeStreamPoolCompartmentRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the stream pool. + * + */ + private String streamPoolId; + + /** + * The stream pool will be moved into the compartment specified within this entity. + */ + private ChangeStreamPoolCompartmentDetails changeStreamPoolCompartmentDetails; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeStreamPoolCompartmentRequest o) { + streamPoolId(o.getStreamPoolId()); + changeStreamPoolCompartmentDetails(o.getChangeStreamPoolCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeStreamPoolCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeStreamPoolCompartmentRequest + */ + public ChangeStreamPoolCompartmentRequest build() { + ChangeStreamPoolCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ConsumerCommitRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ConsumerCommitRequest.java index e415c85737a..31f3dcc0005 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ConsumerCommitRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ConsumerCommitRequest.java @@ -11,7 +11,8 @@ public class ConsumerCommitRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the stream for which the group is committing offsets. + * The OCID of the stream. + * */ private String streamId; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ConsumerHeartbeatRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ConsumerHeartbeatRequest.java index aeec2aa1151..7ed8bfa62d8 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ConsumerHeartbeatRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ConsumerHeartbeatRequest.java @@ -11,7 +11,8 @@ public class ConsumerHeartbeatRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the stream for which the group is committing offsets. + * The OCID of the stream. + * */ private String streamId; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateConnectHarnessRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateConnectHarnessRequest.java new file mode 100644 index 00000000000..2d3d0aa85d7 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateConnectHarnessRequest.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CreateConnectHarnessRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The connect harness to create. + */ + private CreateConnectHarnessDetails createConnectHarnessDetails; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). + */ + private String opcRetryToken; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateConnectHarnessRequest o) { + createConnectHarnessDetails(o.getCreateConnectHarnessDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateConnectHarnessRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateConnectHarnessRequest + */ + public CreateConnectHarnessRequest build() { + CreateConnectHarnessRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateCursorRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateCursorRequest.java index 40a827c8eac..9a4a46159d7 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateCursorRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateCursorRequest.java @@ -11,7 +11,8 @@ public class CreateCursorRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the stream to create a cursor for. + * The OCID of the stream. + * */ private String streamId; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateGroupCursorRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateGroupCursorRequest.java index 8cc19508767..694d720d852 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateGroupCursorRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateGroupCursorRequest.java @@ -11,7 +11,8 @@ public class CreateGroupCursorRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the stream to create a cursor for. + * The OCID of the stream. + * */ private String streamId; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateStreamPoolRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateStreamPoolRequest.java new file mode 100644 index 00000000000..5095d1929c6 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateStreamPoolRequest.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CreateStreamPoolRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The stream pool to create. + */ + private CreateStreamPoolDetails createStreamPoolDetails; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). + */ + private String opcRetryToken; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateStreamPoolRequest o) { + createStreamPoolDetails(o.getCreateStreamPoolDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateStreamPoolRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateStreamPoolRequest + */ + public CreateStreamPoolRequest build() { + CreateStreamPoolRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteConnectHarnessRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteConnectHarnessRequest.java new file mode 100644 index 00000000000..45558f772cd --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteConnectHarnessRequest.java @@ -0,0 +1,89 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class DeleteConnectHarnessRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the connect harness. + * + */ + private String connectHarnessId; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteConnectHarnessRequest o) { + connectHarnessId(o.getConnectHarnessId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteConnectHarnessRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteConnectHarnessRequest + */ + public DeleteConnectHarnessRequest build() { + DeleteConnectHarnessRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteStreamPoolRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteStreamPoolRequest.java new file mode 100644 index 00000000000..7eed3a179b1 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteStreamPoolRequest.java @@ -0,0 +1,89 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class DeleteStreamPoolRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the stream pool. + * + */ + private String streamPoolId; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteStreamPoolRequest o) { + streamPoolId(o.getStreamPoolId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteStreamPoolRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteStreamPoolRequest + */ + public DeleteStreamPoolRequest build() { + DeleteStreamPoolRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteStreamRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteStreamRequest.java index c4859d78c7e..12e92e4d90a 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteStreamRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteStreamRequest.java @@ -11,7 +11,8 @@ public class DeleteStreamRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the stream to delete. + * The OCID of the stream. + * */ private String streamId; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetConnectHarnessRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetConnectHarnessRequest.java new file mode 100644 index 00000000000..9f8a62dfb17 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetConnectHarnessRequest.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetConnectHarnessRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the connect harness. + * + */ + private String connectHarnessId; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetConnectHarnessRequest o) { + connectHarnessId(o.getConnectHarnessId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetConnectHarnessRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetConnectHarnessRequest + */ + public GetConnectHarnessRequest build() { + GetConnectHarnessRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetGroupRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetGroupRequest.java index f931a195cf3..fa4214656c5 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetGroupRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetGroupRequest.java @@ -11,7 +11,8 @@ public class GetGroupRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the stream, on which the group is operating. + * The OCID of the stream. + * */ private String streamId; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetMessagesRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetMessagesRequest.java index 5b17a38fb15..de4ec8678e7 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetMessagesRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetMessagesRequest.java @@ -11,7 +11,8 @@ public class GetMessagesRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the stream to get messages from. + * The OCID of the stream. + * */ private String streamId; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetStreamPoolRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetStreamPoolRequest.java new file mode 100644 index 00000000000..a8b50b8278d --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetStreamPoolRequest.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetStreamPoolRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the stream pool. + * + */ + private String streamPoolId; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetStreamPoolRequest o) { + streamPoolId(o.getStreamPoolId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetStreamPoolRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetStreamPoolRequest + */ + public GetStreamPoolRequest build() { + GetStreamPoolRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetStreamRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetStreamRequest.java index 8c1cbb7a9e5..ec81f6f84b7 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetStreamRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetStreamRequest.java @@ -11,7 +11,8 @@ public class GetStreamRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the stream to retrieve. + * The OCID of the stream. + * */ private String streamId; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ListConnectHarnessesRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ListConnectHarnessesRequest.java new file mode 100644 index 00000000000..56c28538b9d --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ListConnectHarnessesRequest.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListConnectHarnessesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compartment. + */ + private String compartmentId; + + /** + * A filter to return only resources that match the given ID exactly. + * + */ + private String id; + + /** + * A filter to return only resources that match the given name exactly. + * + */ + private String name; + + /** + * The maximum number of items to return. The value must be between 1 and 50. The default is 10. + */ + private Integer limit; + + /** + * The page at which to start retrieving results. + */ + private String page; + + /** + * The field to sort by. You can provide no more than one sort order. By default, `TIMECREATED` sorts results in descending order and `NAME` sorts results in ascending order. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide no more than one sort order. By default, `TIMECREATED` sorts results in descending order and `NAME` sorts results in ascending order. + * + **/ + public enum SortBy { + Name("NAME"), + Timecreated("TIMECREATED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either 'asc' or 'desc'. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private ConnectHarnessSummary.LifecycleState lifecycleState; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListConnectHarnessesRequest o) { + compartmentId(o.getCompartmentId()); + id(o.getId()); + name(o.getName()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListConnectHarnessesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListConnectHarnessesRequest + */ + public ListConnectHarnessesRequest build() { + ListConnectHarnessesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ListStreamPoolsRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ListStreamPoolsRequest.java new file mode 100644 index 00000000000..0a445d506aa --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ListStreamPoolsRequest.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListStreamPoolsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compartment. + */ + private String compartmentId; + + /** + * A filter to return only resources that match the given ID exactly. + * + */ + private String id; + + /** + * A filter to return only resources that match the given name exactly. + * + */ + private String name; + + /** + * The maximum number of items to return. The value must be between 1 and 50. The default is 10. + */ + private Integer limit; + + /** + * The page at which to start retrieving results. + */ + private String page; + + /** + * The field to sort by. You can provide no more than one sort order. By default, `TIMECREATED` sorts results in descending order and `NAME` sorts results in ascending order. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide no more than one sort order. By default, `TIMECREATED` sorts results in descending order and `NAME` sorts results in ascending order. + * + **/ + public enum SortBy { + Name("NAME"), + Timecreated("TIMECREATED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either 'asc' or 'desc'. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private StreamPoolSummary.LifecycleState lifecycleState; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListStreamPoolsRequest o) { + compartmentId(o.getCompartmentId()); + id(o.getId()); + name(o.getName()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListStreamPoolsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListStreamPoolsRequest + */ + public ListStreamPoolsRequest build() { + ListStreamPoolsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ListStreamsRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ListStreamsRequest.java index 915b02519a7..ecbd25a7349 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ListStreamsRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/ListStreamsRequest.java @@ -15,6 +15,11 @@ public class ListStreamsRequest extends com.oracle.bmc.requests.BmcRequest { */ private String compartmentId; + /** + * The OCID of the stream pool. + */ + private String streamPoolId; + /** * A filter to return only resources that match the given ID exactly. * @@ -170,6 +175,7 @@ public Builder retryConfiguration( */ public Builder copy(ListStreamsRequest o) { compartmentId(o.getCompartmentId()); + streamPoolId(o.getStreamPoolId()); id(o.getId()); name(o.getName()); limit(o.getLimit()); diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/PutMessagesRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/PutMessagesRequest.java index bf5ae78b126..5cea0fa81be 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/PutMessagesRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/PutMessagesRequest.java @@ -11,7 +11,8 @@ public class PutMessagesRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the stream where you want to put messages. + * The OCID of the stream. + * */ private String streamId; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateConnectHarnessRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateConnectHarnessRequest.java new file mode 100644 index 00000000000..fc53fb9abf5 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateConnectHarnessRequest.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class UpdateConnectHarnessRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the connect harness. + * + */ + private String connectHarnessId; + + /** + * The connect harness is updated with the tags provided. + */ + private UpdateConnectHarnessDetails updateConnectHarnessDetails; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateConnectHarnessRequest o) { + connectHarnessId(o.getConnectHarnessId()); + updateConnectHarnessDetails(o.getUpdateConnectHarnessDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateConnectHarnessRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateConnectHarnessRequest + */ + public UpdateConnectHarnessRequest build() { + UpdateConnectHarnessRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateGroupRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateGroupRequest.java index 9e31517de20..ac0e71d22d9 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateGroupRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateGroupRequest.java @@ -11,7 +11,8 @@ public class UpdateGroupRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the stream, on which the group is operating. + * The OCID of the stream. + * */ private String streamId; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateStreamPoolRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateStreamPoolRequest.java new file mode 100644 index 00000000000..84c02e6c588 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateStreamPoolRequest.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class UpdateStreamPoolRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the stream pool. + * + */ + private String streamPoolId; + + /** + * The pool is updated with the provided fields. + */ + private UpdateStreamPoolDetails updateStreamPoolDetails; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateStreamPoolRequest o) { + streamPoolId(o.getStreamPoolId()); + updateStreamPoolDetails(o.getUpdateStreamPoolDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateStreamPoolRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateStreamPoolRequest + */ + public UpdateStreamPoolRequest build() { + UpdateStreamPoolRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateStreamRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateStreamRequest.java index 98fa887d5ed..8281afb5c56 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateStreamRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateStreamRequest.java @@ -11,12 +11,13 @@ public class UpdateStreamRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the stream to update. + * The OCID of the stream. + * */ private String streamId; /** - * The stream is updated with the tags provided. + * The stream is updated with the values provided. */ private UpdateStreamDetails updateStreamDetails; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/ChangeConnectHarnessCompartmentResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/ChangeConnectHarnessCompartmentResponse.java new file mode 100644 index 00000000000..193e52ee229 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/ChangeConnectHarnessCompartmentResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ChangeConnectHarnessCompartmentResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeConnectHarnessCompartmentResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/ChangeStreamPoolCompartmentResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/ChangeStreamPoolCompartmentResponse.java new file mode 100644 index 00000000000..95182826c57 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/ChangeStreamPoolCompartmentResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ChangeStreamPoolCompartmentResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeStreamPoolCompartmentResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateConnectHarnessResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateConnectHarnessResponse.java new file mode 100644 index 00000000000..c273e284a21 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateConnectHarnessResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateConnectHarnessResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned ConnectHarness instance. + */ + private ConnectHarness connectHarness; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateConnectHarnessResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + connectHarness(o.getConnectHarness()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateStreamPoolResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateStreamPoolResponse.java new file mode 100644 index 00000000000..ef515c50479 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateStreamPoolResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateStreamPoolResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned StreamPool instance. + */ + private StreamPool streamPool; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateStreamPoolResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + streamPool(o.getStreamPool()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/DeleteConnectHarnessResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/DeleteConnectHarnessResponse.java new file mode 100644 index 00000000000..d1771a6c1eb --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/DeleteConnectHarnessResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteConnectHarnessResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteConnectHarnessResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/DeleteStreamPoolResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/DeleteStreamPoolResponse.java new file mode 100644 index 00000000000..54e5431e951 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/DeleteStreamPoolResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteStreamPoolResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteStreamPoolResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetConnectHarnessResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetConnectHarnessResponse.java new file mode 100644 index 00000000000..e6eacd6381f --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetConnectHarnessResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetConnectHarnessResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned ConnectHarness instance. + */ + private ConnectHarness connectHarness; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetConnectHarnessResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + connectHarness(o.getConnectHarness()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetStreamPoolResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetStreamPoolResponse.java new file mode 100644 index 00000000000..02581113b4a --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetStreamPoolResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetStreamPoolResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned StreamPool instance. + */ + private StreamPool streamPool; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetStreamPoolResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + streamPool(o.getStreamPool()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/ListConnectHarnessesResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/ListConnectHarnessesResponse.java new file mode 100644 index 00000000000..da02204b59a --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/ListConnectHarnessesResponse.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListConnectHarnessesResponse { + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, previous pages of results exist. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcPrevPage; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A list of ConnectHarnessSummary instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListConnectHarnessesResponse o) { + opcNextPage(o.getOpcNextPage()); + opcPrevPage(o.getOpcPrevPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/ListStreamPoolsResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/ListStreamPoolsResponse.java new file mode 100644 index 00000000000..1fca3d6d177 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/ListStreamPoolsResponse.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListStreamPoolsResponse { + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, previous pages of results exist. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcPrevPage; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A list of StreamPoolSummary instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListStreamPoolsResponse o) { + opcNextPage(o.getOpcNextPage()); + opcPrevPage(o.getOpcPrevPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateConnectHarnessResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateConnectHarnessResponse.java new file mode 100644 index 00000000000..e1accc339e4 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateConnectHarnessResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateConnectHarnessResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned ConnectHarness instance. + */ + private ConnectHarness connectHarness; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateConnectHarnessResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + connectHarness(o.getConnectHarness()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateStreamPoolResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateStreamPoolResponse.java new file mode 100644 index 00000000000..d968718335f --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateStreamPoolResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateStreamPoolResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned StreamPool instance. + */ + private StreamPool streamPool; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateStreamPoolResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + streamPool(o.getStreamPool()); + + return this; + } + } +} diff --git a/bmc-waas/pom.xml b/bmc-waas/pom.xml index 29f8b5a7f6b..15f0a15c1ff 100644 --- a/bmc-waas/pom.xml +++ b/bmc-waas/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-waas @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/bmc-workrequests/pom.xml b/bmc-workrequests/pom.xml index cf5e6b5c607..30370677adf 100644 --- a/bmc-workrequests/pom.xml +++ b/bmc-workrequests/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 ../pom.xml oci-java-sdk-workrequests @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.10.0 + 1.11.0 diff --git a/pom.xml b/pom.xml index 606219255b6..acaf23c8450 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.oracle.oci.sdk oci-java-sdk - 1.10.0 + 1.11.0 pom Oracle Cloud Infrastructure SDK This project contains the SDK used for Oracle Cloud Infrastructure