All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.rpc.QuotaFailure Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/rpc/error_details.proto

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(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private QuotaFailure( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new 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: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { violations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } violations_.add( input.readMessage(Violation.parser(), extensionRegistry)); 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 { if (((mutable_bitField0_ & 0x00000001) != 0)) { violations_ = java.util.Collections.unmodifiableList(violations_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_fieldAccessorTable .ensureFieldAccessorsInitialized( QuotaFailure.class, 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; */ 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; */ 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; */ 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; */ 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_ = ""; } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Violation( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new 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: { String s = input.readStringRequireUtf8(); subject_ = s; break; } case 18: { String s = input.readStringRequireUtf8(); description_ = 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.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable .ensureFieldAccessorsInitialized( Violation.class, Builder.class); } public static final int SUBJECT_FIELD_NUMBER = 1; private volatile 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; */ public String getSubject() { Object ref = subject_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 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; */ public com.google.protobuf.ByteString getSubjectBytes() { Object ref = subject_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); subject_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DESCRIPTION_FIELD_NUMBER = 2; private volatile 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; */ public String getDescription() { Object ref = description_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 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; */ public com.google.protobuf.ByteString getDescriptionBytes() { Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getSubjectBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subject_); } if (!getDescriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getSubjectBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subject_); } if (!getDescriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Violation)) { return super.equals(obj); } Violation other = (Violation) obj; if (!getSubject() .equals(other.getSubject())) return false; if (!getDescription() .equals(other.getDescription())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @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) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Violation parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Violation parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Violation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Violation parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Violation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Violation parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Violation parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static 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 Violation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static 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 Violation parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static 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); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Violation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( 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 implements // @@protoc_insertion_point(builder_implements:google.rpc.QuotaFailure.Violation) ViolationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable .ensureFieldAccessorsInitialized( Violation.class, Builder.class); } // Construct using com.google.rpc.QuotaFailure.Violation.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); subject_ = ""; description_ = ""; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor; } @Override public Violation getDefaultInstanceForType() { return Violation.getDefaultInstance(); } @Override public Violation build() { Violation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Violation buildPartial() { Violation result = new Violation(this); result.subject_ = subject_; result.description_ = description_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Violation) { return mergeFrom((Violation)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Violation other) { if (other == Violation.getDefaultInstance()) return this; if (!other.getSubject().isEmpty()) { subject_ = other.subject_; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Violation parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Violation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private 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; */ public String getSubject() { Object ref = subject_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); subject_ = s; return s; } else { return (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; */ public com.google.protobuf.ByteString getSubjectBytes() { Object ref = subject_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (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; */ public Builder setSubject( String value) { if (value == null) { throw new NullPointerException(); } subject_ = value; 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; */ public Builder clearSubject() { subject_ = getDefaultInstance().getSubject(); 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; */ public Builder setSubjectBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); subject_ = value; onChanged(); return this; } private 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; */ public String getDescription() { Object ref = description_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); description_ = s; return s; } else { return (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; */ public com.google.protobuf.ByteString getDescriptionBytes() { Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (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; */ public Builder setDescription( String value) { if (value == null) { throw new NullPointerException(); } description_ = value; 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; */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); 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; */ public Builder setDescriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @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 Violation DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Violation(); } public static Violation getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @Override public Violation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Violation(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @Override public Violation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int VIOLATIONS_FIELD_NUMBER = 1; private java.util.List violations_; /** *
   * Describes all quota violations.
   * 
* * repeated .google.rpc.QuotaFailure.Violation violations = 1; */ public java.util.List getViolationsList() { return violations_; } /** *
   * Describes all quota violations.
   * 
* * repeated .google.rpc.QuotaFailure.Violation violations = 1; */ public java.util.List getViolationsOrBuilderList() { return violations_; } /** *
   * Describes all quota violations.
   * 
* * repeated .google.rpc.QuotaFailure.Violation violations = 1; */ public int getViolationsCount() { return violations_.size(); } /** *
   * Describes all quota violations.
   * 
* * repeated .google.rpc.QuotaFailure.Violation violations = 1; */ public Violation getViolations(int index) { return violations_.get(index); } /** *
   * Describes all quota violations.
   * 
* * repeated .google.rpc.QuotaFailure.Violation violations = 1; */ public ViolationOrBuilder getViolationsOrBuilder( int index) { return violations_.get(index); } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @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)); } unknownFields.writeTo(output); } @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 += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof QuotaFailure)) { return super.equals(obj); } QuotaFailure other = (QuotaFailure) obj; if (!getViolationsList() .equals(other.getViolationsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @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) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static QuotaFailure parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static QuotaFailure parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static QuotaFailure parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static QuotaFailure parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static QuotaFailure parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static QuotaFailure parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static QuotaFailure parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static 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 QuotaFailure parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static 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 QuotaFailure parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static 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); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(QuotaFailure prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( 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 implements // @@protoc_insertion_point(builder_implements:google.rpc.QuotaFailure) com.google.rpc.QuotaFailureOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_fieldAccessorTable .ensureFieldAccessorsInitialized( QuotaFailure.class, Builder.class); } // Construct using com.google.rpc.QuotaFailure.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getViolationsFieldBuilder(); } } @Override public Builder clear() { super.clear(); if (violationsBuilder_ == null) { violations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { violationsBuilder_.clear(); } return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor; } @Override public QuotaFailure getDefaultInstanceForType() { return QuotaFailure.getDefaultInstance(); } @Override public QuotaFailure build() { QuotaFailure result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public QuotaFailure buildPartial() { QuotaFailure result = new QuotaFailure(this); int from_bitField0_ = bitField0_; if (violationsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { violations_ = java.util.Collections.unmodifiableList(violations_); bitField0_ = (bitField0_ & ~0x00000001); } result.violations_ = violations_; } else { result.violations_ = violationsBuilder_.build(); } onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof QuotaFailure) { return mergeFrom((QuotaFailure)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(QuotaFailure other) { if (other == QuotaFailure.getDefaultInstance()) return this; if (violationsBuilder_ == null) { if (!other.violations_.isEmpty()) { if (violations_.isEmpty()) { violations_ = other.violations_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureViolationsIsMutable(); violations_.addAll(other.violations_); } onChanged(); } } else { if (!other.violations_.isEmpty()) { if (violationsBuilder_.isEmpty()) { violationsBuilder_.dispose(); violationsBuilder_ = null; violations_ = other.violations_; bitField0_ = (bitField0_ & ~0x00000001); violationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getViolationsFieldBuilder() : null; } else { violationsBuilder_.addAllMessages(other.violations_); } } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { QuotaFailure parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (QuotaFailure) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List violations_ = java.util.Collections.emptyList(); private void ensureViolationsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { violations_ = new java.util.ArrayList(violations_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< Violation, Violation.Builder, ViolationOrBuilder> violationsBuilder_; /** *
     * Describes all quota violations.
     * 
* * repeated .google.rpc.QuotaFailure.Violation violations = 1; */ public java.util.List getViolationsList() { if (violationsBuilder_ == null) { return java.util.Collections.unmodifiableList(violations_); } else { return violationsBuilder_.getMessageList(); } } /** *
     * 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 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, 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, 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(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, 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( 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, 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( Iterable 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 Violation.Builder getViolationsBuilder( int index) { return getViolationsFieldBuilder().getBuilder(index); } /** *
     * Describes all quota violations.
     * 
* * repeated .google.rpc.QuotaFailure.Violation violations = 1; */ public 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 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 Violation.Builder addViolationsBuilder() { return getViolationsFieldBuilder().addBuilder( Violation.getDefaultInstance()); } /** *
     * Describes all quota violations.
     * 
* * repeated .google.rpc.QuotaFailure.Violation violations = 1; */ public Violation.Builder addViolationsBuilder( int index) { return getViolationsFieldBuilder().addBuilder( index, Violation.getDefaultInstance()); } /** *
     * Describes all quota violations.
     * 
* * repeated .google.rpc.QuotaFailure.Violation violations = 1; */ public java.util.List getViolationsBuilderList() { return getViolationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< Violation, Violation.Builder, ViolationOrBuilder> getViolationsFieldBuilder() { if (violationsBuilder_ == null) { violationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< Violation, Violation.Builder, ViolationOrBuilder>( violations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); violations_ = null; } return violationsBuilder_; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.rpc.QuotaFailure) } // @@protoc_insertion_point(class_scope:google.rpc.QuotaFailure) private static final QuotaFailure DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new QuotaFailure(); } public static QuotaFailure getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @Override public QuotaFailure parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new QuotaFailure(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @Override public QuotaFailure getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy