// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/rpc/error_details.proto // Protobuf Java Version: 3.25.6 package com.google.rpc; /** *
* Describes how a quota check failed. * * For example if a daily limit was exceeded for the calling project, * a service could respond with a QuotaFailure detail containing the project * id and the description of the quota limit that was exceeded. If the * calling project hasn't enabled the service in the developer console, then * a service could respond with the project id and set `service_disabled` * to true. * * Also see RetryDetail and Help types for other details about handling a * quota failure. ** * Protobuf type {@code google.rpc.QuotaFailure} */ public final class QuotaFailure extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.rpc.QuotaFailure) QuotaFailureOrBuilder { private static final long serialVersionUID = 0L; // Use QuotaFailure.newBuilder() to construct. private QuotaFailure(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private QuotaFailure() { violations_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new QuotaFailure(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.rpc.QuotaFailure.class, com.google.rpc.QuotaFailure.Builder.class); } public interface ViolationOrBuilder extends // @@protoc_insertion_point(interface_extends:google.rpc.QuotaFailure.Violation) com.google.protobuf.MessageOrBuilder { /** *
* The subject on which the quota check failed. * For example, "clientip:<ip address of client>" or "project:<Google * developer project id>". ** *
string subject = 1;
* @return The subject.
*/
java.lang.String getSubject();
/**
* * The subject on which the quota check failed. * For example, "clientip:<ip address of client>" or "project:<Google * developer project id>". ** *
string subject = 1;
* @return The bytes for subject.
*/
com.google.protobuf.ByteString
getSubjectBytes();
/**
* * A description of how the quota check failed. Clients can use this * description to find more about the quota configuration in the service's * public documentation, or find the relevant quota limit to adjust through * developer console. * * For example: "Service disabled" or "Daily Limit for read operations * exceeded". ** *
string description = 2;
* @return The description.
*/
java.lang.String getDescription();
/**
* * A description of how the quota check failed. Clients can use this * description to find more about the quota configuration in the service's * public documentation, or find the relevant quota limit to adjust through * developer console. * * For example: "Service disabled" or "Daily Limit for read operations * exceeded". ** *
string description = 2;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
}
/**
* * A message type used to describe a single quota violation. For example, a * daily quota or a custom quota that was exceeded. ** * Protobuf type {@code google.rpc.QuotaFailure.Violation} */ public static final class Violation extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.rpc.QuotaFailure.Violation) ViolationOrBuilder { private static final long serialVersionUID = 0L; // Use Violation.newBuilder() to construct. private Violation(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private Violation() { subject_ = ""; description_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Violation(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.rpc.QuotaFailure.Violation.class, com.google.rpc.QuotaFailure.Violation.Builder.class); } public static final int SUBJECT_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object subject_ = ""; /** *
* The subject on which the quota check failed. * For example, "clientip:<ip address of client>" or "project:<Google * developer project id>". ** *
string subject = 1;
* @return The subject.
*/
@java.lang.Override
public java.lang.String getSubject() {
java.lang.Object ref = subject_;
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();
subject_ = s;
return s;
}
}
/**
* * The subject on which the quota check failed. * For example, "clientip:<ip address of client>" or "project:<Google * developer project id>". ** *
string subject = 1;
* @return The bytes for subject.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSubjectBytes() {
java.lang.Object ref = subject_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
subject_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
* * A description of how the quota check failed. Clients can use this * description to find more about the quota configuration in the service's * public documentation, or find the relevant quota limit to adjust through * developer console. * * For example: "Service disabled" or "Daily Limit for read operations * exceeded". ** *
string description = 2;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
* * A description of how the quota check failed. Clients can use this * description to find more about the quota configuration in the service's * public documentation, or find the relevant quota limit to adjust through * developer console. * * For example: "Service disabled" or "Daily Limit for read operations * exceeded". ** *
string description = 2;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = 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(subject_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subject_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subject_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
size += getUnknownFields().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.rpc.QuotaFailure.Violation)) {
return super.equals(obj);
}
com.google.rpc.QuotaFailure.Violation other = (com.google.rpc.QuotaFailure.Violation) obj;
if (!getSubject()
.equals(other.getSubject())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + SUBJECT_FIELD_NUMBER;
hash = (53 * hash) + getSubject().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.rpc.QuotaFailure.Violation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.rpc.QuotaFailure.Violation parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.rpc.QuotaFailure.Violation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.rpc.QuotaFailure.Violation 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.rpc.QuotaFailure.Violation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.rpc.QuotaFailure.Violation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.rpc.QuotaFailure.Violation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.rpc.QuotaFailure.Violation 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.rpc.QuotaFailure.Violation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.rpc.QuotaFailure.Violation 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.rpc.QuotaFailure.Violation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.rpc.QuotaFailure.Violation 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.rpc.QuotaFailure.Violation 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;
}
/**
* * A message type used to describe a single quota violation. For example, a * daily quota or a custom quota that was exceeded. ** * Protobuf type {@code google.rpc.QuotaFailure.Violation} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
* The subject on which the quota check failed. * For example, "clientip:<ip address of client>" or "project:<Google * developer project id>". ** *
string subject = 1;
* @return The subject.
*/
public java.lang.String getSubject() {
java.lang.Object ref = subject_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
subject_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* * The subject on which the quota check failed. * For example, "clientip:<ip address of client>" or "project:<Google * developer project id>". ** *
string subject = 1;
* @return The bytes for subject.
*/
public com.google.protobuf.ByteString
getSubjectBytes() {
java.lang.Object ref = subject_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
subject_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* * The subject on which the quota check failed. * For example, "clientip:<ip address of client>" or "project:<Google * developer project id>". ** *
string subject = 1;
* @param value The subject to set.
* @return This builder for chaining.
*/
public Builder setSubject(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
subject_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* * The subject on which the quota check failed. * For example, "clientip:<ip address of client>" or "project:<Google * developer project id>". ** *
string subject = 1;
* @return This builder for chaining.
*/
public Builder clearSubject() {
subject_ = getDefaultInstance().getSubject();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* * The subject on which the quota check failed. * For example, "clientip:<ip address of client>" or "project:<Google * developer project id>". ** *
string subject = 1;
* @param value The bytes for subject to set.
* @return This builder for chaining.
*/
public Builder setSubjectBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
subject_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
* * A description of how the quota check failed. Clients can use this * description to find more about the quota configuration in the service's * public documentation, or find the relevant quota limit to adjust through * developer console. * * For example: "Service disabled" or "Daily Limit for read operations * exceeded". ** *
string description = 2;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* * A description of how the quota check failed. Clients can use this * description to find more about the quota configuration in the service's * public documentation, or find the relevant quota limit to adjust through * developer console. * * For example: "Service disabled" or "Daily Limit for read operations * exceeded". ** *
string description = 2;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* * A description of how the quota check failed. Clients can use this * description to find more about the quota configuration in the service's * public documentation, or find the relevant quota limit to adjust through * developer console. * * For example: "Service disabled" or "Daily Limit for read operations * exceeded". ** *
string description = 2;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
description_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* * A description of how the quota check failed. Clients can use this * description to find more about the quota configuration in the service's * public documentation, or find the relevant quota limit to adjust through * developer console. * * For example: "Service disabled" or "Daily Limit for read operations * exceeded". ** *
string description = 2;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* * A description of how the quota check failed. Clients can use this * description to find more about the quota configuration in the service's * public documentation, or find the relevant quota limit to adjust through * developer console. * * For example: "Service disabled" or "Daily Limit for read operations * exceeded". ** *
string description = 2;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000002;
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.rpc.QuotaFailure.Violation)
}
// @@protoc_insertion_point(class_scope:google.rpc.QuotaFailure.Violation)
private static final com.google.rpc.QuotaFailure.Violation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.rpc.QuotaFailure.Violation();
}
public static com.google.rpc.QuotaFailure.Violation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser* Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
@java.lang.Override
public java.util.List* Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
@java.lang.Override
public java.util.List extends com.google.rpc.QuotaFailure.ViolationOrBuilder>
getViolationsOrBuilderList() {
return violations_;
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
@java.lang.Override
public int getViolationsCount() {
return violations_.size();
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
@java.lang.Override
public com.google.rpc.QuotaFailure.Violation getViolations(int index) {
return violations_.get(index);
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
@java.lang.Override
public com.google.rpc.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder(
int index) {
return violations_.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 {
for (int i = 0; i < violations_.size(); i++) {
output.writeMessage(1, violations_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < violations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, violations_.get(i));
}
size += getUnknownFields().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.rpc.QuotaFailure)) {
return super.equals(obj);
}
com.google.rpc.QuotaFailure other = (com.google.rpc.QuotaFailure) obj;
if (!getViolationsList()
.equals(other.getViolationsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getViolationsCount() > 0) {
hash = (37 * hash) + VIOLATIONS_FIELD_NUMBER;
hash = (53 * hash) + getViolationsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.rpc.QuotaFailure parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.rpc.QuotaFailure parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.rpc.QuotaFailure parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.rpc.QuotaFailure 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.rpc.QuotaFailure parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.rpc.QuotaFailure parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.rpc.QuotaFailure parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.rpc.QuotaFailure 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.rpc.QuotaFailure parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.rpc.QuotaFailure 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.rpc.QuotaFailure parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.rpc.QuotaFailure 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.rpc.QuotaFailure 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 how a quota check failed. * * For example if a daily limit was exceeded for the calling project, * a service could respond with a QuotaFailure detail containing the project * id and the description of the quota limit that was exceeded. If the * calling project hasn't enabled the service in the developer console, then * a service could respond with the project id and set `service_disabled` * to true. * * Also see RetryDetail and Help types for other details about handling a * quota failure. ** * Protobuf type {@code google.rpc.QuotaFailure} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
* Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public java.util.List* Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public int getViolationsCount() {
if (violationsBuilder_ == null) {
return violations_.size();
} else {
return violationsBuilder_.getCount();
}
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public com.google.rpc.QuotaFailure.Violation getViolations(int index) {
if (violationsBuilder_ == null) {
return violations_.get(index);
} else {
return violationsBuilder_.getMessage(index);
}
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public Builder setViolations(
int index, com.google.rpc.QuotaFailure.Violation value) {
if (violationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureViolationsIsMutable();
violations_.set(index, value);
onChanged();
} else {
violationsBuilder_.setMessage(index, value);
}
return this;
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public Builder setViolations(
int index, com.google.rpc.QuotaFailure.Violation.Builder builderForValue) {
if (violationsBuilder_ == null) {
ensureViolationsIsMutable();
violations_.set(index, builderForValue.build());
onChanged();
} else {
violationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public Builder addViolations(com.google.rpc.QuotaFailure.Violation value) {
if (violationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureViolationsIsMutable();
violations_.add(value);
onChanged();
} else {
violationsBuilder_.addMessage(value);
}
return this;
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public Builder addViolations(
int index, com.google.rpc.QuotaFailure.Violation value) {
if (violationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureViolationsIsMutable();
violations_.add(index, value);
onChanged();
} else {
violationsBuilder_.addMessage(index, value);
}
return this;
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public Builder addViolations(
com.google.rpc.QuotaFailure.Violation.Builder builderForValue) {
if (violationsBuilder_ == null) {
ensureViolationsIsMutable();
violations_.add(builderForValue.build());
onChanged();
} else {
violationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public Builder addViolations(
int index, com.google.rpc.QuotaFailure.Violation.Builder builderForValue) {
if (violationsBuilder_ == null) {
ensureViolationsIsMutable();
violations_.add(index, builderForValue.build());
onChanged();
} else {
violationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public Builder addAllViolations(
java.lang.Iterable extends com.google.rpc.QuotaFailure.Violation> values) {
if (violationsBuilder_ == null) {
ensureViolationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, violations_);
onChanged();
} else {
violationsBuilder_.addAllMessages(values);
}
return this;
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public Builder clearViolations() {
if (violationsBuilder_ == null) {
violations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
violationsBuilder_.clear();
}
return this;
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public Builder removeViolations(int index) {
if (violationsBuilder_ == null) {
ensureViolationsIsMutable();
violations_.remove(index);
onChanged();
} else {
violationsBuilder_.remove(index);
}
return this;
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public com.google.rpc.QuotaFailure.Violation.Builder getViolationsBuilder(
int index) {
return getViolationsFieldBuilder().getBuilder(index);
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public com.google.rpc.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder(
int index) {
if (violationsBuilder_ == null) {
return violations_.get(index); } else {
return violationsBuilder_.getMessageOrBuilder(index);
}
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public java.util.List extends com.google.rpc.QuotaFailure.ViolationOrBuilder>
getViolationsOrBuilderList() {
if (violationsBuilder_ != null) {
return violationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(violations_);
}
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public com.google.rpc.QuotaFailure.Violation.Builder addViolationsBuilder() {
return getViolationsFieldBuilder().addBuilder(
com.google.rpc.QuotaFailure.Violation.getDefaultInstance());
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public com.google.rpc.QuotaFailure.Violation.Builder addViolationsBuilder(
int index) {
return getViolationsFieldBuilder().addBuilder(
index, com.google.rpc.QuotaFailure.Violation.getDefaultInstance());
}
/**
* * Describes all quota violations. ** *
repeated .google.rpc.QuotaFailure.Violation violations = 1;
*/
public java.util.List