getSystemPolicySettings() {
+ return getStubSettingsBuilder().getSystemPolicySettings();
+ }
+
+ @Override
+ public SystemPolicyV1Beta1Settings build() throws IOException {
+ return new SystemPolicyV1Beta1Settings(this);
+ }
+ }
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/gapic_metadata.json b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/gapic_metadata.json
index 50e7b6d0..ec84086e 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/gapic_metadata.json
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/gapic_metadata.json
@@ -34,6 +34,18 @@
}
}
}
+ },
+ "SystemPolicyV1Beta1": {
+ "clients": {
+ "grpc": {
+ "libraryClient": "SystemPolicyV1Beta1Client",
+ "rpcs": {
+ "GetSystemPolicy": {
+ "methods": ["getSystemPolicy", "getSystemPolicy", "getSystemPolicy", "getSystemPolicyCallable"]
+ }
+ }
+ }
+ }
}
}
}
\ No newline at end of file
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java
index 44e936c3..5bf3f916 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java
@@ -34,10 +34,23 @@
* {@code
* try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
* BinauthzManagementServiceV1Beta1Client.create()) {
- * PolicyName name = PolicyName.of("[PROJECT]");
+ * PolicyName name = PolicyName.ofProjectName("[PROJECT]");
* Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name);
* }
* }
+ *
+ * ======================= SystemPolicyV1Beta1Client =======================
+ *
+ *
Service Description: API for working with the system policy.
+ *
+ *
Sample for SystemPolicyV1Beta1Client:
+ *
+ *
{@code
+ * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
+ * PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ * Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
+ * }
+ * }
*/
@Generated("by gapic-generator-java")
package com.google.cloud.binaryauthorization.v1beta1;
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java
new file mode 100644
index 00000000..bd636c07
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2021 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.binaryauthorization.v1beta1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the SystemPolicyV1Beta1 service API.
+ *
+ * This class is for advanced usage.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class GrpcSystemPolicyV1Beta1CallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ GrpcCallSettings grpcCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ GrpcCallSettings grpcCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ GrpcCallSettings grpcCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBatchingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ GrpcCallSettings grpcCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ return GrpcCallableFactory.createOperationCallable(
+ grpcCallSettings, callSettings, clientContext, operationsStub);
+ }
+
+ @Override
+ public
+ BidiStreamingCallable createBidiStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBidiStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createServerStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ClientStreamingCallable createClientStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createClientStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java
new file mode 100644
index 00000000..33bf36ce
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java
@@ -0,0 +1,165 @@
+/*
+ * Copyright 2021 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.binaryauthorization.v1beta1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest;
+import com.google.cloud.binaryauthorization.v1beta1.Policy;
+import com.google.common.collect.ImmutableMap;
+import com.google.longrunning.stub.GrpcOperationsStub;
+import io.grpc.MethodDescriptor;
+import io.grpc.protobuf.ProtoUtils;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC stub implementation for the SystemPolicyV1Beta1 service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class GrpcSystemPolicyV1Beta1Stub extends SystemPolicyV1Beta1Stub {
+ private static final MethodDescriptor
+ getSystemPolicyMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1/GetSystemPolicy")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetSystemPolicyRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .build();
+
+ private final UnaryCallable getSystemPolicyCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final GrpcOperationsStub operationsStub;
+ private final GrpcStubCallableFactory callableFactory;
+
+ public static final GrpcSystemPolicyV1Beta1Stub create(SystemPolicyV1Beta1StubSettings settings)
+ throws IOException {
+ return new GrpcSystemPolicyV1Beta1Stub(settings, ClientContext.create(settings));
+ }
+
+ public static final GrpcSystemPolicyV1Beta1Stub create(ClientContext clientContext)
+ throws IOException {
+ return new GrpcSystemPolicyV1Beta1Stub(
+ SystemPolicyV1Beta1StubSettings.newBuilder().build(), clientContext);
+ }
+
+ public static final GrpcSystemPolicyV1Beta1Stub create(
+ ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException {
+ return new GrpcSystemPolicyV1Beta1Stub(
+ SystemPolicyV1Beta1StubSettings.newBuilder().build(), clientContext, callableFactory);
+ }
+
+ /**
+ * Constructs an instance of GrpcSystemPolicyV1Beta1Stub, 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 GrpcSystemPolicyV1Beta1Stub(
+ SystemPolicyV1Beta1StubSettings settings, ClientContext clientContext) throws IOException {
+ this(settings, clientContext, new GrpcSystemPolicyV1Beta1CallableFactory());
+ }
+
+ /**
+ * Constructs an instance of GrpcSystemPolicyV1Beta1Stub, 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 GrpcSystemPolicyV1Beta1Stub(
+ SystemPolicyV1Beta1StubSettings settings,
+ ClientContext clientContext,
+ GrpcStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
+
+ GrpcCallSettings getSystemPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getSystemPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+
+ this.getSystemPolicyCallable =
+ callableFactory.createUnaryCallable(
+ getSystemPolicyTransportSettings, settings.getSystemPolicySettings(), clientContext);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ public GrpcOperationsStub getOperationsStub() {
+ return operationsStub;
+ }
+
+ @Override
+ public UnaryCallable getSystemPolicyCallable() {
+ return getSystemPolicyCallable;
+ }
+
+ @Override
+ public final void close() {
+ try {
+ backgroundResources.close();
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new IllegalStateException("Failed to close resource", e);
+ }
+ }
+
+ @Override
+ public void shutdown() {
+ backgroundResources.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return backgroundResources.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return backgroundResources.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ backgroundResources.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return backgroundResources.awaitTermination(duration, unit);
+ }
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java
new file mode 100644
index 00000000..4ecfc173
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2021 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.binaryauthorization.v1beta1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest;
+import com.google.cloud.binaryauthorization.v1beta1.Policy;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the SystemPolicyV1Beta1 service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public abstract class SystemPolicyV1Beta1Stub implements BackgroundResource {
+
+ public UnaryCallable getSystemPolicyCallable() {
+ throw new UnsupportedOperationException("Not implemented: getSystemPolicyCallable()");
+ }
+
+ @Override
+ public abstract void close();
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java
new file mode 100644
index 00000000..a45e3cd8
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java
@@ -0,0 +1,266 @@
+/*
+ * Copyright 2021 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.binaryauthorization.v1beta1.stub;
+
+import com.google.api.core.ApiFunction;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.GaxProperties;
+import com.google.api.gax.core.GoogleCredentialsProvider;
+import com.google.api.gax.core.InstantiatingExecutorProvider;
+import com.google.api.gax.grpc.GaxGrpcProperties;
+import com.google.api.gax.grpc.GrpcTransportChannel;
+import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.retrying.RetrySettings;
+import com.google.api.gax.rpc.ApiClientHeaderProvider;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.StatusCode;
+import com.google.api.gax.rpc.StubSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest;
+import com.google.cloud.binaryauthorization.v1beta1.Policy;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Lists;
+import java.io.IOException;
+import java.util.List;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Settings class to configure an instance of {@link SystemPolicyV1Beta1Stub}.
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ *
+ * - The default service address (binaryauthorization.googleapis.com) and default port (443) are
+ * used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
+ *
+ * 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 total timeout of getSystemPolicy to 30 seconds:
+ *
+ *
{@code
+ * SystemPolicyV1Beta1StubSettings.Builder systemPolicyV1Beta1SettingsBuilder =
+ * SystemPolicyV1Beta1StubSettings.newBuilder();
+ * systemPolicyV1Beta1SettingsBuilder
+ * .getSystemPolicySettings()
+ * .setRetrySettings(
+ * systemPolicyV1Beta1SettingsBuilder
+ * .getSystemPolicySettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * SystemPolicyV1Beta1StubSettings systemPolicyV1Beta1Settings =
+ * systemPolicyV1Beta1SettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class SystemPolicyV1Beta1StubSettings extends StubSettings {
+ /** The default scopes of the service. */
+ private static final ImmutableList DEFAULT_SERVICE_SCOPES =
+ ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
+
+ private final UnaryCallSettings getSystemPolicySettings;
+
+ /** Returns the object with the settings used for calls to getSystemPolicy. */
+ public UnaryCallSettings getSystemPolicySettings() {
+ return getSystemPolicySettings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public SystemPolicyV1Beta1Stub createStub() throws IOException {
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(GrpcTransportChannel.getGrpcTransportName())) {
+ return GrpcSystemPolicyV1Beta1Stub.create(this);
+ }
+ throw new UnsupportedOperationException(
+ String.format(
+ "Transport not supported: %s", getTransportChannelProvider().getTransportName()));
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return InstantiatingExecutorProvider.newBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ public static String getDefaultEndpoint() {
+ return "binaryauthorization.googleapis.com:443";
+ }
+
+ /** Returns the default mTLS service endpoint. */
+ public static String getDefaultMtlsEndpoint() {
+ return "binaryauthorization.mtls.googleapis.com:443";
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return DEFAULT_SERVICE_SCOPES;
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return GoogleCredentialsProvider.newBuilder()
+ .setScopesToApply(DEFAULT_SERVICE_SCOPES)
+ .setUseJwtAccessWithScope(true);
+ }
+
+ /** Returns a builder for the default ChannelProvider for this service. */
+ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
+ return InstantiatingGrpcChannelProvider.newBuilder()
+ .setMaxInboundMessageSize(Integer.MAX_VALUE);
+ }
+
+ public static TransportChannelProvider defaultTransportChannelProvider() {
+ return defaultGrpcTransportProviderBuilder().build();
+ }
+
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(SystemPolicyV1Beta1StubSettings.class))
+ .setTransportToken(
+ GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder() {
+ return Builder.createDefault();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder(ClientContext clientContext) {
+ return new Builder(clientContext);
+ }
+
+ /** Returns a builder containing all the values of this settings class. */
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ protected SystemPolicyV1Beta1StubSettings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+
+ getSystemPolicySettings = settingsBuilder.getSystemPolicySettings().build();
+ }
+
+ /** Builder for SystemPolicyV1Beta1StubSettings. */
+ public static class Builder
+ extends StubSettings.Builder {
+ private final ImmutableList> unaryMethodSettingsBuilders;
+ private final UnaryCallSettings.Builder getSystemPolicySettings;
+ private static final ImmutableMap>
+ RETRYABLE_CODE_DEFINITIONS;
+
+ static {
+ ImmutableMap.Builder> definitions =
+ ImmutableMap.builder();
+ definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ RETRYABLE_CODE_DEFINITIONS = definitions.build();
+ }
+
+ private static final ImmutableMap RETRY_PARAM_DEFINITIONS;
+
+ static {
+ ImmutableMap.Builder definitions = ImmutableMap.builder();
+ RetrySettings settings = null;
+ settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
+ definitions.put("no_retry_params", settings);
+ RETRY_PARAM_DEFINITIONS = definitions.build();
+ }
+
+ protected Builder() {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(clientContext);
+
+ getSystemPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(getSystemPolicySettings);
+ initDefaults(this);
+ }
+
+ protected Builder(SystemPolicyV1Beta1StubSettings settings) {
+ super(settings);
+
+ getSystemPolicySettings = settings.getSystemPolicySettings.toBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(getSystemPolicySettings);
+ }
+
+ private static Builder createDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultTransportChannelProvider());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
+ private static Builder initDefaults(Builder builder) {
+ builder
+ .getSystemPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ return builder;
+ }
+
+ /**
+ * Applies the given settings updater function to all of the unary API methods in this service.
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction, Void> settingsUpdater) {
+ super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
+ return this;
+ }
+
+ public ImmutableList> unaryMethodSettingsBuilders() {
+ return unaryMethodSettingsBuilders;
+ }
+
+ /** Returns the builder for the settings used for calls to getSystemPolicy. */
+ public UnaryCallSettings.Builder getSystemPolicySettings() {
+ return getSystemPolicySettings;
+ }
+
+ @Override
+ public SystemPolicyV1Beta1StubSettings build() throws IOException {
+ return new SystemPolicyV1Beta1StubSettings(this);
+ }
+ }
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java
new file mode 100644
index 00000000..bbd24b07
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java
@@ -0,0 +1,1062 @@
+/*
+ * Copyright 2021 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.protos.google.cloud.binaryauthorization.v1;
+
+import com.google.api.core.ApiFuture;
+import com.google.api.core.ApiFutures;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+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.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.protobuf.Empty;
+import com.google.protos.google.cloud.binaryauthorization.v1.stub.BinauthzManagementServiceV1Stub;
+import com.google.protos.google.cloud.binaryauthorization.v1.stub.BinauthzManagementServiceV1StubSettings;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: Google Cloud Management Service for Binary Authorization admission policies
+ * and attestation authorities.
+ *
+ * This API implements a REST model with the following objects:
+ *
+ *
+ * - [Policy][google.cloud.binaryauthorization.v1.Policy]
+ *
- [Attestor][google.cloud.binaryauthorization.v1.Attestor]
+ *
+ *
+ * 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:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ * Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the BinauthzManagementServiceV1Client object to clean up
+ * resources such as threads. In the example above, try-with-resources is used, which automatically
+ * calls close().
+ *
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ *
+ * - A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable API
+ * callable object, which can be used to initiate calls to the service.
+ *
+ *
+ * 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
+ * BinauthzManagementServiceV1Settings to create(). For example:
+ *
+ *
To customize credentials:
+ *
+ *
{@code
+ * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
+ * BinauthzManagementServiceV1Settings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings);
+ * }
+ *
+ * To customize the endpoint:
+ *
+ *
{@code
+ * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
+ * BinauthzManagementServiceV1Settings.newBuilder().setEndpoint(myEndpoint).build();
+ * BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class BinauthzManagementServiceV1Client implements BackgroundResource {
+ private final BinauthzManagementServiceV1Settings settings;
+ private final BinauthzManagementServiceV1Stub stub;
+
+ /** Constructs an instance of BinauthzManagementServiceV1Client with default settings. */
+ public static final BinauthzManagementServiceV1Client create() throws IOException {
+ return create(BinauthzManagementServiceV1Settings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of BinauthzManagementServiceV1Client, 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 BinauthzManagementServiceV1Client create(
+ BinauthzManagementServiceV1Settings settings) throws IOException {
+ return new BinauthzManagementServiceV1Client(settings);
+ }
+
+ /**
+ * Constructs an instance of BinauthzManagementServiceV1Client, using the given stub for making
+ * calls. This is for advanced usage - prefer using create(BinauthzManagementServiceV1Settings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final BinauthzManagementServiceV1Client create(
+ BinauthzManagementServiceV1Stub stub) {
+ return new BinauthzManagementServiceV1Client(stub);
+ }
+
+ /**
+ * Constructs an instance of BinauthzManagementServiceV1Client, 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 BinauthzManagementServiceV1Client(BinauthzManagementServiceV1Settings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub = ((BinauthzManagementServiceV1StubSettings) settings.getStubSettings()).createStub();
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected BinauthzManagementServiceV1Client(BinauthzManagementServiceV1Stub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final BinauthzManagementServiceV1Settings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public BinauthzManagementServiceV1Stub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the
+ * [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container
+ * image, before the project is allowed to deploy that image. There is at most one policy per
+ * project. All image admission requests are permitted if a project has no policy.
+ *
+ *
Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a
+ * default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ * Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the
+ * [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, in the format
+ * `projects/*/policy`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Resources.Policy getPolicy(PolicyName name) {
+ Service.GetPolicyRequest request =
+ Service.GetPolicyRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the
+ * [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container
+ * image, before the project is allowed to deploy that image. There is at most one policy per
+ * project. All image admission requests are permitted if a project has no policy.
+ *
+ * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a
+ * default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * String name = PolicyName.ofProjectName("[PROJECT]").toString();
+ * Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the
+ * [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, in the format
+ * `projects/*/policy`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Resources.Policy getPolicy(String name) {
+ Service.GetPolicyRequest request = Service.GetPolicyRequest.newBuilder().setName(name).build();
+ return getPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the
+ * [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container
+ * image, before the project is allowed to deploy that image. There is at most one policy per
+ * project. All image admission requests are permitted if a project has no policy.
+ *
+ * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a
+ * default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.GetPolicyRequest request =
+ * Service.GetPolicyRequest.newBuilder()
+ * .setName(PolicyName.ofProjectName("[PROJECT]").toString())
+ * .build();
+ * Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(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 Resources.Policy getPolicy(Service.GetPolicyRequest request) {
+ return getPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the
+ * [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container
+ * image, before the project is allowed to deploy that image. There is at most one policy per
+ * project. All image admission requests are permitted if a project has no policy.
+ *
+ * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a
+ * default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.GetPolicyRequest request =
+ * Service.GetPolicyRequest.newBuilder()
+ * .setName(PolicyName.ofProjectName("[PROJECT]").toString())
+ * .build();
+ * ApiFuture future =
+ * binauthzManagementServiceV1Client.getPolicyCallable().futureCall(request);
+ * // Do something.
+ * Resources.Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getPolicyCallable() {
+ return stub.getPolicyCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and
+ * returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is
+ * always updated as a whole, to avoid race conditions with concurrent policy enforcement (or
+ * management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the
+ * request is malformed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Resources.Policy policy = Resources.Policy.newBuilder().build();
+ * Resources.Policy response = binauthzManagementServiceV1Client.updatePolicy(policy);
+ * }
+ * }
+ *
+ * @param policy Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy]
+ * value. The service will overwrite the [policy
+ * name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in the
+ * request URL, in the format `projects/*/policy`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Resources.Policy updatePolicy(Resources.Policy policy) {
+ Service.UpdatePolicyRequest request =
+ Service.UpdatePolicyRequest.newBuilder().setPolicy(policy).build();
+ return updatePolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and
+ * returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is
+ * always updated as a whole, to avoid race conditions with concurrent policy enforcement (or
+ * management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the
+ * request is malformed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.UpdatePolicyRequest request =
+ * Service.UpdatePolicyRequest.newBuilder()
+ * .setPolicy(Resources.Policy.newBuilder().build())
+ * .build();
+ * Resources.Policy response = binauthzManagementServiceV1Client.updatePolicy(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 Resources.Policy updatePolicy(Service.UpdatePolicyRequest request) {
+ return updatePolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and
+ * returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is
+ * always updated as a whole, to avoid race conditions with concurrent policy enforcement (or
+ * management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the
+ * request is malformed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.UpdatePolicyRequest request =
+ * Service.UpdatePolicyRequest.newBuilder()
+ * .setPolicy(Resources.Policy.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * binauthzManagementServiceV1Client.updatePolicyCallable().futureCall(request);
+ * // Do something.
+ * Resources.Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable updatePolicyCallable() {
+ return stub.updatePolicyCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the
+ * new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project
+ * does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * String attestorId = "attestorId2055733027";
+ * Resources.Attestor attestor = Resources.Attestor.newBuilder().build();
+ * Resources.Attestor response =
+ * binauthzManagementServiceV1Client.createAttestor(parent, attestorId, attestor);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of this
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor].
+ * @param attestorId Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
+ * @param attestor Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor]
+ * value. The service will overwrite the [attestor
+ * name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, in
+ * the format `projects/*/attestors/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Resources.Attestor createAttestor(
+ ProjectName parent, String attestorId, Resources.Attestor attestor) {
+ Service.CreateAttestorRequest request =
+ Service.CreateAttestorRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setAttestorId(attestorId)
+ .setAttestor(attestor)
+ .build();
+ return createAttestor(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the
+ * new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project
+ * does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * String parent = ProjectName.of("[PROJECT]").toString();
+ * String attestorId = "attestorId2055733027";
+ * Resources.Attestor attestor = Resources.Attestor.newBuilder().build();
+ * Resources.Attestor response =
+ * binauthzManagementServiceV1Client.createAttestor(parent, attestorId, attestor);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of this
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor].
+ * @param attestorId Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
+ * @param attestor Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor]
+ * value. The service will overwrite the [attestor
+ * name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, in
+ * the format `projects/*/attestors/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Resources.Attestor createAttestor(
+ String parent, String attestorId, Resources.Attestor attestor) {
+ Service.CreateAttestorRequest request =
+ Service.CreateAttestorRequest.newBuilder()
+ .setParent(parent)
+ .setAttestorId(attestorId)
+ .setAttestor(attestor)
+ .build();
+ return createAttestor(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the
+ * new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project
+ * does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.CreateAttestorRequest request =
+ * Service.CreateAttestorRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setAttestorId("attestorId2055733027")
+ * .setAttestor(Resources.Attestor.newBuilder().build())
+ * .build();
+ * Resources.Attestor response = binauthzManagementServiceV1Client.createAttestor(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 Resources.Attestor createAttestor(Service.CreateAttestorRequest request) {
+ return createAttestorCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the
+ * new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project
+ * does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.CreateAttestorRequest request =
+ * Service.CreateAttestorRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setAttestorId("attestorId2055733027")
+ * .setAttestor(Resources.Attestor.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * binauthzManagementServiceV1Client.createAttestorCallable().futureCall(request);
+ * // Do something.
+ * Resources.Attestor response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ createAttestorCallable() {
+ return stub.createAttestorCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
+ * Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor]
+ * to retrieve, in the format `projects/*/attestors/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Resources.Attestor getAttestor(AttestorName name) {
+ Service.GetAttestorRequest request =
+ Service.GetAttestorRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getAttestor(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
+ * Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor]
+ * to retrieve, in the format `projects/*/attestors/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Resources.Attestor getAttestor(String name) {
+ Service.GetAttestorRequest request =
+ Service.GetAttestorRequest.newBuilder().setName(name).build();
+ return getAttestor(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.GetAttestorRequest request =
+ * Service.GetAttestorRequest.newBuilder()
+ * .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
+ * .build();
+ * Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(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 Resources.Attestor getAttestor(Service.GetAttestorRequest request) {
+ return getAttestorCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.GetAttestorRequest request =
+ * Service.GetAttestorRequest.newBuilder()
+ * .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
+ * .build();
+ * ApiFuture future =
+ * binauthzManagementServiceV1Client.getAttestorCallable().futureCall(request);
+ * // Do something.
+ * Resources.Attestor response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getAttestorCallable() {
+ return stub.getAttestorCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Resources.Attestor attestor = Resources.Attestor.newBuilder().build();
+ * Resources.Attestor response = binauthzManagementServiceV1Client.updateAttestor(attestor);
+ * }
+ * }
+ *
+ * @param attestor Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor]
+ * value. The service will overwrite the [attestor
+ * name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name in
+ * the request URL, in the format `projects/*/attestors/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Resources.Attestor updateAttestor(Resources.Attestor attestor) {
+ Service.UpdateAttestorRequest request =
+ Service.UpdateAttestorRequest.newBuilder().setAttestor(attestor).build();
+ return updateAttestor(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.UpdateAttestorRequest request =
+ * Service.UpdateAttestorRequest.newBuilder()
+ * .setAttestor(Resources.Attestor.newBuilder().build())
+ * .build();
+ * Resources.Attestor response = binauthzManagementServiceV1Client.updateAttestor(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 Resources.Attestor updateAttestor(Service.UpdateAttestorRequest request) {
+ return updateAttestorCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.UpdateAttestorRequest request =
+ * Service.UpdateAttestorRequest.newBuilder()
+ * .setAttestor(Resources.Attestor.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * binauthzManagementServiceV1Client.updateAttestorCallable().futureCall(request);
+ * // Do something.
+ * Resources.Attestor response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ updateAttestorCallable() {
+ return stub.updateAttestorCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if
+ * the project does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (Resources.Attestor element :
+ * binauthzManagementServiceV1Client.listAttestors(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the project associated with the
+ * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAttestorsPagedResponse listAttestors(ProjectName parent) {
+ Service.ListAttestorsRequest request =
+ Service.ListAttestorsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listAttestors(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if
+ * the project does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * String parent = ProjectName.of("[PROJECT]").toString();
+ * for (Resources.Attestor element :
+ * binauthzManagementServiceV1Client.listAttestors(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the project associated with the
+ * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAttestorsPagedResponse listAttestors(String parent) {
+ Service.ListAttestorsRequest request =
+ Service.ListAttestorsRequest.newBuilder().setParent(parent).build();
+ return listAttestors(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if
+ * the project does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.ListAttestorsRequest request =
+ * Service.ListAttestorsRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Resources.Attestor element :
+ * binauthzManagementServiceV1Client.listAttestors(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 ListAttestorsPagedResponse listAttestors(Service.ListAttestorsRequest request) {
+ return listAttestorsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if
+ * the project does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.ListAttestorsRequest request =
+ * Service.ListAttestorsRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * binauthzManagementServiceV1Client.listAttestorsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Resources.Attestor element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listAttestorsPagedCallable() {
+ return stub.listAttestorsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if
+ * the project does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.ListAttestorsRequest request =
+ * Service.ListAttestorsRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * Service.ListAttestorsResponse response =
+ * binauthzManagementServiceV1Client.listAttestorsCallable().call(request);
+ * for (Resources.Attestor element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listAttestorsCallable() {
+ return stub.listAttestorsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
+ * binauthzManagementServiceV1Client.deleteAttestor(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor]
+ * to delete, in the format `projects/*/attestors/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteAttestor(AttestorName name) {
+ Service.DeleteAttestorRequest request =
+ Service.DeleteAttestorRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteAttestor(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
+ * binauthzManagementServiceV1Client.deleteAttestor(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor]
+ * to delete, in the format `projects/*/attestors/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteAttestor(String name) {
+ Service.DeleteAttestorRequest request =
+ Service.DeleteAttestorRequest.newBuilder().setName(name).build();
+ deleteAttestor(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.DeleteAttestorRequest request =
+ * Service.DeleteAttestorRequest.newBuilder()
+ * .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
+ * .build();
+ * binauthzManagementServiceV1Client.deleteAttestor(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 deleteAttestor(Service.DeleteAttestorRequest request) {
+ deleteAttestorCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+ * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * Service.DeleteAttestorRequest request =
+ * Service.DeleteAttestorRequest.newBuilder()
+ * .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
+ * .build();
+ * ApiFuture future =
+ * binauthzManagementServiceV1Client.deleteAttestorCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteAttestorCallable() {
+ return stub.deleteAttestorCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+
+ public static class ListAttestorsPagedResponse
+ extends AbstractPagedListResponse<
+ Service.ListAttestorsRequest,
+ Service.ListAttestorsResponse,
+ Resources.Attestor,
+ ListAttestorsPage,
+ ListAttestorsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext
+ context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListAttestorsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListAttestorsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListAttestorsPagedResponse(ListAttestorsPage page) {
+ super(page, ListAttestorsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListAttestorsPage
+ extends AbstractPage<
+ Service.ListAttestorsRequest,
+ Service.ListAttestorsResponse,
+ Resources.Attestor,
+ ListAttestorsPage> {
+
+ private ListAttestorsPage(
+ PageContext
+ context,
+ Service.ListAttestorsResponse response) {
+ super(context, response);
+ }
+
+ private static ListAttestorsPage createEmptyPage() {
+ return new ListAttestorsPage(null, null);
+ }
+
+ @Override
+ protected ListAttestorsPage createPage(
+ PageContext
+ context,
+ Service.ListAttestorsResponse response) {
+ return new ListAttestorsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext
+ context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListAttestorsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ Service.ListAttestorsRequest,
+ Service.ListAttestorsResponse,
+ Resources.Attestor,
+ ListAttestorsPage,
+ ListAttestorsFixedSizeCollection> {
+
+ private ListAttestorsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListAttestorsFixedSizeCollection createEmptyCollection() {
+ return new ListAttestorsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListAttestorsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListAttestorsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java
new file mode 100644
index 00000000..e7a23f93
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java
@@ -0,0 +1,261 @@
+/*
+ * Copyright 2021 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.protos.google.cloud.binaryauthorization.v1;
+
+import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse;
+
+import com.google.api.core.ApiFunction;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.GoogleCredentialsProvider;
+import com.google.api.gax.core.InstantiatingExecutorProvider;
+import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.rpc.ApiClientHeaderProvider;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientSettings;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.protobuf.Empty;
+import com.google.protos.google.cloud.binaryauthorization.v1.stub.BinauthzManagementServiceV1StubSettings;
+import java.io.IOException;
+import java.util.List;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Settings class to configure an instance of {@link BinauthzManagementServiceV1Client}.
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ *
+ * - The default service address (binaryauthorization.googleapis.com) and default port (443) are
+ * used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
+ *
+ * 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 total timeout of getPolicy to 30 seconds:
+ *
+ *
{@code
+ * BinauthzManagementServiceV1Settings.Builder binauthzManagementServiceV1SettingsBuilder =
+ * BinauthzManagementServiceV1Settings.newBuilder();
+ * binauthzManagementServiceV1SettingsBuilder
+ * .getPolicySettings()
+ * .setRetrySettings(
+ * binauthzManagementServiceV1SettingsBuilder
+ * .getPolicySettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
+ * binauthzManagementServiceV1SettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class BinauthzManagementServiceV1Settings
+ extends ClientSettings {
+
+ /** Returns the object with the settings used for calls to getPolicy. */
+ public UnaryCallSettings getPolicySettings() {
+ return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).getPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to updatePolicy. */
+ public UnaryCallSettings updatePolicySettings() {
+ return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).updatePolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to createAttestor. */
+ public UnaryCallSettings
+ createAttestorSettings() {
+ return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).createAttestorSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getAttestor. */
+ public UnaryCallSettings getAttestorSettings() {
+ return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).getAttestorSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateAttestor. */
+ public UnaryCallSettings
+ updateAttestorSettings() {
+ return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).updateAttestorSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listAttestors. */
+ public PagedCallSettings<
+ Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse>
+ listAttestorsSettings() {
+ return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).listAttestorsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteAttestor. */
+ public UnaryCallSettings deleteAttestorSettings() {
+ return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).deleteAttestorSettings();
+ }
+
+ public static final BinauthzManagementServiceV1Settings create(
+ BinauthzManagementServiceV1StubSettings stub) throws IOException {
+ return new BinauthzManagementServiceV1Settings.Builder(stub.toBuilder()).build();
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return BinauthzManagementServiceV1StubSettings.defaultExecutorProviderBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ public static String getDefaultEndpoint() {
+ return BinauthzManagementServiceV1StubSettings.getDefaultEndpoint();
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return BinauthzManagementServiceV1StubSettings.getDefaultServiceScopes();
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return BinauthzManagementServiceV1StubSettings.defaultCredentialsProviderBuilder();
+ }
+
+ /** Returns a builder for the default ChannelProvider for this service. */
+ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
+ return BinauthzManagementServiceV1StubSettings.defaultGrpcTransportProviderBuilder();
+ }
+
+ public static TransportChannelProvider defaultTransportChannelProvider() {
+ return BinauthzManagementServiceV1StubSettings.defaultTransportChannelProvider();
+ }
+
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return BinauthzManagementServiceV1StubSettings.defaultApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder() {
+ return Builder.createDefault();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder(ClientContext clientContext) {
+ return new Builder(clientContext);
+ }
+
+ /** Returns a builder containing all the values of this settings class. */
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ protected BinauthzManagementServiceV1Settings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+ }
+
+ /** Builder for BinauthzManagementServiceV1Settings. */
+ public static class Builder
+ extends ClientSettings.Builder {
+
+ protected Builder() throws IOException {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(BinauthzManagementServiceV1StubSettings.newBuilder(clientContext));
+ }
+
+ protected Builder(BinauthzManagementServiceV1Settings settings) {
+ super(settings.getStubSettings().toBuilder());
+ }
+
+ protected Builder(BinauthzManagementServiceV1StubSettings.Builder stubSettings) {
+ super(stubSettings);
+ }
+
+ private static Builder createDefault() {
+ return new Builder(BinauthzManagementServiceV1StubSettings.newBuilder());
+ }
+
+ public BinauthzManagementServiceV1StubSettings.Builder getStubSettingsBuilder() {
+ return ((BinauthzManagementServiceV1StubSettings.Builder) getStubSettings());
+ }
+
+ /**
+ * Applies the given settings updater function to all of the unary API methods in this service.
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction, Void> settingsUpdater) {
+ super.applyToAllUnaryMethods(
+ getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
+ return this;
+ }
+
+ /** Returns the builder for the settings used for calls to getPolicy. */
+ public UnaryCallSettings.Builder
+ getPolicySettings() {
+ return getStubSettingsBuilder().getPolicySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updatePolicy. */
+ public UnaryCallSettings.Builder
+ updatePolicySettings() {
+ return getStubSettingsBuilder().updatePolicySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to createAttestor. */
+ public UnaryCallSettings.Builder
+ createAttestorSettings() {
+ return getStubSettingsBuilder().createAttestorSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getAttestor. */
+ public UnaryCallSettings.Builder
+ getAttestorSettings() {
+ return getStubSettingsBuilder().getAttestorSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateAttestor. */
+ public UnaryCallSettings.Builder
+ updateAttestorSettings() {
+ return getStubSettingsBuilder().updateAttestorSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listAttestors. */
+ public PagedCallSettings.Builder<
+ Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse>
+ listAttestorsSettings() {
+ return getStubSettingsBuilder().listAttestorsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAttestor. */
+ public UnaryCallSettings.Builder
+ deleteAttestorSettings() {
+ return getStubSettingsBuilder().deleteAttestorSettings();
+ }
+
+ @Override
+ public BinauthzManagementServiceV1Settings build() throws IOException {
+ return new BinauthzManagementServiceV1Settings(this);
+ }
+ }
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java
new file mode 100644
index 00000000..a4fe0c1f
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java
@@ -0,0 +1,265 @@
+/*
+ * Copyright 2021 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.protos.google.cloud.binaryauthorization.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1Stub;
+import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1StubSettings;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: API for working with the system policy.
+ *
+ * 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:
+ *
+ *
{@code
+ * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
+ * PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the SystemPolicyV1Client object to clean up resources such
+ * as threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ *
+ * - A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable API
+ * callable object, which can be used to initiate calls to the service.
+ *
+ *
+ * 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 SystemPolicyV1Settings to
+ * create(). For example:
+ *
+ *
To customize credentials:
+ *
+ *
{@code
+ * SystemPolicyV1Settings systemPolicyV1Settings =
+ * SystemPolicyV1Settings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings);
+ * }
+ *
+ * To customize the endpoint:
+ *
+ *
{@code
+ * SystemPolicyV1Settings systemPolicyV1Settings =
+ * SystemPolicyV1Settings.newBuilder().setEndpoint(myEndpoint).build();
+ * SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class SystemPolicyV1Client implements BackgroundResource {
+ private final SystemPolicyV1Settings settings;
+ private final SystemPolicyV1Stub stub;
+
+ /** Constructs an instance of SystemPolicyV1Client with default settings. */
+ public static final SystemPolicyV1Client create() throws IOException {
+ return create(SystemPolicyV1Settings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SystemPolicyV1Client, 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 SystemPolicyV1Client create(SystemPolicyV1Settings settings)
+ throws IOException {
+ return new SystemPolicyV1Client(settings);
+ }
+
+ /**
+ * Constructs an instance of SystemPolicyV1Client, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(SystemPolicyV1Settings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final SystemPolicyV1Client create(SystemPolicyV1Stub stub) {
+ return new SystemPolicyV1Client(stub);
+ }
+
+ /**
+ * Constructs an instance of SystemPolicyV1Client, 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 SystemPolicyV1Client(SystemPolicyV1Settings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SystemPolicyV1StubSettings) settings.getStubSettings()).createStub();
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected SystemPolicyV1Client(SystemPolicyV1Stub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final SystemPolicyV1Settings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public SystemPolicyV1Stub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the current system policy in the specified location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
+ * PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name, in the format `locations/*/policy`. Note that the
+ * system policy is not associated with a project.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Resources.Policy getSystemPolicy(PolicyName name) {
+ Service.GetSystemPolicyRequest request =
+ Service.GetSystemPolicyRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getSystemPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the current system policy in the specified location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
+ * String name = PolicyName.ofProjectName("[PROJECT]").toString();
+ * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name, in the format `locations/*/policy`. Note that the
+ * system policy is not associated with a project.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Resources.Policy getSystemPolicy(String name) {
+ Service.GetSystemPolicyRequest request =
+ Service.GetSystemPolicyRequest.newBuilder().setName(name).build();
+ return getSystemPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the current system policy in the specified location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
+ * Service.GetSystemPolicyRequest request =
+ * Service.GetSystemPolicyRequest.newBuilder()
+ * .setName(PolicyName.ofProjectName("[PROJECT]").toString())
+ * .build();
+ * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(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 Resources.Policy getSystemPolicy(Service.GetSystemPolicyRequest request) {
+ return getSystemPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the current system policy in the specified location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
+ * Service.GetSystemPolicyRequest request =
+ * Service.GetSystemPolicyRequest.newBuilder()
+ * .setName(PolicyName.ofProjectName("[PROJECT]").toString())
+ * .build();
+ * ApiFuture future =
+ * systemPolicyV1Client.getSystemPolicyCallable().futureCall(request);
+ * // Do something.
+ * Resources.Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ getSystemPolicyCallable() {
+ return stub.getSystemPolicyCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java
new file mode 100644
index 00000000..1cfd8c98
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java
@@ -0,0 +1,184 @@
+/*
+ * Copyright 2021 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.protos.google.cloud.binaryauthorization.v1;
+
+import com.google.api.core.ApiFunction;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.GoogleCredentialsProvider;
+import com.google.api.gax.core.InstantiatingExecutorProvider;
+import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.rpc.ApiClientHeaderProvider;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1StubSettings;
+import java.io.IOException;
+import java.util.List;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Settings class to configure an instance of {@link SystemPolicyV1Client}.
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ *
+ * - The default service address (binaryauthorization.googleapis.com) and default port (443) are
+ * used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
+ *
+ * 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 total timeout of getSystemPolicy to 30 seconds:
+ *
+ *
{@code
+ * SystemPolicyV1Settings.Builder systemPolicyV1SettingsBuilder =
+ * SystemPolicyV1Settings.newBuilder();
+ * systemPolicyV1SettingsBuilder
+ * .getSystemPolicySettings()
+ * .setRetrySettings(
+ * systemPolicyV1SettingsBuilder
+ * .getSystemPolicySettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * SystemPolicyV1Settings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class SystemPolicyV1Settings extends ClientSettings {
+
+ /** Returns the object with the settings used for calls to getSystemPolicy. */
+ public UnaryCallSettings
+ getSystemPolicySettings() {
+ return ((SystemPolicyV1StubSettings) getStubSettings()).getSystemPolicySettings();
+ }
+
+ public static final SystemPolicyV1Settings create(SystemPolicyV1StubSettings stub)
+ throws IOException {
+ return new SystemPolicyV1Settings.Builder(stub.toBuilder()).build();
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return SystemPolicyV1StubSettings.defaultExecutorProviderBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ public static String getDefaultEndpoint() {
+ return SystemPolicyV1StubSettings.getDefaultEndpoint();
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return SystemPolicyV1StubSettings.getDefaultServiceScopes();
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return SystemPolicyV1StubSettings.defaultCredentialsProviderBuilder();
+ }
+
+ /** Returns a builder for the default ChannelProvider for this service. */
+ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
+ return SystemPolicyV1StubSettings.defaultGrpcTransportProviderBuilder();
+ }
+
+ public static TransportChannelProvider defaultTransportChannelProvider() {
+ return SystemPolicyV1StubSettings.defaultTransportChannelProvider();
+ }
+
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return SystemPolicyV1StubSettings.defaultApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder() {
+ return Builder.createDefault();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder(ClientContext clientContext) {
+ return new Builder(clientContext);
+ }
+
+ /** Returns a builder containing all the values of this settings class. */
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ protected SystemPolicyV1Settings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+ }
+
+ /** Builder for SystemPolicyV1Settings. */
+ public static class Builder extends ClientSettings.Builder {
+
+ protected Builder() throws IOException {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(SystemPolicyV1StubSettings.newBuilder(clientContext));
+ }
+
+ protected Builder(SystemPolicyV1Settings settings) {
+ super(settings.getStubSettings().toBuilder());
+ }
+
+ protected Builder(SystemPolicyV1StubSettings.Builder stubSettings) {
+ super(stubSettings);
+ }
+
+ private static Builder createDefault() {
+ return new Builder(SystemPolicyV1StubSettings.newBuilder());
+ }
+
+ public SystemPolicyV1StubSettings.Builder getStubSettingsBuilder() {
+ return ((SystemPolicyV1StubSettings.Builder) getStubSettings());
+ }
+
+ /**
+ * Applies the given settings updater function to all of the unary API methods in this service.
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction, Void> settingsUpdater) {
+ super.applyToAllUnaryMethods(
+ getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
+ return this;
+ }
+
+ /** Returns the builder for the settings used for calls to getSystemPolicy. */
+ public UnaryCallSettings.Builder
+ getSystemPolicySettings() {
+ return getStubSettingsBuilder().getSystemPolicySettings();
+ }
+
+ @Override
+ public SystemPolicyV1Settings build() throws IOException {
+ return new SystemPolicyV1Settings(this);
+ }
+ }
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java
new file mode 100644
index 00000000..af4f0634
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java
@@ -0,0 +1,237 @@
+/*
+ * Copyright 2021 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.protos.google.cloud.binaryauthorization.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1Stub;
+import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1StubSettings;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: BinAuthz Attestor verification
+ *
+ * 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:
+ *
+ *
{@code
+ * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
+ * Service.ValidateAttestationOccurrenceRequest request =
+ * Service.ValidateAttestationOccurrenceRequest.newBuilder()
+ * .setAttestor("attestor542920680")
+ * .setAttestation(AttestationOccurrence.newBuilder().build())
+ * .setOccurrenceNote("occurrenceNote1722072419")
+ * .setOccurrenceResourceUri("occurrenceResourceUri1001424877")
+ * .build();
+ * Service.ValidateAttestationOccurrenceResponse response =
+ * validationHelperV1Client.validateAttestationOccurrence(request);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the ValidationHelperV1Client object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ *
+ * - A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable API
+ * callable object, which can be used to initiate calls to the service.
+ *
+ *
+ * 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 ValidationHelperV1Settings to
+ * create(). For example:
+ *
+ *
To customize credentials:
+ *
+ *
{@code
+ * ValidationHelperV1Settings validationHelperV1Settings =
+ * ValidationHelperV1Settings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ValidationHelperV1Client validationHelperV1Client =
+ * ValidationHelperV1Client.create(validationHelperV1Settings);
+ * }
+ *
+ * To customize the endpoint:
+ *
+ *
{@code
+ * ValidationHelperV1Settings validationHelperV1Settings =
+ * ValidationHelperV1Settings.newBuilder().setEndpoint(myEndpoint).build();
+ * ValidationHelperV1Client validationHelperV1Client =
+ * ValidationHelperV1Client.create(validationHelperV1Settings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class ValidationHelperV1Client implements BackgroundResource {
+ private final ValidationHelperV1Settings settings;
+ private final ValidationHelperV1Stub stub;
+
+ /** Constructs an instance of ValidationHelperV1Client with default settings. */
+ public static final ValidationHelperV1Client create() throws IOException {
+ return create(ValidationHelperV1Settings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ValidationHelperV1Client, 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 ValidationHelperV1Client create(ValidationHelperV1Settings settings)
+ throws IOException {
+ return new ValidationHelperV1Client(settings);
+ }
+
+ /**
+ * Constructs an instance of ValidationHelperV1Client, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(ValidationHelperV1Settings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final ValidationHelperV1Client create(ValidationHelperV1Stub stub) {
+ return new ValidationHelperV1Client(stub);
+ }
+
+ /**
+ * Constructs an instance of ValidationHelperV1Client, 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 ValidationHelperV1Client(ValidationHelperV1Settings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((ValidationHelperV1StubSettings) settings.getStubSettings()).createStub();
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected ValidationHelperV1Client(ValidationHelperV1Stub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final ValidationHelperV1Settings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public ValidationHelperV1Stub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns whether the given Attestation for the given image URI was signed by the given Attestor
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
+ * Service.ValidateAttestationOccurrenceRequest request =
+ * Service.ValidateAttestationOccurrenceRequest.newBuilder()
+ * .setAttestor("attestor542920680")
+ * .setAttestation(AttestationOccurrence.newBuilder().build())
+ * .setOccurrenceNote("occurrenceNote1722072419")
+ * .setOccurrenceResourceUri("occurrenceResourceUri1001424877")
+ * .build();
+ * Service.ValidateAttestationOccurrenceResponse response =
+ * validationHelperV1Client.validateAttestationOccurrence(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 Service.ValidateAttestationOccurrenceResponse validateAttestationOccurrence(
+ Service.ValidateAttestationOccurrenceRequest request) {
+ return validateAttestationOccurrenceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns whether the given Attestation for the given image URI was signed by the given Attestor
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
+ * Service.ValidateAttestationOccurrenceRequest request =
+ * Service.ValidateAttestationOccurrenceRequest.newBuilder()
+ * .setAttestor("attestor542920680")
+ * .setAttestation(AttestationOccurrence.newBuilder().build())
+ * .setOccurrenceNote("occurrenceNote1722072419")
+ * .setOccurrenceResourceUri("occurrenceResourceUri1001424877")
+ * .build();
+ * ApiFuture future =
+ * validationHelperV1Client.validateAttestationOccurrenceCallable().futureCall(request);
+ * // Do something.
+ * Service.ValidateAttestationOccurrenceResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ Service.ValidateAttestationOccurrenceRequest,
+ Service.ValidateAttestationOccurrenceResponse>
+ validateAttestationOccurrenceCallable() {
+ return stub.validateAttestationOccurrenceCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java
new file mode 100644
index 00000000..b3adada0
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java
@@ -0,0 +1,190 @@
+/*
+ * Copyright 2021 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.protos.google.cloud.binaryauthorization.v1;
+
+import com.google.api.core.ApiFunction;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.GoogleCredentialsProvider;
+import com.google.api.gax.core.InstantiatingExecutorProvider;
+import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.rpc.ApiClientHeaderProvider;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1StubSettings;
+import java.io.IOException;
+import java.util.List;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Settings class to configure an instance of {@link ValidationHelperV1Client}.
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ *
+ * - The default service address (binaryauthorization.googleapis.com) and default port (443) are
+ * used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
+ *
+ * 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 total timeout of validateAttestationOccurrence to 30 seconds:
+ *
+ *
{@code
+ * ValidationHelperV1Settings.Builder validationHelperV1SettingsBuilder =
+ * ValidationHelperV1Settings.newBuilder();
+ * validationHelperV1SettingsBuilder
+ * .validateAttestationOccurrenceSettings()
+ * .setRetrySettings(
+ * validationHelperV1SettingsBuilder
+ * .validateAttestationOccurrenceSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ValidationHelperV1Settings validationHelperV1Settings =
+ * validationHelperV1SettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ValidationHelperV1Settings extends ClientSettings {
+
+ /** Returns the object with the settings used for calls to validateAttestationOccurrence. */
+ public UnaryCallSettings<
+ Service.ValidateAttestationOccurrenceRequest,
+ Service.ValidateAttestationOccurrenceResponse>
+ validateAttestationOccurrenceSettings() {
+ return ((ValidationHelperV1StubSettings) getStubSettings())
+ .validateAttestationOccurrenceSettings();
+ }
+
+ public static final ValidationHelperV1Settings create(ValidationHelperV1StubSettings stub)
+ throws IOException {
+ return new ValidationHelperV1Settings.Builder(stub.toBuilder()).build();
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return ValidationHelperV1StubSettings.defaultExecutorProviderBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ public static String getDefaultEndpoint() {
+ return ValidationHelperV1StubSettings.getDefaultEndpoint();
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return ValidationHelperV1StubSettings.getDefaultServiceScopes();
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return ValidationHelperV1StubSettings.defaultCredentialsProviderBuilder();
+ }
+
+ /** Returns a builder for the default ChannelProvider for this service. */
+ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
+ return ValidationHelperV1StubSettings.defaultGrpcTransportProviderBuilder();
+ }
+
+ public static TransportChannelProvider defaultTransportChannelProvider() {
+ return ValidationHelperV1StubSettings.defaultTransportChannelProvider();
+ }
+
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return ValidationHelperV1StubSettings.defaultApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder() {
+ return Builder.createDefault();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder(ClientContext clientContext) {
+ return new Builder(clientContext);
+ }
+
+ /** Returns a builder containing all the values of this settings class. */
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ protected ValidationHelperV1Settings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+ }
+
+ /** Builder for ValidationHelperV1Settings. */
+ public static class Builder extends ClientSettings.Builder {
+
+ protected Builder() throws IOException {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(ValidationHelperV1StubSettings.newBuilder(clientContext));
+ }
+
+ protected Builder(ValidationHelperV1Settings settings) {
+ super(settings.getStubSettings().toBuilder());
+ }
+
+ protected Builder(ValidationHelperV1StubSettings.Builder stubSettings) {
+ super(stubSettings);
+ }
+
+ private static Builder createDefault() {
+ return new Builder(ValidationHelperV1StubSettings.newBuilder());
+ }
+
+ public ValidationHelperV1StubSettings.Builder getStubSettingsBuilder() {
+ return ((ValidationHelperV1StubSettings.Builder) getStubSettings());
+ }
+
+ /**
+ * Applies the given settings updater function to all of the unary API methods in this service.
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction, Void> settingsUpdater) {
+ super.applyToAllUnaryMethods(
+ getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
+ return this;
+ }
+
+ /** Returns the builder for the settings used for calls to validateAttestationOccurrence. */
+ public UnaryCallSettings.Builder<
+ Service.ValidateAttestationOccurrenceRequest,
+ Service.ValidateAttestationOccurrenceResponse>
+ validateAttestationOccurrenceSettings() {
+ return getStubSettingsBuilder().validateAttestationOccurrenceSettings();
+ }
+
+ @Override
+ public ValidationHelperV1Settings build() throws IOException {
+ return new ValidationHelperV1Settings(this);
+ }
+ }
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/gapic_metadata.json b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/gapic_metadata.json
new file mode 100644
index 00000000..e5c1b6f2
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/gapic_metadata.json
@@ -0,0 +1,63 @@
+{
+ "schema": "1.0",
+ "comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
+ "language": "java",
+ "protoPackage": "google.cloud.binaryauthorization.v1",
+ "libraryPackage": "com.google.protos.google.cloud.binaryauthorization.v1",
+ "services": {
+ "BinauthzManagementServiceV1": {
+ "clients": {
+ "grpc": {
+ "libraryClient": "BinauthzManagementServiceV1Client",
+ "rpcs": {
+ "CreateAttestor": {
+ "methods": ["createAttestor", "createAttestor", "createAttestor", "createAttestorCallable"]
+ },
+ "DeleteAttestor": {
+ "methods": ["deleteAttestor", "deleteAttestor", "deleteAttestor", "deleteAttestorCallable"]
+ },
+ "GetAttestor": {
+ "methods": ["getAttestor", "getAttestor", "getAttestor", "getAttestorCallable"]
+ },
+ "GetPolicy": {
+ "methods": ["getPolicy", "getPolicy", "getPolicy", "getPolicyCallable"]
+ },
+ "ListAttestors": {
+ "methods": ["listAttestors", "listAttestors", "listAttestors", "listAttestorsPagedCallable", "listAttestorsCallable"]
+ },
+ "UpdateAttestor": {
+ "methods": ["updateAttestor", "updateAttestor", "updateAttestorCallable"]
+ },
+ "UpdatePolicy": {
+ "methods": ["updatePolicy", "updatePolicy", "updatePolicyCallable"]
+ }
+ }
+ }
+ }
+ },
+ "SystemPolicyV1": {
+ "clients": {
+ "grpc": {
+ "libraryClient": "SystemPolicyV1Client",
+ "rpcs": {
+ "GetSystemPolicy": {
+ "methods": ["getSystemPolicy", "getSystemPolicy", "getSystemPolicy", "getSystemPolicyCallable"]
+ }
+ }
+ }
+ }
+ },
+ "ValidationHelperV1": {
+ "clients": {
+ "grpc": {
+ "libraryClient": "ValidationHelperV1Client",
+ "rpcs": {
+ "ValidateAttestationOccurrence": {
+ "methods": ["validateAttestationOccurrence", "validateAttestationOccurrenceCallable"]
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java
new file mode 100644
index 00000000..3c020298
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2021 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.
+ */
+
+/**
+ * A client to Binary Authorization API
+ *
+ * The interfaces provided are listed below, along with usage samples.
+ *
+ *
======================= BinauthzManagementServiceV1Client =======================
+ *
+ *
Service Description: Google Cloud Management Service for Binary Authorization admission
+ * policies and attestation authorities.
+ *
+ *
This API implements a REST model with the following objects:
+ *
+ *
+ * - [Policy][google.cloud.binaryauthorization.v1.Policy]
+ *
- [Attestor][google.cloud.binaryauthorization.v1.Attestor]
+ *
+ *
+ * Sample for BinauthzManagementServiceV1Client:
+ *
+ *
{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ * BinauthzManagementServiceV1Client.create()) {
+ * PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ * Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name);
+ * }
+ * }
+ *
+ * ======================= SystemPolicyV1Client =======================
+ *
+ *
Service Description: API for working with the system policy.
+ *
+ *
Sample for SystemPolicyV1Client:
+ *
+ *
{@code
+ * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
+ * PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
+ * }
+ * }
+ *
+ * ======================= ValidationHelperV1Client =======================
+ *
+ *
Service Description: BinAuthz Attestor verification
+ *
+ *
Sample for ValidationHelperV1Client:
+ *
+ *
{@code
+ * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
+ * Service.ValidateAttestationOccurrenceRequest request =
+ * Service.ValidateAttestationOccurrenceRequest.newBuilder()
+ * .setAttestor("attestor542920680")
+ * .setAttestation(AttestationOccurrence.newBuilder().build())
+ * .setOccurrenceNote("occurrenceNote1722072419")
+ * .setOccurrenceResourceUri("occurrenceResourceUri1001424877")
+ * .build();
+ * Service.ValidateAttestationOccurrenceResponse response =
+ * validationHelperV1Client.validateAttestationOccurrence(request);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.protos.google.cloud.binaryauthorization.v1;
+
+import javax.annotation.Generated;
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java
new file mode 100644
index 00000000..a5f29095
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2021 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.protos.google.cloud.binaryauthorization.v1.stub;
+
+import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.protobuf.Empty;
+import com.google.protos.google.cloud.binaryauthorization.v1.Resources;
+import com.google.protos.google.cloud.binaryauthorization.v1.Service;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the BinauthzManagementServiceV1 service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class BinauthzManagementServiceV1Stub implements BackgroundResource {
+
+ public UnaryCallable getPolicyCallable() {
+ throw new UnsupportedOperationException("Not implemented: getPolicyCallable()");
+ }
+
+ public UnaryCallable updatePolicyCallable() {
+ throw new UnsupportedOperationException("Not implemented: updatePolicyCallable()");
+ }
+
+ public UnaryCallable createAttestorCallable() {
+ throw new UnsupportedOperationException("Not implemented: createAttestorCallable()");
+ }
+
+ public UnaryCallable getAttestorCallable() {
+ throw new UnsupportedOperationException("Not implemented: getAttestorCallable()");
+ }
+
+ public UnaryCallable updateAttestorCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateAttestorCallable()");
+ }
+
+ public UnaryCallable
+ listAttestorsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAttestorsPagedCallable()");
+ }
+
+ public UnaryCallable
+ listAttestorsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAttestorsCallable()");
+ }
+
+ public UnaryCallable deleteAttestorCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteAttestorCallable()");
+ }
+
+ @Override
+ public abstract void close();
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java
new file mode 100644
index 00000000..e939c961
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java
@@ -0,0 +1,524 @@
+/*
+ * Copyright 2021 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.protos.google.cloud.binaryauthorization.v1.stub;
+
+import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse;
+
+import com.google.api.core.ApiFunction;
+import com.google.api.core.ApiFuture;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.GaxProperties;
+import com.google.api.gax.core.GoogleCredentialsProvider;
+import com.google.api.gax.core.InstantiatingExecutorProvider;
+import com.google.api.gax.grpc.GaxGrpcProperties;
+import com.google.api.gax.grpc.GrpcTransportChannel;
+import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.retrying.RetrySettings;
+import com.google.api.gax.rpc.ApiCallContext;
+import com.google.api.gax.rpc.ApiClientHeaderProvider;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.PagedListDescriptor;
+import com.google.api.gax.rpc.PagedListResponseFactory;
+import com.google.api.gax.rpc.StatusCode;
+import com.google.api.gax.rpc.StubSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Lists;
+import com.google.protobuf.Empty;
+import com.google.protos.google.cloud.binaryauthorization.v1.Resources;
+import com.google.protos.google.cloud.binaryauthorization.v1.Service;
+import java.io.IOException;
+import java.util.List;
+import javax.annotation.Generated;
+import org.threeten.bp.Duration;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Settings class to configure an instance of {@link BinauthzManagementServiceV1Stub}.
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ *
+ * - The default service address (binaryauthorization.googleapis.com) and default port (443) are
+ * used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
+ *
+ * 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 total timeout of getPolicy to 30 seconds:
+ *
+ *
{@code
+ * BinauthzManagementServiceV1StubSettings.Builder binauthzManagementServiceV1SettingsBuilder =
+ * BinauthzManagementServiceV1StubSettings.newBuilder();
+ * binauthzManagementServiceV1SettingsBuilder
+ * .getPolicySettings()
+ * .setRetrySettings(
+ * binauthzManagementServiceV1SettingsBuilder
+ * .getPolicySettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * BinauthzManagementServiceV1StubSettings binauthzManagementServiceV1Settings =
+ * binauthzManagementServiceV1SettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class BinauthzManagementServiceV1StubSettings
+ extends StubSettings {
+ /** The default scopes of the service. */
+ private static final ImmutableList DEFAULT_SERVICE_SCOPES =
+ ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
+
+ private final UnaryCallSettings getPolicySettings;
+ private final UnaryCallSettings
+ updatePolicySettings;
+ private final UnaryCallSettings
+ createAttestorSettings;
+ private final UnaryCallSettings
+ getAttestorSettings;
+ private final UnaryCallSettings
+ updateAttestorSettings;
+ private final PagedCallSettings<
+ Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse>
+ listAttestorsSettings;
+ private final UnaryCallSettings deleteAttestorSettings;
+
+ private static final PagedListDescriptor<
+ Service.ListAttestorsRequest, Service.ListAttestorsResponse, Resources.Attestor>
+ LIST_ATTESTORS_PAGE_STR_DESC =
+ new PagedListDescriptor<
+ Service.ListAttestorsRequest, Service.ListAttestorsResponse, Resources.Attestor>() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public Service.ListAttestorsRequest injectToken(
+ Service.ListAttestorsRequest payload, String token) {
+ return Service.ListAttestorsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public Service.ListAttestorsRequest injectPageSize(
+ Service.ListAttestorsRequest payload, int pageSize) {
+ return Service.ListAttestorsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(Service.ListAttestorsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(Service.ListAttestorsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(
+ Service.ListAttestorsResponse payload) {
+ return payload.getAttestorsList() == null
+ ? ImmutableList.of()
+ : payload.getAttestorsList();
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse>
+ LIST_ATTESTORS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ Service.ListAttestorsRequest,
+ Service.ListAttestorsResponse,
+ ListAttestorsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ Service.ListAttestorsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext<
+ Service.ListAttestorsRequest,
+ Service.ListAttestorsResponse,
+ Resources.Attestor>
+ pageContext =
+ PageContext.create(callable, LIST_ATTESTORS_PAGE_STR_DESC, request, context);
+ return ListAttestorsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ /** Returns the object with the settings used for calls to getPolicy. */
+ public UnaryCallSettings getPolicySettings() {
+ return getPolicySettings;
+ }
+
+ /** Returns the object with the settings used for calls to updatePolicy. */
+ public UnaryCallSettings updatePolicySettings() {
+ return updatePolicySettings;
+ }
+
+ /** Returns the object with the settings used for calls to createAttestor. */
+ public UnaryCallSettings
+ createAttestorSettings() {
+ return createAttestorSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getAttestor. */
+ public UnaryCallSettings getAttestorSettings() {
+ return getAttestorSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateAttestor. */
+ public UnaryCallSettings
+ updateAttestorSettings() {
+ return updateAttestorSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listAttestors. */
+ public PagedCallSettings<
+ Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse>
+ listAttestorsSettings() {
+ return listAttestorsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteAttestor. */
+ public UnaryCallSettings deleteAttestorSettings() {
+ return deleteAttestorSettings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public BinauthzManagementServiceV1Stub createStub() throws IOException {
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(GrpcTransportChannel.getGrpcTransportName())) {
+ return GrpcBinauthzManagementServiceV1Stub.create(this);
+ }
+ throw new UnsupportedOperationException(
+ String.format(
+ "Transport not supported: %s", getTransportChannelProvider().getTransportName()));
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return InstantiatingExecutorProvider.newBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ public static String getDefaultEndpoint() {
+ return "binaryauthorization.googleapis.com:443";
+ }
+
+ /** Returns the default mTLS service endpoint. */
+ public static String getDefaultMtlsEndpoint() {
+ return "binaryauthorization.mtls.googleapis.com:443";
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return DEFAULT_SERVICE_SCOPES;
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return GoogleCredentialsProvider.newBuilder()
+ .setScopesToApply(DEFAULT_SERVICE_SCOPES)
+ .setUseJwtAccessWithScope(true);
+ }
+
+ /** Returns a builder for the default ChannelProvider for this service. */
+ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
+ return InstantiatingGrpcChannelProvider.newBuilder()
+ .setMaxInboundMessageSize(Integer.MAX_VALUE);
+ }
+
+ public static TransportChannelProvider defaultTransportChannelProvider() {
+ return defaultGrpcTransportProviderBuilder().build();
+ }
+
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(BinauthzManagementServiceV1StubSettings.class))
+ .setTransportToken(
+ GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder() {
+ return Builder.createDefault();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder(ClientContext clientContext) {
+ return new Builder(clientContext);
+ }
+
+ /** Returns a builder containing all the values of this settings class. */
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ protected BinauthzManagementServiceV1StubSettings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+
+ getPolicySettings = settingsBuilder.getPolicySettings().build();
+ updatePolicySettings = settingsBuilder.updatePolicySettings().build();
+ createAttestorSettings = settingsBuilder.createAttestorSettings().build();
+ getAttestorSettings = settingsBuilder.getAttestorSettings().build();
+ updateAttestorSettings = settingsBuilder.updateAttestorSettings().build();
+ listAttestorsSettings = settingsBuilder.listAttestorsSettings().build();
+ deleteAttestorSettings = settingsBuilder.deleteAttestorSettings().build();
+ }
+
+ /** Builder for BinauthzManagementServiceV1StubSettings. */
+ public static class Builder
+ extends StubSettings.Builder {
+ private final ImmutableList> unaryMethodSettingsBuilders;
+ private final UnaryCallSettings.Builder
+ getPolicySettings;
+ private final UnaryCallSettings.Builder
+ updatePolicySettings;
+ private final UnaryCallSettings.Builder
+ createAttestorSettings;
+ private final UnaryCallSettings.Builder
+ getAttestorSettings;
+ private final UnaryCallSettings.Builder
+ updateAttestorSettings;
+ private final PagedCallSettings.Builder<
+ Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse>
+ listAttestorsSettings;
+ private final UnaryCallSettings.Builder
+ deleteAttestorSettings;
+ private static final ImmutableMap>
+ RETRYABLE_CODE_DEFINITIONS;
+
+ static {
+ ImmutableMap.Builder> definitions =
+ ImmutableMap.builder();
+ definitions.put(
+ "retry_policy_0_codes",
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put(
+ "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ RETRYABLE_CODE_DEFINITIONS = definitions.build();
+ }
+
+ private static final ImmutableMap RETRY_PARAM_DEFINITIONS;
+
+ static {
+ ImmutableMap.Builder definitions = ImmutableMap.builder();
+ RetrySettings settings = null;
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(100L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(60000L))
+ .setInitialRpcTimeout(Duration.ofMillis(600000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(600000L))
+ .setTotalTimeout(Duration.ofMillis(600000L))
+ .build();
+ definitions.put("retry_policy_0_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(600000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(600000L))
+ .setTotalTimeout(Duration.ofMillis(600000L))
+ .build();
+ definitions.put("no_retry_1_params", settings);
+ RETRY_PARAM_DEFINITIONS = definitions.build();
+ }
+
+ protected Builder() {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(clientContext);
+
+ getPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ updatePolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ createAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ getAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ updateAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ listAttestorsSettings = PagedCallSettings.newBuilder(LIST_ATTESTORS_PAGE_STR_FACT);
+ deleteAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(
+ getPolicySettings,
+ updatePolicySettings,
+ createAttestorSettings,
+ getAttestorSettings,
+ updateAttestorSettings,
+ listAttestorsSettings,
+ deleteAttestorSettings);
+ initDefaults(this);
+ }
+
+ protected Builder(BinauthzManagementServiceV1StubSettings settings) {
+ super(settings);
+
+ getPolicySettings = settings.getPolicySettings.toBuilder();
+ updatePolicySettings = settings.updatePolicySettings.toBuilder();
+ createAttestorSettings = settings.createAttestorSettings.toBuilder();
+ getAttestorSettings = settings.getAttestorSettings.toBuilder();
+ updateAttestorSettings = settings.updateAttestorSettings.toBuilder();
+ listAttestorsSettings = settings.listAttestorsSettings.toBuilder();
+ deleteAttestorSettings = settings.deleteAttestorSettings.toBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(
+ getPolicySettings,
+ updatePolicySettings,
+ createAttestorSettings,
+ getAttestorSettings,
+ updateAttestorSettings,
+ listAttestorsSettings,
+ deleteAttestorSettings);
+ }
+
+ private static Builder createDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultTransportChannelProvider());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
+ private static Builder initDefaults(Builder builder) {
+ builder
+ .getPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .updatePolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .createAttestorSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+ builder
+ .getAttestorSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .updateAttestorSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .listAttestorsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .deleteAttestorSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ return builder;
+ }
+
+ /**
+ * Applies the given settings updater function to all of the unary API methods in this service.
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction, Void> settingsUpdater) {
+ super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
+ return this;
+ }
+
+ public ImmutableList> unaryMethodSettingsBuilders() {
+ return unaryMethodSettingsBuilders;
+ }
+
+ /** Returns the builder for the settings used for calls to getPolicy. */
+ public UnaryCallSettings.Builder
+ getPolicySettings() {
+ return getPolicySettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updatePolicy. */
+ public UnaryCallSettings.Builder
+ updatePolicySettings() {
+ return updatePolicySettings;
+ }
+
+ /** Returns the builder for the settings used for calls to createAttestor. */
+ public UnaryCallSettings.Builder
+ createAttestorSettings() {
+ return createAttestorSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getAttestor. */
+ public UnaryCallSettings.Builder
+ getAttestorSettings() {
+ return getAttestorSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateAttestor. */
+ public UnaryCallSettings.Builder
+ updateAttestorSettings() {
+ return updateAttestorSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listAttestors. */
+ public PagedCallSettings.Builder<
+ Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse>
+ listAttestorsSettings() {
+ return listAttestorsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAttestor. */
+ public UnaryCallSettings.Builder
+ deleteAttestorSettings() {
+ return deleteAttestorSettings;
+ }
+
+ @Override
+ public BinauthzManagementServiceV1StubSettings build() throws IOException {
+ return new BinauthzManagementServiceV1StubSettings(this);
+ }
+ }
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java
new file mode 100644
index 00000000..5fc1fef3
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2021 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.protos.google.cloud.binaryauthorization.v1.stub;
+
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the BinauthzManagementServiceV1 service API.
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcBinauthzManagementServiceV1CallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ GrpcCallSettings grpcCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ GrpcCallSettings grpcCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ GrpcCallSettings grpcCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBatchingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ GrpcCallSettings grpcCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ return GrpcCallableFactory.createOperationCallable(
+ grpcCallSettings, callSettings, clientContext, operationsStub);
+ }
+
+ @Override
+ public
+ BidiStreamingCallable createBidiStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBidiStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createServerStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ClientStreamingCallable createClientStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createClientStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java
new file mode 100644
index 00000000..87b697b2
--- /dev/null
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java
@@ -0,0 +1,369 @@
+/*
+ * Copyright 2021 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.protos.google.cloud.binaryauthorization.v1.stub;
+
+import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.common.collect.ImmutableMap;
+import com.google.longrunning.stub.GrpcOperationsStub;
+import com.google.protobuf.Empty;
+import com.google.protos.google.cloud.binaryauthorization.v1.Resources;
+import com.google.protos.google.cloud.binaryauthorization.v1.Service;
+import io.grpc.MethodDescriptor;
+import io.grpc.protobuf.ProtoUtils;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC stub implementation for the BinauthzManagementServiceV1 service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcBinauthzManagementServiceV1Stub extends BinauthzManagementServiceV1Stub {
+ private static final MethodDescriptor
+ getPolicyMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/GetPolicy")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(Service.GetPolicyRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Resources.Policy.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ updatePolicyMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/UpdatePolicy")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(Service.UpdatePolicyRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Resources.Policy.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ createAttestorMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/CreateAttestor")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(Service.CreateAttestorRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Resources.Attestor.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ getAttestorMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/GetAttestor")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(Service.GetAttestorRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Resources.Attestor.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ updateAttestorMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/UpdateAttestor")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(Service.UpdateAttestorRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Resources.Attestor.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ listAttestorsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/ListAttestors")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(Service.ListAttestorsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(Service.ListAttestorsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ deleteAttestorMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/DeleteAttestor")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(Service.DeleteAttestorRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .build();
+
+ private final UnaryCallable getPolicyCallable;
+ private final UnaryCallable updatePolicyCallable;
+ private final UnaryCallable
+ createAttestorCallable;
+ private final UnaryCallable getAttestorCallable;
+ private final UnaryCallable
+ updateAttestorCallable;
+ private final UnaryCallable
+ listAttestorsCallable;
+ private final UnaryCallable
+ listAttestorsPagedCallable;
+ private final UnaryCallable deleteAttestorCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final GrpcOperationsStub operationsStub;
+ private final GrpcStubCallableFactory callableFactory;
+
+ public static final GrpcBinauthzManagementServiceV1Stub create(
+ BinauthzManagementServiceV1StubSettings settings) throws IOException {
+ return new GrpcBinauthzManagementServiceV1Stub(settings, ClientContext.create(settings));
+ }
+
+ public static final GrpcBinauthzManagementServiceV1Stub create(ClientContext clientContext)
+ throws IOException {
+ return new GrpcBinauthzManagementServiceV1Stub(
+ BinauthzManagementServiceV1StubSettings.newBuilder().build(), clientContext);
+ }
+
+ public static final GrpcBinauthzManagementServiceV1Stub create(
+ ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException {
+ return new GrpcBinauthzManagementServiceV1Stub(
+ BinauthzManagementServiceV1StubSettings.newBuilder().build(),
+ clientContext,
+ callableFactory);
+ }
+
+ /**
+ * Constructs an instance of GrpcBinauthzManagementServiceV1Stub, 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 GrpcBinauthzManagementServiceV1Stub(
+ BinauthzManagementServiceV1StubSettings settings, ClientContext clientContext)
+ throws IOException {
+ this(settings, clientContext, new GrpcBinauthzManagementServiceV1CallableFactory());
+ }
+
+ /**
+ * Constructs an instance of GrpcBinauthzManagementServiceV1Stub, 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 GrpcBinauthzManagementServiceV1Stub(
+ BinauthzManagementServiceV1StubSettings settings,
+ ClientContext clientContext,
+ GrpcStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
+
+ GrpcCallSettings getPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings updatePolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(updatePolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("policy.name", String.valueOf(request.getPolicy().getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ createAttestorTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(createAttestorMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings getAttestorTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getAttestorMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ updateAttestorTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(updateAttestorMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("attestor.name", String.valueOf(request.getAttestor().getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ listAttestorsTransportSettings =
+ GrpcCallSettings
+ .newBuilder()
+ .setMethodDescriptor(listAttestorsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings deleteAttestorTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteAttestorMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+
+ this.getPolicyCallable =
+ callableFactory.createUnaryCallable(
+ getPolicyTransportSettings, settings.getPolicySettings(), clientContext);
+ this.updatePolicyCallable =
+ callableFactory.createUnaryCallable(
+ updatePolicyTransportSettings, settings.updatePolicySettings(), clientContext);
+ this.createAttestorCallable =
+ callableFactory.createUnaryCallable(
+ createAttestorTransportSettings, settings.createAttestorSettings(), clientContext);
+ this.getAttestorCallable =
+ callableFactory.createUnaryCallable(
+ getAttestorTransportSettings, settings.getAttestorSettings(), clientContext);
+ this.updateAttestorCallable =
+ callableFactory.createUnaryCallable(
+ updateAttestorTransportSettings, settings.updateAttestorSettings(), clientContext);
+ this.listAttestorsCallable =
+ callableFactory.createUnaryCallable(
+ listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext);
+ this.listAttestorsPagedCallable =
+ callableFactory.createPagedCallable(
+ listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext);
+ this.deleteAttestorCallable =
+ callableFactory.createUnaryCallable(
+ deleteAttestorTransportSettings, settings.deleteAttestorSettings(), clientContext);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ public GrpcOperationsStub getOperationsStub() {
+ return operationsStub;
+ }
+
+ @Override
+ public UnaryCallable getPolicyCallable() {
+ return getPolicyCallable;
+ }
+
+ @Override
+ public UnaryCallable updatePolicyCallable() {
+ return updatePolicyCallable;
+ }
+
+ @Override
+ public UnaryCallable createAttestorCallable() {
+ return createAttestorCallable;
+ }
+
+ @Override
+ public UnaryCallable getAttestorCallable() {
+ return getAttestorCallable;
+ }
+
+ @Override
+ public UnaryCallable updateAttestorCallable() {
+ return updateAttestorCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listAttestorsCallable() {
+ return listAttestorsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listAttestorsPagedCallable() {
+ return listAttestorsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable