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

yandex.cloud.api.quota.Quota Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: yandex/cloud/quota/quota.proto

package yandex.cloud.api.quota;

public final class Quota {
  private Quota() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface QuotaMetricOrBuilder extends
      // @@protoc_insertion_point(interface_extends:yandex.cloud.quota.QuotaMetric)
      com.google.protobuf.MessageOrBuilder {

    /**
     * 
     * formatted as <domain>.<metric>.<unit>, e.g. mdb.hdd.size
     * 
* * string name = 1; * @return The name. */ java.lang.String getName(); /** *
     * formatted as <domain>.<metric>.<unit>, e.g. mdb.hdd.size
     * 
* * string name = 1; * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** * int64 limit = 3; * @return The limit. */ long getLimit(); /** * double usage = 4; * @return The usage. */ double getUsage(); } /** * Protobuf type {@code yandex.cloud.quota.QuotaMetric} */ public static final class QuotaMetric extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:yandex.cloud.quota.QuotaMetric) QuotaMetricOrBuilder { private static final long serialVersionUID = 0L; // Use QuotaMetric.newBuilder() to construct. private QuotaMetric(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private QuotaMetric() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new QuotaMetric(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private QuotaMetric( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 24: { limit_ = input.readInt64(); break; } case 33: { usage_ = input.readDouble(); 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 yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaMetric_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaMetric_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.quota.Quota.QuotaMetric.class, yandex.cloud.api.quota.Quota.QuotaMetric.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
     * formatted as <domain>.<metric>.<unit>, e.g. mdb.hdd.size
     * 
* * string name = 1; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
     * formatted as <domain>.<metric>.<unit>, e.g. mdb.hdd.size
     * 
* * string name = 1; * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LIMIT_FIELD_NUMBER = 3; private long limit_; /** * int64 limit = 3; * @return The limit. */ @java.lang.Override public long getLimit() { return limit_; } public static final int USAGE_FIELD_NUMBER = 4; private double usage_; /** * double usage = 4; * @return The usage. */ @java.lang.Override public double getUsage() { return usage_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (limit_ != 0L) { output.writeInt64(3, limit_); } if (java.lang.Double.doubleToRawLongBits(usage_) != 0) { output.writeDouble(4, usage_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (limit_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, limit_); } if (java.lang.Double.doubleToRawLongBits(usage_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(4, usage_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof yandex.cloud.api.quota.Quota.QuotaMetric)) { return super.equals(obj); } yandex.cloud.api.quota.Quota.QuotaMetric other = (yandex.cloud.api.quota.Quota.QuotaMetric) obj; if (!getName() .equals(other.getName())) return false; if (getLimit() != other.getLimit()) return false; if (java.lang.Double.doubleToLongBits(getUsage()) != java.lang.Double.doubleToLongBits( other.getUsage())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + LIMIT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getLimit()); hash = (37 * hash) + USAGE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getUsage())); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static yandex.cloud.api.quota.Quota.QuotaMetric parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.quota.Quota.QuotaMetric parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.quota.Quota.QuotaMetric parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.quota.Quota.QuotaMetric parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.quota.Quota.QuotaMetric parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.quota.Quota.QuotaMetric parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.quota.Quota.QuotaMetric parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.quota.Quota.QuotaMetric 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 yandex.cloud.api.quota.Quota.QuotaMetric parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static yandex.cloud.api.quota.Quota.QuotaMetric 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 yandex.cloud.api.quota.Quota.QuotaMetric parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.quota.Quota.QuotaMetric 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(yandex.cloud.api.quota.Quota.QuotaMetric 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; } /** * Protobuf type {@code yandex.cloud.quota.QuotaMetric} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yandex.cloud.quota.QuotaMetric) yandex.cloud.api.quota.Quota.QuotaMetricOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaMetric_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaMetric_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.quota.Quota.QuotaMetric.class, yandex.cloud.api.quota.Quota.QuotaMetric.Builder.class); } // Construct using yandex.cloud.api.quota.Quota.QuotaMetric.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; limit_ = 0L; usage_ = 0D; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaMetric_descriptor; } @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaMetric getDefaultInstanceForType() { return yandex.cloud.api.quota.Quota.QuotaMetric.getDefaultInstance(); } @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaMetric build() { yandex.cloud.api.quota.Quota.QuotaMetric result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaMetric buildPartial() { yandex.cloud.api.quota.Quota.QuotaMetric result = new yandex.cloud.api.quota.Quota.QuotaMetric(this); result.name_ = name_; result.limit_ = limit_; result.usage_ = usage_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof yandex.cloud.api.quota.Quota.QuotaMetric) { return mergeFrom((yandex.cloud.api.quota.Quota.QuotaMetric)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(yandex.cloud.api.quota.Quota.QuotaMetric other) { if (other == yandex.cloud.api.quota.Quota.QuotaMetric.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getLimit() != 0L) { setLimit(other.getLimit()); } if (other.getUsage() != 0D) { setUsage(other.getUsage()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { yandex.cloud.api.quota.Quota.QuotaMetric parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (yandex.cloud.api.quota.Quota.QuotaMetric) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object name_ = ""; /** *
       * formatted as <domain>.<metric>.<unit>, e.g. mdb.hdd.size
       * 
* * string name = 1; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * formatted as <domain>.<metric>.<unit>, e.g. mdb.hdd.size
       * 
* * string name = 1; * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * formatted as <domain>.<metric>.<unit>, e.g. mdb.hdd.size
       * 
* * string name = 1; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
       * formatted as <domain>.<metric>.<unit>, e.g. mdb.hdd.size
       * 
* * string name = 1; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
       * formatted as <domain>.<metric>.<unit>, e.g. mdb.hdd.size
       * 
* * string name = 1; * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private long limit_ ; /** * int64 limit = 3; * @return The limit. */ @java.lang.Override public long getLimit() { return limit_; } /** * int64 limit = 3; * @param value The limit to set. * @return This builder for chaining. */ public Builder setLimit(long value) { limit_ = value; onChanged(); return this; } /** * int64 limit = 3; * @return This builder for chaining. */ public Builder clearLimit() { limit_ = 0L; onChanged(); return this; } private double usage_ ; /** * double usage = 4; * @return The usage. */ @java.lang.Override public double getUsage() { return usage_; } /** * double usage = 4; * @param value The usage to set. * @return This builder for chaining. */ public Builder setUsage(double value) { usage_ = value; onChanged(); return this; } /** * double usage = 4; * @return This builder for chaining. */ public Builder clearUsage() { usage_ = 0D; 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:yandex.cloud.quota.QuotaMetric) } // @@protoc_insertion_point(class_scope:yandex.cloud.quota.QuotaMetric) private static final yandex.cloud.api.quota.Quota.QuotaMetric DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new yandex.cloud.api.quota.Quota.QuotaMetric(); } public static yandex.cloud.api.quota.Quota.QuotaMetric getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public QuotaMetric parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new QuotaMetric(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaMetric getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface MetricLimitOrBuilder extends // @@protoc_insertion_point(interface_extends:yandex.cloud.quota.MetricLimit) com.google.protobuf.MessageOrBuilder { /** * string name = 1; * @return The name. */ java.lang.String getName(); /** * string name = 1; * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** * int64 limit = 2; * @return The limit. */ long getLimit(); } /** * Protobuf type {@code yandex.cloud.quota.MetricLimit} */ public static final class MetricLimit extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:yandex.cloud.quota.MetricLimit) MetricLimitOrBuilder { private static final long serialVersionUID = 0L; // Use MetricLimit.newBuilder() to construct. private MetricLimit(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MetricLimit() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new MetricLimit(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MetricLimit( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 16: { limit_ = input.readInt64(); 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 yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_MetricLimit_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_MetricLimit_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.quota.Quota.MetricLimit.class, yandex.cloud.api.quota.Quota.MetricLimit.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** * string name = 1; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** * string name = 1; * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LIMIT_FIELD_NUMBER = 2; private long limit_; /** * int64 limit = 2; * @return The limit. */ @java.lang.Override public long getLimit() { return limit_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (limit_ != 0L) { output.writeInt64(2, limit_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (limit_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, limit_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof yandex.cloud.api.quota.Quota.MetricLimit)) { return super.equals(obj); } yandex.cloud.api.quota.Quota.MetricLimit other = (yandex.cloud.api.quota.Quota.MetricLimit) obj; if (!getName() .equals(other.getName())) return false; if (getLimit() != other.getLimit()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + LIMIT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getLimit()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static yandex.cloud.api.quota.Quota.MetricLimit parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.quota.Quota.MetricLimit parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.quota.Quota.MetricLimit parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.quota.Quota.MetricLimit parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.quota.Quota.MetricLimit parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.quota.Quota.MetricLimit parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.quota.Quota.MetricLimit parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.quota.Quota.MetricLimit 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 yandex.cloud.api.quota.Quota.MetricLimit parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static yandex.cloud.api.quota.Quota.MetricLimit 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 yandex.cloud.api.quota.Quota.MetricLimit parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.quota.Quota.MetricLimit 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(yandex.cloud.api.quota.Quota.MetricLimit 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; } /** * Protobuf type {@code yandex.cloud.quota.MetricLimit} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yandex.cloud.quota.MetricLimit) yandex.cloud.api.quota.Quota.MetricLimitOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_MetricLimit_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_MetricLimit_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.quota.Quota.MetricLimit.class, yandex.cloud.api.quota.Quota.MetricLimit.Builder.class); } // Construct using yandex.cloud.api.quota.Quota.MetricLimit.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; limit_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_MetricLimit_descriptor; } @java.lang.Override public yandex.cloud.api.quota.Quota.MetricLimit getDefaultInstanceForType() { return yandex.cloud.api.quota.Quota.MetricLimit.getDefaultInstance(); } @java.lang.Override public yandex.cloud.api.quota.Quota.MetricLimit build() { yandex.cloud.api.quota.Quota.MetricLimit result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public yandex.cloud.api.quota.Quota.MetricLimit buildPartial() { yandex.cloud.api.quota.Quota.MetricLimit result = new yandex.cloud.api.quota.Quota.MetricLimit(this); result.name_ = name_; result.limit_ = limit_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof yandex.cloud.api.quota.Quota.MetricLimit) { return mergeFrom((yandex.cloud.api.quota.Quota.MetricLimit)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(yandex.cloud.api.quota.Quota.MetricLimit other) { if (other == yandex.cloud.api.quota.Quota.MetricLimit.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getLimit() != 0L) { setLimit(other.getLimit()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { yandex.cloud.api.quota.Quota.MetricLimit parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (yandex.cloud.api.quota.Quota.MetricLimit) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object name_ = ""; /** * string name = 1; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * string name = 1; * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string name = 1; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** * string name = 1; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** * string name = 1; * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private long limit_ ; /** * int64 limit = 2; * @return The limit. */ @java.lang.Override public long getLimit() { return limit_; } /** * int64 limit = 2; * @param value The limit to set. * @return This builder for chaining. */ public Builder setLimit(long value) { limit_ = value; onChanged(); return this; } /** * int64 limit = 2; * @return This builder for chaining. */ public Builder clearLimit() { limit_ = 0L; 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:yandex.cloud.quota.MetricLimit) } // @@protoc_insertion_point(class_scope:yandex.cloud.quota.MetricLimit) private static final yandex.cloud.api.quota.Quota.MetricLimit DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new yandex.cloud.api.quota.Quota.MetricLimit(); } public static yandex.cloud.api.quota.Quota.MetricLimit getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MetricLimit parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MetricLimit(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public yandex.cloud.api.quota.Quota.MetricLimit getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface QuotaFailureOrBuilder extends // @@protoc_insertion_point(interface_extends:yandex.cloud.quota.QuotaFailure) com.google.protobuf.MessageOrBuilder { /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ java.util.List getViolationsList(); /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ yandex.cloud.api.quota.Quota.QuotaFailure.Violation getViolations(int index); /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ int getViolationsCount(); /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ java.util.List getViolationsOrBuilderList(); /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ yandex.cloud.api.quota.Quota.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder( int index); } /** * Protobuf type {@code yandex.cloud.quota.QuotaFailure} */ public static final class QuotaFailure extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:yandex.cloud.quota.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(); } @java.lang.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 java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { violations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } violations_.add( input.readMessage(yandex.cloud.api.quota.Quota.QuotaFailure.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 yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaFailure_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaFailure_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.quota.Quota.QuotaFailure.class, yandex.cloud.api.quota.Quota.QuotaFailure.Builder.class); } public interface ViolationOrBuilder extends // @@protoc_insertion_point(interface_extends:yandex.cloud.quota.QuotaFailure.Violation) com.google.protobuf.MessageOrBuilder { /** * .yandex.cloud.quota.QuotaMetric metric = 1; * @return Whether the metric field is set. */ boolean hasMetric(); /** * .yandex.cloud.quota.QuotaMetric metric = 1; * @return The metric. */ yandex.cloud.api.quota.Quota.QuotaMetric getMetric(); /** * .yandex.cloud.quota.QuotaMetric metric = 1; */ yandex.cloud.api.quota.Quota.QuotaMetricOrBuilder getMetricOrBuilder(); /** *
       * new value for the MetricLimit.limit, so it is: old limit + delta
       * 
* * int64 required = 2; * @return The required. */ long getRequired(); } /** * Protobuf type {@code yandex.cloud.quota.QuotaFailure.Violation} */ public static final class Violation extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:yandex.cloud.quota.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() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Violation(); } @java.lang.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 java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { yandex.cloud.api.quota.Quota.QuotaMetric.Builder subBuilder = null; if (metric_ != null) { subBuilder = metric_.toBuilder(); } metric_ = input.readMessage(yandex.cloud.api.quota.Quota.QuotaMetric.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(metric_); metric_ = subBuilder.buildPartial(); } break; } case 16: { required_ = input.readInt64(); 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 yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaFailure_Violation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaFailure_Violation_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.quota.Quota.QuotaFailure.Violation.class, yandex.cloud.api.quota.Quota.QuotaFailure.Violation.Builder.class); } public static final int METRIC_FIELD_NUMBER = 1; private yandex.cloud.api.quota.Quota.QuotaMetric metric_; /** * .yandex.cloud.quota.QuotaMetric metric = 1; * @return Whether the metric field is set. */ @java.lang.Override public boolean hasMetric() { return metric_ != null; } /** * .yandex.cloud.quota.QuotaMetric metric = 1; * @return The metric. */ @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaMetric getMetric() { return metric_ == null ? yandex.cloud.api.quota.Quota.QuotaMetric.getDefaultInstance() : metric_; } /** * .yandex.cloud.quota.QuotaMetric metric = 1; */ @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaMetricOrBuilder getMetricOrBuilder() { return getMetric(); } public static final int REQUIRED_FIELD_NUMBER = 2; private long required_; /** *
       * new value for the MetricLimit.limit, so it is: old limit + delta
       * 
* * int64 required = 2; * @return The required. */ @java.lang.Override public long getRequired() { return required_; } 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 (metric_ != null) { output.writeMessage(1, getMetric()); } if (required_ != 0L) { output.writeInt64(2, required_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (metric_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getMetric()); } if (required_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, required_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof yandex.cloud.api.quota.Quota.QuotaFailure.Violation)) { return super.equals(obj); } yandex.cloud.api.quota.Quota.QuotaFailure.Violation other = (yandex.cloud.api.quota.Quota.QuotaFailure.Violation) obj; if (hasMetric() != other.hasMetric()) return false; if (hasMetric()) { if (!getMetric() .equals(other.getMetric())) return false; } if (getRequired() != other.getRequired()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasMetric()) { hash = (37 * hash) + METRIC_FIELD_NUMBER; hash = (53 * hash) + getMetric().hashCode(); } hash = (37 * hash) + REQUIRED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getRequired()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static yandex.cloud.api.quota.Quota.QuotaFailure.Violation parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.quota.Quota.QuotaFailure.Violation parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.quota.Quota.QuotaFailure.Violation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.quota.Quota.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 yandex.cloud.api.quota.Quota.QuotaFailure.Violation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.quota.Quota.QuotaFailure.Violation parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.quota.Quota.QuotaFailure.Violation parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.quota.Quota.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 yandex.cloud.api.quota.Quota.QuotaFailure.Violation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static yandex.cloud.api.quota.Quota.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 yandex.cloud.api.quota.Quota.QuotaFailure.Violation parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.quota.Quota.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(yandex.cloud.api.quota.Quota.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; } /** * Protobuf type {@code yandex.cloud.quota.QuotaFailure.Violation} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yandex.cloud.quota.QuotaFailure.Violation) yandex.cloud.api.quota.Quota.QuotaFailure.ViolationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaFailure_Violation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaFailure_Violation_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.quota.Quota.QuotaFailure.Violation.class, yandex.cloud.api.quota.Quota.QuotaFailure.Violation.Builder.class); } // Construct using yandex.cloud.api.quota.Quota.QuotaFailure.Violation.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); if (metricBuilder_ == null) { metric_ = null; } else { metric_ = null; metricBuilder_ = null; } required_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaFailure_Violation_descriptor; } @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaFailure.Violation getDefaultInstanceForType() { return yandex.cloud.api.quota.Quota.QuotaFailure.Violation.getDefaultInstance(); } @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaFailure.Violation build() { yandex.cloud.api.quota.Quota.QuotaFailure.Violation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaFailure.Violation buildPartial() { yandex.cloud.api.quota.Quota.QuotaFailure.Violation result = new yandex.cloud.api.quota.Quota.QuotaFailure.Violation(this); if (metricBuilder_ == null) { result.metric_ = metric_; } else { result.metric_ = metricBuilder_.build(); } result.required_ = required_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof yandex.cloud.api.quota.Quota.QuotaFailure.Violation) { return mergeFrom((yandex.cloud.api.quota.Quota.QuotaFailure.Violation)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(yandex.cloud.api.quota.Quota.QuotaFailure.Violation other) { if (other == yandex.cloud.api.quota.Quota.QuotaFailure.Violation.getDefaultInstance()) return this; if (other.hasMetric()) { mergeMetric(other.getMetric()); } if (other.getRequired() != 0L) { setRequired(other.getRequired()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { yandex.cloud.api.quota.Quota.QuotaFailure.Violation parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (yandex.cloud.api.quota.Quota.QuotaFailure.Violation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private yandex.cloud.api.quota.Quota.QuotaMetric metric_; private com.google.protobuf.SingleFieldBuilderV3< yandex.cloud.api.quota.Quota.QuotaMetric, yandex.cloud.api.quota.Quota.QuotaMetric.Builder, yandex.cloud.api.quota.Quota.QuotaMetricOrBuilder> metricBuilder_; /** * .yandex.cloud.quota.QuotaMetric metric = 1; * @return Whether the metric field is set. */ public boolean hasMetric() { return metricBuilder_ != null || metric_ != null; } /** * .yandex.cloud.quota.QuotaMetric metric = 1; * @return The metric. */ public yandex.cloud.api.quota.Quota.QuotaMetric getMetric() { if (metricBuilder_ == null) { return metric_ == null ? yandex.cloud.api.quota.Quota.QuotaMetric.getDefaultInstance() : metric_; } else { return metricBuilder_.getMessage(); } } /** * .yandex.cloud.quota.QuotaMetric metric = 1; */ public Builder setMetric(yandex.cloud.api.quota.Quota.QuotaMetric value) { if (metricBuilder_ == null) { if (value == null) { throw new NullPointerException(); } metric_ = value; onChanged(); } else { metricBuilder_.setMessage(value); } return this; } /** * .yandex.cloud.quota.QuotaMetric metric = 1; */ public Builder setMetric( yandex.cloud.api.quota.Quota.QuotaMetric.Builder builderForValue) { if (metricBuilder_ == null) { metric_ = builderForValue.build(); onChanged(); } else { metricBuilder_.setMessage(builderForValue.build()); } return this; } /** * .yandex.cloud.quota.QuotaMetric metric = 1; */ public Builder mergeMetric(yandex.cloud.api.quota.Quota.QuotaMetric value) { if (metricBuilder_ == null) { if (metric_ != null) { metric_ = yandex.cloud.api.quota.Quota.QuotaMetric.newBuilder(metric_).mergeFrom(value).buildPartial(); } else { metric_ = value; } onChanged(); } else { metricBuilder_.mergeFrom(value); } return this; } /** * .yandex.cloud.quota.QuotaMetric metric = 1; */ public Builder clearMetric() { if (metricBuilder_ == null) { metric_ = null; onChanged(); } else { metric_ = null; metricBuilder_ = null; } return this; } /** * .yandex.cloud.quota.QuotaMetric metric = 1; */ public yandex.cloud.api.quota.Quota.QuotaMetric.Builder getMetricBuilder() { onChanged(); return getMetricFieldBuilder().getBuilder(); } /** * .yandex.cloud.quota.QuotaMetric metric = 1; */ public yandex.cloud.api.quota.Quota.QuotaMetricOrBuilder getMetricOrBuilder() { if (metricBuilder_ != null) { return metricBuilder_.getMessageOrBuilder(); } else { return metric_ == null ? yandex.cloud.api.quota.Quota.QuotaMetric.getDefaultInstance() : metric_; } } /** * .yandex.cloud.quota.QuotaMetric metric = 1; */ private com.google.protobuf.SingleFieldBuilderV3< yandex.cloud.api.quota.Quota.QuotaMetric, yandex.cloud.api.quota.Quota.QuotaMetric.Builder, yandex.cloud.api.quota.Quota.QuotaMetricOrBuilder> getMetricFieldBuilder() { if (metricBuilder_ == null) { metricBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< yandex.cloud.api.quota.Quota.QuotaMetric, yandex.cloud.api.quota.Quota.QuotaMetric.Builder, yandex.cloud.api.quota.Quota.QuotaMetricOrBuilder>( getMetric(), getParentForChildren(), isClean()); metric_ = null; } return metricBuilder_; } private long required_ ; /** *
         * new value for the MetricLimit.limit, so it is: old limit + delta
         * 
* * int64 required = 2; * @return The required. */ @java.lang.Override public long getRequired() { return required_; } /** *
         * new value for the MetricLimit.limit, so it is: old limit + delta
         * 
* * int64 required = 2; * @param value The required to set. * @return This builder for chaining. */ public Builder setRequired(long value) { required_ = value; onChanged(); return this; } /** *
         * new value for the MetricLimit.limit, so it is: old limit + delta
         * 
* * int64 required = 2; * @return This builder for chaining. */ public Builder clearRequired() { required_ = 0L; 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:yandex.cloud.quota.QuotaFailure.Violation) } // @@protoc_insertion_point(class_scope:yandex.cloud.quota.QuotaFailure.Violation) private static final yandex.cloud.api.quota.Quota.QuotaFailure.Violation DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new yandex.cloud.api.quota.Quota.QuotaFailure.Violation(); } public static yandex.cloud.api.quota.Quota.QuotaFailure.Violation getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.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; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaFailure.Violation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int VIOLATIONS_FIELD_NUMBER = 2; private java.util.List violations_; /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ @java.lang.Override public java.util.List getViolationsList() { return violations_; } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ @java.lang.Override public java.util.List getViolationsOrBuilderList() { return violations_; } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ @java.lang.Override public int getViolationsCount() { return violations_.size(); } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaFailure.Violation getViolations(int index) { return violations_.get(index); } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ @java.lang.Override public yandex.cloud.api.quota.Quota.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(2, violations_.get(i)); } unknownFields.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(2, violations_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof yandex.cloud.api.quota.Quota.QuotaFailure)) { return super.equals(obj); } yandex.cloud.api.quota.Quota.QuotaFailure other = (yandex.cloud.api.quota.Quota.QuotaFailure) obj; if (!getViolationsList() .equals(other.getViolationsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); 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 yandex.cloud.api.quota.Quota.QuotaFailure parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.quota.Quota.QuotaFailure parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.quota.Quota.QuotaFailure parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.quota.Quota.QuotaFailure parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.quota.Quota.QuotaFailure parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.quota.Quota.QuotaFailure parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.quota.Quota.QuotaFailure parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.quota.Quota.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 yandex.cloud.api.quota.Quota.QuotaFailure parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static yandex.cloud.api.quota.Quota.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 yandex.cloud.api.quota.Quota.QuotaFailure parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.quota.Quota.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(yandex.cloud.api.quota.Quota.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; } /** * Protobuf type {@code yandex.cloud.quota.QuotaFailure} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yandex.cloud.quota.QuotaFailure) yandex.cloud.api.quota.Quota.QuotaFailureOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaFailure_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaFailure_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.quota.Quota.QuotaFailure.class, yandex.cloud.api.quota.Quota.QuotaFailure.Builder.class); } // Construct using yandex.cloud.api.quota.Quota.QuotaFailure.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getViolationsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (violationsBuilder_ == null) { violations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { violationsBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return yandex.cloud.api.quota.Quota.internal_static_yandex_cloud_quota_QuotaFailure_descriptor; } @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaFailure getDefaultInstanceForType() { return yandex.cloud.api.quota.Quota.QuotaFailure.getDefaultInstance(); } @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaFailure build() { yandex.cloud.api.quota.Quota.QuotaFailure result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaFailure buildPartial() { yandex.cloud.api.quota.Quota.QuotaFailure result = new yandex.cloud.api.quota.Quota.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; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof yandex.cloud.api.quota.Quota.QuotaFailure) { return mergeFrom((yandex.cloud.api.quota.Quota.QuotaFailure)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(yandex.cloud.api.quota.Quota.QuotaFailure other) { if (other == yandex.cloud.api.quota.Quota.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; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { yandex.cloud.api.quota.Quota.QuotaFailure parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (yandex.cloud.api.quota.Quota.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< yandex.cloud.api.quota.Quota.QuotaFailure.Violation, yandex.cloud.api.quota.Quota.QuotaFailure.Violation.Builder, yandex.cloud.api.quota.Quota.QuotaFailure.ViolationOrBuilder> violationsBuilder_; /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public java.util.List getViolationsList() { if (violationsBuilder_ == null) { return java.util.Collections.unmodifiableList(violations_); } else { return violationsBuilder_.getMessageList(); } } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public int getViolationsCount() { if (violationsBuilder_ == null) { return violations_.size(); } else { return violationsBuilder_.getCount(); } } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public yandex.cloud.api.quota.Quota.QuotaFailure.Violation getViolations(int index) { if (violationsBuilder_ == null) { return violations_.get(index); } else { return violationsBuilder_.getMessage(index); } } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public Builder setViolations( int index, yandex.cloud.api.quota.Quota.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; } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public Builder setViolations( int index, yandex.cloud.api.quota.Quota.QuotaFailure.Violation.Builder builderForValue) { if (violationsBuilder_ == null) { ensureViolationsIsMutable(); violations_.set(index, builderForValue.build()); onChanged(); } else { violationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public Builder addViolations(yandex.cloud.api.quota.Quota.QuotaFailure.Violation value) { if (violationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureViolationsIsMutable(); violations_.add(value); onChanged(); } else { violationsBuilder_.addMessage(value); } return this; } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public Builder addViolations( int index, yandex.cloud.api.quota.Quota.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; } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public Builder addViolations( yandex.cloud.api.quota.Quota.QuotaFailure.Violation.Builder builderForValue) { if (violationsBuilder_ == null) { ensureViolationsIsMutable(); violations_.add(builderForValue.build()); onChanged(); } else { violationsBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public Builder addViolations( int index, yandex.cloud.api.quota.Quota.QuotaFailure.Violation.Builder builderForValue) { if (violationsBuilder_ == null) { ensureViolationsIsMutable(); violations_.add(index, builderForValue.build()); onChanged(); } else { violationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public Builder addAllViolations( java.lang.Iterable values) { if (violationsBuilder_ == null) { ensureViolationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, violations_); onChanged(); } else { violationsBuilder_.addAllMessages(values); } return this; } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public Builder clearViolations() { if (violationsBuilder_ == null) { violations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { violationsBuilder_.clear(); } return this; } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public Builder removeViolations(int index) { if (violationsBuilder_ == null) { ensureViolationsIsMutable(); violations_.remove(index); onChanged(); } else { violationsBuilder_.remove(index); } return this; } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public yandex.cloud.api.quota.Quota.QuotaFailure.Violation.Builder getViolationsBuilder( int index) { return getViolationsFieldBuilder().getBuilder(index); } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public yandex.cloud.api.quota.Quota.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder( int index) { if (violationsBuilder_ == null) { return violations_.get(index); } else { return violationsBuilder_.getMessageOrBuilder(index); } } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public java.util.List getViolationsOrBuilderList() { if (violationsBuilder_ != null) { return violationsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(violations_); } } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public yandex.cloud.api.quota.Quota.QuotaFailure.Violation.Builder addViolationsBuilder() { return getViolationsFieldBuilder().addBuilder( yandex.cloud.api.quota.Quota.QuotaFailure.Violation.getDefaultInstance()); } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public yandex.cloud.api.quota.Quota.QuotaFailure.Violation.Builder addViolationsBuilder( int index) { return getViolationsFieldBuilder().addBuilder( index, yandex.cloud.api.quota.Quota.QuotaFailure.Violation.getDefaultInstance()); } /** * repeated .yandex.cloud.quota.QuotaFailure.Violation violations = 2; */ public java.util.List getViolationsBuilderList() { return getViolationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< yandex.cloud.api.quota.Quota.QuotaFailure.Violation, yandex.cloud.api.quota.Quota.QuotaFailure.Violation.Builder, yandex.cloud.api.quota.Quota.QuotaFailure.ViolationOrBuilder> getViolationsFieldBuilder() { if (violationsBuilder_ == null) { violationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< yandex.cloud.api.quota.Quota.QuotaFailure.Violation, yandex.cloud.api.quota.Quota.QuotaFailure.Violation.Builder, yandex.cloud.api.quota.Quota.QuotaFailure.ViolationOrBuilder>( violations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); violations_ = null; } return violationsBuilder_; } @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:yandex.cloud.quota.QuotaFailure) } // @@protoc_insertion_point(class_scope:yandex.cloud.quota.QuotaFailure) private static final yandex.cloud.api.quota.Quota.QuotaFailure DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new yandex.cloud.api.quota.Quota.QuotaFailure(); } public static yandex.cloud.api.quota.Quota.QuotaFailure getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.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; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public yandex.cloud.api.quota.Quota.QuotaFailure getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_yandex_cloud_quota_QuotaMetric_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_yandex_cloud_quota_QuotaMetric_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_yandex_cloud_quota_MetricLimit_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_yandex_cloud_quota_MetricLimit_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_yandex_cloud_quota_QuotaFailure_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_yandex_cloud_quota_QuotaFailure_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_yandex_cloud_quota_QuotaFailure_Violation_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_yandex_cloud_quota_QuotaFailure_Violation_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\036yandex/cloud/quota/quota.proto\022\022yandex" + ".cloud.quota\"9\n\013QuotaMetric\022\014\n\004name\030\001 \001(" + "\t\022\r\n\005limit\030\003 \001(\003\022\r\n\005usage\030\004 \001(\001\"*\n\013Metri" + "cLimit\022\014\n\004name\030\001 \001(\t\022\r\n\005limit\030\002 \001(\003\"\236\001\n\014" + "QuotaFailure\022>\n\nviolations\030\002 \003(\0132*.yande" + "x.cloud.quota.QuotaFailure.Violation\032N\n\t" + "Violation\022/\n\006metric\030\001 \001(\0132\037.yandex.cloud" + ".quota.QuotaMetric\022\020\n\010required\030\002 \001(\003BV\n\026" + "yandex.cloud.api.quotaZ




© 2015 - 2025 Weber Informatics LLC | Privacy Policy