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

lightstep.com.google.api.QuotaLimit Maven / Gradle / Ivy

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

package lightstep.lightstep.lightstep.com.google.api;

/**
 * 
 * `QuotaLimit` defines a specific limit that applies over a specified duration
 * for a limit type. There can be at most one limit for a duration and limit
 * type combination defined within a `QuotaGroup`.
 * 
* * Protobuf type {@code google.api.QuotaLimit} */ public final class QuotaLimit extends lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.QuotaLimit) QuotaLimitOrBuilder { private static final long serialVersionUID = 0L; // Use QuotaLimit.newBuilder() to construct. private QuotaLimit(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private QuotaLimit() { name_ = ""; description_ = ""; duration_ = ""; metric_ = ""; unit_ = ""; displayName_ = ""; } @Override public final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private QuotaLimit( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedInputStream input, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry) throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; lightstep.com.lightstep.lightstep.lightstep.google.protobuf.UnknownFieldSet.Builder unknownFields = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 18: { String s = input.readStringRequireUtf8(); description_ = s; break; } case 24: { defaultLimit_ = input.readInt64(); break; } case 32: { maxLimit_ = input.readInt64(); break; } case 42: { String s = input.readStringRequireUtf8(); duration_ = s; break; } case 50: { String s = input.readStringRequireUtf8(); name_ = s; break; } case 56: { freeTier_ = input.readInt64(); break; } case 66: { String s = input.readStringRequireUtf8(); metric_ = s; break; } case 74: { String s = input.readStringRequireUtf8(); unit_ = s; break; } case 82: { if (!((mutable_bitField0_ & 0x00000100) != 0)) { values_ = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapField.newMapField( ValuesDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000100; } lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapEntry values__ = input.readMessage( ValuesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); values_.getMutableMap().put( values__.getKey(), values__.getValue()); break; } case 98: { String s = input.readStringRequireUtf8(); displayName_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.Descriptor getDescriptor() { return lightstep.lightstep.lightstep.com.google.api.QuotaProto.internal_static_google_api_QuotaLimit_descriptor; } @SuppressWarnings({"rawtypes"}) @Override protected lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 10: return internalGetValues(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return lightstep.lightstep.lightstep.com.google.api.QuotaProto.internal_static_google_api_QuotaLimit_fieldAccessorTable .ensureFieldAccessorsInitialized( QuotaLimit.class, Builder.class); } private int bitField0_; public static final int NAME_FIELD_NUMBER = 6; private volatile Object name_; /** *
   * Name of the quota limit.
   * The name must be provided, and it must be unique within the service. The
   * name can only include alphanumeric characters as well as '-'.
   * The maximum length of the limit name is 64 characters.
   * 
* * string name = 6; */ public String getName() { Object ref = name_; if (ref instanceof String) { return (String) ref; } else { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs = (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
   * Name of the quota limit.
   * The name must be provided, and it must be unique within the service. The
   * name can only include alphanumeric characters as well as '-'.
   * The maximum length of the limit name is 64 characters.
   * 
* * string name = 6; */ public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString getNameBytes() { Object ref = name_; if (ref instanceof String) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8( (String) ref); name_ = b; return b; } else { return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; } } public static final int DESCRIPTION_FIELD_NUMBER = 2; private volatile Object description_; /** *
   * Optional. User-visible, extended description for this quota limit.
   * Should be used only when more context is needed to understand this limit
   * than provided by the limit's display name (see: `display_name`).
   * 
* * string description = 2; */ public String getDescription() { Object ref = description_; if (ref instanceof String) { return (String) ref; } else { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs = (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); description_ = s; return s; } } /** *
   * Optional. User-visible, extended description for this quota limit.
   * Should be used only when more context is needed to understand this limit
   * than provided by the limit's display name (see: `display_name`).
   * 
* * string description = 2; */ public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString getDescriptionBytes() { Object ref = description_; if (ref instanceof String) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8( (String) ref); description_ = b; return b; } else { return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; } } public static final int DEFAULT_LIMIT_FIELD_NUMBER = 3; private long defaultLimit_; /** *
   * Default number of tokens that can be consumed during the specified
   * duration. This is the number of tokens assigned when a client
   * application developer activates the service for his/her project.
   * Specifying a value of 0 will block all requests. This can be used if you
   * are provisioning quota to selected consumers and blocking others.
   * Similarly, a value of -1 will indicate an unlimited quota. No other
   * negative values are allowed.
   * Used by group-based quotas only.
   * 
* * int64 default_limit = 3; */ public long getDefaultLimit() { return defaultLimit_; } public static final int MAX_LIMIT_FIELD_NUMBER = 4; private long maxLimit_; /** *
   * Maximum number of tokens that can be consumed during the specified
   * duration. Client application developers can override the default limit up
   * to this maximum. If specified, this value cannot be set to a value less
   * than the default limit. If not specified, it is set to the default limit.
   * To allow clients to apply overrides with no upper bound, set this to -1,
   * indicating unlimited maximum quota.
   * Used by group-based quotas only.
   * 
* * int64 max_limit = 4; */ public long getMaxLimit() { return maxLimit_; } public static final int FREE_TIER_FIELD_NUMBER = 7; private long freeTier_; /** *
   * Free tier value displayed in the Developers Console for this limit.
   * The free tier is the number of tokens that will be subtracted from the
   * billed amount when billing is enabled.
   * This field can only be set on a limit with duration "1d", in a billable
   * group; it is invalid on any other limit. If this field is not set, it
   * defaults to 0, indicating that there is no free tier for this service.
   * Used by group-based quotas only.
   * 
* * int64 free_tier = 7; */ public long getFreeTier() { return freeTier_; } public static final int DURATION_FIELD_NUMBER = 5; private volatile Object duration_; /** *
   * Duration of this limit in textual notation. Example: "100s", "24h", "1d".
   * For duration longer than a day, only multiple of days is supported. We
   * support only "100s" and "1d" for now. Additional support will be added in
   * the future. "0" indicates indefinite duration.
   * Used by group-based quotas only.
   * 
* * string duration = 5; */ public String getDuration() { Object ref = duration_; if (ref instanceof String) { return (String) ref; } else { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs = (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); duration_ = s; return s; } } /** *
   * Duration of this limit in textual notation. Example: "100s", "24h", "1d".
   * For duration longer than a day, only multiple of days is supported. We
   * support only "100s" and "1d" for now. Additional support will be added in
   * the future. "0" indicates indefinite duration.
   * Used by group-based quotas only.
   * 
* * string duration = 5; */ public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString getDurationBytes() { Object ref = duration_; if (ref instanceof String) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8( (String) ref); duration_ = b; return b; } else { return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; } } public static final int METRIC_FIELD_NUMBER = 8; private volatile Object metric_; /** *
   * The name of the metric this quota limit applies to. The quota limits with
   * the same metric will be checked together during runtime. The metric must be
   * defined within the service config.
   * 
* * string metric = 8; */ public String getMetric() { Object ref = metric_; if (ref instanceof String) { return (String) ref; } else { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs = (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); metric_ = s; return s; } } /** *
   * The name of the metric this quota limit applies to. The quota limits with
   * the same metric will be checked together during runtime. The metric must be
   * defined within the service config.
   * 
* * string metric = 8; */ public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString getMetricBytes() { Object ref = metric_; if (ref instanceof String) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8( (String) ref); metric_ = b; return b; } else { return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; } } public static final int UNIT_FIELD_NUMBER = 9; private volatile Object unit_; /** *
   * Specify the unit of the quota limit. It uses the same syntax as
   * [Metric.unit][]. The supported unit kinds are determined by the quota
   * backend system.
   * Here are some examples:
   * * "1/min/{project}" for quota per minute per project.
   * Note: the order of unit components is insignificant.
   * The "1" at the beginning is required to follow the metric unit syntax.
   * 
* * string unit = 9; */ public String getUnit() { Object ref = unit_; if (ref instanceof String) { return (String) ref; } else { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs = (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); unit_ = s; return s; } } /** *
   * Specify the unit of the quota limit. It uses the same syntax as
   * [Metric.unit][]. The supported unit kinds are determined by the quota
   * backend system.
   * Here are some examples:
   * * "1/min/{project}" for quota per minute per project.
   * Note: the order of unit components is insignificant.
   * The "1" at the beginning is required to follow the metric unit syntax.
   * 
* * string unit = 9; */ public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString getUnitBytes() { Object ref = unit_; if (ref instanceof String) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8( (String) ref); unit_ = b; return b; } else { return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; } } public static final int VALUES_FIELD_NUMBER = 10; private static final class ValuesDefaultEntryHolder { static final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapEntry< String, Long> defaultEntry = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapEntry .newDefaultInstance( lightstep.lightstep.lightstep.com.google.api.QuotaProto.internal_static_google_api_QuotaLimit_ValuesEntry_descriptor, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.WireFormat.FieldType.STRING, "", lightstep.com.lightstep.lightstep.lightstep.google.protobuf.WireFormat.FieldType.INT64, 0L); } private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapField< String, Long> values_; private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapField internalGetValues() { if (values_ == null) { return lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapField.emptyMapField( ValuesDefaultEntryHolder.defaultEntry); } return values_; } public int getValuesCount() { return internalGetValues().getMap().size(); } /** *
   * Tiered limit values. You must specify this as a key:value pair, with an
   * integer value that is the maximum number of requests allowed for the
   * specified unit. Currently only STANDARD is supported.
   * 
* * map<string, int64> values = 10; */ public boolean containsValues( String key) { if (key == null) { throw new NullPointerException(); } return internalGetValues().getMap().containsKey(key); } /** * Use {@link #getValuesMap()} instead. */ @Deprecated public java.util.Map getValues() { return getValuesMap(); } /** *
   * Tiered limit values. You must specify this as a key:value pair, with an
   * integer value that is the maximum number of requests allowed for the
   * specified unit. Currently only STANDARD is supported.
   * 
* * map<string, int64> values = 10; */ public java.util.Map getValuesMap() { return internalGetValues().getMap(); } /** *
   * Tiered limit values. You must specify this as a key:value pair, with an
   * integer value that is the maximum number of requests allowed for the
   * specified unit. Currently only STANDARD is supported.
   * 
* * map<string, int64> values = 10; */ public long getValuesOrDefault( String key, long defaultValue) { if (key == null) { throw new NullPointerException(); } java.util.Map map = internalGetValues().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * Tiered limit values. You must specify this as a key:value pair, with an
   * integer value that is the maximum number of requests allowed for the
   * specified unit. Currently only STANDARD is supported.
   * 
* * map<string, int64> values = 10; */ public long getValuesOrThrow( String key) { if (key == null) { throw new NullPointerException(); } java.util.Map map = internalGetValues().getMap(); if (!map.containsKey(key)) { throw new IllegalArgumentException(); } return map.get(key); } public static final int DISPLAY_NAME_FIELD_NUMBER = 12; private volatile Object displayName_; /** *
   * User-visible display name for this limit.
   * Optional. If not set, the UI will provide a default display name based on
   * the quota configuration. This field can be used to override the default
   * display name generated from the configuration.
   * 
* * string display_name = 12; */ public String getDisplayName() { Object ref = displayName_; if (ref instanceof String) { return (String) ref; } else { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs = (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); displayName_ = s; return s; } } /** *
   * User-visible display name for this limit.
   * Optional. If not set, the UI will provide a default display name based on
   * the quota configuration. This field can be used to override the default
   * display name generated from the configuration.
   * 
* * string display_name = 12; */ public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString getDisplayNameBytes() { Object ref = displayName_; if (ref instanceof String) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8( (String) ref); displayName_ = b; return b; } else { return (lightstep.com.lightstep.lightstep.lightstep.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(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getDescriptionBytes().isEmpty()) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); } if (defaultLimit_ != 0L) { output.writeInt64(3, defaultLimit_); } if (maxLimit_ != 0L) { output.writeInt64(4, maxLimit_); } if (!getDurationBytes().isEmpty()) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.writeString(output, 5, duration_); } if (!getNameBytes().isEmpty()) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); } if (freeTier_ != 0L) { output.writeInt64(7, freeTier_); } if (!getMetricBytes().isEmpty()) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.writeString(output, 8, metric_); } if (!getUnitBytes().isEmpty()) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.writeString(output, 9, unit_); } lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetValues(), ValuesDefaultEntryHolder.defaultEntry, 10); if (!getDisplayNameBytes().isEmpty()) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.writeString(output, 12, displayName_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getDescriptionBytes().isEmpty()) { size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); } if (defaultLimit_ != 0L) { size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedOutputStream .computeInt64Size(3, defaultLimit_); } if (maxLimit_ != 0L) { size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedOutputStream .computeInt64Size(4, maxLimit_); } if (!getDurationBytes().isEmpty()) { size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.computeStringSize(5, duration_); } if (!getNameBytes().isEmpty()) { size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_); } if (freeTier_ != 0L) { size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedOutputStream .computeInt64Size(7, freeTier_); } if (!getMetricBytes().isEmpty()) { size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.computeStringSize(8, metric_); } if (!getUnitBytes().isEmpty()) { size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.computeStringSize(9, unit_); } for (java.util.Map.Entry entry : internalGetValues().getMap().entrySet()) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapEntry values__ = ValuesDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedOutputStream .computeMessageSize(10, values__); } if (!getDisplayNameBytes().isEmpty()) { size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.computeStringSize(12, displayName_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof QuotaLimit)) { return super.equals(obj); } QuotaLimit other = (QuotaLimit) obj; if (!getName() .equals(other.getName())) return false; if (!getDescription() .equals(other.getDescription())) return false; if (getDefaultLimit() != other.getDefaultLimit()) return false; if (getMaxLimit() != other.getMaxLimit()) return false; if (getFreeTier() != other.getFreeTier()) return false; if (!getDuration() .equals(other.getDuration())) return false; if (!getMetric() .equals(other.getMetric())) return false; if (!getUnit() .equals(other.getUnit())) return false; if (!internalGetValues().equals( other.internalGetValues())) return false; if (!getDisplayName() .equals(other.getDisplayName())) 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + DEFAULT_LIMIT_FIELD_NUMBER; hash = (53 * hash) + lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Internal.hashLong( getDefaultLimit()); hash = (37 * hash) + MAX_LIMIT_FIELD_NUMBER; hash = (53 * hash) + lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Internal.hashLong( getMaxLimit()); hash = (37 * hash) + FREE_TIER_FIELD_NUMBER; hash = (53 * hash) + lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Internal.hashLong( getFreeTier()); hash = (37 * hash) + DURATION_FIELD_NUMBER; hash = (53 * hash) + getDuration().hashCode(); hash = (37 * hash) + METRIC_FIELD_NUMBER; hash = (53 * hash) + getMetric().hashCode(); hash = (37 * hash) + UNIT_FIELD_NUMBER; hash = (53 * hash) + getUnit().hashCode(); if (!internalGetValues().getMap().isEmpty()) { hash = (37 * hash) + VALUES_FIELD_NUMBER; hash = (53 * hash) + internalGetValues().hashCode(); } hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static QuotaLimit parseFrom( java.nio.ByteBuffer data) throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static QuotaLimit parseFrom( java.nio.ByteBuffer data, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry) throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static QuotaLimit parseFrom( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString data) throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static QuotaLimit parseFrom( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString data, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry) throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static QuotaLimit parseFrom(byte[] data) throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static QuotaLimit parseFrom( byte[] data, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry) throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static QuotaLimit parseFrom(java.io.InputStream input) throws java.io.IOException { return lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static QuotaLimit parseFrom( java.io.InputStream input, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static QuotaLimit parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static QuotaLimit parseDelimitedFrom( java.io.InputStream input, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static QuotaLimit parseFrom( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedInputStream input) throws java.io.IOException { return lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static QuotaLimit parseFrom( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedInputStream input, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return lightstep.com.lightstep.lightstep.lightstep.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(QuotaLimit 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; } /** *
   * `QuotaLimit` defines a specific limit that applies over a specified duration
   * for a limit type. There can be at most one limit for a duration and limit
   * type combination defined within a `QuotaGroup`.
   * 
* * Protobuf type {@code google.api.QuotaLimit} */ public static final class Builder extends lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.api.QuotaLimit) lightstep.lightstep.lightstep.com.google.api.QuotaLimitOrBuilder { public static final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.Descriptor getDescriptor() { return lightstep.lightstep.lightstep.com.google.api.QuotaProto.internal_static_google_api_QuotaLimit_descriptor; } @SuppressWarnings({"rawtypes"}) protected lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 10: return internalGetValues(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 10: return internalGetMutableValues(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return lightstep.lightstep.lightstep.com.google.api.QuotaProto.internal_static_google_api_QuotaLimit_fieldAccessorTable .ensureFieldAccessorsInitialized( QuotaLimit.class, Builder.class); } // Construct using lightstep.lightstep.lightstep.com.google.api.QuotaLimit.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); name_ = ""; description_ = ""; defaultLimit_ = 0L; maxLimit_ = 0L; freeTier_ = 0L; duration_ = ""; metric_ = ""; unit_ = ""; internalGetMutableValues().clear(); displayName_ = ""; return this; } @Override public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return lightstep.lightstep.lightstep.com.google.api.QuotaProto.internal_static_google_api_QuotaLimit_descriptor; } @Override public QuotaLimit getDefaultInstanceForType() { return QuotaLimit.getDefaultInstance(); } @Override public QuotaLimit build() { QuotaLimit result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public QuotaLimit buildPartial() { QuotaLimit result = new QuotaLimit(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; result.description_ = description_; result.defaultLimit_ = defaultLimit_; result.maxLimit_ = maxLimit_; result.freeTier_ = freeTier_; result.duration_ = duration_; result.metric_ = metric_; result.unit_ = unit_; result.values_ = internalGetValues(); result.values_.makeImmutable(); result.displayName_ = displayName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Message other) { if (other instanceof QuotaLimit) { return mergeFrom((QuotaLimit)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(QuotaLimit other) { if (other == QuotaLimit.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); } if (other.getDefaultLimit() != 0L) { setDefaultLimit(other.getDefaultLimit()); } if (other.getMaxLimit() != 0L) { setMaxLimit(other.getMaxLimit()); } if (other.getFreeTier() != 0L) { setFreeTier(other.getFreeTier()); } if (!other.getDuration().isEmpty()) { duration_ = other.duration_; onChanged(); } if (!other.getMetric().isEmpty()) { metric_ = other.metric_; onChanged(); } if (!other.getUnit().isEmpty()) { unit_ = other.unit_; onChanged(); } internalGetMutableValues().mergeFrom( other.internalGetValues()); if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedInputStream input, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { QuotaLimit parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (QuotaLimit) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private Object name_ = ""; /** *
     * Name of the quota limit.
     * The name must be provided, and it must be unique within the service. The
     * name can only include alphanumeric characters as well as '-'.
     * The maximum length of the limit name is 64 characters.
     * 
* * string name = 6; */ public String getName() { Object ref = name_; if (!(ref instanceof String)) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs = (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); name_ = s; return s; } else { return (String) ref; } } /** *
     * Name of the quota limit.
     * The name must be provided, and it must be unique within the service. The
     * name can only include alphanumeric characters as well as '-'.
     * The maximum length of the limit name is 64 characters.
     * 
* * string name = 6; */ public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString getNameBytes() { Object ref = name_; if (ref instanceof String) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8( (String) ref); name_ = b; return b; } else { return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; } } /** *
     * Name of the quota limit.
     * The name must be provided, and it must be unique within the service. The
     * name can only include alphanumeric characters as well as '-'.
     * The maximum length of the limit name is 64 characters.
     * 
* * string name = 6; */ public Builder setName( String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
     * Name of the quota limit.
     * The name must be provided, and it must be unique within the service. The
     * name can only include alphanumeric characters as well as '-'.
     * The maximum length of the limit name is 64 characters.
     * 
* * string name = 6; */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
     * Name of the quota limit.
     * The name must be provided, and it must be unique within the service. The
     * name can only include alphanumeric characters as well as '-'.
     * The maximum length of the limit name is 64 characters.
     * 
* * string name = 6; */ public Builder setNameBytes( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private Object description_ = ""; /** *
     * Optional. User-visible, extended description for this quota limit.
     * Should be used only when more context is needed to understand this limit
     * than provided by the limit's display name (see: `display_name`).
     * 
* * string description = 2; */ public String getDescription() { Object ref = description_; if (!(ref instanceof String)) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs = (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); description_ = s; return s; } else { return (String) ref; } } /** *
     * Optional. User-visible, extended description for this quota limit.
     * Should be used only when more context is needed to understand this limit
     * than provided by the limit's display name (see: `display_name`).
     * 
* * string description = 2; */ public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString getDescriptionBytes() { Object ref = description_; if (ref instanceof String) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8( (String) ref); description_ = b; return b; } else { return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; } } /** *
     * Optional. User-visible, extended description for this quota limit.
     * Should be used only when more context is needed to understand this limit
     * than provided by the limit's display name (see: `display_name`).
     * 
* * string description = 2; */ public Builder setDescription( String value) { if (value == null) { throw new NullPointerException(); } description_ = value; onChanged(); return this; } /** *
     * Optional. User-visible, extended description for this quota limit.
     * Should be used only when more context is needed to understand this limit
     * than provided by the limit's display name (see: `display_name`).
     * 
* * string description = 2; */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** *
     * Optional. User-visible, extended description for this quota limit.
     * Should be used only when more context is needed to understand this limit
     * than provided by the limit's display name (see: `display_name`).
     * 
* * string description = 2; */ public Builder setDescriptionBytes( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; onChanged(); return this; } private long defaultLimit_ ; /** *
     * Default number of tokens that can be consumed during the specified
     * duration. This is the number of tokens assigned when a client
     * application developer activates the service for his/her project.
     * Specifying a value of 0 will block all requests. This can be used if you
     * are provisioning quota to selected consumers and blocking others.
     * Similarly, a value of -1 will indicate an unlimited quota. No other
     * negative values are allowed.
     * Used by group-based quotas only.
     * 
* * int64 default_limit = 3; */ public long getDefaultLimit() { return defaultLimit_; } /** *
     * Default number of tokens that can be consumed during the specified
     * duration. This is the number of tokens assigned when a client
     * application developer activates the service for his/her project.
     * Specifying a value of 0 will block all requests. This can be used if you
     * are provisioning quota to selected consumers and blocking others.
     * Similarly, a value of -1 will indicate an unlimited quota. No other
     * negative values are allowed.
     * Used by group-based quotas only.
     * 
* * int64 default_limit = 3; */ public Builder setDefaultLimit(long value) { defaultLimit_ = value; onChanged(); return this; } /** *
     * Default number of tokens that can be consumed during the specified
     * duration. This is the number of tokens assigned when a client
     * application developer activates the service for his/her project.
     * Specifying a value of 0 will block all requests. This can be used if you
     * are provisioning quota to selected consumers and blocking others.
     * Similarly, a value of -1 will indicate an unlimited quota. No other
     * negative values are allowed.
     * Used by group-based quotas only.
     * 
* * int64 default_limit = 3; */ public Builder clearDefaultLimit() { defaultLimit_ = 0L; onChanged(); return this; } private long maxLimit_ ; /** *
     * Maximum number of tokens that can be consumed during the specified
     * duration. Client application developers can override the default limit up
     * to this maximum. If specified, this value cannot be set to a value less
     * than the default limit. If not specified, it is set to the default limit.
     * To allow clients to apply overrides with no upper bound, set this to -1,
     * indicating unlimited maximum quota.
     * Used by group-based quotas only.
     * 
* * int64 max_limit = 4; */ public long getMaxLimit() { return maxLimit_; } /** *
     * Maximum number of tokens that can be consumed during the specified
     * duration. Client application developers can override the default limit up
     * to this maximum. If specified, this value cannot be set to a value less
     * than the default limit. If not specified, it is set to the default limit.
     * To allow clients to apply overrides with no upper bound, set this to -1,
     * indicating unlimited maximum quota.
     * Used by group-based quotas only.
     * 
* * int64 max_limit = 4; */ public Builder setMaxLimit(long value) { maxLimit_ = value; onChanged(); return this; } /** *
     * Maximum number of tokens that can be consumed during the specified
     * duration. Client application developers can override the default limit up
     * to this maximum. If specified, this value cannot be set to a value less
     * than the default limit. If not specified, it is set to the default limit.
     * To allow clients to apply overrides with no upper bound, set this to -1,
     * indicating unlimited maximum quota.
     * Used by group-based quotas only.
     * 
* * int64 max_limit = 4; */ public Builder clearMaxLimit() { maxLimit_ = 0L; onChanged(); return this; } private long freeTier_ ; /** *
     * Free tier value displayed in the Developers Console for this limit.
     * The free tier is the number of tokens that will be subtracted from the
     * billed amount when billing is enabled.
     * This field can only be set on a limit with duration "1d", in a billable
     * group; it is invalid on any other limit. If this field is not set, it
     * defaults to 0, indicating that there is no free tier for this service.
     * Used by group-based quotas only.
     * 
* * int64 free_tier = 7; */ public long getFreeTier() { return freeTier_; } /** *
     * Free tier value displayed in the Developers Console for this limit.
     * The free tier is the number of tokens that will be subtracted from the
     * billed amount when billing is enabled.
     * This field can only be set on a limit with duration "1d", in a billable
     * group; it is invalid on any other limit. If this field is not set, it
     * defaults to 0, indicating that there is no free tier for this service.
     * Used by group-based quotas only.
     * 
* * int64 free_tier = 7; */ public Builder setFreeTier(long value) { freeTier_ = value; onChanged(); return this; } /** *
     * Free tier value displayed in the Developers Console for this limit.
     * The free tier is the number of tokens that will be subtracted from the
     * billed amount when billing is enabled.
     * This field can only be set on a limit with duration "1d", in a billable
     * group; it is invalid on any other limit. If this field is not set, it
     * defaults to 0, indicating that there is no free tier for this service.
     * Used by group-based quotas only.
     * 
* * int64 free_tier = 7; */ public Builder clearFreeTier() { freeTier_ = 0L; onChanged(); return this; } private Object duration_ = ""; /** *
     * Duration of this limit in textual notation. Example: "100s", "24h", "1d".
     * For duration longer than a day, only multiple of days is supported. We
     * support only "100s" and "1d" for now. Additional support will be added in
     * the future. "0" indicates indefinite duration.
     * Used by group-based quotas only.
     * 
* * string duration = 5; */ public String getDuration() { Object ref = duration_; if (!(ref instanceof String)) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs = (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); duration_ = s; return s; } else { return (String) ref; } } /** *
     * Duration of this limit in textual notation. Example: "100s", "24h", "1d".
     * For duration longer than a day, only multiple of days is supported. We
     * support only "100s" and "1d" for now. Additional support will be added in
     * the future. "0" indicates indefinite duration.
     * Used by group-based quotas only.
     * 
* * string duration = 5; */ public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString getDurationBytes() { Object ref = duration_; if (ref instanceof String) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8( (String) ref); duration_ = b; return b; } else { return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; } } /** *
     * Duration of this limit in textual notation. Example: "100s", "24h", "1d".
     * For duration longer than a day, only multiple of days is supported. We
     * support only "100s" and "1d" for now. Additional support will be added in
     * the future. "0" indicates indefinite duration.
     * Used by group-based quotas only.
     * 
* * string duration = 5; */ public Builder setDuration( String value) { if (value == null) { throw new NullPointerException(); } duration_ = value; onChanged(); return this; } /** *
     * Duration of this limit in textual notation. Example: "100s", "24h", "1d".
     * For duration longer than a day, only multiple of days is supported. We
     * support only "100s" and "1d" for now. Additional support will be added in
     * the future. "0" indicates indefinite duration.
     * Used by group-based quotas only.
     * 
* * string duration = 5; */ public Builder clearDuration() { duration_ = getDefaultInstance().getDuration(); onChanged(); return this; } /** *
     * Duration of this limit in textual notation. Example: "100s", "24h", "1d".
     * For duration longer than a day, only multiple of days is supported. We
     * support only "100s" and "1d" for now. Additional support will be added in
     * the future. "0" indicates indefinite duration.
     * Used by group-based quotas only.
     * 
* * string duration = 5; */ public Builder setDurationBytes( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); duration_ = value; onChanged(); return this; } private Object metric_ = ""; /** *
     * The name of the metric this quota limit applies to. The quota limits with
     * the same metric will be checked together during runtime. The metric must be
     * defined within the service config.
     * 
* * string metric = 8; */ public String getMetric() { Object ref = metric_; if (!(ref instanceof String)) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs = (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); metric_ = s; return s; } else { return (String) ref; } } /** *
     * The name of the metric this quota limit applies to. The quota limits with
     * the same metric will be checked together during runtime. The metric must be
     * defined within the service config.
     * 
* * string metric = 8; */ public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString getMetricBytes() { Object ref = metric_; if (ref instanceof String) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8( (String) ref); metric_ = b; return b; } else { return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; } } /** *
     * The name of the metric this quota limit applies to. The quota limits with
     * the same metric will be checked together during runtime. The metric must be
     * defined within the service config.
     * 
* * string metric = 8; */ public Builder setMetric( String value) { if (value == null) { throw new NullPointerException(); } metric_ = value; onChanged(); return this; } /** *
     * The name of the metric this quota limit applies to. The quota limits with
     * the same metric will be checked together during runtime. The metric must be
     * defined within the service config.
     * 
* * string metric = 8; */ public Builder clearMetric() { metric_ = getDefaultInstance().getMetric(); onChanged(); return this; } /** *
     * The name of the metric this quota limit applies to. The quota limits with
     * the same metric will be checked together during runtime. The metric must be
     * defined within the service config.
     * 
* * string metric = 8; */ public Builder setMetricBytes( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); metric_ = value; onChanged(); return this; } private Object unit_ = ""; /** *
     * Specify the unit of the quota limit. It uses the same syntax as
     * [Metric.unit][]. The supported unit kinds are determined by the quota
     * backend system.
     * Here are some examples:
     * * "1/min/{project}" for quota per minute per project.
     * Note: the order of unit components is insignificant.
     * The "1" at the beginning is required to follow the metric unit syntax.
     * 
* * string unit = 9; */ public String getUnit() { Object ref = unit_; if (!(ref instanceof String)) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs = (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); unit_ = s; return s; } else { return (String) ref; } } /** *
     * Specify the unit of the quota limit. It uses the same syntax as
     * [Metric.unit][]. The supported unit kinds are determined by the quota
     * backend system.
     * Here are some examples:
     * * "1/min/{project}" for quota per minute per project.
     * Note: the order of unit components is insignificant.
     * The "1" at the beginning is required to follow the metric unit syntax.
     * 
* * string unit = 9; */ public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString getUnitBytes() { Object ref = unit_; if (ref instanceof String) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8( (String) ref); unit_ = b; return b; } else { return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; } } /** *
     * Specify the unit of the quota limit. It uses the same syntax as
     * [Metric.unit][]. The supported unit kinds are determined by the quota
     * backend system.
     * Here are some examples:
     * * "1/min/{project}" for quota per minute per project.
     * Note: the order of unit components is insignificant.
     * The "1" at the beginning is required to follow the metric unit syntax.
     * 
* * string unit = 9; */ public Builder setUnit( String value) { if (value == null) { throw new NullPointerException(); } unit_ = value; onChanged(); return this; } /** *
     * Specify the unit of the quota limit. It uses the same syntax as
     * [Metric.unit][]. The supported unit kinds are determined by the quota
     * backend system.
     * Here are some examples:
     * * "1/min/{project}" for quota per minute per project.
     * Note: the order of unit components is insignificant.
     * The "1" at the beginning is required to follow the metric unit syntax.
     * 
* * string unit = 9; */ public Builder clearUnit() { unit_ = getDefaultInstance().getUnit(); onChanged(); return this; } /** *
     * Specify the unit of the quota limit. It uses the same syntax as
     * [Metric.unit][]. The supported unit kinds are determined by the quota
     * backend system.
     * Here are some examples:
     * * "1/min/{project}" for quota per minute per project.
     * Note: the order of unit components is insignificant.
     * The "1" at the beginning is required to follow the metric unit syntax.
     * 
* * string unit = 9; */ public Builder setUnitBytes( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); unit_ = value; onChanged(); return this; } private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapField< String, Long> values_; private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapField internalGetValues() { if (values_ == null) { return lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapField.emptyMapField( ValuesDefaultEntryHolder.defaultEntry); } return values_; } private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapField internalGetMutableValues() { onChanged();; if (values_ == null) { values_ = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.MapField.newMapField( ValuesDefaultEntryHolder.defaultEntry); } if (!values_.isMutable()) { values_ = values_.copy(); } return values_; } public int getValuesCount() { return internalGetValues().getMap().size(); } /** *
     * Tiered limit values. You must specify this as a key:value pair, with an
     * integer value that is the maximum number of requests allowed for the
     * specified unit. Currently only STANDARD is supported.
     * 
* * map<string, int64> values = 10; */ public boolean containsValues( String key) { if (key == null) { throw new NullPointerException(); } return internalGetValues().getMap().containsKey(key); } /** * Use {@link #getValuesMap()} instead. */ @Deprecated public java.util.Map getValues() { return getValuesMap(); } /** *
     * Tiered limit values. You must specify this as a key:value pair, with an
     * integer value that is the maximum number of requests allowed for the
     * specified unit. Currently only STANDARD is supported.
     * 
* * map<string, int64> values = 10; */ public java.util.Map getValuesMap() { return internalGetValues().getMap(); } /** *
     * Tiered limit values. You must specify this as a key:value pair, with an
     * integer value that is the maximum number of requests allowed for the
     * specified unit. Currently only STANDARD is supported.
     * 
* * map<string, int64> values = 10; */ public long getValuesOrDefault( String key, long defaultValue) { if (key == null) { throw new NullPointerException(); } java.util.Map map = internalGetValues().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * Tiered limit values. You must specify this as a key:value pair, with an
     * integer value that is the maximum number of requests allowed for the
     * specified unit. Currently only STANDARD is supported.
     * 
* * map<string, int64> values = 10; */ public long getValuesOrThrow( String key) { if (key == null) { throw new NullPointerException(); } java.util.Map map = internalGetValues().getMap(); if (!map.containsKey(key)) { throw new IllegalArgumentException(); } return map.get(key); } public Builder clearValues() { internalGetMutableValues().getMutableMap() .clear(); return this; } /** *
     * Tiered limit values. You must specify this as a key:value pair, with an
     * integer value that is the maximum number of requests allowed for the
     * specified unit. Currently only STANDARD is supported.
     * 
* * map<string, int64> values = 10; */ public Builder removeValues( String key) { if (key == null) { throw new NullPointerException(); } internalGetMutableValues().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @Deprecated public java.util.Map getMutableValues() { return internalGetMutableValues().getMutableMap(); } /** *
     * Tiered limit values. You must specify this as a key:value pair, with an
     * integer value that is the maximum number of requests allowed for the
     * specified unit. Currently only STANDARD is supported.
     * 
* * map<string, int64> values = 10; */ public Builder putValues( String key, long value) { if (key == null) { throw new NullPointerException(); } internalGetMutableValues().getMutableMap() .put(key, value); return this; } /** *
     * Tiered limit values. You must specify this as a key:value pair, with an
     * integer value that is the maximum number of requests allowed for the
     * specified unit. Currently only STANDARD is supported.
     * 
* * map<string, int64> values = 10; */ public Builder putAllValues( java.util.Map values) { internalGetMutableValues().getMutableMap() .putAll(values); return this; } private Object displayName_ = ""; /** *
     * User-visible display name for this limit.
     * Optional. If not set, the UI will provide a default display name based on
     * the quota configuration. This field can be used to override the default
     * display name generated from the configuration.
     * 
* * string display_name = 12; */ public String getDisplayName() { Object ref = displayName_; if (!(ref instanceof String)) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs = (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); displayName_ = s; return s; } else { return (String) ref; } } /** *
     * User-visible display name for this limit.
     * Optional. If not set, the UI will provide a default display name based on
     * the quota configuration. This field can be used to override the default
     * display name generated from the configuration.
     * 
* * string display_name = 12; */ public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString getDisplayNameBytes() { Object ref = displayName_; if (ref instanceof String) { lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b = lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8( (String) ref); displayName_ = b; return b; } else { return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref; } } /** *
     * User-visible display name for this limit.
     * Optional. If not set, the UI will provide a default display name based on
     * the quota configuration. This field can be used to override the default
     * display name generated from the configuration.
     * 
* * string display_name = 12; */ public Builder setDisplayName( String value) { if (value == null) { throw new NullPointerException(); } displayName_ = value; onChanged(); return this; } /** *
     * User-visible display name for this limit.
     * Optional. If not set, the UI will provide a default display name based on
     * the quota configuration. This field can be used to override the default
     * display name generated from the configuration.
     * 
* * string display_name = 12; */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); onChanged(); return this; } /** *
     * User-visible display name for this limit.
     * Optional. If not set, the UI will provide a default display name based on
     * the quota configuration. This field can be used to override the default
     * display name generated from the configuration.
     * 
* * string display_name = 12; */ public Builder setDisplayNameBytes( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); displayName_ = value; onChanged(); return this; } @Override public final Builder setUnknownFields( final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.api.QuotaLimit) } // @@protoc_insertion_point(class_scope:google.api.QuotaLimit) private static final QuotaLimit DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new QuotaLimit(); } public static QuotaLimit getDefaultInstance() { return DEFAULT_INSTANCE; } private static final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Parser PARSER = new lightstep.com.lightstep.lightstep.lightstep.google.protobuf.AbstractParser() { @Override public QuotaLimit parsePartialFrom( lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedInputStream input, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry) throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException { return new QuotaLimit(input, extensionRegistry); } }; public static lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Parser parser() { return PARSER; } @Override public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Parser getParserForType() { return PARSER; } @Override public QuotaLimit getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy