diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml
index 04e4063f52aa..6d1265ec78f1 100644
--- a/.github/workflows/hermetic_library_generation.yaml
+++ b/.github/workflows/hermetic_library_generation.yaml
@@ -37,7 +37,7 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
- - uses: googleapis/sdk-platform-java/.github/scripts@v2.62.1
+ - uses: googleapis/sdk-platform-java/.github/scripts@v2.62.2
if: env.SHOULD_RUN == 'true'
with:
base_ref: ${{ github.base_ref }}
diff --git a/generation_config.yaml b/generation_config.yaml
index 3a9aa5852f4b..97397826c314 100644
--- a/generation_config.yaml
+++ b/generation_config.yaml
@@ -1,6 +1,6 @@
-gapic_generator_version: 2.62.1
-googleapis_commitish: 9978d435df71bb16ecadd1e4421640748d0bf533
-libraries_bom_version: 26.67.0
+gapic_generator_version: 2.62.2
+googleapis_commitish: 3acfdb6166a7101691cdf812bf8f8a67a2084fde
+libraries_bom_version: 26.68.0
# the libraries are ordered with respect to library name, which is
# java-{library.library_name} or java-{library.api-shortname} when
diff --git a/java-accessapproval/README.md b/java-accessapproval/README.md
index b054903e3bc0..3fdabe5ecb16 100644
--- a/java-accessapproval/README.md
+++ b/java-accessapproval/README.md
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
+ * If true, the model server will be isolated from the external internet. + *+ * + *
bool private_model_server_enabled = 30;
+ *
+ * @return The privateModelServerEnabled.
+ */
+ @java.lang.Override
+ public boolean getPrivateModelServerEnabled() {
+ return privateModelServerEnabled_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -1479,6 +1498,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (((bitField0_ & 0x00000040) != 0)) {
output.writeMessage(29, getGenAiAdvancedFeaturesConfig());
}
+ if (privateModelServerEnabled_ != false) {
+ output.writeBool(30, privateModelServerEnabled_);
+ }
getUnknownFields().writeTo(output);
}
@@ -1575,6 +1597,9 @@ public int getSerializedSize() {
com.google.protobuf.CodedOutputStream.computeMessageSize(
29, getGenAiAdvancedFeaturesConfig());
}
+ if (privateModelServerEnabled_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(30, privateModelServerEnabled_);
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -1637,6 +1662,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getGenAiAdvancedFeaturesConfig().equals(other.getGenAiAdvancedFeaturesConfig()))
return false;
}
+ if (getPrivateModelServerEnabled() != other.getPrivateModelServerEnabled()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1710,6 +1736,8 @@ public int hashCode() {
hash = (37 * hash) + GEN_AI_ADVANCED_FEATURES_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getGenAiAdvancedFeaturesConfig().hashCode();
}
+ hash = (37 * hash) + PRIVATE_MODEL_SERVER_ENABLED_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPrivateModelServerEnabled());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -1948,6 +1976,7 @@ public Builder clear() {
genAiAdvancedFeaturesConfigBuilder_.dispose();
genAiAdvancedFeaturesConfigBuilder_ = null;
}
+ privateModelServerEnabled_ = false;
return this;
}
@@ -2080,6 +2109,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.Endpoint result) {
: genAiAdvancedFeaturesConfigBuilder_.build();
to_bitField0_ |= 0x00000040;
}
+ if (((from_bitField0_ & 0x00200000) != 0)) {
+ result.privateModelServerEnabled_ = privateModelServerEnabled_;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -2227,6 +2259,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.Endpoint other) {
if (other.hasGenAiAdvancedFeaturesConfig()) {
mergeGenAiAdvancedFeaturesConfig(other.getGenAiAdvancedFeaturesConfig());
}
+ if (other.getPrivateModelServerEnabled() != false) {
+ setPrivateModelServerEnabled(other.getPrivateModelServerEnabled());
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -2403,6 +2438,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00100000;
break;
} // case 234
+ case 240:
+ {
+ privateModelServerEnabled_ = input.readBool();
+ bitField0_ |= 0x00200000;
+ break;
+ } // case 240
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -6115,6 +6156,62 @@ public Builder clearGenAiAdvancedFeaturesConfig() {
return genAiAdvancedFeaturesConfigBuilder_;
}
+ private boolean privateModelServerEnabled_;
+
+ /**
+ *
+ *
+ * + * If true, the model server will be isolated from the external internet. + *+ * + *
bool private_model_server_enabled = 30;
+ *
+ * @return The privateModelServerEnabled.
+ */
+ @java.lang.Override
+ public boolean getPrivateModelServerEnabled() {
+ return privateModelServerEnabled_;
+ }
+
+ /**
+ *
+ *
+ * + * If true, the model server will be isolated from the external internet. + *+ * + *
bool private_model_server_enabled = 30;
+ *
+ * @param value The privateModelServerEnabled to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPrivateModelServerEnabled(boolean value) {
+
+ privateModelServerEnabled_ = value;
+ bitField0_ |= 0x00200000;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * If true, the model server will be isolated from the external internet. + *+ * + *
bool private_model_server_enabled = 30;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPrivateModelServerEnabled() {
+ bitField0_ = (bitField0_ & ~0x00200000);
+ privateModelServerEnabled_ = false;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java
index c646c5cba9e1..6aa608c87805 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java
@@ -921,4 +921,17 @@ java.lang.String getLabelsOrDefault(
*/
com.google.cloud.aiplatform.v1.GenAiAdvancedFeaturesConfigOrBuilder
getGenAiAdvancedFeaturesConfigOrBuilder();
+
+ /**
+ *
+ *
+ * + * If true, the model server will be isolated from the external internet. + *+ * + *
bool private_model_server_enabled = 30;
+ *
+ * @return The privateModelServerEnabled.
+ */
+ boolean getPrivateModelServerEnabled();
}
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java
index 33fcd228d899..d3fd21a7fd0f 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java
@@ -104,7 +104,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "ource.proto\0320google/cloud/aiplatform/v1/encryption_spec.proto\032,google/cloud/aipl"
+ "atform/v1/explanation.proto\032#google/cloud/aiplatform/v1/io.proto\0322google/cloud/a"
+ "iplatform/v1/machine_resources.proto\0323google/cloud/aiplatform/v1/service_network"
- + "ing.proto\032\036google/protobuf/duration.proto\032\037google/protobuf/timestamp.proto\"\346\013\n"
+ + "ing.proto\032\036google/protobuf/duration.proto\032\037google/protobuf/timestamp.proto\"\214\014\n"
+ "\010Endpoint\022\021\n"
+ "\004name\030\001 \001(\tB\003\340A\003\022\031\n"
+ "\014display_name\030\002 \001(\tB\003\340A\002\022\023\n"
@@ -136,21 +136,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "satisfies_pzs\030\033 \001(\010B\003\340A\003\022\032\n\r"
+ "satisfies_pzi\030\034 \001(\010B\003\340A\003\022e\n"
+ "\037gen_ai_advanced_features_config\030\035 \001("
- + "\01327.google.cloud.aiplatform.v1.GenAiAdvancedFeaturesConfigB\003\340A\001\0323\n"
+ + "\01327.google.cloud.aiplatform.v1.GenAiAdvancedFeaturesConfigB\003\340A\001\022$\n"
+ + "\034private_model_server_enabled\030\036 \001(\010\0323\n"
+ "\021TrafficSplitEntry\022\013\n"
+ "\003key\030\001 \001(\t\022\r\n"
+ "\005value\030\002 \001(\005:\0028\001\032-\n"
+ "\013LabelsEntry\022\013\n"
+ "\003key\030\001 \001(\t\022\r\n"
+ "\005value\030\002 \001(\t:\0028\001:\265\001\352A\261\001\n"
- + "\"aiplatform.googleapis.com/Endpoint\022+ * If true, the model server will be isolated from the external internet. + *+ * + *
bool private_model_server_enabled = 30;
+ *
+ * @return The privateModelServerEnabled.
+ */
+ @java.lang.Override
+ public boolean getPrivateModelServerEnabled() {
+ return privateModelServerEnabled_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -1486,6 +1505,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (((bitField0_ & 0x00000040) != 0)) {
output.writeMessage(29, getGenAiAdvancedFeaturesConfig());
}
+ if (privateModelServerEnabled_ != false) {
+ output.writeBool(30, privateModelServerEnabled_);
+ }
getUnknownFields().writeTo(output);
}
@@ -1582,6 +1604,9 @@ public int getSerializedSize() {
com.google.protobuf.CodedOutputStream.computeMessageSize(
29, getGenAiAdvancedFeaturesConfig());
}
+ if (privateModelServerEnabled_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(30, privateModelServerEnabled_);
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -1645,6 +1670,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getGenAiAdvancedFeaturesConfig().equals(other.getGenAiAdvancedFeaturesConfig()))
return false;
}
+ if (getPrivateModelServerEnabled() != other.getPrivateModelServerEnabled()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1718,6 +1744,8 @@ public int hashCode() {
hash = (37 * hash) + GEN_AI_ADVANCED_FEATURES_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getGenAiAdvancedFeaturesConfig().hashCode();
}
+ hash = (37 * hash) + PRIVATE_MODEL_SERVER_ENABLED_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPrivateModelServerEnabled());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -1956,6 +1984,7 @@ public Builder clear() {
genAiAdvancedFeaturesConfigBuilder_.dispose();
genAiAdvancedFeaturesConfigBuilder_ = null;
}
+ privateModelServerEnabled_ = false;
return this;
}
@@ -2088,6 +2117,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.Endpoint result)
: genAiAdvancedFeaturesConfigBuilder_.build();
to_bitField0_ |= 0x00000040;
}
+ if (((from_bitField0_ & 0x00200000) != 0)) {
+ result.privateModelServerEnabled_ = privateModelServerEnabled_;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -2235,6 +2267,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Endpoint other) {
if (other.hasGenAiAdvancedFeaturesConfig()) {
mergeGenAiAdvancedFeaturesConfig(other.getGenAiAdvancedFeaturesConfig());
}
+ if (other.getPrivateModelServerEnabled() != false) {
+ setPrivateModelServerEnabled(other.getPrivateModelServerEnabled());
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -2412,6 +2447,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00100000;
break;
} // case 234
+ case 240:
+ {
+ privateModelServerEnabled_ = input.readBool();
+ bitField0_ |= 0x00200000;
+ break;
+ } // case 240
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -6131,6 +6172,62 @@ public Builder clearGenAiAdvancedFeaturesConfig() {
return genAiAdvancedFeaturesConfigBuilder_;
}
+ private boolean privateModelServerEnabled_;
+
+ /**
+ *
+ *
+ * + * If true, the model server will be isolated from the external internet. + *+ * + *
bool private_model_server_enabled = 30;
+ *
+ * @return The privateModelServerEnabled.
+ */
+ @java.lang.Override
+ public boolean getPrivateModelServerEnabled() {
+ return privateModelServerEnabled_;
+ }
+
+ /**
+ *
+ *
+ * + * If true, the model server will be isolated from the external internet. + *+ * + *
bool private_model_server_enabled = 30;
+ *
+ * @param value The privateModelServerEnabled to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPrivateModelServerEnabled(boolean value) {
+
+ privateModelServerEnabled_ = value;
+ bitField0_ |= 0x00200000;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * If true, the model server will be isolated from the external internet. + *+ * + *
bool private_model_server_enabled = 30;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPrivateModelServerEnabled() {
+ bitField0_ = (bitField0_ & ~0x00200000);
+ privateModelServerEnabled_ = false;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java
index 021636a62e0a..bf9f1007ee2f 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java
@@ -924,4 +924,17 @@ java.lang.String getLabelsOrDefault(
*/
com.google.cloud.aiplatform.v1beta1.GenAiAdvancedFeaturesConfigOrBuilder
getGenAiAdvancedFeaturesConfigOrBuilder();
+
+ /**
+ *
+ *
+ * + * If true, the model server will be isolated from the external internet. + *+ * + *
bool private_model_server_enabled = 30;
+ *
+ * @return The privateModelServerEnabled.
+ */
+ boolean getPrivateModelServerEnabled();
}
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java
index e375420d3e59..f0f2d4fd6ac4 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java
@@ -112,7 +112,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "ogle/cloud/aiplatform/v1beta1/explanation.proto\032(google/cloud/aiplatform/v1beta1"
+ "/io.proto\0327google/cloud/aiplatform/v1beta1/machine_resources.proto\0328google/cloud"
+ "/aiplatform/v1beta1/service_networking.p"
- + "roto\032\036google/protobuf/duration.proto\032\037google/protobuf/timestamp.proto\"\216\014\n"
+ + "roto\032\036google/protobuf/duration.proto\032\037google/protobuf/timestamp.proto\"\264\014\n"
+ "\010Endpoint\022\021\n"
+ "\004name\030\001 \001(\tB\003\340A\003\022\031\n"
+ "\014display_name\030\002 \001(\tB\003\340A\002\022\023\n"
@@ -145,21 +145,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "satisfies_pzs\030\033 \001(\010B\003\340A\003\022\032\n\r"
+ "satisfies_pzi\030\034 \001(\010B\003\340A\003\022j\n"
+ "\037gen_ai_advanced_features_config\030\035 \001(\0132<.google"
- + ".cloud.aiplatform.v1beta1.GenAiAdvancedFeaturesConfigB\003\340A\001\0323\n"
+ + ".cloud.aiplatform.v1beta1.GenAiAdvancedFeaturesConfigB\003\340A\001\022$\n"
+ + "\034private_model_server_enabled\030\036 \001(\010\0323\n"
+ "\021TrafficSplitEntry\022\013\n"
+ "\003key\030\001 \001(\t\022\r\n"
+ "\005value\030\002 \001(\005:\0028\001\032-\n"
+ "\013LabelsEntry\022\013\n"
+ "\003key\030\001 \001(\t\022\r\n"
+ "\005value\030\002 \001(\t:\0028\001:\265\001\352A\261\001\n"
- + "\"aiplatform.googleapis.com/Endpoint\022UpdateApi
Update an API resource in the API hub. The following fields in the [API][] can be updated: + *
Update an API resource in the API hub. The following fields in the [API][google.cloud.apihub.v1.Api] can be updated: *
The [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask] should be used to specify the fields being updated. @@ -411,6 +412,25 @@ *
CreateApiOperation
Create an apiOperation in an API version. An apiOperation can be created only if the version has no apiOperations which were created by parsing a spec.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *createApiOperation(CreateApiOperationRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *createApiOperation(VersionName parent, ApiOperation apiOperation, String apiOperationId) + *
createApiOperation(String parent, ApiOperation apiOperation, String apiOperationId) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *createApiOperationCallable() + *
GetApiOperation
Get details about a particular operation in API version.
UpdateApiOperation
Update an operation in an API version. The following fields in the [ApiOperation resource][google.cloud.apihub.v1.ApiOperation] can be updated: + *
The [update_mask][google.cloud.apihub.v1.UpdateApiOperationRequest.update_mask] should be used to specify the fields being updated. + *
An operation can be updated only if the operation was created via [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API. If the operation was created by parsing the spec, then it can be edited by updating the spec.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *updateApiOperation(UpdateApiOperationRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *updateApiOperation(ApiOperation apiOperation, FieldMask updateMask) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *updateApiOperationCallable() + *
DeleteApiOperation
Delete an operation in an API version and we can delete only the operations created via create API. If the operation was created by parsing the spec, then it can be deleted by editing or deleting the spec.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *deleteApiOperation(DeleteApiOperationRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *deleteApiOperation(ApiOperationName name) + *
deleteApiOperation(String name) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *deleteApiOperationCallable() + *
GetDefinition
Get details about a definition in an API version.
The [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] should be used to specify the fields being updated.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/. + *
This value should be 4-500 characters, overall resource name which will be of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, its length is + * limited to 700 characters and valid characters are /[a-z][A-Z][0-9]-_/. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Version createVersion(ApiName parent, Version version, String versionId) { @@ -1668,7 +1746,9 @@ public final Version createVersion(ApiName parent, Version version, String versi * id is already used by another version in the API resource. *
This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/. + *
This value should be 4-500 characters, overall resource name which will be of format
+ * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, its length is
+ * limited to 700 characters and valid characters are /[a-z][A-Z][0-9]-_/.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Version createVersion(String parent, Version version, String versionId) {
@@ -2313,7 +2393,9 @@ public final UnaryCallable This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
+ * This value should be 4-500 characters, overall resource name which will be of format
+ * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, its
+ * length is limited to 1000 characters and valid characters are /[a-z][A-Z][0-9]-_/.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Spec createSpec(VersionName parent, Spec spec, String specId) {
@@ -2370,7 +2452,9 @@ public final Spec createSpec(VersionName parent, Spec spec, String specId) {
* id is already used by another spec in the API resource.
* This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
+ * This value should be 4-500 characters, overall resource name which will be of format
+ * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, its
+ * length is limited to 1000 characters and valid characters are /[a-z][A-Z][0-9]-_/.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Spec createSpec(String parent, Spec spec, String specId) {
@@ -3124,6 +3208,162 @@ public final UnaryCallable Sample code:
+ *
+ * This value should be 4-500 characters, overall resource name which will be of format
+ * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
+ * its length is limited to 700 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApiOperation createApiOperation(
+ VersionName parent, ApiOperation apiOperation, String apiOperationId) {
+ CreateApiOperationRequest request =
+ CreateApiOperationRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setApiOperation(apiOperation)
+ .setApiOperationId(apiOperationId)
+ .build();
+ return createApiOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create an apiOperation in an API version. An apiOperation can be created only if the version
+ * has no apiOperations which were created by parsing a spec.
+ *
+ * Sample code:
+ *
+ * This value should be 4-500 characters, overall resource name which will be of format
+ * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
+ * its length is limited to 700 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApiOperation createApiOperation(
+ String parent, ApiOperation apiOperation, String apiOperationId) {
+ CreateApiOperationRequest request =
+ CreateApiOperationRequest.newBuilder()
+ .setParent(parent)
+ .setApiOperation(apiOperation)
+ .setApiOperationId(apiOperationId)
+ .build();
+ return createApiOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create an apiOperation in an API version. An apiOperation can be created only if the version
+ * has no apiOperations which were created by parsing a spec.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The [update_mask][google.cloud.apihub.v1.UpdateApiOperationRequest.update_mask] should be
+ * used to specify the fields being updated.
+ *
+ * An operation can be updated only if the operation was created via
+ * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API. If the operation
+ * was created by parsing the spec, then it can be edited by updating the spec.
+ *
+ * Sample code:
+ *
+ * The operation resource's `name` field is used to identify the operation resource to
+ * update. Format:
+ * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
+ * @param updateMask Required. The list of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApiOperation updateApiOperation(ApiOperation apiOperation, FieldMask updateMask) {
+ UpdateApiOperationRequest request =
+ UpdateApiOperationRequest.newBuilder()
+ .setApiOperation(apiOperation)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateApiOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update an operation in an API version. The following fields in the [ApiOperation
+ * resource][google.cloud.apihub.v1.ApiOperation] can be updated:
+ *
+ * The [update_mask][google.cloud.apihub.v1.UpdateApiOperationRequest.update_mask] should be
+ * used to specify the fields being updated.
+ *
+ * An operation can be updated only if the operation was created via
+ * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API. If the operation
+ * was created by parsing the spec, then it can be edited by updating the spec.
+ *
+ * Sample code:
+ *
+ * The [update_mask][google.cloud.apihub.v1.UpdateApiOperationRequest.update_mask] should be
+ * used to specify the fields being updated.
+ *
+ * An operation can be updated only if the operation was created via
+ * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API. If the operation
+ * was created by parsing the spec, then it can be edited by updating the spec.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] should be used
- * to specify the fields being updated.
- *
* Sample code:
*
* The [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] should be used
- * to specify the fields being updated.
- *
* Sample code:
*
* The [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] should be used
- * to specify the fields being updated.
- *
* Sample code:
*
* This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the ApiHubCollectClient object to clean up resources such
+ * as threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * CollectApiData Collect API data from a source and push it to Hub's collect layer. Request object method variants only take one parameter, a request object, which must be constructed before the call. collectApiDataAsync(CollectApiDataRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. collectApiDataAsync(LocationName location, CollectionType collectionType, ApiData apiData)
+ * collectApiDataAsync(String location, CollectionType collectionType, ApiData apiData)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. collectApiDataOperationCallable()
+ * collectApiDataCallable()
+ * ListLocations Lists information about the supported locations for this service. Request object method variants only take one parameter, a request object, which must be constructed before the call. listLocations(ListLocationsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listLocationsPagedCallable()
+ * listLocationsCallable()
+ * GetLocation Gets information about a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLocation(GetLocationRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLocationCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of ApiHubCollectSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class ApiHubCollectClient implements BackgroundResource {
+ private final ApiHubCollectSettings settings;
+ private final ApiHubCollectStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+
+ /** Constructs an instance of ApiHubCollectClient with default settings. */
+ public static final ApiHubCollectClient create() throws IOException {
+ return create(ApiHubCollectSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ApiHubCollectClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final ApiHubCollectClient create(ApiHubCollectSettings settings)
+ throws IOException {
+ return new ApiHubCollectClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ApiHubCollectClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(ApiHubCollectSettings).
+ */
+ public static final ApiHubCollectClient create(ApiHubCollectStub stub) {
+ return new ApiHubCollectClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ApiHubCollectClient, using the given settings. This is protected so
+ * that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected ApiHubCollectClient(ApiHubCollectSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((ApiHubCollectStubSettings) settings.getStubSettings()).createStub();
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected ApiHubCollectClient(ApiHubCollectStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ public final ApiHubCollectSettings getSettings() {
+ return settings;
+ }
+
+ public ApiHubCollectStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final OperationsClient getHttpJsonOperationsClient() {
+ return httpJsonOperationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Collect API data from a source and push it to Hub's collect layer.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getLocation:
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for collectApiData:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the ApiHubCurateClient object to clean up resources such
+ * as threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * CreateCuration Create a curation resource in the API hub. Once a curation resource is created, plugin instances can start using it. Request object method variants only take one parameter, a request object, which must be constructed before the call. createCuration(CreateCurationRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. createCuration(LocationName parent, Curation curation, String curationId)
+ * createCuration(String parent, Curation curation, String curationId)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createCurationCallable()
+ * GetCuration Get curation resource details. Request object method variants only take one parameter, a request object, which must be constructed before the call. getCuration(GetCurationRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getCuration(CurationName name)
+ * getCuration(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCurationCallable()
+ * ListCurations List curation resources in the API hub. Request object method variants only take one parameter, a request object, which must be constructed before the call. listCurations(ListCurationsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listCurations(LocationName parent)
+ * listCurations(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listCurationsPagedCallable()
+ * listCurationsCallable()
+ * UpdateCuration Update a curation resource in the API hub. The following fields in the [curation][google.cloud.apihub.v1.Curation] can be updated:
+ * The [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask] should be used to specify the fields being updated. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateCuration(UpdateCurationRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. updateCuration(Curation curation, FieldMask updateMask)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateCurationCallable()
+ * DeleteCuration Delete a curation resource in the API hub. A curation can only be deleted if it's not being used by any plugin instance. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteCuration(DeleteCurationRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. deleteCuration(CurationName name)
+ * deleteCuration(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteCurationCallable()
+ * ListLocations Lists information about the supported locations for this service. Request object method variants only take one parameter, a request object, which must be constructed before the call. listLocations(ListLocationsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listLocationsPagedCallable()
+ * listLocationsCallable()
+ * GetLocation Gets information about a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLocation(GetLocationRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLocationCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of ApiHubCurateSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class ApiHubCurateClient implements BackgroundResource {
+ private final ApiHubCurateSettings settings;
+ private final ApiHubCurateStub stub;
+
+ /** Constructs an instance of ApiHubCurateClient with default settings. */
+ public static final ApiHubCurateClient create() throws IOException {
+ return create(ApiHubCurateSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ApiHubCurateClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final ApiHubCurateClient create(ApiHubCurateSettings settings) throws IOException {
+ return new ApiHubCurateClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ApiHubCurateClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(ApiHubCurateSettings).
+ */
+ public static final ApiHubCurateClient create(ApiHubCurateStub stub) {
+ return new ApiHubCurateClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ApiHubCurateClient, using the given settings. This is protected so
+ * that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected ApiHubCurateClient(ApiHubCurateSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((ApiHubCurateStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected ApiHubCurateClient(ApiHubCurateStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final ApiHubCurateSettings getSettings() {
+ return settings;
+ }
+
+ public ApiHubCurateStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a curation resource in the API hub. Once a curation resource is created, plugin
+ * instances can start using it.
+ *
+ * Sample code:
+ *
+ * This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Curation createCuration(LocationName parent, Curation curation, String curationId) {
+ CreateCurationRequest request =
+ CreateCurationRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setCuration(curation)
+ .setCurationId(curationId)
+ .build();
+ return createCuration(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a curation resource in the API hub. Once a curation resource is created, plugin
+ * instances can start using it.
+ *
+ * Sample code:
+ *
+ * This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Curation createCuration(String parent, Curation curation, String curationId) {
+ CreateCurationRequest request =
+ CreateCurationRequest.newBuilder()
+ .setParent(parent)
+ .setCuration(curation)
+ .setCurationId(curationId)
+ .build();
+ return createCuration(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a curation resource in the API hub. Once a curation resource is created, plugin
+ * instances can start using it.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask] should be used to
+ * specify the fields being updated.
+ *
+ * Sample code:
+ *
+ * The curation resource's `name` field is used to identify the curation resource to
+ * update. Format: `projects/{project}/locations/{location}/curations/{curation}`
+ * @param updateMask Optional. The list of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Curation updateCuration(Curation curation, FieldMask updateMask) {
+ UpdateCurationRequest request =
+ UpdateCurationRequest.newBuilder().setCuration(curation).setUpdateMask(updateMask).build();
+ return updateCuration(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a curation resource in the API hub. The following fields in the
+ * [curation][google.cloud.apihub.v1.Curation] can be updated:
+ *
+ * The [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask] should be used to
+ * specify the fields being updated.
+ *
+ * Sample code:
+ *
+ * The [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask] should be used to
+ * specify the fields being updated.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of createCuration:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the ApiHubDiscoveryClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * ListDiscoveredApiObservations Lists all the DiscoveredAPIObservations in a given project and location. Request object method variants only take one parameter, a request object, which must be constructed before the call. listDiscoveredApiObservations(ListDiscoveredApiObservationsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listDiscoveredApiObservations(LocationName parent)
+ * listDiscoveredApiObservations(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listDiscoveredApiObservationsPagedCallable()
+ * listDiscoveredApiObservationsCallable()
+ * GetDiscoveredApiObservation Gets a DiscoveredAPIObservation in a given project, location and ApiObservation. Request object method variants only take one parameter, a request object, which must be constructed before the call. getDiscoveredApiObservation(GetDiscoveredApiObservationRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getDiscoveredApiObservation(DiscoveredApiObservationName name)
+ * getDiscoveredApiObservation(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getDiscoveredApiObservationCallable()
+ * ListDiscoveredApiOperations Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation. Request object method variants only take one parameter, a request object, which must be constructed before the call. listDiscoveredApiOperations(ListDiscoveredApiOperationsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listDiscoveredApiOperations(DiscoveredApiObservationName parent)
+ * listDiscoveredApiOperations(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listDiscoveredApiOperationsPagedCallable()
+ * listDiscoveredApiOperationsCallable()
+ * GetDiscoveredApiOperation Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation. Request object method variants only take one parameter, a request object, which must be constructed before the call. getDiscoveredApiOperation(GetDiscoveredApiOperationRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getDiscoveredApiOperation(DiscoveredApiOperationName name)
+ * getDiscoveredApiOperation(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getDiscoveredApiOperationCallable()
+ * ListLocations Lists information about the supported locations for this service. Request object method variants only take one parameter, a request object, which must be constructed before the call. listLocations(ListLocationsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listLocationsPagedCallable()
+ * listLocationsCallable()
+ * GetLocation Gets information about a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLocation(GetLocationRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLocationCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of ApiHubDiscoverySettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class ApiHubDiscoveryClient implements BackgroundResource {
+ private final ApiHubDiscoverySettings settings;
+ private final ApiHubDiscoveryStub stub;
+
+ /** Constructs an instance of ApiHubDiscoveryClient with default settings. */
+ public static final ApiHubDiscoveryClient create() throws IOException {
+ return create(ApiHubDiscoverySettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ApiHubDiscoveryClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final ApiHubDiscoveryClient create(ApiHubDiscoverySettings settings)
+ throws IOException {
+ return new ApiHubDiscoveryClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ApiHubDiscoveryClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(ApiHubDiscoverySettings).
+ */
+ public static final ApiHubDiscoveryClient create(ApiHubDiscoveryStub stub) {
+ return new ApiHubDiscoveryClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ApiHubDiscoveryClient, using the given settings. This is protected so
+ * that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected ApiHubDiscoveryClient(ApiHubDiscoverySettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((ApiHubDiscoveryStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected ApiHubDiscoveryClient(ApiHubDiscoveryStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final ApiHubDiscoverySettings getSettings() {
+ return settings;
+ }
+
+ public ApiHubDiscoveryStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the DiscoveredAPIObservations in a given project and location.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getDiscoveredApiObservation:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubClient apiHubClient = ApiHubClient.create()) {
+ * VersionName parent = VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
+ * ApiOperation apiOperation = ApiOperation.newBuilder().build();
+ * String apiOperationId = "apiOperationId-2124555672";
+ * ApiOperation response = apiHubClient.createApiOperation(parent, apiOperation, apiOperationId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource for the operation resource. Format:
+ * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
+ * @param apiOperation Required. The operation resource to create.
+ * @param apiOperationId Optional. The ID to use for the operation resource, which will become the
+ * final component of the operation's resource name. This field is optional.
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubClient apiHubClient = ApiHubClient.create()) {
+ * String parent = VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString();
+ * ApiOperation apiOperation = ApiOperation.newBuilder().build();
+ * String apiOperationId = "apiOperationId-2124555672";
+ * ApiOperation response = apiHubClient.createApiOperation(parent, apiOperation, apiOperationId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource for the operation resource. Format:
+ * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
+ * @param apiOperation Required. The operation resource to create.
+ * @param apiOperationId Optional. The ID to use for the operation resource, which will become the
+ * final component of the operation's resource name. This field is optional.
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubClient apiHubClient = ApiHubClient.create()) {
+ * CreateApiOperationRequest request =
+ * CreateApiOperationRequest.newBuilder()
+ * .setParent(VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
+ * .setApiOperationId("apiOperationId-2124555672")
+ * .setApiOperation(ApiOperation.newBuilder().build())
+ * .build();
+ * ApiOperation response = apiHubClient.createApiOperation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApiOperation createApiOperation(CreateApiOperationRequest request) {
+ return createApiOperationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create an apiOperation in an API version. An apiOperation can be created only if the version
+ * has no apiOperations which were created by parsing a spec.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubClient apiHubClient = ApiHubClient.create()) {
+ * CreateApiOperationRequest request =
+ * CreateApiOperationRequest.newBuilder()
+ * .setParent(VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
+ * .setApiOperationId("apiOperationId-2124555672")
+ * .setApiOperation(ApiOperation.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubClient apiHubClient = ApiHubClient.create()) {
+ * ApiOperation apiOperation = ApiOperation.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * ApiOperation response = apiHubClient.updateApiOperation(apiOperation, updateMask);
+ * }
+ * }
+ *
+ * @param apiOperation Required. The apiOperation resource to update.
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubClient apiHubClient = ApiHubClient.create()) {
+ * UpdateApiOperationRequest request =
+ * UpdateApiOperationRequest.newBuilder()
+ * .setApiOperation(ApiOperation.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiOperation response = apiHubClient.updateApiOperation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApiOperation updateApiOperation(UpdateApiOperationRequest request) {
+ return updateApiOperationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update an operation in an API version. The following fields in the [ApiOperation
+ * resource][google.cloud.apihub.v1.ApiOperation] can be updated:
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubClient apiHubClient = ApiHubClient.create()) {
+ * UpdateApiOperationRequest request =
+ * UpdateApiOperationRequest.newBuilder()
+ * .setApiOperation(ApiOperation.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubClient apiHubClient = ApiHubClient.create()) {
+ * ApiOperationName name =
+ * ApiOperationName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]");
+ * apiHubClient.deleteApiOperation(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the operation resource to delete. Format:
+ * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteApiOperation(ApiOperationName name) {
+ DeleteApiOperationRequest request =
+ DeleteApiOperationRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteApiOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete an operation in an API version and we can delete only the operations created via create
+ * API. If the operation was created by parsing the spec, then it can be deleted by editing or
+ * deleting the spec.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubClient apiHubClient = ApiHubClient.create()) {
+ * String name =
+ * ApiOperationName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]")
+ * .toString();
+ * apiHubClient.deleteApiOperation(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the operation resource to delete. Format:
+ * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteApiOperation(String name) {
+ DeleteApiOperationRequest request =
+ DeleteApiOperationRequest.newBuilder().setName(name).build();
+ deleteApiOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete an operation in an API version and we can delete only the operations created via create
+ * API. If the operation was created by parsing the spec, then it can be deleted by editing or
+ * deleting the spec.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubClient apiHubClient = ApiHubClient.create()) {
+ * DeleteApiOperationRequest request =
+ * DeleteApiOperationRequest.newBuilder()
+ * .setName(
+ * ApiOperationName.of(
+ * "[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]")
+ * .toString())
+ * .build();
+ * apiHubClient.deleteApiOperation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteApiOperation(DeleteApiOperationRequest request) {
+ deleteApiOperationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete an operation in an API version and we can delete only the operations created via create
+ * API. If the operation was created by parsing the spec, then it can be deleted by editing or
+ * deleting the spec.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubClient apiHubClient = ApiHubClient.create()) {
+ * DeleteApiOperationRequest request =
+ * DeleteApiOperationRequest.newBuilder()
+ * .setName(
+ * ApiOperationName.of(
+ * "[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
@@ -4023,11 +4540,14 @@ public final Deployment updateDeployment(Deployment deployment, FieldMask update
* {@code
@@ -4068,11 +4588,14 @@ public final Deployment updateDeployment(UpdateDeploymentRequest request) {
* {@code
diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCollectClient.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCollectClient.java
new file mode 100644
index 000000000000..c64fe27243bd
--- /dev/null
+++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCollectClient.java
@@ -0,0 +1,666 @@
+/*
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.apihub.v1;
+
+import com.google.api.core.ApiFuture;
+import com.google.api.core.ApiFutures;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.httpjson.longrunning.OperationsClient;
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.api.gax.paging.AbstractFixedSizeCollection;
+import com.google.api.gax.paging.AbstractPage;
+import com.google.api.gax.paging.AbstractPagedListResponse;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.apihub.v1.stub.ApiHubCollectStub;
+import com.google.cloud.apihub.v1.stub.ApiHubCollectStubSettings;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.longrunning.Operation;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: This service exposes methods used for collecting various types of data from
+ * different first party and third party sources and push it to Hub's collect layer.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = apiHubCollectClient.getLocation(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubCollectSettings apiHubCollectSettings =
+ * ApiHubCollectSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create(apiHubCollectSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubCollectSettings apiHubCollectSettings =
+ * ApiHubCollectSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create(apiHubCollectSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
+ * LocationName location = LocationName.of("[PROJECT]", "[LOCATION]");
+ * CollectionType collectionType = CollectionType.forNumber(0);
+ * ApiData apiData = ApiData.newBuilder().build();
+ * CollectApiDataResponse response =
+ * apiHubCollectClient.collectApiDataAsync(location, collectionType, apiData).get();
+ * }
+ * }
+ *
+ * @param location Required. The regional location of the API hub instance and its resources.
+ * Format: `projects/{project}/locations/{location}`
+ * @param collectionType Required. The type of collection. Applies to all entries in
+ * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data].
+ * @param apiData Required. The API data to be collected.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
+ * String location = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * CollectionType collectionType = CollectionType.forNumber(0);
+ * ApiData apiData = ApiData.newBuilder().build();
+ * CollectApiDataResponse response =
+ * apiHubCollectClient.collectApiDataAsync(location, collectionType, apiData).get();
+ * }
+ * }
+ *
+ * @param location Required. The regional location of the API hub instance and its resources.
+ * Format: `projects/{project}/locations/{location}`
+ * @param collectionType Required. The type of collection. Applies to all entries in
+ * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data].
+ * @param apiData Required. The API data to be collected.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
+ * CollectApiDataRequest request =
+ * CollectApiDataRequest.newBuilder()
+ * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setCollectionType(CollectionType.forNumber(0))
+ * .setPluginInstance(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .setActionId("actionId-1656172047")
+ * .setApiData(ApiData.newBuilder().build())
+ * .build();
+ * CollectApiDataResponse response = apiHubCollectClient.collectApiDataAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
+ * CollectApiDataRequest request =
+ * CollectApiDataRequest.newBuilder()
+ * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setCollectionType(CollectionType.forNumber(0))
+ * .setPluginInstance(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .setActionId("actionId-1656172047")
+ * .setApiData(ApiData.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
+ * CollectApiDataRequest request =
+ * CollectApiDataRequest.newBuilder()
+ * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setCollectionType(CollectionType.forNumber(0))
+ * .setPluginInstance(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .setActionId("actionId-1656172047")
+ * .setApiData(ApiData.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : apiHubCollectClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = apiHubCollectClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = apiHubCollectClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubCollectSettings.Builder apiHubCollectSettingsBuilder = ApiHubCollectSettings.newBuilder();
+ * apiHubCollectSettingsBuilder
+ * .getLocationSettings()
+ * .setRetrySettings(
+ * apiHubCollectSettingsBuilder
+ * .getLocationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * ApiHubCollectSettings apiHubCollectSettings = apiHubCollectSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubCollectSettings.Builder apiHubCollectSettingsBuilder = ApiHubCollectSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * apiHubCollectSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ApiHubCollectSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Curation curation = Curation.newBuilder().build();
+ * String curationId = "curationId1428017328";
+ * Curation response = apiHubCurateClient.createCuration(parent, curation, curationId);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubCurateSettings apiHubCurateSettings =
+ * ApiHubCurateSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create(apiHubCurateSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubCurateSettings apiHubCurateSettings =
+ * ApiHubCurateSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create(apiHubCurateSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Curation curation = Curation.newBuilder().build();
+ * String curationId = "curationId1428017328";
+ * Curation response = apiHubCurateClient.createCuration(parent, curation, curationId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource for the curation resource. Format:
+ * `projects/{project}/locations/{location}`
+ * @param curation Required. The curation resource to create.
+ * @param curationId Optional. The ID to use for the curation resource, which will become the
+ * final component of the curations's resource name. This field is optional.
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Curation curation = Curation.newBuilder().build();
+ * String curationId = "curationId1428017328";
+ * Curation response = apiHubCurateClient.createCuration(parent, curation, curationId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource for the curation resource. Format:
+ * `projects/{project}/locations/{location}`
+ * @param curation Required. The curation resource to create.
+ * @param curationId Optional. The ID to use for the curation resource, which will become the
+ * final component of the curations's resource name. This field is optional.
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * CreateCurationRequest request =
+ * CreateCurationRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setCurationId("curationId1428017328")
+ * .setCuration(Curation.newBuilder().build())
+ * .build();
+ * Curation response = apiHubCurateClient.createCuration(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Curation createCuration(CreateCurationRequest request) {
+ return createCurationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a curation resource in the API hub. Once a curation resource is created, plugin
+ * instances can start using it.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * CreateCurationRequest request =
+ * CreateCurationRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setCurationId("curationId1428017328")
+ * .setCuration(Curation.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * CurationName name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]");
+ * Curation response = apiHubCurateClient.getCuration(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the curation resource to retrieve. Format:
+ * `projects/{project}/locations/{location}/curations/{curation}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Curation getCuration(CurationName name) {
+ GetCurationRequest request =
+ GetCurationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getCuration(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get curation resource details.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * String name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString();
+ * Curation response = apiHubCurateClient.getCuration(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the curation resource to retrieve. Format:
+ * `projects/{project}/locations/{location}/curations/{curation}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Curation getCuration(String name) {
+ GetCurationRequest request = GetCurationRequest.newBuilder().setName(name).build();
+ return getCuration(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get curation resource details.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * GetCurationRequest request =
+ * GetCurationRequest.newBuilder()
+ * .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString())
+ * .build();
+ * Curation response = apiHubCurateClient.getCuration(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Curation getCuration(GetCurationRequest request) {
+ return getCurationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get curation resource details.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * GetCurationRequest request =
+ * GetCurationRequest.newBuilder()
+ * .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Curation element : apiHubCurateClient.listCurations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which owns this collection of curation resources. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCurationsPagedResponse listCurations(LocationName parent) {
+ ListCurationsRequest request =
+ ListCurationsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listCurations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List curation resources in the API hub.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Curation element : apiHubCurateClient.listCurations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which owns this collection of curation resources. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCurationsPagedResponse listCurations(String parent) {
+ ListCurationsRequest request = ListCurationsRequest.newBuilder().setParent(parent).build();
+ return listCurations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List curation resources in the API hub.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * ListCurationsRequest request =
+ * ListCurationsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Curation element : apiHubCurateClient.listCurations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCurationsPagedResponse listCurations(ListCurationsRequest request) {
+ return listCurationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List curation resources in the API hub.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * ListCurationsRequest request =
+ * ListCurationsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * ListCurationsRequest request =
+ * ListCurationsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListCurationsResponse response = apiHubCurateClient.listCurationsCallable().call(request);
+ * for (Curation element : response.getCurationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * Curation curation = Curation.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Curation response = apiHubCurateClient.updateCuration(curation, updateMask);
+ * }
+ * }
+ *
+ * @param curation Required. The curation resource to update.
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * UpdateCurationRequest request =
+ * UpdateCurationRequest.newBuilder()
+ * .setCuration(Curation.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Curation response = apiHubCurateClient.updateCuration(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Curation updateCuration(UpdateCurationRequest request) {
+ return updateCurationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a curation resource in the API hub. The following fields in the
+ * [curation][google.cloud.apihub.v1.Curation] can be updated:
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * UpdateCurationRequest request =
+ * UpdateCurationRequest.newBuilder()
+ * .setCuration(Curation.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * CurationName name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]");
+ * apiHubCurateClient.deleteCuration(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the curation resource to delete. Format:
+ * `projects/{project}/locations/{location}/curations/{curation}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteCuration(CurationName name) {
+ DeleteCurationRequest request =
+ DeleteCurationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteCuration(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a curation resource in the API hub. A curation can only be deleted if it's not being
+ * used by any plugin instance.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * String name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString();
+ * apiHubCurateClient.deleteCuration(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the curation resource to delete. Format:
+ * `projects/{project}/locations/{location}/curations/{curation}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteCuration(String name) {
+ DeleteCurationRequest request = DeleteCurationRequest.newBuilder().setName(name).build();
+ deleteCuration(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a curation resource in the API hub. A curation can only be deleted if it's not being
+ * used by any plugin instance.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * DeleteCurationRequest request =
+ * DeleteCurationRequest.newBuilder()
+ * .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString())
+ * .build();
+ * apiHubCurateClient.deleteCuration(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteCuration(DeleteCurationRequest request) {
+ deleteCurationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a curation resource in the API hub. A curation can only be deleted if it's not being
+ * used by any plugin instance.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * DeleteCurationRequest request =
+ * DeleteCurationRequest.newBuilder()
+ * .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : apiHubCurateClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = apiHubCurateClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = apiHubCurateClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubCurateSettings.Builder apiHubCurateSettingsBuilder = ApiHubCurateSettings.newBuilder();
+ * apiHubCurateSettingsBuilder
+ * .createCurationSettings()
+ * .setRetrySettings(
+ * apiHubCurateSettingsBuilder
+ * .createCurationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * ApiHubCurateSettings apiHubCurateSettings = apiHubCurateSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@Generated("by gapic-generator-java")
+public class ApiHubCurateSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * DiscoveredApiObservationName name =
+ * DiscoveredApiObservationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]");
+ * DiscoveredApiObservation response = apiHubDiscoveryClient.getDiscoveredApiObservation(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubDiscoverySettings apiHubDiscoverySettings =
+ * ApiHubDiscoverySettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ApiHubDiscoveryClient apiHubDiscoveryClient =
+ * ApiHubDiscoveryClient.create(apiHubDiscoverySettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubDiscoverySettings apiHubDiscoverySettings =
+ * ApiHubDiscoverySettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ApiHubDiscoveryClient apiHubDiscoveryClient =
+ * ApiHubDiscoveryClient.create(apiHubDiscoverySettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (DiscoveredApiObservation element :
+ * apiHubDiscoveryClient.listDiscoveredApiObservations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which owns this collection of ApiObservations. Format:
+ * projects/{project}/locations/{location}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDiscoveredApiObservationsPagedResponse listDiscoveredApiObservations(
+ LocationName parent) {
+ ListDiscoveredApiObservationsRequest request =
+ ListDiscoveredApiObservationsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDiscoveredApiObservations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the DiscoveredAPIObservations in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (DiscoveredApiObservation element :
+ * apiHubDiscoveryClient.listDiscoveredApiObservations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which owns this collection of ApiObservations. Format:
+ * projects/{project}/locations/{location}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDiscoveredApiObservationsPagedResponse listDiscoveredApiObservations(
+ String parent) {
+ ListDiscoveredApiObservationsRequest request =
+ ListDiscoveredApiObservationsRequest.newBuilder().setParent(parent).build();
+ return listDiscoveredApiObservations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the DiscoveredAPIObservations in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * ListDiscoveredApiObservationsRequest request =
+ * ListDiscoveredApiObservationsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (DiscoveredApiObservation element :
+ * apiHubDiscoveryClient.listDiscoveredApiObservations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDiscoveredApiObservationsPagedResponse listDiscoveredApiObservations(
+ ListDiscoveredApiObservationsRequest request) {
+ return listDiscoveredApiObservationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the DiscoveredAPIObservations in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * ListDiscoveredApiObservationsRequest request =
+ * ListDiscoveredApiObservationsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ ListDiscoveredApiObservationsRequest, ListDiscoveredApiObservationsPagedResponse>
+ listDiscoveredApiObservationsPagedCallable() {
+ return stub.listDiscoveredApiObservationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the DiscoveredAPIObservations in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * ListDiscoveredApiObservationsRequest request =
+ * ListDiscoveredApiObservationsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListDiscoveredApiObservationsResponse response =
+ * apiHubDiscoveryClient.listDiscoveredApiObservationsCallable().call(request);
+ * for (DiscoveredApiObservation element : response.getDiscoveredApiObservationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListDiscoveredApiObservationsRequest, ListDiscoveredApiObservationsResponse>
+ listDiscoveredApiObservationsCallable() {
+ return stub.listDiscoveredApiObservationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a DiscoveredAPIObservation in a given project, location and ApiObservation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * DiscoveredApiObservationName name =
+ * DiscoveredApiObservationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]");
+ * DiscoveredApiObservation response = apiHubDiscoveryClient.getDiscoveredApiObservation(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the DiscoveredApiObservation to retrieve. Format:
+ * projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DiscoveredApiObservation getDiscoveredApiObservation(
+ DiscoveredApiObservationName name) {
+ GetDiscoveredApiObservationRequest request =
+ GetDiscoveredApiObservationRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getDiscoveredApiObservation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a DiscoveredAPIObservation in a given project, location and ApiObservation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * String name =
+ * DiscoveredApiObservationName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
+ * .toString();
+ * DiscoveredApiObservation response = apiHubDiscoveryClient.getDiscoveredApiObservation(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the DiscoveredApiObservation to retrieve. Format:
+ * projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DiscoveredApiObservation getDiscoveredApiObservation(String name) {
+ GetDiscoveredApiObservationRequest request =
+ GetDiscoveredApiObservationRequest.newBuilder().setName(name).build();
+ return getDiscoveredApiObservation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a DiscoveredAPIObservation in a given project, location and ApiObservation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * GetDiscoveredApiObservationRequest request =
+ * GetDiscoveredApiObservationRequest.newBuilder()
+ * .setName(
+ * DiscoveredApiObservationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
+ * .toString())
+ * .build();
+ * DiscoveredApiObservation response =
+ * apiHubDiscoveryClient.getDiscoveredApiObservation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DiscoveredApiObservation getDiscoveredApiObservation(
+ GetDiscoveredApiObservationRequest request) {
+ return getDiscoveredApiObservationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a DiscoveredAPIObservation in a given project, location and ApiObservation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * GetDiscoveredApiObservationRequest request =
+ * GetDiscoveredApiObservationRequest.newBuilder()
+ * .setName(
+ * DiscoveredApiObservationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * DiscoveredApiObservationName parent =
+ * DiscoveredApiObservationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]");
+ * for (DiscoveredApiOperation element :
+ * apiHubDiscoveryClient.listDiscoveredApiOperations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which owns this collection of DiscoveredApiOperations.
+ * Format:
+ * projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDiscoveredApiOperationsPagedResponse listDiscoveredApiOperations(
+ DiscoveredApiObservationName parent) {
+ ListDiscoveredApiOperationsRequest request =
+ ListDiscoveredApiOperationsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDiscoveredApiOperations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * String parent =
+ * DiscoveredApiObservationName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
+ * .toString();
+ * for (DiscoveredApiOperation element :
+ * apiHubDiscoveryClient.listDiscoveredApiOperations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which owns this collection of DiscoveredApiOperations.
+ * Format:
+ * projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDiscoveredApiOperationsPagedResponse listDiscoveredApiOperations(String parent) {
+ ListDiscoveredApiOperationsRequest request =
+ ListDiscoveredApiOperationsRequest.newBuilder().setParent(parent).build();
+ return listDiscoveredApiOperations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * ListDiscoveredApiOperationsRequest request =
+ * ListDiscoveredApiOperationsRequest.newBuilder()
+ * .setParent(
+ * DiscoveredApiObservationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (DiscoveredApiOperation element :
+ * apiHubDiscoveryClient.listDiscoveredApiOperations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDiscoveredApiOperationsPagedResponse listDiscoveredApiOperations(
+ ListDiscoveredApiOperationsRequest request) {
+ return listDiscoveredApiOperationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * ListDiscoveredApiOperationsRequest request =
+ * ListDiscoveredApiOperationsRequest.newBuilder()
+ * .setParent(
+ * DiscoveredApiObservationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ ListDiscoveredApiOperationsRequest, ListDiscoveredApiOperationsPagedResponse>
+ listDiscoveredApiOperationsPagedCallable() {
+ return stub.listDiscoveredApiOperationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * ListDiscoveredApiOperationsRequest request =
+ * ListDiscoveredApiOperationsRequest.newBuilder()
+ * .setParent(
+ * DiscoveredApiObservationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListDiscoveredApiOperationsResponse response =
+ * apiHubDiscoveryClient.listDiscoveredApiOperationsCallable().call(request);
+ * for (DiscoveredApiOperation element : response.getDiscoveredApiOperationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListDiscoveredApiOperationsRequest, ListDiscoveredApiOperationsResponse>
+ listDiscoveredApiOperationsCallable() {
+ return stub.listDiscoveredApiOperationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * DiscoveredApiOperationName name =
+ * DiscoveredApiOperationName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DISCOVERED_API_OBSERVATION]",
+ * "[DISCOVERED_API_OPERATION]");
+ * DiscoveredApiOperation response = apiHubDiscoveryClient.getDiscoveredApiOperation(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the DiscoveredApiOperation to retrieve. Format:
+ * projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DiscoveredApiOperation getDiscoveredApiOperation(DiscoveredApiOperationName name) {
+ GetDiscoveredApiOperationRequest request =
+ GetDiscoveredApiOperationRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getDiscoveredApiOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * String name =
+ * DiscoveredApiOperationName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DISCOVERED_API_OBSERVATION]",
+ * "[DISCOVERED_API_OPERATION]")
+ * .toString();
+ * DiscoveredApiOperation response = apiHubDiscoveryClient.getDiscoveredApiOperation(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the DiscoveredApiOperation to retrieve. Format:
+ * projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DiscoveredApiOperation getDiscoveredApiOperation(String name) {
+ GetDiscoveredApiOperationRequest request =
+ GetDiscoveredApiOperationRequest.newBuilder().setName(name).build();
+ return getDiscoveredApiOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * GetDiscoveredApiOperationRequest request =
+ * GetDiscoveredApiOperationRequest.newBuilder()
+ * .setName(
+ * DiscoveredApiOperationName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DISCOVERED_API_OBSERVATION]",
+ * "[DISCOVERED_API_OPERATION]")
+ * .toString())
+ * .build();
+ * DiscoveredApiOperation response = apiHubDiscoveryClient.getDiscoveredApiOperation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DiscoveredApiOperation getDiscoveredApiOperation(
+ GetDiscoveredApiOperationRequest request) {
+ return getDiscoveredApiOperationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * GetDiscoveredApiOperationRequest request =
+ * GetDiscoveredApiOperationRequest.newBuilder()
+ * .setName(
+ * DiscoveredApiOperationName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DISCOVERED_API_OBSERVATION]",
+ * "[DISCOVERED_API_OPERATION]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : apiHubDiscoveryClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * apiHubDiscoveryClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = apiHubDiscoveryClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubDiscoverySettings.Builder apiHubDiscoverySettingsBuilder =
+ * ApiHubDiscoverySettings.newBuilder();
+ * apiHubDiscoverySettingsBuilder
+ * .getDiscoveredApiObservationSettings()
+ * .setRetrySettings(
+ * apiHubDiscoverySettingsBuilder
+ * .getDiscoveredApiObservationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * ApiHubDiscoverySettings apiHubDiscoverySettings = apiHubDiscoverySettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@Generated("by gapic-generator-java")
+public class ApiHubDiscoverySettings extends ClientSettings
GetPlugin
Get details about an API Hub plugin.
Get an API Hub plugin.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*CreatePlugin
Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *createPlugin(CreatePluginRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *createPlugin(LocationName parent, Plugin plugin, String pluginId) + *
createPlugin(String parent, Plugin plugin, String pluginId) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *createPluginCallable() + *
ListPlugins
List all the plugins in a given project and location.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *listPlugins(ListPluginsRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *listPlugins(LocationName parent) + *
listPlugins(String parent) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *listPluginsPagedCallable() + *
listPluginsCallable() + *
DeletePlugin
Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *deletePluginAsync(DeletePluginRequest request) + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *deletePluginAsync(PluginName name) + *
deletePluginAsync(String name) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *deletePluginOperationCallable() + *
deletePluginCallable() + *
CreatePluginInstance
Creates a Plugin instance in the API hub.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *createPluginInstanceAsync(CreatePluginInstanceRequest request) + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *createPluginInstanceAsync(PluginName parent, PluginInstance pluginInstance, String pluginInstanceId) + *
createPluginInstanceAsync(String parent, PluginInstance pluginInstance, String pluginInstanceId) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *createPluginInstanceOperationCallable() + *
createPluginInstanceCallable() + *
ExecutePluginInstanceAction
Executes a plugin instance in the API hub.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *executePluginInstanceActionAsync(ExecutePluginInstanceActionRequest request) + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *executePluginInstanceActionAsync(PluginInstanceName name, ActionExecutionDetail actionExecutionDetail) + *
executePluginInstanceActionAsync(String name, ActionExecutionDetail actionExecutionDetail) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *executePluginInstanceActionOperationCallable() + *
executePluginInstanceActionCallable() + *
GetPluginInstance
Get an API Hub plugin instance.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *getPluginInstance(GetPluginInstanceRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *getPluginInstance(PluginInstanceName name) + *
getPluginInstance(String name) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *getPluginInstanceCallable() + *
ListPluginInstances
List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id}
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *listPluginInstances(ListPluginInstancesRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *listPluginInstances(PluginName parent) + *
listPluginInstances(String parent) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *listPluginInstancesPagedCallable() + *
listPluginInstancesCallable() + *
EnablePluginInstanceAction
Enables a plugin instance in the API hub.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *enablePluginInstanceActionAsync(EnablePluginInstanceActionRequest request) + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *enablePluginInstanceActionAsync(PluginInstanceName name, String actionId) + *
enablePluginInstanceActionAsync(String name, String actionId) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *enablePluginInstanceActionOperationCallable() + *
enablePluginInstanceActionCallable() + *
DisablePluginInstanceAction
Disables a plugin instance in the API hub.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *disablePluginInstanceActionAsync(DisablePluginInstanceActionRequest request) + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *disablePluginInstanceActionAsync(PluginInstanceName name, String actionId) + *
disablePluginInstanceActionAsync(String name, String actionId) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *disablePluginInstanceActionOperationCallable() + *
disablePluginInstanceActionCallable() + *
UpdatePluginInstance
Updates a plugin instance in the API hub. The following fields in the [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated currently: + *
The [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] should be used to specify the fields being updated. + *
To update the [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] of the plugin instance, use the [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig] method.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *updatePluginInstance(UpdatePluginInstanceRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *updatePluginInstance(PluginInstance pluginInstance, FieldMask updateMask) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *updatePluginInstanceCallable() + *
DeletePluginInstance
Deletes a plugin instance in the API hub.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *deletePluginInstanceAsync(DeletePluginInstanceRequest request) + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *deletePluginInstanceAsync(PluginInstanceName name) + *
deletePluginInstanceAsync(String name) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *deletePluginInstanceOperationCallable() + *
deletePluginInstanceCallable() + *
ListLocations
Lists information about the supported locations for this service.
Sample code: * @@ -271,7 +510,7 @@ public final Plugin getPlugin(PluginName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details about an API Hub plugin. + * Get an API Hub plugin. * *
Sample code: * @@ -298,7 +537,7 @@ public final Plugin getPlugin(String name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details about an API Hub plugin. + * Get an API Hub plugin. * *
Sample code: * @@ -326,7 +565,7 @@ public final Plugin getPlugin(GetPluginRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details about an API Hub plugin. + * Get an API Hub plugin. * *
Sample code:
*
@@ -573,7 +812,8 @@ public final UnaryCallable Sample code:
*
@@ -584,29 +824,119 @@ public final UnaryCallable This value should be 4-63 characters, overall resource name which will be of format
+ * `projects/{project}/locations/{location}/plugins/{plugin}`, its length is limited to 1000
+ * characters and valid characters are /[a-z][A-Z][0-9]-_/.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Plugin createPlugin(LocationName parent, Plugin plugin, String pluginId) {
+ CreatePluginRequest request =
+ CreatePluginRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setPlugin(plugin)
+ .setPluginId(pluginId)
+ .build();
+ return createPlugin(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to
+ * create plugin instances.
+ *
+ * Sample code:
+ *
+ * This value should be 4-63 characters, overall resource name which will be of format
+ * `projects/{project}/locations/{location}/plugins/{plugin}`, its length is limited to 1000
+ * characters and valid characters are /[a-z][A-Z][0-9]-_/.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Plugin createPlugin(String parent, Plugin plugin, String pluginId) {
+ CreatePluginRequest request =
+ CreatePluginRequest.newBuilder()
+ .setParent(parent)
+ .setPlugin(plugin)
+ .setPluginId(pluginId)
+ .build();
+ return createPlugin(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to
+ * create plugin instances.
+ *
+ * Sample code:
+ *
+ * Sample code:
*
@@ -617,30 +947,25 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
+ * CreatePluginRequest request =
+ * CreatePluginRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPluginId("pluginId-1859618898")
+ * .setPlugin(Plugin.newBuilder().build())
* .build();
- * ApiFuture Sample code:
*
@@ -651,35 +976,28 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * ListLocationsResponse response = apiHubPluginClient.listLocationsCallable().call(request);
- * for (Location element : response.getLocationsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Plugin element : apiHubPluginClient.listPlugins(parent).iterateAll()) {
+ * // doThingsWith(element);
* }
* }
* }
+ *
+ * @param parent Required. The parent resource where this plugin will be created. Format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable Sample code:
*
@@ -690,21 +1008,25 @@ public final UnaryCallable Sample code:
*
@@ -715,18 +1037,1678 @@ public final Location getLocation(GetLocationRequest request) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * ApiFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * This value should be 4-63 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * This value should be 4-63 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] should be
+ * used to specify the fields being updated.
+ *
+ * To update the [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and
+ * [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] of the plugin
+ * instance, use the
+ * [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig]
+ * method.
+ *
+ * Sample code:
+ *
+ * The [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] should be
+ * used to specify the fields being updated.
+ *
+ * To update the [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and
+ * [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] of the plugin
+ * instance, use the
+ * [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig]
+ * method.
+ *
+ * Sample code:
+ *
+ * The [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] should be
+ * used to specify the fields being updated.
+ *
+ * To update the [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and
+ * [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] of the plugin
+ * instance, use the
+ * [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig]
+ * method.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for deletePlugin:
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Plugin plugin = Plugin.newBuilder().build();
+ * String pluginId = "pluginId-1859618898";
+ * Plugin response = apiHubPluginClient.createPlugin(parent, plugin, pluginId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where this plugin will be created. Format:
+ * `projects/{project}/locations/{location}`.
+ * @param plugin Required. The plugin to create.
+ * @param pluginId Optional. The ID to use for the Plugin resource, which will become the final
+ * component of the Plugin's resource name. This field is optional.
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * CreatePluginRequest request =
+ * CreatePluginRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPluginId("pluginId-1859618898")
+ * .setPlugin(Plugin.newBuilder().build())
* .build();
- * for (Location element : apiHubPluginClient.listLocations(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * Plugin response = apiHubPluginClient.createPlugin(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
- return listLocationsPagedCallable().call(request);
+ public final Plugin createPlugin(CreatePluginRequest request) {
+ return createPluginCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists information about the supported locations for this service.
+ * Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to
+ * create plugin instances.
*
* {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * ListPluginsRequest request =
+ * ListPluginsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * ListPluginsRequest request =
+ * ListPluginsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListPluginsResponse response = apiHubPluginClient.listPluginsCallable().call(request);
+ * for (Plugin element : response.getPluginsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * PluginName name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]");
+ * apiHubPluginClient.deletePluginAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Plugin resource to delete. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * String name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString();
+ * apiHubPluginClient.deletePluginAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Plugin resource to delete. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * DeletePluginRequest request =
+ * DeletePluginRequest.newBuilder()
+ * .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
+ * .build();
+ * apiHubPluginClient.deletePluginAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * DeletePluginRequest request =
+ * DeletePluginRequest.newBuilder()
+ * .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * DeletePluginRequest request =
+ * DeletePluginRequest.newBuilder()
+ * .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * PluginName parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]");
+ * PluginInstance pluginInstance = PluginInstance.newBuilder().build();
+ * String pluginInstanceId = "pluginInstanceId-1741818845";
+ * PluginInstance response =
+ * apiHubPluginClient
+ * .createPluginInstanceAsync(parent, pluginInstance, pluginInstanceId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the plugin instance resource. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}`
+ * @param pluginInstance Required. The plugin instance to create.
+ * @param pluginInstanceId Optional. The ID to use for the plugin instance, which will become the
+ * final component of the plugin instance's resource name. This field is optional.
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * String parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString();
+ * PluginInstance pluginInstance = PluginInstance.newBuilder().build();
+ * String pluginInstanceId = "pluginInstanceId-1741818845";
+ * PluginInstance response =
+ * apiHubPluginClient
+ * .createPluginInstanceAsync(parent, pluginInstance, pluginInstanceId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the plugin instance resource. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}`
+ * @param pluginInstance Required. The plugin instance to create.
+ * @param pluginInstanceId Optional. The ID to use for the plugin instance, which will become the
+ * final component of the plugin instance's resource name. This field is optional.
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * CreatePluginInstanceRequest request =
+ * CreatePluginInstanceRequest.newBuilder()
+ * .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
+ * .setPluginInstanceId("pluginInstanceId-1741818845")
+ * .setPluginInstance(PluginInstance.newBuilder().build())
+ * .build();
+ * PluginInstance response = apiHubPluginClient.createPluginInstanceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * CreatePluginInstanceRequest request =
+ * CreatePluginInstanceRequest.newBuilder()
+ * .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
+ * .setPluginInstanceId("pluginInstanceId-1741818845")
+ * .setPluginInstance(PluginInstance.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * CreatePluginInstanceRequest request =
+ * CreatePluginInstanceRequest.newBuilder()
+ * .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
+ * .setPluginInstanceId("pluginInstanceId-1741818845")
+ * .setPluginInstance(PluginInstance.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * PluginInstanceName name =
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]");
+ * ActionExecutionDetail actionExecutionDetail = ActionExecutionDetail.newBuilder().build();
+ * ExecutePluginInstanceActionResponse response =
+ * apiHubPluginClient.executePluginInstanceActionAsync(name, actionExecutionDetail).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the plugin instance to execute. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
+ * @param actionExecutionDetail Required. The execution details for the action to execute.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * String name =
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString();
+ * ActionExecutionDetail actionExecutionDetail = ActionExecutionDetail.newBuilder().build();
+ * ExecutePluginInstanceActionResponse response =
+ * apiHubPluginClient.executePluginInstanceActionAsync(name, actionExecutionDetail).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the plugin instance to execute. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
+ * @param actionExecutionDetail Required. The execution details for the action to execute.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * ExecutePluginInstanceActionRequest request =
+ * ExecutePluginInstanceActionRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .setActionExecutionDetail(ActionExecutionDetail.newBuilder().build())
+ * .build();
+ * ExecutePluginInstanceActionResponse response =
+ * apiHubPluginClient.executePluginInstanceActionAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * ExecutePluginInstanceActionRequest request =
+ * ExecutePluginInstanceActionRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .setActionExecutionDetail(ActionExecutionDetail.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ ExecutePluginInstanceActionRequest,
+ ExecutePluginInstanceActionResponse,
+ OperationMetadata>
+ executePluginInstanceActionOperationCallable() {
+ return stub.executePluginInstanceActionOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Executes a plugin instance in the API hub.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * ExecutePluginInstanceActionRequest request =
+ * ExecutePluginInstanceActionRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .setActionExecutionDetail(ActionExecutionDetail.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * PluginInstanceName name =
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]");
+ * PluginInstance response = apiHubPluginClient.getPluginInstance(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the plugin instance to retrieve. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PluginInstance getPluginInstance(PluginInstanceName name) {
+ GetPluginInstanceRequest request =
+ GetPluginInstanceRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getPluginInstance(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get an API Hub plugin instance.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * String name =
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString();
+ * PluginInstance response = apiHubPluginClient.getPluginInstance(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the plugin instance to retrieve. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PluginInstance getPluginInstance(String name) {
+ GetPluginInstanceRequest request = GetPluginInstanceRequest.newBuilder().setName(name).build();
+ return getPluginInstance(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get an API Hub plugin instance.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * GetPluginInstanceRequest request =
+ * GetPluginInstanceRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .build();
+ * PluginInstance response = apiHubPluginClient.getPluginInstance(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PluginInstance getPluginInstance(GetPluginInstanceRequest request) {
+ return getPluginInstanceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get an API Hub plugin instance.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * GetPluginInstanceRequest request =
+ * GetPluginInstanceRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * PluginName parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]");
+ * for (PluginInstance element : apiHubPluginClient.listPluginInstances(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where this plugin will be created. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}`. To list plugin instances for
+ * multiple plugins, use the - character instead of the plugin ID.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPluginInstancesPagedResponse listPluginInstances(PluginName parent) {
+ ListPluginInstancesRequest request =
+ ListPluginInstancesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listPluginInstances(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List all the plugins in a given project and location. `-` can be used as wildcard value for
+ * {plugin_id}
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * String parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString();
+ * for (PluginInstance element : apiHubPluginClient.listPluginInstances(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where this plugin will be created. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}`. To list plugin instances for
+ * multiple plugins, use the - character instead of the plugin ID.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPluginInstancesPagedResponse listPluginInstances(String parent) {
+ ListPluginInstancesRequest request =
+ ListPluginInstancesRequest.newBuilder().setParent(parent).build();
+ return listPluginInstances(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List all the plugins in a given project and location. `-` can be used as wildcard value for
+ * {plugin_id}
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * ListPluginInstancesRequest request =
+ * ListPluginInstancesRequest.newBuilder()
+ * .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (PluginInstance element : apiHubPluginClient.listPluginInstances(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPluginInstancesPagedResponse listPluginInstances(
+ ListPluginInstancesRequest request) {
+ return listPluginInstancesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List all the plugins in a given project and location. `-` can be used as wildcard value for
+ * {plugin_id}
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * ListPluginInstancesRequest request =
+ * ListPluginInstancesRequest.newBuilder()
+ * .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * ListPluginInstancesRequest request =
+ * ListPluginInstancesRequest.newBuilder()
+ * .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListPluginInstancesResponse response =
+ * apiHubPluginClient.listPluginInstancesCallable().call(request);
+ * for (PluginInstance element : response.getPluginInstancesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * PluginInstanceName name =
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]");
+ * String actionId = "actionId-1656172047";
+ * EnablePluginInstanceActionResponse response =
+ * apiHubPluginClient.enablePluginInstanceActionAsync(name, actionId).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the plugin instance to enable. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
+ * @param actionId Required. The action id to enable.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * String name =
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString();
+ * String actionId = "actionId-1656172047";
+ * EnablePluginInstanceActionResponse response =
+ * apiHubPluginClient.enablePluginInstanceActionAsync(name, actionId).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the plugin instance to enable. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
+ * @param actionId Required. The action id to enable.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * EnablePluginInstanceActionRequest request =
+ * EnablePluginInstanceActionRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .setActionId("actionId-1656172047")
+ * .build();
+ * EnablePluginInstanceActionResponse response =
+ * apiHubPluginClient.enablePluginInstanceActionAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * EnablePluginInstanceActionRequest request =
+ * EnablePluginInstanceActionRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .setActionId("actionId-1656172047")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ EnablePluginInstanceActionRequest, EnablePluginInstanceActionResponse, OperationMetadata>
+ enablePluginInstanceActionOperationCallable() {
+ return stub.enablePluginInstanceActionOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Enables a plugin instance in the API hub.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * EnablePluginInstanceActionRequest request =
+ * EnablePluginInstanceActionRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .setActionId("actionId-1656172047")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * PluginInstanceName name =
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]");
+ * String actionId = "actionId-1656172047";
+ * DisablePluginInstanceActionResponse response =
+ * apiHubPluginClient.disablePluginInstanceActionAsync(name, actionId).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the plugin instance to disable. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
+ * @param actionId Required. The action id to disable.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * String name =
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString();
+ * String actionId = "actionId-1656172047";
+ * DisablePluginInstanceActionResponse response =
+ * apiHubPluginClient.disablePluginInstanceActionAsync(name, actionId).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the plugin instance to disable. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
+ * @param actionId Required. The action id to disable.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * DisablePluginInstanceActionRequest request =
+ * DisablePluginInstanceActionRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .setActionId("actionId-1656172047")
+ * .build();
+ * DisablePluginInstanceActionResponse response =
+ * apiHubPluginClient.disablePluginInstanceActionAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * DisablePluginInstanceActionRequest request =
+ * DisablePluginInstanceActionRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .setActionId("actionId-1656172047")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ DisablePluginInstanceActionRequest,
+ DisablePluginInstanceActionResponse,
+ OperationMetadata>
+ disablePluginInstanceActionOperationCallable() {
+ return stub.disablePluginInstanceActionOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Disables a plugin instance in the API hub.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * DisablePluginInstanceActionRequest request =
+ * DisablePluginInstanceActionRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .setActionId("actionId-1656172047")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * PluginInstance pluginInstance = PluginInstance.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * PluginInstance response = apiHubPluginClient.updatePluginInstance(pluginInstance, updateMask);
+ * }
+ * }
+ *
+ * @param pluginInstance Required. The plugin instance to update.
+ * @param updateMask Optional. The list of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PluginInstance updatePluginInstance(
+ PluginInstance pluginInstance, FieldMask updateMask) {
+ UpdatePluginInstanceRequest request =
+ UpdatePluginInstanceRequest.newBuilder()
+ .setPluginInstance(pluginInstance)
+ .setUpdateMask(updateMask)
+ .build();
+ return updatePluginInstance(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a plugin instance in the API hub. The following fields in the
+ * [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated currently:
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * UpdatePluginInstanceRequest request =
+ * UpdatePluginInstanceRequest.newBuilder()
+ * .setPluginInstance(PluginInstance.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * PluginInstance response = apiHubPluginClient.updatePluginInstance(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PluginInstance updatePluginInstance(UpdatePluginInstanceRequest request) {
+ return updatePluginInstanceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a plugin instance in the API hub. The following fields in the
+ * [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated currently:
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * UpdatePluginInstanceRequest request =
+ * UpdatePluginInstanceRequest.newBuilder()
+ * .setPluginInstance(PluginInstance.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * PluginInstanceName name =
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]");
+ * apiHubPluginClient.deletePluginInstanceAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the plugin instance to delete. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * String name =
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString();
+ * apiHubPluginClient.deletePluginInstanceAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the plugin instance to delete. Format:
+ * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * DeletePluginInstanceRequest request =
+ * DeletePluginInstanceRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .build();
+ * apiHubPluginClient.deletePluginInstanceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * DeletePluginInstanceRequest request =
+ * DeletePluginInstanceRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * DeletePluginInstanceRequest request =
+ * DeletePluginInstanceRequest.newBuilder()
+ * .setName(
+ * PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : apiHubPluginClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = apiHubPluginClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = apiHubPluginClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubPluginSettings.Builder apiHubPluginSettingsBuilder = ApiHubPluginSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * apiHubPluginSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
*/
@Generated("by gapic-generator-java")
public class ApiHubPluginSettings extends ClientSettings
DeleteApiHubInstance
Deletes the API hub instance.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *deleteApiHubInstanceAsync(DeleteApiHubInstanceRequest request) + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *deleteApiHubInstanceAsync(ApiHubInstanceName name) + *
deleteApiHubInstanceAsync(String name) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *deleteApiHubInstanceOperationCallable() + *
deleteApiHubInstanceCallable() + *
GetApiHubInstance
Gets details of a single API Hub instance.
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+ * ApiHubInstanceName name =
+ * ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]");
+ * provisioningClient.deleteApiHubInstanceAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Api Hub instance to delete. Format:
+ * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+ * String name =
+ * ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]").toString();
+ * provisioningClient.deleteApiHubInstanceAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Api Hub instance to delete. Format:
+ * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+ * DeleteApiHubInstanceRequest request =
+ * DeleteApiHubInstanceRequest.newBuilder()
+ * .setName(
+ * ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]").toString())
+ * .build();
+ * provisioningClient.deleteApiHubInstanceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+ * DeleteApiHubInstanceRequest request =
+ * DeleteApiHubInstanceRequest.newBuilder()
+ * .setName(
+ * ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]").toString())
+ * .build();
+ * OperationFuture future =
+ * provisioningClient.deleteApiHubInstanceOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
+ * DeleteApiHubInstanceRequest request =
+ * DeleteApiHubInstanceRequest.newBuilder()
+ * .setName(
+ * ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]").toString())
+ * .build();
+ * ApiFuture future =
+ * provisioningClient.deleteApiHubInstanceCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable======================= ApiHubCollectClient ======================= + * + *
Service Description: This service exposes methods used for collecting various types of data + * from different first party and third party sources and push it to Hub's collect layer. + * + *
Sample for ApiHubCollectClient: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = apiHubCollectClient.getLocation(request);
+ * }
+ * }
+ *
+ * ======================= ApiHubCurateClient ======================= + * + *
Service Description: This service is used for managing curations for processing API data + * consumed from collect layer. + * + *
Sample for ApiHubCurateClient: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Curation curation = Curation.newBuilder().build();
+ * String curationId = "curationId1428017328";
+ * Curation response = apiHubCurateClient.createCuration(parent, curation, curationId);
+ * }
+ * }
+ *
+ * ======================= ApiHubDiscoveryClient ======================= + * + *
Service Description: This service exposes methods used to manage DiscoveredApiObservations and + * DiscoveredApiOperations. + * + *
Sample for ApiHubDiscoveryClient: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
+ * DiscoveredApiObservationName name =
+ * DiscoveredApiObservationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]");
+ * DiscoveredApiObservation response = apiHubDiscoveryClient.getDiscoveredApiObservation(name);
+ * }
+ * }
+ *
* ======================= HostProjectRegistrationServiceClient ======================= * *
Service Description: This service is used for managing the host project registrations. diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCollectStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCollectStub.java new file mode 100644 index 000000000000..d3e030b633c9 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCollectStub.java @@ -0,0 +1,72 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.apihub.v1.stub; + +import static com.google.cloud.apihub.v1.ApiHubCollectClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apihub.v1.CollectApiDataRequest; +import com.google.cloud.apihub.v1.CollectApiDataResponse; +import com.google.cloud.apihub.v1.OperationMetadata; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ApiHubCollect service API. + * + *
This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class ApiHubCollectStub implements BackgroundResource {
+
+ public OperationsStub getHttpJsonOperationsStub() {
+ throw new UnsupportedOperationException("Not implemented: getHttpJsonOperationsStub()");
+ }
+
+ public OperationCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getLocation:
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for collectApiData:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class ApiHubCurateStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of createCuration:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class ApiHubDiscoveryStub implements BackgroundResource {
+
+ public UnaryCallable<
+ ListDiscoveredApiObservationsRequest, ListDiscoveredApiObservationsPagedResponse>
+ listDiscoveredApiObservationsPagedCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: listDiscoveredApiObservationsPagedCallable()");
+ }
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getDiscoveredApiObservation:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for deletePlugin:
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubCollectStubSettings.Builder apiHubCollectSettingsBuilder =
+ * ApiHubCollectStubSettings.newBuilder();
+ * apiHubCollectSettingsBuilder
+ * .getLocationSettings()
+ * .setRetrySettings(
+ * apiHubCollectSettingsBuilder
+ * .getLocationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * ApiHubCollectStubSettings apiHubCollectSettings = apiHubCollectSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubCollectStubSettings.Builder apiHubCollectSettingsBuilder =
+ * ApiHubCollectStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * apiHubCollectSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ApiHubCollectStubSettings extends StubSettings
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubCurateStubSettings.Builder apiHubCurateSettingsBuilder =
+ * ApiHubCurateStubSettings.newBuilder();
+ * apiHubCurateSettingsBuilder
+ * .createCurationSettings()
+ * .setRetrySettings(
+ * apiHubCurateSettingsBuilder
+ * .createCurationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * ApiHubCurateStubSettings apiHubCurateSettings = apiHubCurateSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@Generated("by gapic-generator-java")
+public class ApiHubCurateStubSettings extends StubSettings
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubDiscoveryStubSettings.Builder apiHubDiscoverySettingsBuilder =
+ * ApiHubDiscoveryStubSettings.newBuilder();
+ * apiHubDiscoverySettingsBuilder
+ * .getDiscoveredApiObservationSettings()
+ * .setRetrySettings(
+ * apiHubDiscoverySettingsBuilder
+ * .getDiscoveredApiObservationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * ApiHubDiscoveryStubSettings apiHubDiscoverySettings = apiHubDiscoverySettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@Generated("by gapic-generator-java")
+public class ApiHubDiscoveryStubSettings extends StubSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ApiHubPluginStubSettings.Builder apiHubPluginSettingsBuilder =
+ * ApiHubPluginStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * apiHubPluginSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
*/
@Generated("by gapic-generator-java")
public class ApiHubPluginStubSettings extends StubSettings