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

com.google.api.Usage Maven / Gradle / Ivy

There is a newer version: 0.0.6
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/api/usage.proto

package com.google.api;

/**
 * Protobuf type {@code google.api.Usage}
 *
 * 
 * Configuration controlling usage of a service.
 * 
*/ public final class Usage extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.api.Usage) UsageOrBuilder { // Use Usage.newBuilder() to construct. private Usage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Usage() { serviceAccess_ = 0; requirements_ = com.google.protobuf.LazyStringArrayList.EMPTY; dependsOnServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; activationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; deactivationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; rules_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private Usage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { requirements_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } requirements_.add(s); break; } case 18: { String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { dependsOnServices_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000004; } dependsOnServices_.add(s); break; } case 26: { String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { activationHooks_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000008; } activationHooks_.add(s); break; } case 32: { int rawValue = input.readEnum(); serviceAccess_ = rawValue; break; } case 42: { String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { deactivationHooks_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000010; } deactivationHooks_.add(s); break; } case 50: { if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { rules_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000020; } rules_.add(input.readMessage(com.google.api.UsageRule.parser(), extensionRegistry)); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { throw new RuntimeException( new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { requirements_ = requirements_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { dependsOnServices_ = dependsOnServices_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { activationHooks_ = activationHooks_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { deactivationHooks_ = deactivationHooks_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { rules_ = java.util.Collections.unmodifiableList(rules_); } makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.UsageProto.internal_static_google_api_Usage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.UsageProto.internal_static_google_api_Usage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.Usage.class, com.google.api.Usage.Builder.class); } /** * Protobuf enum {@code google.api.Usage.ServiceAccess} * *
   * Service access types.
   * Access to restricted API features is always controlled by
   * [visibility][google.api.Visibility], independent of the ServiceAccess type.
   * (--GOOGLE_INTERNAL: Services using one of the ORG_ options will be
   * restricted to everyone@google.com --)
   * 
*/ public enum ServiceAccess implements com.google.protobuf.ProtocolMessageEnum { /** * RESTRICTED = 0; * *
     * The service can only be seen/used by users identified in the service's
     * access control policy.
     * If the service has not been whitelisted by your domain administrator
     * for out-of-org publishing, then this mode will be treated like
     * ORG_RESTRICTED.
     * 
*/ RESTRICTED(0, 0), /** * PUBLIC = 1; * *
     * The service can be seen/used by anyone.
     * If the service has not been whitelisted by your domain administrator
     * for out-of-org publishing, then this mode will be treated like
     * ORG_PUBLIC.
     * The discovery document for the service will also be public and allow
     * allow unregistered access.
     * 
*/ PUBLIC(1, 1), /** * ORG_RESTRICTED = 2; * *
     * The service can be seen/used by users identified in the service's
     * access control policy.  Access is further constrained to the group
     * controlled by the administrator of the project/org that owns the
     * service.
     * 
*/ ORG_RESTRICTED(2, 2), /** * ORG_PUBLIC = 3; * *
     * The service can be seen/used by the group of users controlled by the
     * administrator of the project/org that owns the service.
     * 
*/ ORG_PUBLIC(3, 3), UNRECOGNIZED(-1, -1), ; /** * RESTRICTED = 0; * *
     * The service can only be seen/used by users identified in the service's
     * access control policy.
     * If the service has not been whitelisted by your domain administrator
     * for out-of-org publishing, then this mode will be treated like
     * ORG_RESTRICTED.
     * 
*/ public static final int RESTRICTED_VALUE = 0; /** * PUBLIC = 1; * *
     * The service can be seen/used by anyone.
     * If the service has not been whitelisted by your domain administrator
     * for out-of-org publishing, then this mode will be treated like
     * ORG_PUBLIC.
     * The discovery document for the service will also be public and allow
     * allow unregistered access.
     * 
*/ public static final int PUBLIC_VALUE = 1; /** * ORG_RESTRICTED = 2; * *
     * The service can be seen/used by users identified in the service's
     * access control policy.  Access is further constrained to the group
     * controlled by the administrator of the project/org that owns the
     * service.
     * 
*/ public static final int ORG_RESTRICTED_VALUE = 2; /** * ORG_PUBLIC = 3; * *
     * The service can be seen/used by the group of users controlled by the
     * administrator of the project/org that owns the service.
     * 
*/ public static final int ORG_PUBLIC_VALUE = 3; public final int getNumber() { if (index == -1) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } public static ServiceAccess valueOf(int value) { switch (value) { case 0: return RESTRICTED; case 1: return PUBLIC; case 2: return ORG_RESTRICTED; case 3: return ORG_PUBLIC; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< ServiceAccess> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public ServiceAccess findValueByNumber(int number) { return ServiceAccess.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.api.Usage.getDescriptor().getEnumTypes().get(0); } private static final ServiceAccess[] VALUES = values(); public static ServiceAccess valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int index; private final int value; private ServiceAccess(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:google.api.Usage.ServiceAccess) } private int bitField0_; public static final int SERVICE_ACCESS_FIELD_NUMBER = 4; private int serviceAccess_; /** * optional .google.api.Usage.ServiceAccess service_access = 4; * *
   * Controls which users can see or activate the service.
   * 
*/ public int getServiceAccessValue() { return serviceAccess_; } /** * optional .google.api.Usage.ServiceAccess service_access = 4; * *
   * Controls which users can see or activate the service.
   * 
*/ public com.google.api.Usage.ServiceAccess getServiceAccess() { com.google.api.Usage.ServiceAccess result = com.google.api.Usage.ServiceAccess.valueOf(serviceAccess_); return result == null ? com.google.api.Usage.ServiceAccess.UNRECOGNIZED : result; } public static final int REQUIREMENTS_FIELD_NUMBER = 1; private com.google.protobuf.LazyStringList requirements_; /** * repeated string requirements = 1; * *
   * Requirements that must be satisfied before a consumer project can use the
   * service. Each requirement is of the form <service.name>/<requirement-id>;
   * for example 'serviceusage.googleapis.com/billing-enabled'.
   * 
*/ public com.google.protobuf.ProtocolStringList getRequirementsList() { return requirements_; } /** * repeated string requirements = 1; * *
   * Requirements that must be satisfied before a consumer project can use the
   * service. Each requirement is of the form <service.name>/<requirement-id>;
   * for example 'serviceusage.googleapis.com/billing-enabled'.
   * 
*/ public int getRequirementsCount() { return requirements_.size(); } /** * repeated string requirements = 1; * *
   * Requirements that must be satisfied before a consumer project can use the
   * service. Each requirement is of the form <service.name>/<requirement-id>;
   * for example 'serviceusage.googleapis.com/billing-enabled'.
   * 
*/ public java.lang.String getRequirements(int index) { return requirements_.get(index); } /** * repeated string requirements = 1; * *
   * Requirements that must be satisfied before a consumer project can use the
   * service. Each requirement is of the form <service.name>/<requirement-id>;
   * for example 'serviceusage.googleapis.com/billing-enabled'.
   * 
*/ public com.google.protobuf.ByteString getRequirementsBytes(int index) { return requirements_.getByteString(index); } public static final int DEPENDS_ON_SERVICES_FIELD_NUMBER = 2; private com.google.protobuf.LazyStringList dependsOnServices_; /** * repeated string depends_on_services = 2; * *
   * Services that must be activated in order for this service to be used.
   * The set of services activated as a result of these relations are all
   * activated in parallel with no guaranteed order of activation.
   * Each string is a service name, e.g. `calendar.googleapis.com`.
   * 
*/ public com.google.protobuf.ProtocolStringList getDependsOnServicesList() { return dependsOnServices_; } /** * repeated string depends_on_services = 2; * *
   * Services that must be activated in order for this service to be used.
   * The set of services activated as a result of these relations are all
   * activated in parallel with no guaranteed order of activation.
   * Each string is a service name, e.g. `calendar.googleapis.com`.
   * 
*/ public int getDependsOnServicesCount() { return dependsOnServices_.size(); } /** * repeated string depends_on_services = 2; * *
   * Services that must be activated in order for this service to be used.
   * The set of services activated as a result of these relations are all
   * activated in parallel with no guaranteed order of activation.
   * Each string is a service name, e.g. `calendar.googleapis.com`.
   * 
*/ public java.lang.String getDependsOnServices(int index) { return dependsOnServices_.get(index); } /** * repeated string depends_on_services = 2; * *
   * Services that must be activated in order for this service to be used.
   * The set of services activated as a result of these relations are all
   * activated in parallel with no guaranteed order of activation.
   * Each string is a service name, e.g. `calendar.googleapis.com`.
   * 
*/ public com.google.protobuf.ByteString getDependsOnServicesBytes(int index) { return dependsOnServices_.getByteString(index); } public static final int ACTIVATION_HOOKS_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList activationHooks_; /** * repeated string activation_hooks = 3; * *
   * Services that must be contacted before a consumer can begin using the
   * service. Each service will be contacted in sequence, and, if any activation
   * call fails, the entire activation will fail. Each hook is of the form
   * <service.name>/<hook-id>, where <hook-id> is optional; for example:
   * 'robotservice.googleapis.com/default'.
   * 
*/ public com.google.protobuf.ProtocolStringList getActivationHooksList() { return activationHooks_; } /** * repeated string activation_hooks = 3; * *
   * Services that must be contacted before a consumer can begin using the
   * service. Each service will be contacted in sequence, and, if any activation
   * call fails, the entire activation will fail. Each hook is of the form
   * <service.name>/<hook-id>, where <hook-id> is optional; for example:
   * 'robotservice.googleapis.com/default'.
   * 
*/ public int getActivationHooksCount() { return activationHooks_.size(); } /** * repeated string activation_hooks = 3; * *
   * Services that must be contacted before a consumer can begin using the
   * service. Each service will be contacted in sequence, and, if any activation
   * call fails, the entire activation will fail. Each hook is of the form
   * <service.name>/<hook-id>, where <hook-id> is optional; for example:
   * 'robotservice.googleapis.com/default'.
   * 
*/ public java.lang.String getActivationHooks(int index) { return activationHooks_.get(index); } /** * repeated string activation_hooks = 3; * *
   * Services that must be contacted before a consumer can begin using the
   * service. Each service will be contacted in sequence, and, if any activation
   * call fails, the entire activation will fail. Each hook is of the form
   * <service.name>/<hook-id>, where <hook-id> is optional; for example:
   * 'robotservice.googleapis.com/default'.
   * 
*/ public com.google.protobuf.ByteString getActivationHooksBytes(int index) { return activationHooks_.getByteString(index); } public static final int DEACTIVATION_HOOKS_FIELD_NUMBER = 5; private com.google.protobuf.LazyStringList deactivationHooks_; /** * repeated string deactivation_hooks = 5; * *
   * Services that must be contacted before a consumer can deactivate a
   * service. Each service will be contacted in sequence, and, if any
   * deactivation call fails, the entire deactivation will fail. Each hook is
   * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
   * example:
   * 'compute.googleapis.com/'.
   * 
*/ public com.google.protobuf.ProtocolStringList getDeactivationHooksList() { return deactivationHooks_; } /** * repeated string deactivation_hooks = 5; * *
   * Services that must be contacted before a consumer can deactivate a
   * service. Each service will be contacted in sequence, and, if any
   * deactivation call fails, the entire deactivation will fail. Each hook is
   * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
   * example:
   * 'compute.googleapis.com/'.
   * 
*/ public int getDeactivationHooksCount() { return deactivationHooks_.size(); } /** * repeated string deactivation_hooks = 5; * *
   * Services that must be contacted before a consumer can deactivate a
   * service. Each service will be contacted in sequence, and, if any
   * deactivation call fails, the entire deactivation will fail. Each hook is
   * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
   * example:
   * 'compute.googleapis.com/'.
   * 
*/ public java.lang.String getDeactivationHooks(int index) { return deactivationHooks_.get(index); } /** * repeated string deactivation_hooks = 5; * *
   * Services that must be contacted before a consumer can deactivate a
   * service. Each service will be contacted in sequence, and, if any
   * deactivation call fails, the entire deactivation will fail. Each hook is
   * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
   * example:
   * 'compute.googleapis.com/'.
   * 
*/ public com.google.protobuf.ByteString getDeactivationHooksBytes(int index) { return deactivationHooks_.getByteString(index); } public static final int RULES_FIELD_NUMBER = 6; private java.util.List rules_; /** * repeated .google.api.UsageRule rules = 6; * *
   * Individual rules for configuring usage on selected methods.
   * 
*/ public java.util.List getRulesList() { return rules_; } /** * repeated .google.api.UsageRule rules = 6; * *
   * Individual rules for configuring usage on selected methods.
   * 
*/ public java.util.List getRulesOrBuilderList() { return rules_; } /** * repeated .google.api.UsageRule rules = 6; * *
   * Individual rules for configuring usage on selected methods.
   * 
*/ public int getRulesCount() { return rules_.size(); } /** * repeated .google.api.UsageRule rules = 6; * *
   * Individual rules for configuring usage on selected methods.
   * 
*/ public com.google.api.UsageRule getRules(int index) { return rules_.get(index); } /** * repeated .google.api.UsageRule rules = 6; * *
   * Individual rules for configuring usage on selected methods.
   * 
*/ public com.google.api.UsageRuleOrBuilder getRulesOrBuilder( int index) { return rules_.get(index); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < requirements_.size(); i++) { com.google.protobuf.GeneratedMessage.writeString(output, 1, requirements_.getRaw(i)); } for (int i = 0; i < dependsOnServices_.size(); i++) { com.google.protobuf.GeneratedMessage.writeString(output, 2, dependsOnServices_.getRaw(i)); } for (int i = 0; i < activationHooks_.size(); i++) { com.google.protobuf.GeneratedMessage.writeString(output, 3, activationHooks_.getRaw(i)); } if (serviceAccess_ != com.google.api.Usage.ServiceAccess.RESTRICTED.getNumber()) { output.writeEnum(4, serviceAccess_); } for (int i = 0; i < deactivationHooks_.size(); i++) { com.google.protobuf.GeneratedMessage.writeString(output, 5, deactivationHooks_.getRaw(i)); } for (int i = 0; i < rules_.size(); i++) { output.writeMessage(6, rules_.get(i)); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < requirements_.size(); i++) { dataSize += computeStringSizeNoTag(requirements_.getRaw(i)); } size += dataSize; size += 1 * getRequirementsList().size(); } { int dataSize = 0; for (int i = 0; i < dependsOnServices_.size(); i++) { dataSize += computeStringSizeNoTag(dependsOnServices_.getRaw(i)); } size += dataSize; size += 1 * getDependsOnServicesList().size(); } { int dataSize = 0; for (int i = 0; i < activationHooks_.size(); i++) { dataSize += computeStringSizeNoTag(activationHooks_.getRaw(i)); } size += dataSize; size += 1 * getActivationHooksList().size(); } if (serviceAccess_ != com.google.api.Usage.ServiceAccess.RESTRICTED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, serviceAccess_); } { int dataSize = 0; for (int i = 0; i < deactivationHooks_.size(); i++) { dataSize += computeStringSizeNoTag(deactivationHooks_.getRaw(i)); } size += dataSize; size += 1 * getDeactivationHooksList().size(); } for (int i = 0; i < rules_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, rules_.get(i)); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; public static com.google.api.Usage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.Usage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.api.Usage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.Usage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.api.Usage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.google.api.Usage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.google.api.Usage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.google.api.Usage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.google.api.Usage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.google.api.Usage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.api.Usage prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code google.api.Usage} * *
   * Configuration controlling usage of a service.
   * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.api.Usage) com.google.api.UsageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.UsageProto.internal_static_google_api_Usage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.UsageProto.internal_static_google_api_Usage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.Usage.class, com.google.api.Usage.Builder.class); } // Construct using com.google.api.Usage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getRulesFieldBuilder(); } } public Builder clear() { super.clear(); serviceAccess_ = 0; requirements_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); dependsOnServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); activationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); deactivationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000020); } else { rulesBuilder_.clear(); } return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.api.UsageProto.internal_static_google_api_Usage_descriptor; } public com.google.api.Usage getDefaultInstanceForType() { return com.google.api.Usage.getDefaultInstance(); } public com.google.api.Usage build() { com.google.api.Usage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.api.Usage buildPartial() { com.google.api.Usage result = new com.google.api.Usage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.serviceAccess_ = serviceAccess_; if (((bitField0_ & 0x00000002) == 0x00000002)) { requirements_ = requirements_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); } result.requirements_ = requirements_; if (((bitField0_ & 0x00000004) == 0x00000004)) { dependsOnServices_ = dependsOnServices_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000004); } result.dependsOnServices_ = dependsOnServices_; if (((bitField0_ & 0x00000008) == 0x00000008)) { activationHooks_ = activationHooks_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000008); } result.activationHooks_ = activationHooks_; if (((bitField0_ & 0x00000010) == 0x00000010)) { deactivationHooks_ = deactivationHooks_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000010); } result.deactivationHooks_ = deactivationHooks_; if (rulesBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020)) { rules_ = java.util.Collections.unmodifiableList(rules_); bitField0_ = (bitField0_ & ~0x00000020); } result.rules_ = rules_; } else { result.rules_ = rulesBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.api.Usage) { return mergeFrom((com.google.api.Usage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.api.Usage other) { if (other == com.google.api.Usage.getDefaultInstance()) return this; if (other.serviceAccess_ != 0) { setServiceAccessValue(other.getServiceAccessValue()); } if (!other.requirements_.isEmpty()) { if (requirements_.isEmpty()) { requirements_ = other.requirements_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureRequirementsIsMutable(); requirements_.addAll(other.requirements_); } onChanged(); } if (!other.dependsOnServices_.isEmpty()) { if (dependsOnServices_.isEmpty()) { dependsOnServices_ = other.dependsOnServices_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureDependsOnServicesIsMutable(); dependsOnServices_.addAll(other.dependsOnServices_); } onChanged(); } if (!other.activationHooks_.isEmpty()) { if (activationHooks_.isEmpty()) { activationHooks_ = other.activationHooks_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureActivationHooksIsMutable(); activationHooks_.addAll(other.activationHooks_); } onChanged(); } if (!other.deactivationHooks_.isEmpty()) { if (deactivationHooks_.isEmpty()) { deactivationHooks_ = other.deactivationHooks_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureDeactivationHooksIsMutable(); deactivationHooks_.addAll(other.deactivationHooks_); } onChanged(); } if (rulesBuilder_ == null) { if (!other.rules_.isEmpty()) { if (rules_.isEmpty()) { rules_ = other.rules_; bitField0_ = (bitField0_ & ~0x00000020); } else { ensureRulesIsMutable(); rules_.addAll(other.rules_); } onChanged(); } } else { if (!other.rules_.isEmpty()) { if (rulesBuilder_.isEmpty()) { rulesBuilder_.dispose(); rulesBuilder_ = null; rules_ = other.rules_; bitField0_ = (bitField0_ & ~0x00000020); rulesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getRulesFieldBuilder() : null; } else { rulesBuilder_.addAllMessages(other.rules_); } } } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.api.Usage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.api.Usage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int serviceAccess_ = 0; /** * optional .google.api.Usage.ServiceAccess service_access = 4; * *
     * Controls which users can see or activate the service.
     * 
