![JAR search and dependency download from the Maven repository](/logo.png)
com.google.api.servicecontrol.v1.AllocateQuotaResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of endpoints-management-protos Show documentation
Show all versions of endpoints-management-protos Show documentation
Contains the generated protocol buffer surface used by Endpoints
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/servicecontrol/v1/quota_controller.proto
package com.google.api.servicecontrol.v1;
/**
*
* Response message for the AllocateQuota method.
*
*
* Protobuf type {@code google.api.servicecontrol.v1.AllocateQuotaResponse}
*/
public final class AllocateQuotaResponse extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.AllocateQuotaResponse)
AllocateQuotaResponseOrBuilder {
// Use AllocateQuotaResponse.newBuilder() to construct.
private AllocateQuotaResponse(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private AllocateQuotaResponse() {
operationId_ = "";
allocateErrors_ = java.util.Collections.emptyList();
quotaMetrics_ = java.util.Collections.emptyList();
serviceConfigId_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private AllocateQuotaResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
operationId_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
allocateErrors_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
allocateErrors_.add(
input.readMessage(com.google.api.servicecontrol.v1.QuotaError.parser(), extensionRegistry));
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
quotaMetrics_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
quotaMetrics_.add(
input.readMessage(com.google.api.servicecontrol.v1.MetricValueSet.parser(), extensionRegistry));
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
serviceConfigId_ = s;
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 {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
allocateErrors_ = java.util.Collections.unmodifiableList(allocateErrors_);
}
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
quotaMetrics_ = java.util.Collections.unmodifiableList(quotaMetrics_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.QuotaControllerProto.internal_static_google_api_servicecontrol_v1_AllocateQuotaResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.QuotaControllerProto.internal_static_google_api_servicecontrol_v1_AllocateQuotaResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.AllocateQuotaResponse.class, com.google.api.servicecontrol.v1.AllocateQuotaResponse.Builder.class);
}
private int bitField0_;
public static final int OPERATION_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object operationId_;
/**
*
* The same operation_id value used in the AllocateQuotaRequest. Used for
* logging and diagnostics purposes.
*
*
* optional string operation_id = 1;
*/
public java.lang.String getOperationId() {
java.lang.Object ref = operationId_;
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();
operationId_ = s;
return s;
}
}
/**
*
* The same operation_id value used in the AllocateQuotaRequest. Used for
* logging and diagnostics purposes.
*
*
* optional string operation_id = 1;
*/
public com.google.protobuf.ByteString
getOperationIdBytes() {
java.lang.Object ref = operationId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
operationId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ALLOCATE_ERRORS_FIELD_NUMBER = 2;
private java.util.List allocateErrors_;
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public java.util.List getAllocateErrorsList() {
return allocateErrors_;
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public java.util.List extends com.google.api.servicecontrol.v1.QuotaErrorOrBuilder>
getAllocateErrorsOrBuilderList() {
return allocateErrors_;
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public int getAllocateErrorsCount() {
return allocateErrors_.size();
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public com.google.api.servicecontrol.v1.QuotaError getAllocateErrors(int index) {
return allocateErrors_.get(index);
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public com.google.api.servicecontrol.v1.QuotaErrorOrBuilder getAllocateErrorsOrBuilder(
int index) {
return allocateErrors_.get(index);
}
public static final int QUOTA_METRICS_FIELD_NUMBER = 3;
private java.util.List quotaMetrics_;
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public java.util.List getQuotaMetricsList() {
return quotaMetrics_;
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public java.util.List extends com.google.api.servicecontrol.v1.MetricValueSetOrBuilder>
getQuotaMetricsOrBuilderList() {
return quotaMetrics_;
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public int getQuotaMetricsCount() {
return quotaMetrics_.size();
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public com.google.api.servicecontrol.v1.MetricValueSet getQuotaMetrics(int index) {
return quotaMetrics_.get(index);
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public com.google.api.servicecontrol.v1.MetricValueSetOrBuilder getQuotaMetricsOrBuilder(
int index) {
return quotaMetrics_.get(index);
}
public static final int SERVICE_CONFIG_ID_FIELD_NUMBER = 4;
private volatile java.lang.Object serviceConfigId_;
/**
*
* ID of the actual config used to process the request.
*
*
* optional string service_config_id = 4;
*/
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;
}
}
/**
*
* ID of the actual config used to process the request.
*
*
* optional string service_config_id = 4;
*/
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;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getOperationIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, operationId_);
}
for (int i = 0; i < allocateErrors_.size(); i++) {
output.writeMessage(2, allocateErrors_.get(i));
}
for (int i = 0; i < quotaMetrics_.size(); i++) {
output.writeMessage(3, quotaMetrics_.get(i));
}
if (!getServiceConfigIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessage.writeString(output, 4, serviceConfigId_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getOperationIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, operationId_);
}
for (int i = 0; i < allocateErrors_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, allocateErrors_.get(i));
}
for (int i = 0; i < quotaMetrics_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, quotaMetrics_.get(i));
}
if (!getServiceConfigIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(4, serviceConfigId_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.api.servicecontrol.v1.AllocateQuotaResponse)) {
return super.equals(obj);
}
com.google.api.servicecontrol.v1.AllocateQuotaResponse other = (com.google.api.servicecontrol.v1.AllocateQuotaResponse) obj;
boolean result = true;
result = result && getOperationId()
.equals(other.getOperationId());
result = result && getAllocateErrorsList()
.equals(other.getAllocateErrorsList());
result = result && getQuotaMetricsList()
.equals(other.getQuotaMetricsList());
result = result && getServiceConfigId()
.equals(other.getServiceConfigId());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + OPERATION_ID_FIELD_NUMBER;
hash = (53 * hash) + getOperationId().hashCode();
if (getAllocateErrorsCount() > 0) {
hash = (37 * hash) + ALLOCATE_ERRORS_FIELD_NUMBER;
hash = (53 * hash) + getAllocateErrorsList().hashCode();
}
if (getQuotaMetricsCount() > 0) {
hash = (37 * hash) + QUOTA_METRICS_FIELD_NUMBER;
hash = (53 * hash) + getQuotaMetricsList().hashCode();
}
hash = (37 * hash) + SERVICE_CONFIG_ID_FIELD_NUMBER;
hash = (53 * hash) + getServiceConfigId().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.servicecontrol.v1.AllocateQuotaResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.AllocateQuotaResponse 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.v1.AllocateQuotaResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.AllocateQuotaResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.AllocateQuotaResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.AllocateQuotaResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.AllocateQuotaResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.AllocateQuotaResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.AllocateQuotaResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.AllocateQuotaResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.api.servicecontrol.v1.AllocateQuotaResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Response message for the AllocateQuota method.
*
*
* Protobuf type {@code google.api.servicecontrol.v1.AllocateQuotaResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.servicecontrol.v1.AllocateQuotaResponse)
com.google.api.servicecontrol.v1.AllocateQuotaResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.QuotaControllerProto.internal_static_google_api_servicecontrol_v1_AllocateQuotaResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.QuotaControllerProto.internal_static_google_api_servicecontrol_v1_AllocateQuotaResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.AllocateQuotaResponse.class, com.google.api.servicecontrol.v1.AllocateQuotaResponse.Builder.class);
}
// Construct using com.google.api.servicecontrol.v1.AllocateQuotaResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getAllocateErrorsFieldBuilder();
getQuotaMetricsFieldBuilder();
}
}
public Builder clear() {
super.clear();
operationId_ = "";
if (allocateErrorsBuilder_ == null) {
allocateErrors_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
allocateErrorsBuilder_.clear();
}
if (quotaMetricsBuilder_ == null) {
quotaMetrics_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
quotaMetricsBuilder_.clear();
}
serviceConfigId_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.servicecontrol.v1.QuotaControllerProto.internal_static_google_api_servicecontrol_v1_AllocateQuotaResponse_descriptor;
}
public com.google.api.servicecontrol.v1.AllocateQuotaResponse getDefaultInstanceForType() {
return com.google.api.servicecontrol.v1.AllocateQuotaResponse.getDefaultInstance();
}
public com.google.api.servicecontrol.v1.AllocateQuotaResponse build() {
com.google.api.servicecontrol.v1.AllocateQuotaResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.api.servicecontrol.v1.AllocateQuotaResponse buildPartial() {
com.google.api.servicecontrol.v1.AllocateQuotaResponse result = new com.google.api.servicecontrol.v1.AllocateQuotaResponse(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.operationId_ = operationId_;
if (allocateErrorsBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
allocateErrors_ = java.util.Collections.unmodifiableList(allocateErrors_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.allocateErrors_ = allocateErrors_;
} else {
result.allocateErrors_ = allocateErrorsBuilder_.build();
}
if (quotaMetricsBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)) {
quotaMetrics_ = java.util.Collections.unmodifiableList(quotaMetrics_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.quotaMetrics_ = quotaMetrics_;
} else {
result.quotaMetrics_ = quotaMetricsBuilder_.build();
}
result.serviceConfigId_ = serviceConfigId_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.servicecontrol.v1.AllocateQuotaResponse) {
return mergeFrom((com.google.api.servicecontrol.v1.AllocateQuotaResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.servicecontrol.v1.AllocateQuotaResponse other) {
if (other == com.google.api.servicecontrol.v1.AllocateQuotaResponse.getDefaultInstance()) return this;
if (!other.getOperationId().isEmpty()) {
operationId_ = other.operationId_;
onChanged();
}
if (allocateErrorsBuilder_ == null) {
if (!other.allocateErrors_.isEmpty()) {
if (allocateErrors_.isEmpty()) {
allocateErrors_ = other.allocateErrors_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureAllocateErrorsIsMutable();
allocateErrors_.addAll(other.allocateErrors_);
}
onChanged();
}
} else {
if (!other.allocateErrors_.isEmpty()) {
if (allocateErrorsBuilder_.isEmpty()) {
allocateErrorsBuilder_.dispose();
allocateErrorsBuilder_ = null;
allocateErrors_ = other.allocateErrors_;
bitField0_ = (bitField0_ & ~0x00000002);
allocateErrorsBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getAllocateErrorsFieldBuilder() : null;
} else {
allocateErrorsBuilder_.addAllMessages(other.allocateErrors_);
}
}
}
if (quotaMetricsBuilder_ == null) {
if (!other.quotaMetrics_.isEmpty()) {
if (quotaMetrics_.isEmpty()) {
quotaMetrics_ = other.quotaMetrics_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureQuotaMetricsIsMutable();
quotaMetrics_.addAll(other.quotaMetrics_);
}
onChanged();
}
} else {
if (!other.quotaMetrics_.isEmpty()) {
if (quotaMetricsBuilder_.isEmpty()) {
quotaMetricsBuilder_.dispose();
quotaMetricsBuilder_ = null;
quotaMetrics_ = other.quotaMetrics_;
bitField0_ = (bitField0_ & ~0x00000004);
quotaMetricsBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getQuotaMetricsFieldBuilder() : null;
} else {
quotaMetricsBuilder_.addAllMessages(other.quotaMetrics_);
}
}
}
if (!other.getServiceConfigId().isEmpty()) {
serviceConfigId_ = other.serviceConfigId_;
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.api.servicecontrol.v1.AllocateQuotaResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.servicecontrol.v1.AllocateQuotaResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object operationId_ = "";
/**
*
* The same operation_id value used in the AllocateQuotaRequest. Used for
* logging and diagnostics purposes.
*
*
* optional string operation_id = 1;
*/
public java.lang.String getOperationId() {
java.lang.Object ref = operationId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
operationId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The same operation_id value used in the AllocateQuotaRequest. Used for
* logging and diagnostics purposes.
*
*
* optional string operation_id = 1;
*/
public com.google.protobuf.ByteString
getOperationIdBytes() {
java.lang.Object ref = operationId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
operationId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The same operation_id value used in the AllocateQuotaRequest. Used for
* logging and diagnostics purposes.
*
*
* optional string operation_id = 1;
*/
public Builder setOperationId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
operationId_ = value;
onChanged();
return this;
}
/**
*
* The same operation_id value used in the AllocateQuotaRequest. Used for
* logging and diagnostics purposes.
*
*
* optional string operation_id = 1;
*/
public Builder clearOperationId() {
operationId_ = getDefaultInstance().getOperationId();
onChanged();
return this;
}
/**
*
* The same operation_id value used in the AllocateQuotaRequest. Used for
* logging and diagnostics purposes.
*
*
* optional string operation_id = 1;
*/
public Builder setOperationIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
operationId_ = value;
onChanged();
return this;
}
private java.util.List allocateErrors_ =
java.util.Collections.emptyList();
private void ensureAllocateErrorsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
allocateErrors_ = new java.util.ArrayList(allocateErrors_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.api.servicecontrol.v1.QuotaError, com.google.api.servicecontrol.v1.QuotaError.Builder, com.google.api.servicecontrol.v1.QuotaErrorOrBuilder> allocateErrorsBuilder_;
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public java.util.List getAllocateErrorsList() {
if (allocateErrorsBuilder_ == null) {
return java.util.Collections.unmodifiableList(allocateErrors_);
} else {
return allocateErrorsBuilder_.getMessageList();
}
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public int getAllocateErrorsCount() {
if (allocateErrorsBuilder_ == null) {
return allocateErrors_.size();
} else {
return allocateErrorsBuilder_.getCount();
}
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public com.google.api.servicecontrol.v1.QuotaError getAllocateErrors(int index) {
if (allocateErrorsBuilder_ == null) {
return allocateErrors_.get(index);
} else {
return allocateErrorsBuilder_.getMessage(index);
}
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public Builder setAllocateErrors(
int index, com.google.api.servicecontrol.v1.QuotaError value) {
if (allocateErrorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAllocateErrorsIsMutable();
allocateErrors_.set(index, value);
onChanged();
} else {
allocateErrorsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public Builder setAllocateErrors(
int index, com.google.api.servicecontrol.v1.QuotaError.Builder builderForValue) {
if (allocateErrorsBuilder_ == null) {
ensureAllocateErrorsIsMutable();
allocateErrors_.set(index, builderForValue.build());
onChanged();
} else {
allocateErrorsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public Builder addAllocateErrors(com.google.api.servicecontrol.v1.QuotaError value) {
if (allocateErrorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAllocateErrorsIsMutable();
allocateErrors_.add(value);
onChanged();
} else {
allocateErrorsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public Builder addAllocateErrors(
int index, com.google.api.servicecontrol.v1.QuotaError value) {
if (allocateErrorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAllocateErrorsIsMutable();
allocateErrors_.add(index, value);
onChanged();
} else {
allocateErrorsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public Builder addAllocateErrors(
com.google.api.servicecontrol.v1.QuotaError.Builder builderForValue) {
if (allocateErrorsBuilder_ == null) {
ensureAllocateErrorsIsMutable();
allocateErrors_.add(builderForValue.build());
onChanged();
} else {
allocateErrorsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public Builder addAllocateErrors(
int index, com.google.api.servicecontrol.v1.QuotaError.Builder builderForValue) {
if (allocateErrorsBuilder_ == null) {
ensureAllocateErrorsIsMutable();
allocateErrors_.add(index, builderForValue.build());
onChanged();
} else {
allocateErrorsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public Builder addAllAllocateErrors(
java.lang.Iterable extends com.google.api.servicecontrol.v1.QuotaError> values) {
if (allocateErrorsBuilder_ == null) {
ensureAllocateErrorsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, allocateErrors_);
onChanged();
} else {
allocateErrorsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public Builder clearAllocateErrors() {
if (allocateErrorsBuilder_ == null) {
allocateErrors_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
allocateErrorsBuilder_.clear();
}
return this;
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public Builder removeAllocateErrors(int index) {
if (allocateErrorsBuilder_ == null) {
ensureAllocateErrorsIsMutable();
allocateErrors_.remove(index);
onChanged();
} else {
allocateErrorsBuilder_.remove(index);
}
return this;
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public com.google.api.servicecontrol.v1.QuotaError.Builder getAllocateErrorsBuilder(
int index) {
return getAllocateErrorsFieldBuilder().getBuilder(index);
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public com.google.api.servicecontrol.v1.QuotaErrorOrBuilder getAllocateErrorsOrBuilder(
int index) {
if (allocateErrorsBuilder_ == null) {
return allocateErrors_.get(index); } else {
return allocateErrorsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public java.util.List extends com.google.api.servicecontrol.v1.QuotaErrorOrBuilder>
getAllocateErrorsOrBuilderList() {
if (allocateErrorsBuilder_ != null) {
return allocateErrorsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(allocateErrors_);
}
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public com.google.api.servicecontrol.v1.QuotaError.Builder addAllocateErrorsBuilder() {
return getAllocateErrorsFieldBuilder().addBuilder(
com.google.api.servicecontrol.v1.QuotaError.getDefaultInstance());
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public com.google.api.servicecontrol.v1.QuotaError.Builder addAllocateErrorsBuilder(
int index) {
return getAllocateErrorsFieldBuilder().addBuilder(
index, com.google.api.servicecontrol.v1.QuotaError.getDefaultInstance());
}
/**
*
* Indicates the decision of the allocate.
*
*
* repeated .google.api.servicecontrol.v1.QuotaError allocate_errors = 2;
*/
public java.util.List
getAllocateErrorsBuilderList() {
return getAllocateErrorsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.api.servicecontrol.v1.QuotaError, com.google.api.servicecontrol.v1.QuotaError.Builder, com.google.api.servicecontrol.v1.QuotaErrorOrBuilder>
getAllocateErrorsFieldBuilder() {
if (allocateErrorsBuilder_ == null) {
allocateErrorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.api.servicecontrol.v1.QuotaError, com.google.api.servicecontrol.v1.QuotaError.Builder, com.google.api.servicecontrol.v1.QuotaErrorOrBuilder>(
allocateErrors_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
allocateErrors_ = null;
}
return allocateErrorsBuilder_;
}
private java.util.List quotaMetrics_ =
java.util.Collections.emptyList();
private void ensureQuotaMetricsIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
quotaMetrics_ = new java.util.ArrayList(quotaMetrics_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.api.servicecontrol.v1.MetricValueSet, com.google.api.servicecontrol.v1.MetricValueSet.Builder, com.google.api.servicecontrol.v1.MetricValueSetOrBuilder> quotaMetricsBuilder_;
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public java.util.List getQuotaMetricsList() {
if (quotaMetricsBuilder_ == null) {
return java.util.Collections.unmodifiableList(quotaMetrics_);
} else {
return quotaMetricsBuilder_.getMessageList();
}
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public int getQuotaMetricsCount() {
if (quotaMetricsBuilder_ == null) {
return quotaMetrics_.size();
} else {
return quotaMetricsBuilder_.getCount();
}
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public com.google.api.servicecontrol.v1.MetricValueSet getQuotaMetrics(int index) {
if (quotaMetricsBuilder_ == null) {
return quotaMetrics_.get(index);
} else {
return quotaMetricsBuilder_.getMessage(index);
}
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public Builder setQuotaMetrics(
int index, com.google.api.servicecontrol.v1.MetricValueSet value) {
if (quotaMetricsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureQuotaMetricsIsMutable();
quotaMetrics_.set(index, value);
onChanged();
} else {
quotaMetricsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public Builder setQuotaMetrics(
int index, com.google.api.servicecontrol.v1.MetricValueSet.Builder builderForValue) {
if (quotaMetricsBuilder_ == null) {
ensureQuotaMetricsIsMutable();
quotaMetrics_.set(index, builderForValue.build());
onChanged();
} else {
quotaMetricsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public Builder addQuotaMetrics(com.google.api.servicecontrol.v1.MetricValueSet value) {
if (quotaMetricsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureQuotaMetricsIsMutable();
quotaMetrics_.add(value);
onChanged();
} else {
quotaMetricsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public Builder addQuotaMetrics(
int index, com.google.api.servicecontrol.v1.MetricValueSet value) {
if (quotaMetricsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureQuotaMetricsIsMutable();
quotaMetrics_.add(index, value);
onChanged();
} else {
quotaMetricsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public Builder addQuotaMetrics(
com.google.api.servicecontrol.v1.MetricValueSet.Builder builderForValue) {
if (quotaMetricsBuilder_ == null) {
ensureQuotaMetricsIsMutable();
quotaMetrics_.add(builderForValue.build());
onChanged();
} else {
quotaMetricsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public Builder addQuotaMetrics(
int index, com.google.api.servicecontrol.v1.MetricValueSet.Builder builderForValue) {
if (quotaMetricsBuilder_ == null) {
ensureQuotaMetricsIsMutable();
quotaMetrics_.add(index, builderForValue.build());
onChanged();
} else {
quotaMetricsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public Builder addAllQuotaMetrics(
java.lang.Iterable extends com.google.api.servicecontrol.v1.MetricValueSet> values) {
if (quotaMetricsBuilder_ == null) {
ensureQuotaMetricsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, quotaMetrics_);
onChanged();
} else {
quotaMetricsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public Builder clearQuotaMetrics() {
if (quotaMetricsBuilder_ == null) {
quotaMetrics_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
quotaMetricsBuilder_.clear();
}
return this;
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public Builder removeQuotaMetrics(int index) {
if (quotaMetricsBuilder_ == null) {
ensureQuotaMetricsIsMutable();
quotaMetrics_.remove(index);
onChanged();
} else {
quotaMetricsBuilder_.remove(index);
}
return this;
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public com.google.api.servicecontrol.v1.MetricValueSet.Builder getQuotaMetricsBuilder(
int index) {
return getQuotaMetricsFieldBuilder().getBuilder(index);
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public com.google.api.servicecontrol.v1.MetricValueSetOrBuilder getQuotaMetricsOrBuilder(
int index) {
if (quotaMetricsBuilder_ == null) {
return quotaMetrics_.get(index); } else {
return quotaMetricsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public java.util.List extends com.google.api.servicecontrol.v1.MetricValueSetOrBuilder>
getQuotaMetricsOrBuilderList() {
if (quotaMetricsBuilder_ != null) {
return quotaMetricsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(quotaMetrics_);
}
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public com.google.api.servicecontrol.v1.MetricValueSet.Builder addQuotaMetricsBuilder() {
return getQuotaMetricsFieldBuilder().addBuilder(
com.google.api.servicecontrol.v1.MetricValueSet.getDefaultInstance());
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public com.google.api.servicecontrol.v1.MetricValueSet.Builder addQuotaMetricsBuilder(
int index) {
return getQuotaMetricsFieldBuilder().addBuilder(
index, com.google.api.servicecontrol.v1.MetricValueSet.getDefaultInstance());
}
/**
*
* Quota metrics to indicate the result of allocation. Depending on the
* request, one or more of the following metrics will be included:
* 1. For rate quota, per quota group or per quota metric incremental usage
* will be specified using the following delta metric:
* "serviceruntime.googleapis.com/api/consumer/quota_used_count"
* 2. For allocation quota, per quota metric total usage will be specified
* using the following gauge metric:
* "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
* 3. For both rate quota and allocation quota, the quota limit reached
* condition will be specified using the following boolean metric:
* "serviceruntime.googleapis.com/quota/exceeded"
*
*
* repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 3;
*/
public java.util.List
getQuotaMetricsBuilderList() {
return getQuotaMetricsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.api.servicecontrol.v1.MetricValueSet, com.google.api.servicecontrol.v1.MetricValueSet.Builder, com.google.api.servicecontrol.v1.MetricValueSetOrBuilder>
getQuotaMetricsFieldBuilder() {
if (quotaMetricsBuilder_ == null) {
quotaMetricsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.api.servicecontrol.v1.MetricValueSet, com.google.api.servicecontrol.v1.MetricValueSet.Builder, com.google.api.servicecontrol.v1.MetricValueSetOrBuilder>(
quotaMetrics_,
((bitField0_ & 0x00000004) == 0x00000004),
getParentForChildren(),
isClean());
quotaMetrics_ = null;
}
return quotaMetricsBuilder_;
}
private java.lang.Object serviceConfigId_ = "";
/**
*
* ID of the actual config used to process the request.
*
*
* optional string service_config_id = 4;
*/
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;
}
}
/**
*
* ID of the actual config used to process the request.
*
*
* optional string service_config_id = 4;
*/
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;
}
}
/**
*
* ID of the actual config used to process the request.
*
*
* optional string service_config_id = 4;
*/
public Builder setServiceConfigId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
serviceConfigId_ = value;
onChanged();
return this;
}
/**
*
* ID of the actual config used to process the request.
*
*
* optional string service_config_id = 4;
*/
public Builder clearServiceConfigId() {
serviceConfigId_ = getDefaultInstance().getServiceConfigId();
onChanged();
return this;
}
/**
*
* ID of the actual config used to process the request.
*
*
* optional string service_config_id = 4;
*/
public Builder setServiceConfigIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
serviceConfigId_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:google.api.servicecontrol.v1.AllocateQuotaResponse)
}
// @@protoc_insertion_point(class_scope:google.api.servicecontrol.v1.AllocateQuotaResponse)
private static final com.google.api.servicecontrol.v1.AllocateQuotaResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.servicecontrol.v1.AllocateQuotaResponse();
}
public static com.google.api.servicecontrol.v1.AllocateQuotaResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public AllocateQuotaResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AllocateQuotaResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.api.servicecontrol.v1.AllocateQuotaResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy