Private Preview. This feature is only available for approved services. + * + *
This API provides admission control and telemetry reporting for services that are integrated + * with [Service Infrastructure](/service-infrastructure). + * + *
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 (ServiceControllerClient serviceControllerClient = ServiceControllerClient.create()) { + * CheckRequest request = + * CheckRequest.newBuilder() + * .setServiceName("serviceName-1928572192") + * .setServiceConfigId("serviceConfigId650537426") + * .setAttributes(AttributeContext.newBuilder().build()) + * .addAllResources(new ArrayList+ * + *()) + * .setFlags("flags97513095") + * .build(); + * CheckResponse response = serviceControllerClient.check(request); + * } + * }
Note: close() needs to be called on the ServiceControllerClient 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: + * + *
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 ServiceControllerSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@code + * ServiceControllerSettings serviceControllerSettings = + * ServiceControllerSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * ServiceControllerClient serviceControllerClient = + * ServiceControllerClient.create(serviceControllerSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * ServiceControllerSettings serviceControllerSettings = + * ServiceControllerSettings.newBuilder().setEndpoint(myEndpoint).build(); + * ServiceControllerClient serviceControllerClient = + * ServiceControllerClient.create(serviceControllerSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ServiceControllerClient implements BackgroundResource { + private final ServiceControllerSettings settings; + private final ServiceControllerStub stub; + + /** Constructs an instance of ServiceControllerClient with default settings. */ + public static final ServiceControllerClient create() throws IOException { + return create(ServiceControllerSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ServiceControllerClient, 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 ServiceControllerClient create(ServiceControllerSettings settings) + throws IOException { + return new ServiceControllerClient(settings); + } + + /** + * Constructs an instance of ServiceControllerClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(ServiceControllerSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final ServiceControllerClient create(ServiceControllerStub stub) { + return new ServiceControllerClient(stub); + } + + /** + * Constructs an instance of ServiceControllerClient, 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 ServiceControllerClient(ServiceControllerSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ServiceControllerStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected ServiceControllerClient(ServiceControllerStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ServiceControllerSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ServiceControllerStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Private Preview. This feature is only available for approved services. + * + *
This method provides admission control for services that are integrated with [Service + * Infrastructure](/service-infrastructure). It checks whether an operation should be allowed + * based on the service configuration and relevant policies. It must be called before the + * operation is executed. For more information, see [Admission + * Control](/service-infrastructure/docs/admission-control). + * + *
NOTE: The admission control has an expected policy propagation delay of 60s. The caller + * **must** not depend on the most recent policy changes. + * + *
NOTE: The admission control has a hard limit of 1 referenced resources per call. If an + * operation refers to more than 1 resources, the caller must call the Check method multiple + * times. + * + *
This method requires the `servicemanagement.services.check` permission on the specified + * service. For more information, see [Service Control API Access + * Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control). + * + *
Sample code: + * + *
{@code + * try (ServiceControllerClient serviceControllerClient = ServiceControllerClient.create()) { + * CheckRequest request = + * CheckRequest.newBuilder() + * .setServiceName("serviceName-1928572192") + * .setServiceConfigId("serviceConfigId650537426") + * .setAttributes(AttributeContext.newBuilder().build()) + * .addAllResources(new ArrayList+ * + * @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 CheckResponse check(CheckRequest request) { + return checkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Private Preview. This feature is only available for approved services. + * + *()) + * .setFlags("flags97513095") + * .build(); + * CheckResponse response = serviceControllerClient.check(request); + * } + * }
This method provides admission control for services that are integrated with [Service + * Infrastructure](/service-infrastructure). It checks whether an operation should be allowed + * based on the service configuration and relevant policies. It must be called before the + * operation is executed. For more information, see [Admission + * Control](/service-infrastructure/docs/admission-control). + * + *
NOTE: The admission control has an expected policy propagation delay of 60s. The caller + * **must** not depend on the most recent policy changes. + * + *
NOTE: The admission control has a hard limit of 1 referenced resources per call. If an + * operation refers to more than 1 resources, the caller must call the Check method multiple + * times. + * + *
This method requires the `servicemanagement.services.check` permission on the specified + * service. For more information, see [Service Control API Access + * Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control). + * + *
Sample code: + * + *
{@code + * try (ServiceControllerClient serviceControllerClient = ServiceControllerClient.create()) { + * CheckRequest request = + * CheckRequest.newBuilder() + * .setServiceName("serviceName-1928572192") + * .setServiceConfigId("serviceConfigId650537426") + * .setAttributes(AttributeContext.newBuilder().build()) + * .addAllResources(new ArrayList+ */ + public final UnaryCallable()) + * .setFlags("flags97513095") + * .build(); + * ApiFuture future = serviceControllerClient.checkCallable().futureCall(request); + * // Do something. + * CheckResponse response = future.get(); + * } + * }
This method provides telemetry reporting for services that are integrated with [Service + * Infrastructure](/service-infrastructure). It reports a list of operations that have occurred on + * a service. It must be called after the operations have been executed. For more information, see + * [Telemetry Reporting](/service-infrastructure/docs/telemetry-reporting). + * + *
NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. + * It is recommended to have no more than 100 operations per call. + * + *
This method requires the `servicemanagement.services.report` permission on the specified + * service. For more information, see [Service Control API Access + * Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control). + * + *
Sample code: + * + *
{@code + * try (ServiceControllerClient serviceControllerClient = ServiceControllerClient.create()) { + * ReportRequest request = + * ReportRequest.newBuilder() + * .setServiceName("serviceName-1928572192") + * .setServiceConfigId("serviceConfigId650537426") + * .addAllOperations(new ArrayList+ * + * @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 ReportResponse report(ReportRequest request) { + return reportCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Private Preview. This feature is only available for approved services. + * + *()) + * .build(); + * ReportResponse response = serviceControllerClient.report(request); + * } + * }
This method provides telemetry reporting for services that are integrated with [Service + * Infrastructure](/service-infrastructure). It reports a list of operations that have occurred on + * a service. It must be called after the operations have been executed. For more information, see + * [Telemetry Reporting](/service-infrastructure/docs/telemetry-reporting). + * + *
NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. + * It is recommended to have no more than 100 operations per call. + * + *
This method requires the `servicemanagement.services.report` permission on the specified + * service. For more information, see [Service Control API Access + * Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control). + * + *
Sample code: + * + *
{@code + * try (ServiceControllerClient serviceControllerClient = ServiceControllerClient.create()) { + * ReportRequest request = + * ReportRequest.newBuilder() + * .setServiceName("serviceName-1928572192") + * .setServiceConfigId("serviceConfigId650537426") + * .addAllOperations(new ArrayList+ */ + public final UnaryCallable()) + * .build(); + * ApiFuture future = + * serviceControllerClient.reportCallable().futureCall(request); + * // Do something. + * ReportResponse response = future.get(); + * } + * }
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of check to 30 seconds: + * + *
{@code + * ServiceControllerSettings.Builder serviceControllerSettingsBuilder = + * ServiceControllerSettings.newBuilder(); + * serviceControllerSettingsBuilder + * .checkSettings() + * .setRetrySettings( + * serviceControllerSettingsBuilder + * .checkSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * ServiceControllerSettings serviceControllerSettings = serviceControllerSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class ServiceControllerSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= ServiceControllerClient =======================
+ *
+ * Service Description: [Service Control API v2](/service-infrastructure/docs/service-control)
+ *
+ * Private Preview. This feature is only available for approved services.
+ *
+ * This API provides admission control and telemetry reporting for services that are integrated
+ * with [Service Infrastructure](/service-infrastructure).
+ *
+ * Sample for ServiceControllerClient:
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcServiceControllerCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcServiceControllerStub extends ServiceControllerStub {
+ private static final MethodDescriptor This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class ServiceControllerStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of check to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction{@code
+ * try (ServiceControllerClient serviceControllerClient = ServiceControllerClient.create()) {
+ * CheckRequest request =
+ * CheckRequest.newBuilder()
+ * .setServiceName("serviceName-1928572192")
+ * .setServiceConfigId("serviceConfigId650537426")
+ * .setAttributes(AttributeContext.newBuilder().build())
+ * .addAllResources(new ArrayList
+ */
+@Generated("by gapic-generator-java")
+package com.google.api.servicecontrol.v2;
+
+import javax.annotation.Generated;
diff --git a/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v2/stub/GrpcServiceControllerCallableFactory.java b/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v2/stub/GrpcServiceControllerCallableFactory.java
new file mode 100644
index 00000000..dd288578
--- /dev/null
+++ b/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v2/stub/GrpcServiceControllerCallableFactory.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.api.servicecontrol.v2.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 ServiceController service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * ServiceControllerStubSettings.Builder serviceControllerSettingsBuilder =
+ * ServiceControllerStubSettings.newBuilder();
+ * serviceControllerSettingsBuilder
+ * .checkSettings()
+ * .setRetrySettings(
+ * serviceControllerSettingsBuilder
+ * .checkSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ServiceControllerStubSettings serviceControllerSettings =
+ * serviceControllerSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ServiceControllerStubSettings extends StubSettings
+ * Request message for the Check method. + *+ * + * Protobuf type {@code google.api.servicecontrol.v2.CheckRequest} + */ +public final class CheckRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicecontrol.v2.CheckRequest) + CheckRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CheckRequest.newBuilder() to construct. + private CheckRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CheckRequest() { + serviceName_ = ""; + serviceConfigId_ = ""; + resources_ = java.util.Collections.emptyList(); + flags_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CheckRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CheckRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceConfigId_ = s; + break; + } + case 26: + { + com.google.rpc.context.AttributeContext.Builder subBuilder = null; + if (attributes_ != null) { + subBuilder = attributes_.toBuilder(); + } + attributes_ = + input.readMessage( + com.google.rpc.context.AttributeContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(attributes_); + attributes_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = + new java.util.ArrayList
+ * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return The serviceName.
+ */
+ @java.lang.Override
+ public java.lang.String getServiceName() {
+ java.lang.Object ref = serviceName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceName_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return The bytes for serviceName.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getServiceNameBytes() {
+ java.lang.Object ref = serviceName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serviceName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SERVICE_CONFIG_ID_FIELD_NUMBER = 2;
+ private volatile java.lang.Object serviceConfigId_;
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return The serviceConfigId.
+ */
+ @java.lang.Override
+ public java.lang.String getServiceConfigId() {
+ java.lang.Object ref = serviceConfigId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceConfigId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return The bytes for serviceConfigId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getServiceConfigIdBytes() {
+ java.lang.Object ref = serviceConfigId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serviceConfigId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ATTRIBUTES_FIELD_NUMBER = 3;
+ private com.google.rpc.context.AttributeContext attributes_;
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ *
+ * @return Whether the attributes field is set.
+ */
+ @java.lang.Override
+ public boolean hasAttributes() {
+ return attributes_ != null;
+ }
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ *
+ * @return The attributes.
+ */
+ @java.lang.Override
+ public com.google.rpc.context.AttributeContext getAttributes() {
+ return attributes_ == null
+ ? com.google.rpc.context.AttributeContext.getDefaultInstance()
+ : attributes_;
+ }
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ */
+ @java.lang.Override
+ public com.google.rpc.context.AttributeContextOrBuilder getAttributesOrBuilder() {
+ return getAttributes();
+ }
+
+ public static final int RESOURCES_FIELD_NUMBER = 4;
+ private java.util.List+ * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ @java.lang.Override
+ public java.util.List+ * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.api.servicecontrol.v2.ResourceInfoOrBuilder>
+ getResourcesOrBuilderList() {
+ return resources_;
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ @java.lang.Override
+ public int getResourcesCount() {
+ return resources_.size();
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ @java.lang.Override
+ public com.google.api.servicecontrol.v2.ResourceInfo getResources(int index) {
+ return resources_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ @java.lang.Override
+ public com.google.api.servicecontrol.v2.ResourceInfoOrBuilder getResourcesOrBuilder(int index) {
+ return resources_.get(index);
+ }
+
+ public static final int FLAGS_FIELD_NUMBER = 5;
+ private volatile java.lang.Object flags_;
+ /**
+ *
+ *
+ * + * Optional. Contains a comma-separated list of flags. + *+ * + *
string flags = 5;
+ *
+ * @return The flags.
+ */
+ @java.lang.Override
+ public java.lang.String getFlags() {
+ java.lang.Object ref = flags_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ flags_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Contains a comma-separated list of flags. + *+ * + *
string flags = 5;
+ *
+ * @return The bytes for flags.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getFlagsBytes() {
+ java.lang.Object ref = flags_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ flags_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceConfigId_);
+ }
+ if (attributes_ != null) {
+ output.writeMessage(3, getAttributes());
+ }
+ for (int i = 0; i < resources_.size(); i++) {
+ output.writeMessage(4, resources_.get(i));
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(flags_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, flags_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceConfigId_);
+ }
+ if (attributes_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAttributes());
+ }
+ for (int i = 0; i < resources_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, resources_.get(i));
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(flags_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, flags_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.api.servicecontrol.v2.CheckRequest)) {
+ return super.equals(obj);
+ }
+ com.google.api.servicecontrol.v2.CheckRequest other =
+ (com.google.api.servicecontrol.v2.CheckRequest) obj;
+
+ if (!getServiceName().equals(other.getServiceName())) return false;
+ if (!getServiceConfigId().equals(other.getServiceConfigId())) return false;
+ if (hasAttributes() != other.hasAttributes()) return false;
+ if (hasAttributes()) {
+ if (!getAttributes().equals(other.getAttributes())) return false;
+ }
+ if (!getResourcesList().equals(other.getResourcesList())) return false;
+ if (!getFlags().equals(other.getFlags())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getServiceName().hashCode();
+ hash = (37 * hash) + SERVICE_CONFIG_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getServiceConfigId().hashCode();
+ if (hasAttributes()) {
+ hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER;
+ hash = (53 * hash) + getAttributes().hashCode();
+ }
+ if (getResourcesCount() > 0) {
+ hash = (37 * hash) + RESOURCES_FIELD_NUMBER;
+ hash = (53 * hash) + getResourcesList().hashCode();
+ }
+ hash = (37 * hash) + FLAGS_FIELD_NUMBER;
+ hash = (53 * hash) + getFlags().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.api.servicecontrol.v2.CheckRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request message for the Check method. + *+ * + * Protobuf type {@code google.api.servicecontrol.v2.CheckRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return The serviceName.
+ */
+ public java.lang.String getServiceName() {
+ java.lang.Object ref = serviceName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return The bytes for serviceName.
+ */
+ public com.google.protobuf.ByteString getServiceNameBytes() {
+ java.lang.Object ref = serviceName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serviceName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @param value The serviceName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setServiceName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ serviceName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearServiceName() {
+
+ serviceName_ = getDefaultInstance().getServiceName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @param value The bytes for serviceName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setServiceNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ serviceName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object serviceConfigId_ = "";
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return The serviceConfigId.
+ */
+ public java.lang.String getServiceConfigId() {
+ java.lang.Object ref = serviceConfigId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceConfigId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return The bytes for serviceConfigId.
+ */
+ public com.google.protobuf.ByteString getServiceConfigIdBytes() {
+ java.lang.Object ref = serviceConfigId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serviceConfigId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @param value The serviceConfigId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setServiceConfigId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ serviceConfigId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearServiceConfigId() {
+
+ serviceConfigId_ = getDefaultInstance().getServiceConfigId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @param value The bytes for serviceConfigId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setServiceConfigIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ serviceConfigId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.rpc.context.AttributeContext attributes_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.context.AttributeContext,
+ com.google.rpc.context.AttributeContext.Builder,
+ com.google.rpc.context.AttributeContextOrBuilder>
+ attributesBuilder_;
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ *
+ * @return Whether the attributes field is set.
+ */
+ public boolean hasAttributes() {
+ return attributesBuilder_ != null || attributes_ != null;
+ }
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ *
+ * @return The attributes.
+ */
+ public com.google.rpc.context.AttributeContext getAttributes() {
+ if (attributesBuilder_ == null) {
+ return attributes_ == null
+ ? com.google.rpc.context.AttributeContext.getDefaultInstance()
+ : attributes_;
+ } else {
+ return attributesBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ */
+ public Builder setAttributes(com.google.rpc.context.AttributeContext value) {
+ if (attributesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ attributes_ = value;
+ onChanged();
+ } else {
+ attributesBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ */
+ public Builder setAttributes(com.google.rpc.context.AttributeContext.Builder builderForValue) {
+ if (attributesBuilder_ == null) {
+ attributes_ = builderForValue.build();
+ onChanged();
+ } else {
+ attributesBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ */
+ public Builder mergeAttributes(com.google.rpc.context.AttributeContext value) {
+ if (attributesBuilder_ == null) {
+ if (attributes_ != null) {
+ attributes_ =
+ com.google.rpc.context.AttributeContext.newBuilder(attributes_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ attributes_ = value;
+ }
+ onChanged();
+ } else {
+ attributesBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ */
+ public Builder clearAttributes() {
+ if (attributesBuilder_ == null) {
+ attributes_ = null;
+ onChanged();
+ } else {
+ attributes_ = null;
+ attributesBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ */
+ public com.google.rpc.context.AttributeContext.Builder getAttributesBuilder() {
+
+ onChanged();
+ return getAttributesFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ */
+ public com.google.rpc.context.AttributeContextOrBuilder getAttributesOrBuilder() {
+ if (attributesBuilder_ != null) {
+ return attributesBuilder_.getMessageOrBuilder();
+ } else {
+ return attributes_ == null
+ ? com.google.rpc.context.AttributeContext.getDefaultInstance()
+ : attributes_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.context.AttributeContext,
+ com.google.rpc.context.AttributeContext.Builder,
+ com.google.rpc.context.AttributeContextOrBuilder>
+ getAttributesFieldBuilder() {
+ if (attributesBuilder_ == null) {
+ attributesBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.context.AttributeContext,
+ com.google.rpc.context.AttributeContext.Builder,
+ com.google.rpc.context.AttributeContextOrBuilder>(
+ getAttributes(), getParentForChildren(), isClean());
+ attributes_ = null;
+ }
+ return attributesBuilder_;
+ }
+
+ private java.util.List+ * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public java.util.List+ * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public int getResourcesCount() {
+ if (resourcesBuilder_ == null) {
+ return resources_.size();
+ } else {
+ return resourcesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public com.google.api.servicecontrol.v2.ResourceInfo getResources(int index) {
+ if (resourcesBuilder_ == null) {
+ return resources_.get(index);
+ } else {
+ return resourcesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public Builder setResources(int index, com.google.api.servicecontrol.v2.ResourceInfo value) {
+ if (resourcesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResourcesIsMutable();
+ resources_.set(index, value);
+ onChanged();
+ } else {
+ resourcesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public Builder setResources(
+ int index, com.google.api.servicecontrol.v2.ResourceInfo.Builder builderForValue) {
+ if (resourcesBuilder_ == null) {
+ ensureResourcesIsMutable();
+ resources_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ resourcesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public Builder addResources(com.google.api.servicecontrol.v2.ResourceInfo value) {
+ if (resourcesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResourcesIsMutable();
+ resources_.add(value);
+ onChanged();
+ } else {
+ resourcesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public Builder addResources(int index, com.google.api.servicecontrol.v2.ResourceInfo value) {
+ if (resourcesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResourcesIsMutable();
+ resources_.add(index, value);
+ onChanged();
+ } else {
+ resourcesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public Builder addResources(
+ com.google.api.servicecontrol.v2.ResourceInfo.Builder builderForValue) {
+ if (resourcesBuilder_ == null) {
+ ensureResourcesIsMutable();
+ resources_.add(builderForValue.build());
+ onChanged();
+ } else {
+ resourcesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public Builder addResources(
+ int index, com.google.api.servicecontrol.v2.ResourceInfo.Builder builderForValue) {
+ if (resourcesBuilder_ == null) {
+ ensureResourcesIsMutable();
+ resources_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ resourcesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public Builder addAllResources(
+ java.lang.Iterable extends com.google.api.servicecontrol.v2.ResourceInfo> values) {
+ if (resourcesBuilder_ == null) {
+ ensureResourcesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resources_);
+ onChanged();
+ } else {
+ resourcesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public Builder clearResources() {
+ if (resourcesBuilder_ == null) {
+ resources_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ resourcesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public Builder removeResources(int index) {
+ if (resourcesBuilder_ == null) {
+ ensureResourcesIsMutable();
+ resources_.remove(index);
+ onChanged();
+ } else {
+ resourcesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public com.google.api.servicecontrol.v2.ResourceInfo.Builder getResourcesBuilder(int index) {
+ return getResourcesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public com.google.api.servicecontrol.v2.ResourceInfoOrBuilder getResourcesOrBuilder(int index) {
+ if (resourcesBuilder_ == null) {
+ return resources_.get(index);
+ } else {
+ return resourcesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public java.util.List extends com.google.api.servicecontrol.v2.ResourceInfoOrBuilder>
+ getResourcesOrBuilderList() {
+ if (resourcesBuilder_ != null) {
+ return resourcesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(resources_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public com.google.api.servicecontrol.v2.ResourceInfo.Builder addResourcesBuilder() {
+ return getResourcesFieldBuilder()
+ .addBuilder(com.google.api.servicecontrol.v2.ResourceInfo.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public com.google.api.servicecontrol.v2.ResourceInfo.Builder addResourcesBuilder(int index) {
+ return getResourcesFieldBuilder()
+ .addBuilder(index, com.google.api.servicecontrol.v2.ResourceInfo.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ public java.util.List+ * Optional. Contains a comma-separated list of flags. + *+ * + *
string flags = 5;
+ *
+ * @return The flags.
+ */
+ public java.lang.String getFlags() {
+ java.lang.Object ref = flags_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ flags_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Contains a comma-separated list of flags. + *+ * + *
string flags = 5;
+ *
+ * @return The bytes for flags.
+ */
+ public com.google.protobuf.ByteString getFlagsBytes() {
+ java.lang.Object ref = flags_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ flags_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Contains a comma-separated list of flags. + *+ * + *
string flags = 5;
+ *
+ * @param value The flags to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFlags(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ flags_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Contains a comma-separated list of flags. + *+ * + *
string flags = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFlags() {
+
+ flags_ = getDefaultInstance().getFlags();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Contains a comma-separated list of flags. + *+ * + *
string flags = 5;
+ *
+ * @param value The bytes for flags to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFlagsBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ flags_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.api.servicecontrol.v2.CheckRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.api.servicecontrol.v2.CheckRequest)
+ private static final com.google.api.servicecontrol.v2.CheckRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.api.servicecontrol.v2.CheckRequest();
+ }
+
+ public static com.google.api.servicecontrol.v2.CheckRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return The serviceName.
+ */
+ java.lang.String getServiceName();
+ /**
+ *
+ *
+ * + * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return The bytes for serviceName.
+ */
+ com.google.protobuf.ByteString getServiceNameBytes();
+
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return The serviceConfigId.
+ */
+ java.lang.String getServiceConfigId();
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return The bytes for serviceConfigId.
+ */
+ com.google.protobuf.ByteString getServiceConfigIdBytes();
+
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ *
+ * @return Whether the attributes field is set.
+ */
+ boolean hasAttributes();
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ *
+ * @return The attributes.
+ */
+ com.google.rpc.context.AttributeContext getAttributes();
+ /**
+ *
+ *
+ * + * Describes attributes about the operation being executed by the service. + *+ * + *
.google.rpc.context.AttributeContext attributes = 3;
+ */
+ com.google.rpc.context.AttributeContextOrBuilder getAttributesOrBuilder();
+
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ java.util.List+ * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ com.google.api.servicecontrol.v2.ResourceInfo getResources(int index);
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ int getResourcesCount();
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ java.util.List extends com.google.api.servicecontrol.v2.ResourceInfoOrBuilder>
+ getResourcesOrBuilderList();
+ /**
+ *
+ *
+ * + * Describes the resources and the policies applied to each resource. + *+ * + *
repeated .google.api.servicecontrol.v2.ResourceInfo resources = 4;
+ */
+ com.google.api.servicecontrol.v2.ResourceInfoOrBuilder getResourcesOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Optional. Contains a comma-separated list of flags. + *+ * + *
string flags = 5;
+ *
+ * @return The flags.
+ */
+ java.lang.String getFlags();
+ /**
+ *
+ *
+ * + * Optional. Contains a comma-separated list of flags. + *+ * + *
string flags = 5;
+ *
+ * @return The bytes for flags.
+ */
+ com.google.protobuf.ByteString getFlagsBytes();
+}
diff --git a/proto-google-cloud-service-control-v2/src/main/java/com/google/api/servicecontrol/v2/CheckResponse.java b/proto-google-cloud-service-control-v2/src/main/java/com/google/api/servicecontrol/v2/CheckResponse.java
new file mode 100644
index 00000000..0e033530
--- /dev/null
+++ b/proto-google-cloud-service-control-v2/src/main/java/com/google/api/servicecontrol/v2/CheckResponse.java
@@ -0,0 +1,1064 @@
+/*
+ * Copyright 2020 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/api/servicecontrol/v2/service_controller.proto
+
+package com.google.api.servicecontrol.v2;
+
+/**
+ *
+ *
+ * + * Response message for the Check method. + *+ * + * Protobuf type {@code google.api.servicecontrol.v2.CheckResponse} + */ +public final class CheckResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicecontrol.v2.CheckResponse) + CheckResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CheckResponse.newBuilder() to construct. + private CheckResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CheckResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CheckResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CheckResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + headers_ = + com.google.protobuf.MapField.newMapField( + HeadersDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry
+ * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ *
+ * @return Whether the status field is set.
+ */
+ @java.lang.Override
+ public boolean hasStatus() {
+ return status_ != null;
+ }
+ /**
+ *
+ *
+ * + * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ *
+ * @return The status.
+ */
+ @java.lang.Override
+ public com.google.rpc.Status getStatus() {
+ return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
+ }
+ /**
+ *
+ *
+ * + * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ */
+ @java.lang.Override
+ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
+ return getStatus();
+ }
+
+ public static final int HEADERS_FIELD_NUMBER = 2;
+
+ private static final class HeadersDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry+ * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ @java.lang.Override
+ public boolean containsHeaders(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetHeaders().getMap().containsKey(key);
+ }
+ /** Use {@link #getHeadersMap()} instead. */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map+ * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ @java.lang.Override
+ public java.util.Map+ * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ @java.lang.Override
+ public java.lang.String getHeadersOrDefault(java.lang.String key, java.lang.String defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ @java.lang.Override
+ public java.lang.String getHeadersOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Response message for the Check method. + *+ * + * Protobuf type {@code google.api.servicecontrol.v2.CheckResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ *
+ * @return Whether the status field is set.
+ */
+ public boolean hasStatus() {
+ return statusBuilder_ != null || status_ != null;
+ }
+ /**
+ *
+ *
+ * + * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ *
+ * @return The status.
+ */
+ public com.google.rpc.Status getStatus() {
+ if (statusBuilder_ == null) {
+ return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
+ } else {
+ return statusBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ */
+ public Builder setStatus(com.google.rpc.Status value) {
+ if (statusBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ status_ = value;
+ onChanged();
+ } else {
+ statusBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ */
+ public Builder setStatus(com.google.rpc.Status.Builder builderForValue) {
+ if (statusBuilder_ == null) {
+ status_ = builderForValue.build();
+ onChanged();
+ } else {
+ statusBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ */
+ public Builder mergeStatus(com.google.rpc.Status value) {
+ if (statusBuilder_ == null) {
+ if (status_ != null) {
+ status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial();
+ } else {
+ status_ = value;
+ }
+ onChanged();
+ } else {
+ statusBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ */
+ public Builder clearStatus() {
+ if (statusBuilder_ == null) {
+ status_ = null;
+ onChanged();
+ } else {
+ status_ = null;
+ statusBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ */
+ public com.google.rpc.Status.Builder getStatusBuilder() {
+
+ onChanged();
+ return getStatusFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ */
+ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
+ if (statusBuilder_ != null) {
+ return statusBuilder_.getMessageOrBuilder();
+ } else {
+ return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
+ getStatusFieldBuilder() {
+ if (statusBuilder_ == null) {
+ statusBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status,
+ com.google.rpc.Status.Builder,
+ com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean());
+ status_ = null;
+ }
+ return statusBuilder_;
+ }
+
+ private com.google.protobuf.MapField+ * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ @java.lang.Override
+ public boolean containsHeaders(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetHeaders().getMap().containsKey(key);
+ }
+ /** Use {@link #getHeadersMap()} instead. */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map+ * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ @java.lang.Override
+ public java.util.Map+ * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ @java.lang.Override
+ public java.lang.String getHeadersOrDefault(
+ java.lang.String key, java.lang.String defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ @java.lang.Override
+ public java.lang.String getHeadersOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ public Builder removeHeaders(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableHeaders().getMutableMap().remove(key);
+ return this;
+ }
+ /** Use alternate mutation accessors instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ public Builder putHeaders(java.lang.String key, java.lang.String value) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ if (value == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableHeaders().getMutableMap().put(key, value);
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ public Builder putAllHeaders(java.util.Map+ * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ *
+ * @return Whether the status field is set.
+ */
+ boolean hasStatus();
+ /**
+ *
+ *
+ * + * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ *
+ * @return The status.
+ */
+ com.google.rpc.Status getStatus();
+ /**
+ *
+ *
+ * + * Operation is allowed when this field is not set. Any non-'OK' status + * indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] + * would contain additional details about the denial. + *+ * + *
.google.rpc.Status status = 1;
+ */
+ com.google.rpc.StatusOrBuilder getStatusOrBuilder();
+
+ /**
+ *
+ *
+ * + * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ int getHeadersCount();
+ /**
+ *
+ *
+ * + * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ boolean containsHeaders(java.lang.String key);
+ /** Use {@link #getHeadersMap()} instead. */
+ @java.lang.Deprecated
+ java.util.Map+ * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ java.util.Map+ * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ java.lang.String getHeadersOrDefault(java.lang.String key, java.lang.String defaultValue);
+ /**
+ *
+ *
+ * + * Returns a set of request contexts generated from the `CheckRequest`. + *+ * + *
map<string, string> headers = 2;
+ */
+ java.lang.String getHeadersOrThrow(java.lang.String key);
+}
diff --git a/proto-google-cloud-service-control-v2/src/main/java/com/google/api/servicecontrol/v2/ReportRequest.java b/proto-google-cloud-service-control-v2/src/main/java/com/google/api/servicecontrol/v2/ReportRequest.java
new file mode 100644
index 00000000..7c7437ae
--- /dev/null
+++ b/proto-google-cloud-service-control-v2/src/main/java/com/google/api/servicecontrol/v2/ReportRequest.java
@@ -0,0 +1,1393 @@
+/*
+ * Copyright 2020 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/api/servicecontrol/v2/service_controller.proto
+
+package com.google.api.servicecontrol.v2;
+
+/**
+ *
+ *
+ * + * Request message for the Report method. + *+ * + * Protobuf type {@code google.api.servicecontrol.v2.ReportRequest} + */ +public final class ReportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicecontrol.v2.ReportRequest) + ReportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportRequest.newBuilder() to construct. + private ReportRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ReportRequest() { + serviceName_ = ""; + serviceConfigId_ = ""; + operations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReportRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceConfigId_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + operations_ = new java.util.ArrayList
+ * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return The serviceName.
+ */
+ @java.lang.Override
+ public java.lang.String getServiceName() {
+ java.lang.Object ref = serviceName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceName_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return The bytes for serviceName.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getServiceNameBytes() {
+ java.lang.Object ref = serviceName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serviceName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SERVICE_CONFIG_ID_FIELD_NUMBER = 2;
+ private volatile java.lang.Object serviceConfigId_;
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return The serviceConfigId.
+ */
+ @java.lang.Override
+ public java.lang.String getServiceConfigId() {
+ java.lang.Object ref = serviceConfigId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceConfigId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return The bytes for serviceConfigId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getServiceConfigIdBytes() {
+ java.lang.Object ref = serviceConfigId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serviceConfigId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int OPERATIONS_FIELD_NUMBER = 3;
+ private java.util.List+ * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ @java.lang.Override
+ public java.util.List+ * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.rpc.context.AttributeContextOrBuilder>
+ getOperationsOrBuilderList() {
+ return operations_;
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ @java.lang.Override
+ public int getOperationsCount() {
+ return operations_.size();
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ @java.lang.Override
+ public com.google.rpc.context.AttributeContext getOperations(int index) {
+ return operations_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ @java.lang.Override
+ public com.google.rpc.context.AttributeContextOrBuilder getOperationsOrBuilder(int index) {
+ return operations_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceConfigId_);
+ }
+ for (int i = 0; i < operations_.size(); i++) {
+ output.writeMessage(3, operations_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceConfigId_);
+ }
+ for (int i = 0; i < operations_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, operations_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.api.servicecontrol.v2.ReportRequest)) {
+ return super.equals(obj);
+ }
+ com.google.api.servicecontrol.v2.ReportRequest other =
+ (com.google.api.servicecontrol.v2.ReportRequest) obj;
+
+ if (!getServiceName().equals(other.getServiceName())) return false;
+ if (!getServiceConfigId().equals(other.getServiceConfigId())) return false;
+ if (!getOperationsList().equals(other.getOperationsList())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getServiceName().hashCode();
+ hash = (37 * hash) + SERVICE_CONFIG_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getServiceConfigId().hashCode();
+ if (getOperationsCount() > 0) {
+ hash = (37 * hash) + OPERATIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getOperationsList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.api.servicecontrol.v2.ReportRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.api.servicecontrol.v2.ReportRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.ReportRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.api.servicecontrol.v2.ReportRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.ReportRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.api.servicecontrol.v2.ReportRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.ReportRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.api.servicecontrol.v2.ReportRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.ReportRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.api.servicecontrol.v2.ReportRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.ReportRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.api.servicecontrol.v2.ReportRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.api.servicecontrol.v2.ReportRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request message for the Report method. + *+ * + * Protobuf type {@code google.api.servicecontrol.v2.ReportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return The serviceName.
+ */
+ public java.lang.String getServiceName() {
+ java.lang.Object ref = serviceName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return The bytes for serviceName.
+ */
+ public com.google.protobuf.ByteString getServiceNameBytes() {
+ java.lang.Object ref = serviceName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serviceName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @param value The serviceName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setServiceName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ serviceName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearServiceName() {
+
+ serviceName_ = getDefaultInstance().getServiceName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @param value The bytes for serviceName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setServiceNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ serviceName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object serviceConfigId_ = "";
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return The serviceConfigId.
+ */
+ public java.lang.String getServiceConfigId() {
+ java.lang.Object ref = serviceConfigId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceConfigId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return The bytes for serviceConfigId.
+ */
+ public com.google.protobuf.ByteString getServiceConfigIdBytes() {
+ java.lang.Object ref = serviceConfigId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serviceConfigId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @param value The serviceConfigId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setServiceConfigId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ serviceConfigId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearServiceConfigId() {
+
+ serviceConfigId_ = getDefaultInstance().getServiceConfigId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @param value The bytes for serviceConfigId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setServiceConfigIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ serviceConfigId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List+ * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public java.util.List+ * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public int getOperationsCount() {
+ if (operationsBuilder_ == null) {
+ return operations_.size();
+ } else {
+ return operationsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public com.google.rpc.context.AttributeContext getOperations(int index) {
+ if (operationsBuilder_ == null) {
+ return operations_.get(index);
+ } else {
+ return operationsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public Builder setOperations(int index, com.google.rpc.context.AttributeContext value) {
+ if (operationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOperationsIsMutable();
+ operations_.set(index, value);
+ onChanged();
+ } else {
+ operationsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public Builder setOperations(
+ int index, com.google.rpc.context.AttributeContext.Builder builderForValue) {
+ if (operationsBuilder_ == null) {
+ ensureOperationsIsMutable();
+ operations_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ operationsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public Builder addOperations(com.google.rpc.context.AttributeContext value) {
+ if (operationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOperationsIsMutable();
+ operations_.add(value);
+ onChanged();
+ } else {
+ operationsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public Builder addOperations(int index, com.google.rpc.context.AttributeContext value) {
+ if (operationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOperationsIsMutable();
+ operations_.add(index, value);
+ onChanged();
+ } else {
+ operationsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public Builder addOperations(com.google.rpc.context.AttributeContext.Builder builderForValue) {
+ if (operationsBuilder_ == null) {
+ ensureOperationsIsMutable();
+ operations_.add(builderForValue.build());
+ onChanged();
+ } else {
+ operationsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public Builder addOperations(
+ int index, com.google.rpc.context.AttributeContext.Builder builderForValue) {
+ if (operationsBuilder_ == null) {
+ ensureOperationsIsMutable();
+ operations_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ operationsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public Builder addAllOperations(
+ java.lang.Iterable extends com.google.rpc.context.AttributeContext> values) {
+ if (operationsBuilder_ == null) {
+ ensureOperationsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, operations_);
+ onChanged();
+ } else {
+ operationsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public Builder clearOperations() {
+ if (operationsBuilder_ == null) {
+ operations_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ operationsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public Builder removeOperations(int index) {
+ if (operationsBuilder_ == null) {
+ ensureOperationsIsMutable();
+ operations_.remove(index);
+ onChanged();
+ } else {
+ operationsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public com.google.rpc.context.AttributeContext.Builder getOperationsBuilder(int index) {
+ return getOperationsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public com.google.rpc.context.AttributeContextOrBuilder getOperationsOrBuilder(int index) {
+ if (operationsBuilder_ == null) {
+ return operations_.get(index);
+ } else {
+ return operationsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public java.util.List extends com.google.rpc.context.AttributeContextOrBuilder>
+ getOperationsOrBuilderList() {
+ if (operationsBuilder_ != null) {
+ return operationsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(operations_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public com.google.rpc.context.AttributeContext.Builder addOperationsBuilder() {
+ return getOperationsFieldBuilder()
+ .addBuilder(com.google.rpc.context.AttributeContext.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public com.google.rpc.context.AttributeContext.Builder addOperationsBuilder(int index) {
+ return getOperationsFieldBuilder()
+ .addBuilder(index, com.google.rpc.context.AttributeContext.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ public java.util.List+ * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return The serviceName.
+ */
+ java.lang.String getServiceName();
+ /**
+ *
+ *
+ * + * The service name as specified in its service configuration. For example, + * `"pubsub.googleapis.com"`. + * See + * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + * for the definition of a service name. + *+ * + *
string service_name = 1;
+ *
+ * @return The bytes for serviceName.
+ */
+ com.google.protobuf.ByteString getServiceNameBytes();
+
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return The serviceConfigId.
+ */
+ java.lang.String getServiceConfigId();
+ /**
+ *
+ *
+ * + * Specifies the version of the service configuration that should be used to + * process the request. Must not be empty. Set this field to 'latest' to + * specify using the latest configuration. + *+ * + *
string service_config_id = 2;
+ *
+ * @return The bytes for serviceConfigId.
+ */
+ com.google.protobuf.ByteString getServiceConfigIdBytes();
+
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ java.util.List+ * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ com.google.rpc.context.AttributeContext getOperations(int index);
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ int getOperationsCount();
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ java.util.List extends com.google.rpc.context.AttributeContextOrBuilder>
+ getOperationsOrBuilderList();
+ /**
+ *
+ *
+ * + * Describes the list of operations to be reported. Each operation is + * represented as an AttributeContext, and contains all attributes around an + * API access. + *+ * + *
repeated .google.rpc.context.AttributeContext operations = 3;
+ */
+ com.google.rpc.context.AttributeContextOrBuilder getOperationsOrBuilder(int index);
+}
diff --git a/proto-google-cloud-service-control-v2/src/main/java/com/google/api/servicecontrol/v2/ReportResponse.java b/proto-google-cloud-service-control-v2/src/main/java/com/google/api/servicecontrol/v2/ReportResponse.java
new file mode 100644
index 00000000..ef1cbc0a
--- /dev/null
+++ b/proto-google-cloud-service-control-v2/src/main/java/com/google/api/servicecontrol/v2/ReportResponse.java
@@ -0,0 +1,457 @@
+/*
+ * Copyright 2020 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/api/servicecontrol/v2/service_controller.proto
+
+package com.google.api.servicecontrol.v2;
+
+/**
+ *
+ *
+ * + * Response message for the Report method. + * If the request contains any invalid data, the server returns an RPC error. + *+ * + * Protobuf type {@code google.api.servicecontrol.v2.ReportResponse} + */ +public final class ReportResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicecontrol.v2.ReportResponse) + ReportResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportResponse.newBuilder() to construct. + private ReportResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ReportResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReportResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReportResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicecontrol.v2.ServiceControllerProto + .internal_static_google_api_servicecontrol_v2_ReportResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicecontrol.v2.ServiceControllerProto + .internal_static_google_api_servicecontrol_v2_ReportResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicecontrol.v2.ReportResponse.class, + com.google.api.servicecontrol.v2.ReportResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicecontrol.v2.ReportResponse)) { + return super.equals(obj); + } + com.google.api.servicecontrol.v2.ReportResponse other = + (com.google.api.servicecontrol.v2.ReportResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicecontrol.v2.ReportResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicecontrol.v2.ReportResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicecontrol.v2.ReportResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicecontrol.v2.ReportResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicecontrol.v2.ReportResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicecontrol.v2.ReportResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicecontrol.v2.ReportResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicecontrol.v2.ReportResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicecontrol.v2.ReportResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicecontrol.v2.ReportResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicecontrol.v2.ReportResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicecontrol.v2.ReportResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.api.servicecontrol.v2.ReportResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+ * Response message for the Report method. + * If the request contains any invalid data, the server returns an RPC error. + *+ * + * Protobuf type {@code google.api.servicecontrol.v2.ReportResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Describes a resource referenced in the request. + *+ * + * Protobuf type {@code google.api.servicecontrol.v2.ResourceInfo} + */ +public final class ResourceInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicecontrol.v2.ResourceInfo) + ResourceInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceInfo.newBuilder() to construct. + private ResourceInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ResourceInfo() { + name_ = ""; + type_ = ""; + permission_ = ""; + container_ = ""; + location_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResourceInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + permission_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + container_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + location_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicecontrol.v2.ServiceControllerProto + .internal_static_google_api_servicecontrol_v2_ResourceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicecontrol.v2.ServiceControllerProto + .internal_static_google_api_servicecontrol_v2_ResourceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicecontrol.v2.ResourceInfo.class, + com.google.api.servicecontrol.v2.ResourceInfo.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * The name of the resource referenced in the request. + *+ * + *
string name = 1;
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the resource referenced in the request. + *+ * + *
string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TYPE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object type_;
+ /**
+ *
+ *
+ * + * The resource type in the format of "{service}/{kind}". + *+ * + *
string type = 2;
+ *
+ * @return The type.
+ */
+ @java.lang.Override
+ public java.lang.String getType() {
+ java.lang.Object ref = type_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ type_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource type in the format of "{service}/{kind}". + *+ * + *
string type = 2;
+ *
+ * @return The bytes for type.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getTypeBytes() {
+ java.lang.Object ref = type_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ type_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PERMISSION_FIELD_NUMBER = 3;
+ private volatile java.lang.Object permission_;
+ /**
+ *
+ *
+ * + * The resource permission needed for this request. + * The format must be "{service}/{plural}.{verb}". + *+ * + *
string permission = 3;
+ *
+ * @return The permission.
+ */
+ @java.lang.Override
+ public java.lang.String getPermission() {
+ java.lang.Object ref = permission_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ permission_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource permission needed for this request. + * The format must be "{service}/{plural}.{verb}". + *+ * + *
string permission = 3;
+ *
+ * @return The bytes for permission.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getPermissionBytes() {
+ java.lang.Object ref = permission_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ permission_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CONTAINER_FIELD_NUMBER = 4;
+ private volatile java.lang.Object container_;
+ /**
+ *
+ *
+ * + * Optional. The identifier of the container of this resource. For Google + * Cloud APIs, the resource container must be one of the following formats: + * - `projects/<project-id or project-number>` + * - `folders/<folder-id>` + * - `organizations/<organization-id>` + * For the policy enforcement on the container level (VPCSC and Location + * Policy check), this field takes precedence on the container extracted from + * name when presents. + *+ * + *
string container = 4;
+ *
+ * @return The container.
+ */
+ @java.lang.Override
+ public java.lang.String getContainer() {
+ java.lang.Object ref = container_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ container_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The identifier of the container of this resource. For Google + * Cloud APIs, the resource container must be one of the following formats: + * - `projects/<project-id or project-number>` + * - `folders/<folder-id>` + * - `organizations/<organization-id>` + * For the policy enforcement on the container level (VPCSC and Location + * Policy check), this field takes precedence on the container extracted from + * name when presents. + *+ * + *
string container = 4;
+ *
+ * @return The bytes for container.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getContainerBytes() {
+ java.lang.Object ref = container_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ container_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int LOCATION_FIELD_NUMBER = 5;
+ private volatile java.lang.Object location_;
+ /**
+ *
+ *
+ * + * Optional. The location of the resource. The value must be a valid zone, + * region or multiregion. For example: "europe-west4" or + * "northamerica-northeast1-a" + *+ * + *
string location = 5;
+ *
+ * @return The location.
+ */
+ @java.lang.Override
+ public java.lang.String getLocation() {
+ java.lang.Object ref = location_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ location_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The location of the resource. The value must be a valid zone, + * region or multiregion. For example: "europe-west4" or + * "northamerica-northeast1-a" + *+ * + *
string location = 5;
+ *
+ * @return The bytes for location.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getLocationBytes() {
+ java.lang.Object ref = location_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ location_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, permission_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(container_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, container_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, location_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, permission_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(container_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, container_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, location_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.api.servicecontrol.v2.ResourceInfo)) {
+ return super.equals(obj);
+ }
+ com.google.api.servicecontrol.v2.ResourceInfo other =
+ (com.google.api.servicecontrol.v2.ResourceInfo) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (!getType().equals(other.getType())) return false;
+ if (!getPermission().equals(other.getPermission())) return false;
+ if (!getContainer().equals(other.getContainer())) return false;
+ if (!getLocation().equals(other.getLocation())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getType().hashCode();
+ hash = (37 * hash) + PERMISSION_FIELD_NUMBER;
+ hash = (53 * hash) + getPermission().hashCode();
+ hash = (37 * hash) + CONTAINER_FIELD_NUMBER;
+ hash = (53 * hash) + getContainer().hashCode();
+ hash = (37 * hash) + LOCATION_FIELD_NUMBER;
+ hash = (53 * hash) + getLocation().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.api.servicecontrol.v2.ResourceInfo prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Describes a resource referenced in the request. + *+ * + * Protobuf type {@code google.api.servicecontrol.v2.ResourceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The name of the resource referenced in the request. + *+ * + *
string name = 1;
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the resource referenced in the request. + *+ * + *
string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the resource referenced in the request. + *+ * + *
string name = 1;
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The name of the resource referenced in the request. + *+ * + *
string name = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The name of the resource referenced in the request. + *+ * + *
string name = 1;
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object type_ = "";
+ /**
+ *
+ *
+ * + * The resource type in the format of "{service}/{kind}". + *+ * + *
string type = 2;
+ *
+ * @return The type.
+ */
+ public java.lang.String getType() {
+ java.lang.Object ref = type_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ type_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource type in the format of "{service}/{kind}". + *+ * + *
string type = 2;
+ *
+ * @return The bytes for type.
+ */
+ public com.google.protobuf.ByteString getTypeBytes() {
+ java.lang.Object ref = type_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ type_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource type in the format of "{service}/{kind}". + *+ * + *
string type = 2;
+ *
+ * @param value The type to set.
+ * @return This builder for chaining.
+ */
+ public Builder setType(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ type_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource type in the format of "{service}/{kind}". + *+ * + *
string type = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearType() {
+
+ type_ = getDefaultInstance().getType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource type in the format of "{service}/{kind}". + *+ * + *
string type = 2;
+ *
+ * @param value The bytes for type to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTypeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ type_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object permission_ = "";
+ /**
+ *
+ *
+ * + * The resource permission needed for this request. + * The format must be "{service}/{plural}.{verb}". + *+ * + *
string permission = 3;
+ *
+ * @return The permission.
+ */
+ public java.lang.String getPermission() {
+ java.lang.Object ref = permission_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ permission_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource permission needed for this request. + * The format must be "{service}/{plural}.{verb}". + *+ * + *
string permission = 3;
+ *
+ * @return The bytes for permission.
+ */
+ public com.google.protobuf.ByteString getPermissionBytes() {
+ java.lang.Object ref = permission_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ permission_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource permission needed for this request. + * The format must be "{service}/{plural}.{verb}". + *+ * + *
string permission = 3;
+ *
+ * @param value The permission to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPermission(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ permission_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource permission needed for this request. + * The format must be "{service}/{plural}.{verb}". + *+ * + *
string permission = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPermission() {
+
+ permission_ = getDefaultInstance().getPermission();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource permission needed for this request. + * The format must be "{service}/{plural}.{verb}". + *+ * + *
string permission = 3;
+ *
+ * @param value The bytes for permission to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPermissionBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ permission_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object container_ = "";
+ /**
+ *
+ *
+ * + * Optional. The identifier of the container of this resource. For Google + * Cloud APIs, the resource container must be one of the following formats: + * - `projects/<project-id or project-number>` + * - `folders/<folder-id>` + * - `organizations/<organization-id>` + * For the policy enforcement on the container level (VPCSC and Location + * Policy check), this field takes precedence on the container extracted from + * name when presents. + *+ * + *
string container = 4;
+ *
+ * @return The container.
+ */
+ public java.lang.String getContainer() {
+ java.lang.Object ref = container_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ container_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The identifier of the container of this resource. For Google + * Cloud APIs, the resource container must be one of the following formats: + * - `projects/<project-id or project-number>` + * - `folders/<folder-id>` + * - `organizations/<organization-id>` + * For the policy enforcement on the container level (VPCSC and Location + * Policy check), this field takes precedence on the container extracted from + * name when presents. + *+ * + *
string container = 4;
+ *
+ * @return The bytes for container.
+ */
+ public com.google.protobuf.ByteString getContainerBytes() {
+ java.lang.Object ref = container_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ container_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The identifier of the container of this resource. For Google + * Cloud APIs, the resource container must be one of the following formats: + * - `projects/<project-id or project-number>` + * - `folders/<folder-id>` + * - `organizations/<organization-id>` + * For the policy enforcement on the container level (VPCSC and Location + * Policy check), this field takes precedence on the container extracted from + * name when presents. + *+ * + *
string container = 4;
+ *
+ * @param value The container to set.
+ * @return This builder for chaining.
+ */
+ public Builder setContainer(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ container_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The identifier of the container of this resource. For Google + * Cloud APIs, the resource container must be one of the following formats: + * - `projects/<project-id or project-number>` + * - `folders/<folder-id>` + * - `organizations/<organization-id>` + * For the policy enforcement on the container level (VPCSC and Location + * Policy check), this field takes precedence on the container extracted from + * name when presents. + *+ * + *
string container = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearContainer() {
+
+ container_ = getDefaultInstance().getContainer();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The identifier of the container of this resource. For Google + * Cloud APIs, the resource container must be one of the following formats: + * - `projects/<project-id or project-number>` + * - `folders/<folder-id>` + * - `organizations/<organization-id>` + * For the policy enforcement on the container level (VPCSC and Location + * Policy check), this field takes precedence on the container extracted from + * name when presents. + *+ * + *
string container = 4;
+ *
+ * @param value The bytes for container to set.
+ * @return This builder for chaining.
+ */
+ public Builder setContainerBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ container_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object location_ = "";
+ /**
+ *
+ *
+ * + * Optional. The location of the resource. The value must be a valid zone, + * region or multiregion. For example: "europe-west4" or + * "northamerica-northeast1-a" + *+ * + *
string location = 5;
+ *
+ * @return The location.
+ */
+ public java.lang.String getLocation() {
+ java.lang.Object ref = location_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ location_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The location of the resource. The value must be a valid zone, + * region or multiregion. For example: "europe-west4" or + * "northamerica-northeast1-a" + *+ * + *
string location = 5;
+ *
+ * @return The bytes for location.
+ */
+ public com.google.protobuf.ByteString getLocationBytes() {
+ java.lang.Object ref = location_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ location_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The location of the resource. The value must be a valid zone, + * region or multiregion. For example: "europe-west4" or + * "northamerica-northeast1-a" + *+ * + *
string location = 5;
+ *
+ * @param value The location to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLocation(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ location_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The location of the resource. The value must be a valid zone, + * region or multiregion. For example: "europe-west4" or + * "northamerica-northeast1-a" + *+ * + *
string location = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearLocation() {
+
+ location_ = getDefaultInstance().getLocation();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The location of the resource. The value must be a valid zone, + * region or multiregion. For example: "europe-west4" or + * "northamerica-northeast1-a" + *+ * + *
string location = 5;
+ *
+ * @param value The bytes for location to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLocationBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ location_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.api.servicecontrol.v2.ResourceInfo)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.api.servicecontrol.v2.ResourceInfo)
+ private static final com.google.api.servicecontrol.v2.ResourceInfo DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.api.servicecontrol.v2.ResourceInfo();
+ }
+
+ public static com.google.api.servicecontrol.v2.ResourceInfo getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The name of the resource referenced in the request. + *+ * + *
string name = 1;
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * The name of the resource referenced in the request. + *+ * + *
string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * The resource type in the format of "{service}/{kind}". + *+ * + *
string type = 2;
+ *
+ * @return The type.
+ */
+ java.lang.String getType();
+ /**
+ *
+ *
+ * + * The resource type in the format of "{service}/{kind}". + *+ * + *
string type = 2;
+ *
+ * @return The bytes for type.
+ */
+ com.google.protobuf.ByteString getTypeBytes();
+
+ /**
+ *
+ *
+ * + * The resource permission needed for this request. + * The format must be "{service}/{plural}.{verb}". + *+ * + *
string permission = 3;
+ *
+ * @return The permission.
+ */
+ java.lang.String getPermission();
+ /**
+ *
+ *
+ * + * The resource permission needed for this request. + * The format must be "{service}/{plural}.{verb}". + *+ * + *
string permission = 3;
+ *
+ * @return The bytes for permission.
+ */
+ com.google.protobuf.ByteString getPermissionBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The identifier of the container of this resource. For Google + * Cloud APIs, the resource container must be one of the following formats: + * - `projects/<project-id or project-number>` + * - `folders/<folder-id>` + * - `organizations/<organization-id>` + * For the policy enforcement on the container level (VPCSC and Location + * Policy check), this field takes precedence on the container extracted from + * name when presents. + *+ * + *
string container = 4;
+ *
+ * @return The container.
+ */
+ java.lang.String getContainer();
+ /**
+ *
+ *
+ * + * Optional. The identifier of the container of this resource. For Google + * Cloud APIs, the resource container must be one of the following formats: + * - `projects/<project-id or project-number>` + * - `folders/<folder-id>` + * - `organizations/<organization-id>` + * For the policy enforcement on the container level (VPCSC and Location + * Policy check), this field takes precedence on the container extracted from + * name when presents. + *+ * + *
string container = 4;
+ *
+ * @return The bytes for container.
+ */
+ com.google.protobuf.ByteString getContainerBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The location of the resource. The value must be a valid zone, + * region or multiregion. For example: "europe-west4" or + * "northamerica-northeast1-a" + *+ * + *
string location = 5;
+ *
+ * @return The location.
+ */
+ java.lang.String getLocation();
+ /**
+ *
+ *
+ * + * Optional. The location of the resource. The value must be a valid zone, + * region or multiregion. For example: "europe-west4" or + * "northamerica-northeast1-a" + *+ * + *
string location = 5;
+ *
+ * @return The bytes for location.
+ */
+ com.google.protobuf.ByteString getLocationBytes();
+}
diff --git a/proto-google-cloud-service-control-v2/src/main/java/com/google/api/servicecontrol/v2/ServiceControllerProto.java b/proto-google-cloud-service-control-v2/src/main/java/com/google/api/servicecontrol/v2/ServiceControllerProto.java
new file mode 100644
index 00000000..e47f3a75
--- /dev/null
+++ b/proto-google-cloud-service-control-v2/src/main/java/com/google/api/servicecontrol/v2/ServiceControllerProto.java
@@ -0,0 +1,174 @@
+/*
+ * Copyright 2020 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/api/servicecontrol/v2/service_controller.proto
+
+package com.google.api.servicecontrol.v2;
+
+public final class ServiceControllerProto {
+ private ServiceControllerProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_api_servicecontrol_v2_CheckRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_api_servicecontrol_v2_CheckRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_api_servicecontrol_v2_ResourceInfo_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_api_servicecontrol_v2_ResourceInfo_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_api_servicecontrol_v2_CheckResponse_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_api_servicecontrol_v2_CheckResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_api_servicecontrol_v2_CheckResponse_HeadersEntry_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_api_servicecontrol_v2_CheckResponse_HeadersEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_api_servicecontrol_v2_ReportRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_api_servicecontrol_v2_ReportRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_api_servicecontrol_v2_ReportResponse_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_api_servicecontrol_v2_ReportResponse_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n5google/api/servicecontrol/v2/service_c"
+ + "ontroller.proto\022\034google.api.servicecontr"
+ + "ol.v2\032\034google/api/annotations.proto\032\027goo"
+ + "gle/api/client.proto\032*google/rpc/context"
+ + "/attribute_context.proto\032\027google/rpc/sta"
+ + "tus.proto\"\307\001\n\014CheckRequest\022\024\n\014service_na"
+ + "me\030\001 \001(\t\022\031\n\021service_config_id\030\002 \001(\t\0228\n\na"
+ + "ttributes\030\003 \001(\0132$.google.rpc.context.Att"
+ + "ributeContext\022=\n\tresources\030\004 \003(\0132*.googl"
+ + "e.api.servicecontrol.v2.ResourceInfo\022\r\n\005"
+ + "flags\030\005 \001(\t\"c\n\014ResourceInfo\022\014\n\004name\030\001 \001("
+ + "\t\022\014\n\004type\030\002 \001(\t\022\022\n\npermission\030\003 \001(\t\022\021\n\tc"
+ + "ontainer\030\004 \001(\t\022\020\n\010location\030\005 \001(\t\"\256\001\n\rChe"
+ + "ckResponse\022\"\n\006status\030\001 \001(\0132\022.google.rpc."
+ + "Status\022I\n\007headers\030\002 \003(\01328.google.api.ser"
+ + "vicecontrol.v2.CheckResponse.HeadersEntr"
+ + "y\032.\n\014HeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030"
+ + "\002 \001(\t:\0028\001\"z\n\rReportRequest\022\024\n\014service_na"
+ + "me\030\001 \001(\t\022\031\n\021service_config_id\030\002 \001(\t\0228\n\no"
+ + "perations\030\003 \003(\0132$.google.rpc.context.Att"
+ + "ributeContext\"\020\n\016ReportResponse2\274\003\n\021Serv"
+ + "iceController\022\216\001\n\005Check\022*.google.api.ser"
+ + "vicecontrol.v2.CheckRequest\032+.google.api"
+ + ".servicecontrol.v2.CheckResponse\",\202\323\344\223\002&"
+ + "\"!/v2/services/{service_name}:check:\001*\022\222"
+ + "\001\n\006Report\022+.google.api.servicecontrol.v2"
+ + ".ReportRequest\032,.google.api.servicecontr"
+ + "ol.v2.ReportResponse\"-\202\323\344\223\002\'\"\"/v2/servic"
+ + "es/{service_name}:report:\001*\032\200\001\312A\035service"
+ + "control.googleapis.com\322A]https://www.goo"
+ + "gleapis.com/auth/cloud-platform,https://"
+ + "www.googleapis.com/auth/servicecontrolB\370"
+ + "\001\n com.google.api.servicecontrol.v2B\026Ser"
+ + "viceControllerProtoP\001ZJgoogle.golang.org"
+ + "/genproto/googleapis/api/servicecontrol/"
+ + "v2;servicecontrol\370\001\001\242\002\004GASC\252\002\036Google.Clo"
+ + "ud.ServiceControl.V2\312\002\036Google\\Cloud\\Serv"
+ + "iceControl\\V2\352\002!Google::Cloud::ServiceCo"
+ + "ntrol::V2b\006proto3"
+ };
+ descriptor =
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.api.AnnotationsProto.getDescriptor(),
+ com.google.api.ClientProto.getDescriptor(),
+ com.google.rpc.context.AttributeContextProto.getDescriptor(),
+ com.google.rpc.StatusProto.getDescriptor(),
+ });
+ internal_static_google_api_servicecontrol_v2_CheckRequest_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_api_servicecontrol_v2_CheckRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_api_servicecontrol_v2_CheckRequest_descriptor,
+ new java.lang.String[] {
+ "ServiceName", "ServiceConfigId", "Attributes", "Resources", "Flags",
+ });
+ internal_static_google_api_servicecontrol_v2_ResourceInfo_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_google_api_servicecontrol_v2_ResourceInfo_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_api_servicecontrol_v2_ResourceInfo_descriptor,
+ new java.lang.String[] {
+ "Name", "Type", "Permission", "Container", "Location",
+ });
+ internal_static_google_api_servicecontrol_v2_CheckResponse_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_google_api_servicecontrol_v2_CheckResponse_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_api_servicecontrol_v2_CheckResponse_descriptor,
+ new java.lang.String[] {
+ "Status", "Headers",
+ });
+ internal_static_google_api_servicecontrol_v2_CheckResponse_HeadersEntry_descriptor =
+ internal_static_google_api_servicecontrol_v2_CheckResponse_descriptor
+ .getNestedTypes()
+ .get(0);
+ internal_static_google_api_servicecontrol_v2_CheckResponse_HeadersEntry_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_api_servicecontrol_v2_CheckResponse_HeadersEntry_descriptor,
+ new java.lang.String[] {
+ "Key", "Value",
+ });
+ internal_static_google_api_servicecontrol_v2_ReportRequest_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_google_api_servicecontrol_v2_ReportRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_api_servicecontrol_v2_ReportRequest_descriptor,
+ new java.lang.String[] {
+ "ServiceName", "ServiceConfigId", "Operations",
+ });
+ internal_static_google_api_servicecontrol_v2_ReportResponse_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_google_api_servicecontrol_v2_ReportResponse_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_api_servicecontrol_v2_ReportResponse_descriptor,
+ new java.lang.String[] {});
+ com.google.protobuf.ExtensionRegistry registry =
+ com.google.protobuf.ExtensionRegistry.newInstance();
+ registry.add(com.google.api.ClientProto.defaultHost);
+ registry.add(com.google.api.AnnotationsProto.http);
+ registry.add(com.google.api.ClientProto.oauthScopes);
+ com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
+ descriptor, registry);
+ com.google.api.AnnotationsProto.getDescriptor();
+ com.google.api.ClientProto.getDescriptor();
+ com.google.rpc.context.AttributeContextProto.getDescriptor();
+ com.google.rpc.StatusProto.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/proto-google-cloud-service-control-v2/src/main/proto/google/api/servicecontrol/v2/service_controller.proto b/proto-google-cloud-service-control-v2/src/main/proto/google/api/servicecontrol/v2/service_controller.proto
new file mode 100644
index 00000000..62e3f24c
--- /dev/null
+++ b/proto-google-cloud-service-control-v2/src/main/proto/google/api/servicecontrol/v2/service_controller.proto
@@ -0,0 +1,186 @@
+// Copyright 2022 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
+//
+// http://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.
+
+syntax = "proto3";
+
+package google.api.servicecontrol.v2;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/rpc/context/attribute_context.proto";
+import "google/rpc/status.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.ServiceControl.V2";
+option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v2;servicecontrol";
+option java_multiple_files = true;
+option java_outer_classname = "ServiceControllerProto";
+option java_package = "com.google.api.servicecontrol.v2";
+option objc_class_prefix = "GASC";
+option php_namespace = "Google\\Cloud\\ServiceControl\\V2";
+option ruby_package = "Google::Cloud::ServiceControl::V2";
+
+// [Service Control API v2](/service-infrastructure/docs/service-control)
+//
+// Private Preview. This feature is only available for approved services.
+//
+// This API provides admission control and telemetry reporting for services
+// that are integrated with [Service Infrastructure](/service-infrastructure).
+service ServiceController {
+ option (google.api.default_host) = "servicecontrol.googleapis.com";
+ option (google.api.oauth_scopes) =
+ "https://www.googleapis.com/auth/cloud-platform,"
+ "https://www.googleapis.com/auth/servicecontrol";
+
+ // Private Preview. This feature is only available for approved services.
+ //
+ // This method provides admission control for services that are integrated
+ // with [Service Infrastructure](/service-infrastructure). It checks whether
+ // an operation should be allowed based on the service configuration and
+ // relevant policies. It must be called before the operation is executed.
+ // For more information, see
+ // [Admission Control](/service-infrastructure/docs/admission-control).
+ //
+ // NOTE: The admission control has an expected policy propagation delay of
+ // 60s. The caller **must** not depend on the most recent policy changes.
+ //
+ // NOTE: The admission control has a hard limit of 1 referenced resources
+ // per call. If an operation refers to more than 1 resources, the caller
+ // must call the Check method multiple times.
+ //
+ // This method requires the `servicemanagement.services.check` permission
+ // on the specified service. For more information, see
+ // [Service Control API Access
+ // Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).
+ rpc Check(CheckRequest) returns (CheckResponse) {
+ option (google.api.http) = {
+ post: "/v2/services/{service_name}:check"
+ body: "*"
+ };
+ }
+
+ // Private Preview. This feature is only available for approved services.
+ //
+ // This method provides telemetry reporting for services that are integrated
+ // with [Service Infrastructure](/service-infrastructure). It reports a list
+ // of operations that have occurred on a service. It must be called after the
+ // operations have been executed. For more information, see
+ // [Telemetry Reporting](/service-infrastructure/docs/telemetry-reporting).
+ //
+ // NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB
+ // per Report call. It is recommended to have no more than 100 operations per
+ // call.
+ //
+ // This method requires the `servicemanagement.services.report` permission
+ // on the specified service. For more information, see
+ // [Service Control API Access
+ // Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).
+ rpc Report(ReportRequest) returns (ReportResponse) {
+ option (google.api.http) = {
+ post: "/v2/services/{service_name}:report"
+ body: "*"
+ };
+ }
+}
+
+// Request message for the Check method.
+message CheckRequest {
+ // The service name as specified in its service configuration. For example,
+ // `"pubsub.googleapis.com"`.
+ //
+ // See
+ // [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
+ // for the definition of a service name.
+ string service_name = 1;
+
+ // Specifies the version of the service configuration that should be used to
+ // process the request. Must not be empty. Set this field to 'latest' to
+ // specify using the latest configuration.
+ string service_config_id = 2;
+
+ // Describes attributes about the operation being executed by the service.
+ google.rpc.context.AttributeContext attributes = 3;
+
+ // Describes the resources and the policies applied to each resource.
+ repeated ResourceInfo resources = 4;
+
+ // Optional. Contains a comma-separated list of flags.
+ string flags = 5;
+}
+
+// Describes a resource referenced in the request.
+message ResourceInfo {
+ // The name of the resource referenced in the request.
+ string name = 1;
+
+ // The resource type in the format of "{service}/{kind}".
+ string type = 2;
+
+ // The resource permission needed for this request.
+ // The format must be "{service}/{plural}.{verb}".
+ string permission = 3;
+
+ // Optional. The identifier of the container of this resource. For Google
+ // Cloud APIs, the resource container must be one of the following formats:
+ // - `projects/