*/ public int getServiceAccessValue() { return serviceAccess_; } /** * optional .google.api.Usage.ServiceAccess service_access = 4; * *
     * Controls which users can see or activate the service.
     * 
*/ public Builder setServiceAccessValue(int value) { serviceAccess_ = value; onChanged(); return this; } /** * optional .google.api.Usage.ServiceAccess service_access = 4; * *
     * Controls which users can see or activate the service.
     * 
*/ public com.google.api.Usage.ServiceAccess getServiceAccess() { com.google.api.Usage.ServiceAccess result = com.google.api.Usage.ServiceAccess.valueOf(serviceAccess_); return result == null ? com.google.api.Usage.ServiceAccess.UNRECOGNIZED : result; } /** * optional .google.api.Usage.ServiceAccess service_access = 4; * *
     * Controls which users can see or activate the service.
     * 
*/ public Builder setServiceAccess(com.google.api.Usage.ServiceAccess value) { if (value == null) { throw new NullPointerException(); } serviceAccess_ = value.getNumber(); onChanged(); return this; } /** * optional .google.api.Usage.ServiceAccess service_access = 4; * *
     * Controls which users can see or activate the service.
     * 
*/ public Builder clearServiceAccess() { serviceAccess_ = 0; onChanged(); return this; } private com.google.protobuf.LazyStringList requirements_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureRequirementsIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { requirements_ = new com.google.protobuf.LazyStringArrayList(requirements_); bitField0_ |= 0x00000002; } } /** * repeated string requirements = 1; * *
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form <service.name>/<requirement-id>;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * 
*/ public com.google.protobuf.ProtocolStringList getRequirementsList() { return requirements_.getUnmodifiableView(); } /** * repeated string requirements = 1; * *
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form <service.name>/<requirement-id>;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * 
*/ public int getRequirementsCount() { return requirements_.size(); } /** * repeated string requirements = 1; * *
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form <service.name>/<requirement-id>;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * 
*/ public java.lang.String getRequirements(int index) { return requirements_.get(index); } /** * repeated string requirements = 1; * *
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form <service.name>/<requirement-id>;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * 
*/ public com.google.protobuf.ByteString getRequirementsBytes(int index) { return requirements_.getByteString(index); } /** * repeated string requirements = 1; * *
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form <service.name>/<requirement-id>;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * 
*/ public Builder setRequirements( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureRequirementsIsMutable(); requirements_.set(index, value); onChanged(); return this; } /** * repeated string requirements = 1; * *
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form <service.name>/<requirement-id>;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * 
*/ public Builder addRequirements( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureRequirementsIsMutable(); requirements_.add(value); onChanged(); return this; } /** * repeated string requirements = 1; * *
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form <service.name>/<requirement-id>;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * 
*/ public Builder addAllRequirements( java.lang.Iterable values) { ensureRequirementsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, requirements_); onChanged(); return this; } /** * repeated string requirements = 1; * *
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form <service.name>/<requirement-id>;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * 
*/ public Builder clearRequirements() { requirements_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * repeated string requirements = 1; * *
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form <service.name>/<requirement-id>;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * 
*/ public Builder addRequirementsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureRequirementsIsMutable(); requirements_.add(value); onChanged(); return this; } private com.google.protobuf.LazyStringList dependsOnServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureDependsOnServicesIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { dependsOnServices_ = new com.google.protobuf.LazyStringArrayList(dependsOnServices_); bitField0_ |= 0x00000004; } } /** * repeated string depends_on_services = 2; * *
     * Services that must be activated in order for this service to be used.
     * The set of services activated as a result of these relations are all
     * activated in parallel with no guaranteed order of activation.
     * Each string is a service name, e.g. `calendar.googleapis.com`.
     * 
*/ public com.google.protobuf.ProtocolStringList getDependsOnServicesList() { return dependsOnServices_.getUnmodifiableView(); } /** * repeated string depends_on_services = 2; * *
     * Services that must be activated in order for this service to be used.
     * The set of services activated as a result of these relations are all
     * activated in parallel with no guaranteed order of activation.
     * Each string is a service name, e.g. `calendar.googleapis.com`.
     * 
*/ public int getDependsOnServicesCount() { return dependsOnServices_.size(); } /** * repeated string depends_on_services = 2; * *
     * Services that must be activated in order for this service to be used.
     * The set of services activated as a result of these relations are all
     * activated in parallel with no guaranteed order of activation.
     * Each string is a service name, e.g. `calendar.googleapis.com`.
     * 
*/ public java.lang.String getDependsOnServices(int index) { return dependsOnServices_.get(index); } /** * repeated string depends_on_services = 2; * *
     * Services that must be activated in order for this service to be used.
     * The set of services activated as a result of these relations are all
     * activated in parallel with no guaranteed order of activation.
     * Each string is a service name, e.g. `calendar.googleapis.com`.
     * 
*/ public com.google.protobuf.ByteString getDependsOnServicesBytes(int index) { return dependsOnServices_.getByteString(index); } /** * repeated string depends_on_services = 2; * *
     * Services that must be activated in order for this service to be used.
     * The set of services activated as a result of these relations are all
     * activated in parallel with no guaranteed order of activation.
     * Each string is a service name, e.g. `calendar.googleapis.com`.
     * 
*/ public Builder setDependsOnServices( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureDependsOnServicesIsMutable(); dependsOnServices_.set(index, value); onChanged(); return this; } /** * repeated string depends_on_services = 2; * *
     * Services that must be activated in order for this service to be used.
     * The set of services activated as a result of these relations are all
     * activated in parallel with no guaranteed order of activation.
     * Each string is a service name, e.g. `calendar.googleapis.com`.
     * 
*/ public Builder addDependsOnServices( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureDependsOnServicesIsMutable(); dependsOnServices_.add(value); onChanged(); return this; } /** * repeated string depends_on_services = 2; * *
     * Services that must be activated in order for this service to be used.
     * The set of services activated as a result of these relations are all
     * activated in parallel with no guaranteed order of activation.
     * Each string is a service name, e.g. `calendar.googleapis.com`.
     * 
*/ public Builder addAllDependsOnServices( java.lang.Iterable values) { ensureDependsOnServicesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, dependsOnServices_); onChanged(); return this; } /** * repeated string depends_on_services = 2; * *
     * Services that must be activated in order for this service to be used.
     * The set of services activated as a result of these relations are all
     * activated in parallel with no guaranteed order of activation.
     * Each string is a service name, e.g. `calendar.googleapis.com`.
     * 
*/ public Builder clearDependsOnServices() { dependsOnServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * repeated string depends_on_services = 2; * *
     * Services that must be activated in order for this service to be used.
     * The set of services activated as a result of these relations are all
     * activated in parallel with no guaranteed order of activation.
     * Each string is a service name, e.g. `calendar.googleapis.com`.
     * 
*/ public Builder addDependsOnServicesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureDependsOnServicesIsMutable(); dependsOnServices_.add(value); onChanged(); return this; } private com.google.protobuf.LazyStringList activationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureActivationHooksIsMutable() { if (!((bitField0_ & 0x00000008) == 0x00000008)) { activationHooks_ = new com.google.protobuf.LazyStringArrayList(activationHooks_); bitField0_ |= 0x00000008; } } /** * repeated string activation_hooks = 3; * *
     * Services that must be contacted before a consumer can begin using the
     * service. Each service will be contacted in sequence, and, if any activation
     * call fails, the entire activation will fail. Each hook is of the form
     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
     * 'robotservice.googleapis.com/default'.
     * 
*/ public com.google.protobuf.ProtocolStringList getActivationHooksList() { return activationHooks_.getUnmodifiableView(); } /** * repeated string activation_hooks = 3; * *
     * Services that must be contacted before a consumer can begin using the
     * service. Each service will be contacted in sequence, and, if any activation
     * call fails, the entire activation will fail. Each hook is of the form
     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
     * 'robotservice.googleapis.com/default'.
     * 
*/ public int getActivationHooksCount() { return activationHooks_.size(); } /** * repeated string activation_hooks = 3; * *
     * Services that must be contacted before a consumer can begin using the
     * service. Each service will be contacted in sequence, and, if any activation
     * call fails, the entire activation will fail. Each hook is of the form
     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
     * 'robotservice.googleapis.com/default'.
     * 
*/ public java.lang.String getActivationHooks(int index) { return activationHooks_.get(index); } /** * repeated string activation_hooks = 3; * *
     * Services that must be contacted before a consumer can begin using the
     * service. Each service will be contacted in sequence, and, if any activation
     * call fails, the entire activation will fail. Each hook is of the form
     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
     * 'robotservice.googleapis.com/default'.
     * 
*/ public com.google.protobuf.ByteString getActivationHooksBytes(int index) { return activationHooks_.getByteString(index); } /** * repeated string activation_hooks = 3; * *
     * Services that must be contacted before a consumer can begin using the
     * service. Each service will be contacted in sequence, and, if any activation
     * call fails, the entire activation will fail. Each hook is of the form
     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
     * 'robotservice.googleapis.com/default'.
     * 
*/ public Builder setActivationHooks( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureActivationHooksIsMutable(); activationHooks_.set(index, value); onChanged(); return this; } /** * repeated string activation_hooks = 3; * *
     * Services that must be contacted before a consumer can begin using the
     * service. Each service will be contacted in sequence, and, if any activation
     * call fails, the entire activation will fail. Each hook is of the form
     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
     * 'robotservice.googleapis.com/default'.
     * 
*/ public Builder addActivationHooks( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureActivationHooksIsMutable(); activationHooks_.add(value); onChanged(); return this; } /** * repeated string activation_hooks = 3; * *
     * Services that must be contacted before a consumer can begin using the
     * service. Each service will be contacted in sequence, and, if any activation
     * call fails, the entire activation will fail. Each hook is of the form
     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
     * 'robotservice.googleapis.com/default'.
     * 
*/ public Builder addAllActivationHooks( java.lang.Iterable values) { ensureActivationHooksIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, activationHooks_); onChanged(); return this; } /** * repeated string activation_hooks = 3; * *
     * Services that must be contacted before a consumer can begin using the
     * service. Each service will be contacted in sequence, and, if any activation
     * call fails, the entire activation will fail. Each hook is of the form
     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
     * 'robotservice.googleapis.com/default'.
     * 
*/ public Builder clearActivationHooks() { activationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * repeated string activation_hooks = 3; * *
     * Services that must be contacted before a consumer can begin using the
     * service. Each service will be contacted in sequence, and, if any activation
     * call fails, the entire activation will fail. Each hook is of the form
     * <service.name>/<hook-id>, where <hook-id> is optional; for example:
     * 'robotservice.googleapis.com/default'.
     * 
*/ public Builder addActivationHooksBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureActivationHooksIsMutable(); activationHooks_.add(value); onChanged(); return this; } private com.google.protobuf.LazyStringList deactivationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureDeactivationHooksIsMutable() { if (!((bitField0_ & 0x00000010) == 0x00000010)) { deactivationHooks_ = new com.google.protobuf.LazyStringArrayList(deactivationHooks_); bitField0_ |= 0x00000010; } } /** * repeated string deactivation_hooks = 5; * *
     * Services that must be contacted before a consumer can deactivate a
     * service. Each service will be contacted in sequence, and, if any
     * deactivation call fails, the entire deactivation will fail. Each hook is
     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
     * example:
     * 'compute.googleapis.com/'.
     * 
*/ public com.google.protobuf.ProtocolStringList getDeactivationHooksList() { return deactivationHooks_.getUnmodifiableView(); } /** * repeated string deactivation_hooks = 5; * *
     * Services that must be contacted before a consumer can deactivate a
     * service. Each service will be contacted in sequence, and, if any
     * deactivation call fails, the entire deactivation will fail. Each hook is
     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
     * example:
     * 'compute.googleapis.com/'.
     * 
*/ public int getDeactivationHooksCount() { return deactivationHooks_.size(); } /** * repeated string deactivation_hooks = 5; * *
     * Services that must be contacted before a consumer can deactivate a
     * service. Each service will be contacted in sequence, and, if any
     * deactivation call fails, the entire deactivation will fail. Each hook is
     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
     * example:
     * 'compute.googleapis.com/'.
     * 
*/ public java.lang.String getDeactivationHooks(int index) { return deactivationHooks_.get(index); } /** * repeated string deactivation_hooks = 5; * *
     * Services that must be contacted before a consumer can deactivate a
     * service. Each service will be contacted in sequence, and, if any
     * deactivation call fails, the entire deactivation will fail. Each hook is
     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
     * example:
     * 'compute.googleapis.com/'.
     * 
*/ public com.google.protobuf.ByteString getDeactivationHooksBytes(int index) { return deactivationHooks_.getByteString(index); } /** * repeated string deactivation_hooks = 5; * *
     * Services that must be contacted before a consumer can deactivate a
     * service. Each service will be contacted in sequence, and, if any
     * deactivation call fails, the entire deactivation will fail. Each hook is
     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
     * example:
     * 'compute.googleapis.com/'.
     * 
*/ public Builder setDeactivationHooks( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureDeactivationHooksIsMutable(); deactivationHooks_.set(index, value); onChanged(); return this; } /** * repeated string deactivation_hooks = 5; * *
     * Services that must be contacted before a consumer can deactivate a
     * service. Each service will be contacted in sequence, and, if any
     * deactivation call fails, the entire deactivation will fail. Each hook is
     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
     * example:
     * 'compute.googleapis.com/'.
     * 
*/ public Builder addDeactivationHooks( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureDeactivationHooksIsMutable(); deactivationHooks_.add(value); onChanged(); return this; } /** * repeated string deactivation_hooks = 5; * *
     * Services that must be contacted before a consumer can deactivate a
     * service. Each service will be contacted in sequence, and, if any
     * deactivation call fails, the entire deactivation will fail. Each hook is
     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
     * example:
     * 'compute.googleapis.com/'.
     * 
*/ public Builder addAllDeactivationHooks( java.lang.Iterable values) { ensureDeactivationHooksIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, deactivationHooks_); onChanged(); return this; } /** * repeated string deactivation_hooks = 5; * *
     * Services that must be contacted before a consumer can deactivate a
     * service. Each service will be contacted in sequence, and, if any
     * deactivation call fails, the entire deactivation will fail. Each hook is
     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
     * example:
     * 'compute.googleapis.com/'.
     * 
*/ public Builder clearDeactivationHooks() { deactivationHooks_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * repeated string deactivation_hooks = 5; * *
     * Services that must be contacted before a consumer can deactivate a
     * service. Each service will be contacted in sequence, and, if any
     * deactivation call fails, the entire deactivation will fail. Each hook is
     * of the form <service.name>/<hook-id>, where <hook-id> is optional; for
     * example:
     * 'compute.googleapis.com/'.
     * 
*/ public Builder addDeactivationHooksBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureDeactivationHooksIsMutable(); deactivationHooks_.add(value); onChanged(); return this; } private java.util.List rules_ = java.util.Collections.emptyList(); private void ensureRulesIsMutable() { if (!((bitField0_ & 0x00000020) == 0x00000020)) { rules_ = new java.util.ArrayList(rules_); bitField0_ |= 0x00000020; } } private com.google.protobuf.RepeatedFieldBuilder< com.google.api.UsageRule, com.google.api.UsageRule.Builder, com.google.api.UsageRuleOrBuilder> rulesBuilder_; /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public java.util.List getRulesList() { if (rulesBuilder_ == null) { return java.util.Collections.unmodifiableList(rules_); } else { return rulesBuilder_.getMessageList(); } } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public int getRulesCount() { if (rulesBuilder_ == null) { return rules_.size(); } else { return rulesBuilder_.getCount(); } } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public com.google.api.UsageRule getRules(int index) { if (rulesBuilder_ == null) { return rules_.get(index); } else { return rulesBuilder_.getMessage(index); } } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public Builder setRules( int index, com.google.api.UsageRule value) { if (rulesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRulesIsMutable(); rules_.set(index, value); onChanged(); } else { rulesBuilder_.setMessage(index, value); } return this; } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public Builder setRules( int index, com.google.api.UsageRule.Builder builderForValue) { if (rulesBuilder_ == null) { ensureRulesIsMutable(); rules_.set(index, builderForValue.build()); onChanged(); } else { rulesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public Builder addRules(com.google.api.UsageRule value) { if (rulesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRulesIsMutable(); rules_.add(value); onChanged(); } else { rulesBuilder_.addMessage(value); } return this; } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public Builder addRules( int index, com.google.api.UsageRule value) { if (rulesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRulesIsMutable(); rules_.add(index, value); onChanged(); } else { rulesBuilder_.addMessage(index, value); } return this; } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public Builder addRules( com.google.api.UsageRule.Builder builderForValue) { if (rulesBuilder_ == null) { ensureRulesIsMutable(); rules_.add(builderForValue.build()); onChanged(); } else { rulesBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public Builder addRules( int index, com.google.api.UsageRule.Builder builderForValue) { if (rulesBuilder_ == null) { ensureRulesIsMutable(); rules_.add(index, builderForValue.build()); onChanged(); } else { rulesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public Builder addAllRules( java.lang.Iterable values) { if (rulesBuilder_ == null) { ensureRulesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, rules_); onChanged(); } else { rulesBuilder_.addAllMessages(values); } return this; } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public Builder clearRules() { if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { rulesBuilder_.clear(); } return this; } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public Builder removeRules(int index) { if (rulesBuilder_ == null) { ensureRulesIsMutable(); rules_.remove(index); onChanged(); } else { rulesBuilder_.remove(index); } return this; } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public com.google.api.UsageRule.Builder getRulesBuilder( int index) { return getRulesFieldBuilder().getBuilder(index); } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public com.google.api.UsageRuleOrBuilder getRulesOrBuilder( int index) { if (rulesBuilder_ == null) { return rules_.get(index); } else { return rulesBuilder_.getMessageOrBuilder(index); } } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public java.util.List getRulesOrBuilderList() { if (rulesBuilder_ != null) { return rulesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(rules_); } } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public com.google.api.UsageRule.Builder addRulesBuilder() { return getRulesFieldBuilder().addBuilder( com.google.api.UsageRule.getDefaultInstance()); } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public com.google.api.UsageRule.Builder addRulesBuilder( int index) { return getRulesFieldBuilder().addBuilder( index, com.google.api.UsageRule.getDefaultInstance()); } /** * repeated .google.api.UsageRule rules = 6; * *
     * Individual rules for configuring usage on selected methods.
     * 
*/ public java.util.List getRulesBuilderList() { return getRulesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.google.api.UsageRule, com.google.api.UsageRule.Builder, com.google.api.UsageRuleOrBuilder> getRulesFieldBuilder() { if (rulesBuilder_ == null) { rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.google.api.UsageRule, com.google.api.UsageRule.Builder, com.google.api.UsageRuleOrBuilder>( rules_, ((bitField0_ & 0x00000020) == 0x00000020), getParentForChildren(), isClean()); rules_ = null; } return rulesBuilder_; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:google.api.Usage) } // @@protoc_insertion_point(class_scope:google.api.Usage) private static final com.google.api.Usage DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.api.Usage(); } public static com.google.api.Usage getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Usage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { try { return new Usage(input, extensionRegistry); } catch (RuntimeException e) { if (e.getCause() instanceof com.google.protobuf.InvalidProtocolBufferException) { throw (com.google.protobuf.InvalidProtocolBufferException) e.getCause(); } throw e; } } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.api.Usage getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy