diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProto.java new file mode 100644 index 000000000000..bc11666bab4c --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProto.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public final class AuthProto { + private AuthProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Authentication_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Authentication_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_AuthenticationRule_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_AuthenticationRule_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_AuthProvider_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_AuthProvider_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_OAuthRequirements_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_OAuthRequirements_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_AuthRequirement_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_AuthRequirement_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\025google/api/auth.proto\022\ngoogle.api\032\034goo" + + "gle/api/annotations.proto\"l\n\016Authenticat" + + "ion\022-\n\005rules\030\003 \003(\0132\036.google.api.Authenti" + + "cationRule\022+\n\tproviders\030\004 \003(\0132\030.google.a" + + "pi.AuthProvider\"\251\001\n\022AuthenticationRule\022\020" + + "\n\010selector\030\001 \001(\t\022,\n\005oauth\030\002 \001(\0132\035.google" + + ".api.OAuthRequirements\022 \n\030allow_without_" + + "credential\030\005 \001(\010\0221\n\014requirements\030\007 \003(\0132\033" + + ".google.api.AuthRequirement\"<\n\014AuthProvi" + + "der\022\n\n\002id\030\001 \001(\t\022\016\n\006issuer\030\002 \001(\t\022\020\n\010jwks_", + "uri\030\003 \001(\t\"-\n\021OAuthRequirements\022\030\n\020canoni" + + "cal_scopes\030\001 \001(\t\"9\n\017AuthRequirement\022\023\n\013p" + + "rovider_id\030\001 \001(\t\022\021\n\taudiences\030\002 \001(\tB\035\n\016c" + + "om.google.apiB\tAuthProtoP\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }, assigner); + internal_static_google_api_Authentication_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Authentication_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Authentication_descriptor, + new java.lang.String[] { "Rules", "Providers", }); + internal_static_google_api_AuthenticationRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_AuthenticationRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_AuthenticationRule_descriptor, + new java.lang.String[] { "Selector", "Oauth", "AllowWithoutCredential", "Requirements", }); + internal_static_google_api_AuthProvider_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_api_AuthProvider_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_AuthProvider_descriptor, + new java.lang.String[] { "Id", "Issuer", "JwksUri", }); + internal_static_google_api_OAuthRequirements_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_api_OAuthRequirements_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_OAuthRequirements_descriptor, + new java.lang.String[] { "CanonicalScopes", }); + internal_static_google_api_AuthRequirement_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_api_AuthRequirement_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_AuthRequirement_descriptor, + new java.lang.String[] { "ProviderId", "Audiences", }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProvider.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProvider.java new file mode 100644 index 000000000000..b51cf09e550d --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProvider.java @@ -0,0 +1,871 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.AuthProvider} + * + *
+ * Configuration for an anthentication provider, including support for
+ * [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
+ * 
+ */ +public final class AuthProvider extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.AuthProvider) + AuthProviderOrBuilder { + // Use AuthProvider.newBuilder() to construct. + private AuthProvider(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthProvider() { + id_ = ""; + issuer_ = ""; + jwksUri_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private AuthProvider( + 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(); + + id_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + issuer_ = s; + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + jwksUri_ = s; + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_AuthProvider_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_AuthProvider_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.AuthProvider.class, com.google.api.AuthProvider.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * optional string id = 1; + * + *
+   * The unique identifier of the auth provider. It will be referred to by
+   * `AuthRequirement.provider_id`.
+   * Example: "bookstore_auth".
+   * 
+ */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * optional string id = 1; + * + *
+   * The unique identifier of the auth provider. It will be referred to by
+   * `AuthRequirement.provider_id`.
+   * Example: "bookstore_auth".
+   * 
+ */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ISSUER_FIELD_NUMBER = 2; + private volatile java.lang.Object issuer_; + /** + * optional string issuer = 2; + * + *
+   * Identifies the principal that issued the JWT. See
+   * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+   * Usually a URL or an email address.
+   * Example: https://securetoken.google.com
+   * Example: 1234567-compute@developer.gserviceaccount.com
+   * 
+ */ + public java.lang.String getIssuer() { + java.lang.Object ref = issuer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + issuer_ = s; + return s; + } + } + /** + * optional string issuer = 2; + * + *
+   * Identifies the principal that issued the JWT. See
+   * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+   * Usually a URL or an email address.
+   * Example: https://securetoken.google.com
+   * Example: 1234567-compute@developer.gserviceaccount.com
+   * 
+ */ + public com.google.protobuf.ByteString + getIssuerBytes() { + java.lang.Object ref = issuer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + issuer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JWKS_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object jwksUri_; + /** + * optional string jwks_uri = 3; + * + *
+   * URL of the provider's public key set to validate signature of the JWT. See
+   * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+   * Optional if the key set document:
+   *  - can be retrieved from
+   *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
+   *    of the issuer.
+   *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
+   * Example: https://www.googleapis.com/oauth2/v1/certs
+   * 
+ */ + public java.lang.String getJwksUri() { + java.lang.Object ref = jwksUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jwksUri_ = s; + return s; + } + } + /** + * optional string jwks_uri = 3; + * + *
+   * URL of the provider's public key set to validate signature of the JWT. See
+   * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+   * Optional if the key set document:
+   *  - can be retrieved from
+   *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
+   *    of the issuer.
+   *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
+   * Example: https://www.googleapis.com/oauth2/v1/certs
+   * 
+ */ + public com.google.protobuf.ByteString + getJwksUriBytes() { + java.lang.Object ref = jwksUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jwksUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 { + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + if (!getIssuerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, issuer_); + } + if (!getJwksUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, jwksUri_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + if (!getIssuerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, issuer_); + } + if (!getJwksUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, jwksUri_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.AuthProvider parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.AuthProvider 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.AuthProvider parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.AuthProvider parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.AuthProvider parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.AuthProvider parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.AuthProvider parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.AuthProvider parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.AuthProvider parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.AuthProvider 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.AuthProvider 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.AuthProvider} + * + *
+   * Configuration for an anthentication provider, including support for
+   * [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.AuthProvider) + com.google.api.AuthProviderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_AuthProvider_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_AuthProvider_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.AuthProvider.class, com.google.api.AuthProvider.Builder.class); + } + + // Construct using com.google.api.AuthProvider.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + id_ = ""; + + issuer_ = ""; + + jwksUri_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.AuthProto.internal_static_google_api_AuthProvider_descriptor; + } + + public com.google.api.AuthProvider getDefaultInstanceForType() { + return com.google.api.AuthProvider.getDefaultInstance(); + } + + public com.google.api.AuthProvider build() { + com.google.api.AuthProvider result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.AuthProvider buildPartial() { + com.google.api.AuthProvider result = new com.google.api.AuthProvider(this); + result.id_ = id_; + result.issuer_ = issuer_; + result.jwksUri_ = jwksUri_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.AuthProvider) { + return mergeFrom((com.google.api.AuthProvider)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.AuthProvider other) { + if (other == com.google.api.AuthProvider.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getIssuer().isEmpty()) { + issuer_ = other.issuer_; + onChanged(); + } + if (!other.getJwksUri().isEmpty()) { + jwksUri_ = other.jwksUri_; + onChanged(); + } + 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.AuthProvider parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.AuthProvider) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object id_ = ""; + /** + * optional string id = 1; + * + *
+     * The unique identifier of the auth provider. It will be referred to by
+     * `AuthRequirement.provider_id`.
+     * Example: "bookstore_auth".
+     * 
+ */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string id = 1; + * + *
+     * The unique identifier of the auth provider. It will be referred to by
+     * `AuthRequirement.provider_id`.
+     * Example: "bookstore_auth".
+     * 
+ */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string id = 1; + * + *
+     * The unique identifier of the auth provider. It will be referred to by
+     * `AuthRequirement.provider_id`.
+     * Example: "bookstore_auth".
+     * 
+ */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * optional string id = 1; + * + *
+     * The unique identifier of the auth provider. It will be referred to by
+     * `AuthRequirement.provider_id`.
+     * Example: "bookstore_auth".
+     * 
+ */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * optional string id = 1; + * + *
+     * The unique identifier of the auth provider. It will be referred to by
+     * `AuthRequirement.provider_id`.
+     * Example: "bookstore_auth".
+     * 
+ */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object issuer_ = ""; + /** + * optional string issuer = 2; + * + *
+     * Identifies the principal that issued the JWT. See
+     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+     * Usually a URL or an email address.
+     * Example: https://securetoken.google.com
+     * Example: 1234567-compute@developer.gserviceaccount.com
+     * 
+ */ + public java.lang.String getIssuer() { + java.lang.Object ref = issuer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + issuer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string issuer = 2; + * + *
+     * Identifies the principal that issued the JWT. See
+     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+     * Usually a URL or an email address.
+     * Example: https://securetoken.google.com
+     * Example: 1234567-compute@developer.gserviceaccount.com
+     * 
+ */ + public com.google.protobuf.ByteString + getIssuerBytes() { + java.lang.Object ref = issuer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + issuer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string issuer = 2; + * + *
+     * Identifies the principal that issued the JWT. See
+     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+     * Usually a URL or an email address.
+     * Example: https://securetoken.google.com
+     * Example: 1234567-compute@developer.gserviceaccount.com
+     * 
+ */ + public Builder setIssuer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + issuer_ = value; + onChanged(); + return this; + } + /** + * optional string issuer = 2; + * + *
+     * Identifies the principal that issued the JWT. See
+     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+     * Usually a URL or an email address.
+     * Example: https://securetoken.google.com
+     * Example: 1234567-compute@developer.gserviceaccount.com
+     * 
+ */ + public Builder clearIssuer() { + + issuer_ = getDefaultInstance().getIssuer(); + onChanged(); + return this; + } + /** + * optional string issuer = 2; + * + *
+     * Identifies the principal that issued the JWT. See
+     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+     * Usually a URL or an email address.
+     * Example: https://securetoken.google.com
+     * Example: 1234567-compute@developer.gserviceaccount.com
+     * 
+ */ + public Builder setIssuerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + issuer_ = value; + onChanged(); + return this; + } + + private java.lang.Object jwksUri_ = ""; + /** + * optional string jwks_uri = 3; + * + *
+     * URL of the provider's public key set to validate signature of the JWT. See
+     * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+     * Optional if the key set document:
+     *  - can be retrieved from
+     *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
+     *    of the issuer.
+     *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
+     * Example: https://www.googleapis.com/oauth2/v1/certs
+     * 
+ */ + public java.lang.String getJwksUri() { + java.lang.Object ref = jwksUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jwksUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string jwks_uri = 3; + * + *
+     * URL of the provider's public key set to validate signature of the JWT. See
+     * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+     * Optional if the key set document:
+     *  - can be retrieved from
+     *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
+     *    of the issuer.
+     *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
+     * Example: https://www.googleapis.com/oauth2/v1/certs
+     * 
+ */ + public com.google.protobuf.ByteString + getJwksUriBytes() { + java.lang.Object ref = jwksUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jwksUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string jwks_uri = 3; + * + *
+     * URL of the provider's public key set to validate signature of the JWT. See
+     * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+     * Optional if the key set document:
+     *  - can be retrieved from
+     *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
+     *    of the issuer.
+     *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
+     * Example: https://www.googleapis.com/oauth2/v1/certs
+     * 
+ */ + public Builder setJwksUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jwksUri_ = value; + onChanged(); + return this; + } + /** + * optional string jwks_uri = 3; + * + *
+     * URL of the provider's public key set to validate signature of the JWT. See
+     * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+     * Optional if the key set document:
+     *  - can be retrieved from
+     *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
+     *    of the issuer.
+     *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
+     * Example: https://www.googleapis.com/oauth2/v1/certs
+     * 
+ */ + public Builder clearJwksUri() { + + jwksUri_ = getDefaultInstance().getJwksUri(); + onChanged(); + return this; + } + /** + * optional string jwks_uri = 3; + * + *
+     * URL of the provider's public key set to validate signature of the JWT. See
+     * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+     * Optional if the key set document:
+     *  - can be retrieved from
+     *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
+     *    of the issuer.
+     *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
+     * Example: https://www.googleapis.com/oauth2/v1/certs
+     * 
+ */ + public Builder setJwksUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jwksUri_ = value; + onChanged(); + return this; + } + 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.AuthProvider) + } + + // @@protoc_insertion_point(class_scope:google.api.AuthProvider) + private static final com.google.api.AuthProvider DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.AuthProvider(); + } + + public static com.google.api.AuthProvider getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public AuthProvider parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new AuthProvider(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.AuthProvider getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProviderOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProviderOrBuilder.java new file mode 100644 index 000000000000..d608c53c1181 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthProviderOrBuilder.java @@ -0,0 +1,89 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public interface AuthProviderOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.AuthProvider) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string id = 1; + * + *
+   * The unique identifier of the auth provider. It will be referred to by
+   * `AuthRequirement.provider_id`.
+   * Example: "bookstore_auth".
+   * 
+ */ + java.lang.String getId(); + /** + * optional string id = 1; + * + *
+   * The unique identifier of the auth provider. It will be referred to by
+   * `AuthRequirement.provider_id`.
+   * Example: "bookstore_auth".
+   * 
+ */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * optional string issuer = 2; + * + *
+   * Identifies the principal that issued the JWT. See
+   * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+   * Usually a URL or an email address.
+   * Example: https://securetoken.google.com
+   * Example: 1234567-compute@developer.gserviceaccount.com
+   * 
+ */ + java.lang.String getIssuer(); + /** + * optional string issuer = 2; + * + *
+   * Identifies the principal that issued the JWT. See
+   * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+   * Usually a URL or an email address.
+   * Example: https://securetoken.google.com
+   * Example: 1234567-compute@developer.gserviceaccount.com
+   * 
+ */ + com.google.protobuf.ByteString + getIssuerBytes(); + + /** + * optional string jwks_uri = 3; + * + *
+   * URL of the provider's public key set to validate signature of the JWT. See
+   * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+   * Optional if the key set document:
+   *  - can be retrieved from
+   *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
+   *    of the issuer.
+   *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
+   * Example: https://www.googleapis.com/oauth2/v1/certs
+   * 
+ */ + java.lang.String getJwksUri(); + /** + * optional string jwks_uri = 3; + * + *
+   * URL of the provider's public key set to validate signature of the JWT. See
+   * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+   * Optional if the key set document:
+   *  - can be retrieved from
+   *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
+   *    of the issuer.
+   *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
+   * Example: https://www.googleapis.com/oauth2/v1/certs
+   * 
+ */ + com.google.protobuf.ByteString + getJwksUriBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirement.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirement.java new file mode 100644 index 000000000000..e83a3f49df98 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirement.java @@ -0,0 +1,699 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.AuthRequirement} + * + *
+ * User-defined authentication requirements, including support for
+ * [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
+ * 
+ */ +public final class AuthRequirement extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.AuthRequirement) + AuthRequirementOrBuilder { + // Use AuthRequirement.newBuilder() to construct. + private AuthRequirement(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthRequirement() { + providerId_ = ""; + audiences_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private AuthRequirement( + 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(); + + providerId_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + audiences_ = s; + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.AuthRequirement.class, com.google.api.AuthRequirement.Builder.class); + } + + public static final int PROVIDER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object providerId_; + /** + * optional string provider_id = 1; + * + *
+   * [id][AuthProvider.id] from authentication provider.
+   * Example:
+   *     provider_id: bookstore_auth
+   * 
+ */ + public java.lang.String getProviderId() { + java.lang.Object ref = providerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerId_ = s; + return s; + } + } + /** + * optional string provider_id = 1; + * + *
+   * [id][AuthProvider.id] from authentication provider.
+   * Example:
+   *     provider_id: bookstore_auth
+   * 
+ */ + public com.google.protobuf.ByteString + getProviderIdBytes() { + java.lang.Object ref = providerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + providerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUDIENCES_FIELD_NUMBER = 2; + private volatile java.lang.Object audiences_; + /** + * optional string audiences = 2; + * + *
+   * The list of JWT
+   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+   * that are allowed to access. A JWT containing any of these audiences will
+   * be accepted. When this setting is absent, only JWTs with audience
+   * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
+   * will be accepted.
+   * Example:
+   *     audiences: bookstore_android.apps.googleusercontent.com,
+   *                bookstore_web.apps.googleusercontent.com
+   * 
+ */ + public java.lang.String getAudiences() { + java.lang.Object ref = audiences_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audiences_ = s; + return s; + } + } + /** + * optional string audiences = 2; + * + *
+   * The list of JWT
+   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+   * that are allowed to access. A JWT containing any of these audiences will
+   * be accepted. When this setting is absent, only JWTs with audience
+   * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
+   * will be accepted.
+   * Example:
+   *     audiences: bookstore_android.apps.googleusercontent.com,
+   *                bookstore_web.apps.googleusercontent.com
+   * 
+ */ + public com.google.protobuf.ByteString + getAudiencesBytes() { + java.lang.Object ref = audiences_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + audiences_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 { + if (!getProviderIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, providerId_); + } + if (!getAudiencesBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, audiences_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getProviderIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, providerId_); + } + if (!getAudiencesBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, audiences_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.AuthRequirement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.AuthRequirement 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.AuthRequirement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.AuthRequirement parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.AuthRequirement parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.AuthRequirement parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.AuthRequirement parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.AuthRequirement parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.AuthRequirement parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.AuthRequirement 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.AuthRequirement 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.AuthRequirement} + * + *
+   * User-defined authentication requirements, including support for
+   * [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.AuthRequirement) + com.google.api.AuthRequirementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.AuthRequirement.class, com.google.api.AuthRequirement.Builder.class); + } + + // Construct using com.google.api.AuthRequirement.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + providerId_ = ""; + + audiences_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_descriptor; + } + + public com.google.api.AuthRequirement getDefaultInstanceForType() { + return com.google.api.AuthRequirement.getDefaultInstance(); + } + + public com.google.api.AuthRequirement build() { + com.google.api.AuthRequirement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.AuthRequirement buildPartial() { + com.google.api.AuthRequirement result = new com.google.api.AuthRequirement(this); + result.providerId_ = providerId_; + result.audiences_ = audiences_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.AuthRequirement) { + return mergeFrom((com.google.api.AuthRequirement)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.AuthRequirement other) { + if (other == com.google.api.AuthRequirement.getDefaultInstance()) return this; + if (!other.getProviderId().isEmpty()) { + providerId_ = other.providerId_; + onChanged(); + } + if (!other.getAudiences().isEmpty()) { + audiences_ = other.audiences_; + onChanged(); + } + 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.AuthRequirement parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.AuthRequirement) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object providerId_ = ""; + /** + * optional string provider_id = 1; + * + *
+     * [id][AuthProvider.id] from authentication provider.
+     * Example:
+     *     provider_id: bookstore_auth
+     * 
+ */ + public java.lang.String getProviderId() { + java.lang.Object ref = providerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string provider_id = 1; + * + *
+     * [id][AuthProvider.id] from authentication provider.
+     * Example:
+     *     provider_id: bookstore_auth
+     * 
+ */ + public com.google.protobuf.ByteString + getProviderIdBytes() { + java.lang.Object ref = providerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + providerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string provider_id = 1; + * + *
+     * [id][AuthProvider.id] from authentication provider.
+     * Example:
+     *     provider_id: bookstore_auth
+     * 
+ */ + public Builder setProviderId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + providerId_ = value; + onChanged(); + return this; + } + /** + * optional string provider_id = 1; + * + *
+     * [id][AuthProvider.id] from authentication provider.
+     * Example:
+     *     provider_id: bookstore_auth
+     * 
+ */ + public Builder clearProviderId() { + + providerId_ = getDefaultInstance().getProviderId(); + onChanged(); + return this; + } + /** + * optional string provider_id = 1; + * + *
+     * [id][AuthProvider.id] from authentication provider.
+     * Example:
+     *     provider_id: bookstore_auth
+     * 
+ */ + public Builder setProviderIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + providerId_ = value; + onChanged(); + return this; + } + + private java.lang.Object audiences_ = ""; + /** + * optional string audiences = 2; + * + *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, only JWTs with audience
+     * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
+     * will be accepted.
+     * Example:
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ */ + public java.lang.String getAudiences() { + java.lang.Object ref = audiences_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audiences_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string audiences = 2; + * + *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, only JWTs with audience
+     * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
+     * will be accepted.
+     * Example:
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ */ + public com.google.protobuf.ByteString + getAudiencesBytes() { + java.lang.Object ref = audiences_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + audiences_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string audiences = 2; + * + *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, only JWTs with audience
+     * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
+     * will be accepted.
+     * Example:
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ */ + public Builder setAudiences( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + audiences_ = value; + onChanged(); + return this; + } + /** + * optional string audiences = 2; + * + *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, only JWTs with audience
+     * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
+     * will be accepted.
+     * Example:
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ */ + public Builder clearAudiences() { + + audiences_ = getDefaultInstance().getAudiences(); + onChanged(); + return this; + } + /** + * optional string audiences = 2; + * + *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, only JWTs with audience
+     * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
+     * will be accepted.
+     * Example:
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ */ + public Builder setAudiencesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + audiences_ = value; + onChanged(); + return this; + } + 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.AuthRequirement) + } + + // @@protoc_insertion_point(class_scope:google.api.AuthRequirement) + private static final com.google.api.AuthRequirement DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.AuthRequirement(); + } + + public static com.google.api.AuthRequirement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public AuthRequirement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new AuthRequirement(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.AuthRequirement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirementOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirementOrBuilder.java new file mode 100644 index 000000000000..3d6a2b19f76d --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthRequirementOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public interface AuthRequirementOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.AuthRequirement) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string provider_id = 1; + * + *
+   * [id][AuthProvider.id] from authentication provider.
+   * Example:
+   *     provider_id: bookstore_auth
+   * 
+ */ + java.lang.String getProviderId(); + /** + * optional string provider_id = 1; + * + *
+   * [id][AuthProvider.id] from authentication provider.
+   * Example:
+   *     provider_id: bookstore_auth
+   * 
+ */ + com.google.protobuf.ByteString + getProviderIdBytes(); + + /** + * optional string audiences = 2; + * + *
+   * The list of JWT
+   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+   * that are allowed to access. A JWT containing any of these audiences will
+   * be accepted. When this setting is absent, only JWTs with audience
+   * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
+   * will be accepted.
+   * Example:
+   *     audiences: bookstore_android.apps.googleusercontent.com,
+   *                bookstore_web.apps.googleusercontent.com
+   * 
+ */ + java.lang.String getAudiences(); + /** + * optional string audiences = 2; + * + *
+   * The list of JWT
+   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+   * that are allowed to access. A JWT containing any of these audiences will
+   * be accepted. When this setting is absent, only JWTs with audience
+   * "https://[Service_name][Service.name]/[API_name][google.protobuf.Api.name]"
+   * will be accepted.
+   * Example:
+   *     audiences: bookstore_android.apps.googleusercontent.com,
+   *                bookstore_web.apps.googleusercontent.com
+   * 
+ */ + com.google.protobuf.ByteString + getAudiencesBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Authentication.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Authentication.java new file mode 100644 index 000000000000..5a575e19ca89 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/Authentication.java @@ -0,0 +1,1205 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Authentication} + * + *
+ * (== page authentication ==)
+ * `Authentication` defines the authentication configuration for an API.
+ * Example for an API targeted for external use:
+ *     name: calendar.googleapis.com
+ *     authentication:
+ *       rules:
+ *       - selector: "*"
+ *         oauth:
+ *           canonical_scopes: https://www.googleapis.com/auth/calendar
+ *       - selector: google.calendar.Delegate
+ *         oauth:
+ *           canonical_scopes: https://www.googleapis.com/auth/calendar.read
+ * 
+ */ +public final class Authentication extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Authentication) + AuthenticationOrBuilder { + // Use Authentication.newBuilder() to construct. + private Authentication(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Authentication() { + rules_ = java.util.Collections.emptyList(); + providers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Authentication( + 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 26: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + rules_.add(input.readMessage(com.google.api.AuthenticationRule.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + providers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + providers_.add(input.readMessage(com.google.api.AuthProvider.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_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + providers_ = java.util.Collections.unmodifiableList(providers_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_Authentication_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_Authentication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Authentication.class, com.google.api.Authentication.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 3; + private java.util.List rules_; + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+   * Individual rules for authentication.
+   * 
+ */ + public java.util.List getRulesList() { + return rules_; + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+   * Individual rules for authentication.
+   * 
+ */ + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+   * Individual rules for authentication.
+   * 
+ */ + public int getRulesCount() { + return rules_.size(); + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+   * Individual rules for authentication.
+   * 
+ */ + public com.google.api.AuthenticationRule getRules(int index) { + return rules_.get(index); + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+   * Individual rules for authentication.
+   * 
+ */ + public com.google.api.AuthenticationRuleOrBuilder getRulesOrBuilder( + int index) { + return rules_.get(index); + } + + public static final int PROVIDERS_FIELD_NUMBER = 4; + private java.util.List providers_; + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ */ + public java.util.List getProvidersList() { + return providers_; + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ */ + public java.util.List + getProvidersOrBuilderList() { + return providers_; + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ */ + public int getProvidersCount() { + return providers_.size(); + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ */ + public com.google.api.AuthProvider getProviders(int index) { + return providers_.get(index); + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ */ + public com.google.api.AuthProviderOrBuilder getProvidersOrBuilder( + int index) { + return providers_.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 < rules_.size(); i++) { + output.writeMessage(3, rules_.get(i)); + } + for (int i = 0; i < providers_.size(); i++) { + output.writeMessage(4, providers_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, rules_.get(i)); + } + for (int i = 0; i < providers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, providers_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Authentication parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Authentication 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.Authentication parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Authentication parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Authentication parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Authentication parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Authentication parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Authentication parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Authentication parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Authentication 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.Authentication 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.Authentication} + * + *
+   * (== page authentication ==)
+   * `Authentication` defines the authentication configuration for an API.
+   * Example for an API targeted for external use:
+   *     name: calendar.googleapis.com
+   *     authentication:
+   *       rules:
+   *       - selector: "*"
+   *         oauth:
+   *           canonical_scopes: https://www.googleapis.com/auth/calendar
+   *       - selector: google.calendar.Delegate
+   *         oauth:
+   *           canonical_scopes: https://www.googleapis.com/auth/calendar.read
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Authentication) + com.google.api.AuthenticationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_Authentication_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_Authentication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Authentication.class, com.google.api.Authentication.Builder.class); + } + + // Construct using com.google.api.Authentication.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(); + getProvidersFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rulesBuilder_.clear(); + } + if (providersBuilder_ == null) { + providers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + providersBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.AuthProto.internal_static_google_api_Authentication_descriptor; + } + + public com.google.api.Authentication getDefaultInstanceForType() { + return com.google.api.Authentication.getDefaultInstance(); + } + + public com.google.api.Authentication build() { + com.google.api.Authentication result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Authentication buildPartial() { + com.google.api.Authentication result = new com.google.api.Authentication(this); + int from_bitField0_ = bitField0_; + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + if (providersBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + providers_ = java.util.Collections.unmodifiableList(providers_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.providers_ = providers_; + } else { + result.providers_ = providersBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Authentication) { + return mergeFrom((com.google.api.Authentication)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Authentication other) { + if (other == com.google.api.Authentication.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (providersBuilder_ == null) { + if (!other.providers_.isEmpty()) { + if (providers_.isEmpty()) { + providers_ = other.providers_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureProvidersIsMutable(); + providers_.addAll(other.providers_); + } + onChanged(); + } + } else { + if (!other.providers_.isEmpty()) { + if (providersBuilder_.isEmpty()) { + providersBuilder_.dispose(); + providersBuilder_ = null; + providers_ = other.providers_; + bitField0_ = (bitField0_ & ~0x00000002); + providersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getProvidersFieldBuilder() : null; + } else { + providersBuilder_.addAllMessages(other.providers_); + } + } + } + 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.Authentication parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Authentication) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.AuthenticationRule, com.google.api.AuthenticationRule.Builder, com.google.api.AuthenticationRuleOrBuilder> rulesBuilder_; + + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public com.google.api.AuthenticationRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.AuthenticationRule 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.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.AuthenticationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public Builder addRules(com.google.api.AuthenticationRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.AuthenticationRule 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.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public Builder addRules( + com.google.api.AuthenticationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.AuthenticationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + 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.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public com.google.api.AuthenticationRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public com.google.api.AuthenticationRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public com.google.api.AuthenticationRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.api.AuthenticationRule.getDefaultInstance()); + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public com.google.api.AuthenticationRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.api.AuthenticationRule.getDefaultInstance()); + } + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+     * Individual rules for authentication.
+     * 
+ */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.AuthenticationRule, com.google.api.AuthenticationRule.Builder, com.google.api.AuthenticationRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.AuthenticationRule, com.google.api.AuthenticationRule.Builder, com.google.api.AuthenticationRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private java.util.List providers_ = + java.util.Collections.emptyList(); + private void ensureProvidersIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + providers_ = new java.util.ArrayList(providers_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.AuthProvider, com.google.api.AuthProvider.Builder, com.google.api.AuthProviderOrBuilder> providersBuilder_; + + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public java.util.List getProvidersList() { + if (providersBuilder_ == null) { + return java.util.Collections.unmodifiableList(providers_); + } else { + return providersBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public int getProvidersCount() { + if (providersBuilder_ == null) { + return providers_.size(); + } else { + return providersBuilder_.getCount(); + } + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public com.google.api.AuthProvider getProviders(int index) { + if (providersBuilder_ == null) { + return providers_.get(index); + } else { + return providersBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public Builder setProviders( + int index, com.google.api.AuthProvider value) { + if (providersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidersIsMutable(); + providers_.set(index, value); + onChanged(); + } else { + providersBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public Builder setProviders( + int index, com.google.api.AuthProvider.Builder builderForValue) { + if (providersBuilder_ == null) { + ensureProvidersIsMutable(); + providers_.set(index, builderForValue.build()); + onChanged(); + } else { + providersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public Builder addProviders(com.google.api.AuthProvider value) { + if (providersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidersIsMutable(); + providers_.add(value); + onChanged(); + } else { + providersBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public Builder addProviders( + int index, com.google.api.AuthProvider value) { + if (providersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidersIsMutable(); + providers_.add(index, value); + onChanged(); + } else { + providersBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public Builder addProviders( + com.google.api.AuthProvider.Builder builderForValue) { + if (providersBuilder_ == null) { + ensureProvidersIsMutable(); + providers_.add(builderForValue.build()); + onChanged(); + } else { + providersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public Builder addProviders( + int index, com.google.api.AuthProvider.Builder builderForValue) { + if (providersBuilder_ == null) { + ensureProvidersIsMutable(); + providers_.add(index, builderForValue.build()); + onChanged(); + } else { + providersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public Builder addAllProviders( + java.lang.Iterable values) { + if (providersBuilder_ == null) { + ensureProvidersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, providers_); + onChanged(); + } else { + providersBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public Builder clearProviders() { + if (providersBuilder_ == null) { + providers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + providersBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public Builder removeProviders(int index) { + if (providersBuilder_ == null) { + ensureProvidersIsMutable(); + providers_.remove(index); + onChanged(); + } else { + providersBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public com.google.api.AuthProvider.Builder getProvidersBuilder( + int index) { + return getProvidersFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public com.google.api.AuthProviderOrBuilder getProvidersOrBuilder( + int index) { + if (providersBuilder_ == null) { + return providers_.get(index); } else { + return providersBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public java.util.List + getProvidersOrBuilderList() { + if (providersBuilder_ != null) { + return providersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(providers_); + } + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public com.google.api.AuthProvider.Builder addProvidersBuilder() { + return getProvidersFieldBuilder().addBuilder( + com.google.api.AuthProvider.getDefaultInstance()); + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public com.google.api.AuthProvider.Builder addProvidersBuilder( + int index) { + return getProvidersFieldBuilder().addBuilder( + index, com.google.api.AuthProvider.getDefaultInstance()); + } + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ */ + public java.util.List + getProvidersBuilderList() { + return getProvidersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.AuthProvider, com.google.api.AuthProvider.Builder, com.google.api.AuthProviderOrBuilder> + getProvidersFieldBuilder() { + if (providersBuilder_ == null) { + providersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.AuthProvider, com.google.api.AuthProvider.Builder, com.google.api.AuthProviderOrBuilder>( + providers_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + providers_ = null; + } + return providersBuilder_; + } + 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.Authentication) + } + + // @@protoc_insertion_point(class_scope:google.api.Authentication) + private static final com.google.api.Authentication DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Authentication(); + } + + public static com.google.api.Authentication getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Authentication parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Authentication(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.Authentication getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationOrBuilder.java new file mode 100644 index 000000000000..03bf8c77f326 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public interface AuthenticationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Authentication) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+   * Individual rules for authentication.
+   * 
+ */ + java.util.List + getRulesList(); + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+   * Individual rules for authentication.
+   * 
+ */ + com.google.api.AuthenticationRule getRules(int index); + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+   * Individual rules for authentication.
+   * 
+ */ + int getRulesCount(); + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+   * Individual rules for authentication.
+   * 
+ */ + java.util.List + getRulesOrBuilderList(); + /** + * repeated .google.api.AuthenticationRule rules = 3; + * + *
+   * Individual rules for authentication.
+   * 
+ */ + com.google.api.AuthenticationRuleOrBuilder getRulesOrBuilder( + int index); + + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ */ + java.util.List + getProvidersList(); + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ */ + com.google.api.AuthProvider getProviders(int index); + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ */ + int getProvidersCount(); + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ */ + java.util.List + getProvidersOrBuilderList(); + /** + * repeated .google.api.AuthProvider providers = 4; + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ */ + com.google.api.AuthProviderOrBuilder getProvidersOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRule.java new file mode 100644 index 000000000000..93bd30b82a2a --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRule.java @@ -0,0 +1,1234 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.AuthenticationRule} + * + *
+ * Authentication rules for the service.
+ * By default, if a method has any authentication requirements, every request
+ * must include a valid credential matching one of the requirements.
+ * It's an error to include more than one kind of credential in a single
+ * request.
+ * If a method doesn't have any auth requirements, request credentials will be
+ * ignored.
+ * (--GOOGLE_INTERNAL:
+ * If a method doesn't have any matching auth rules, One Platform auth isn't
+ * enforced. Instead, ESF acts as a stubby proxy. Any side channel credentials
+ * will be forwarded to the application without verification. If
+ * --enable_esf_delegation=true and --rpc_proxy_whitelist allows it, the API
+ * backend will also be sent the client's LOAS role. See
+ * wiki/Main/StubbyDelegation for more information.
+ * --)
+ * 
+ */ +public final class AuthenticationRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.AuthenticationRule) + AuthenticationRuleOrBuilder { + // Use AuthenticationRule.newBuilder() to construct. + private AuthenticationRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticationRule() { + selector_ = ""; + allowWithoutCredential_ = false; + requirements_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private AuthenticationRule( + 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(); + + selector_ = s; + break; + } + case 18: { + com.google.api.OAuthRequirements.Builder subBuilder = null; + if (oauth_ != null) { + subBuilder = oauth_.toBuilder(); + } + oauth_ = input.readMessage(com.google.api.OAuthRequirements.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(oauth_); + oauth_ = subBuilder.buildPartial(); + } + + break; + } + case 40: { + + allowWithoutCredential_ = input.readBool(); + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + requirements_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + requirements_.add(input.readMessage(com.google.api.AuthRequirement.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_ & 0x00000008) == 0x00000008)) { + requirements_ = java.util.Collections.unmodifiableList(requirements_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.AuthenticationRule.class, com.google.api.AuthenticationRule.Builder.class); + } + + private int bitField0_; + public static final int SELECTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object selector_; + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + public com.google.protobuf.ByteString + getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OAUTH_FIELD_NUMBER = 2; + private com.google.api.OAuthRequirements oauth_; + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+   * The requirements for OAuth credentials.
+   * 
+ */ + public boolean hasOauth() { + return oauth_ != null; + } + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+   * The requirements for OAuth credentials.
+   * 
+ */ + public com.google.api.OAuthRequirements getOauth() { + return oauth_ == null ? com.google.api.OAuthRequirements.getDefaultInstance() : oauth_; + } + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+   * The requirements for OAuth credentials.
+   * 
+ */ + public com.google.api.OAuthRequirementsOrBuilder getOauthOrBuilder() { + return getOauth(); + } + + public static final int ALLOW_WITHOUT_CREDENTIAL_FIELD_NUMBER = 5; + private boolean allowWithoutCredential_; + /** + * optional bool allow_without_credential = 5; + * + *
+   * Whether to allow requests without a credential.
+   * 
+ */ + public boolean getAllowWithoutCredential() { + return allowWithoutCredential_; + } + + public static final int REQUIREMENTS_FIELD_NUMBER = 7; + private java.util.List requirements_; + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+   * Requirements for additional authentication providers.
+   * 
+ */ + public java.util.List getRequirementsList() { + return requirements_; + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+   * Requirements for additional authentication providers.
+   * 
+ */ + public java.util.List + getRequirementsOrBuilderList() { + return requirements_; + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+   * Requirements for additional authentication providers.
+   * 
+ */ + public int getRequirementsCount() { + return requirements_.size(); + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+   * Requirements for additional authentication providers.
+   * 
+ */ + public com.google.api.AuthRequirement getRequirements(int index) { + return requirements_.get(index); + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+   * Requirements for additional authentication providers.
+   * 
+ */ + public com.google.api.AuthRequirementOrBuilder getRequirementsOrBuilder( + int index) { + return requirements_.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 { + if (!getSelectorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_); + } + if (oauth_ != null) { + output.writeMessage(2, getOauth()); + } + if (allowWithoutCredential_ != false) { + output.writeBool(5, allowWithoutCredential_); + } + for (int i = 0; i < requirements_.size(); i++) { + output.writeMessage(7, requirements_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSelectorBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, selector_); + } + if (oauth_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOauth()); + } + if (allowWithoutCredential_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, allowWithoutCredential_); + } + for (int i = 0; i < requirements_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, requirements_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.AuthenticationRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.AuthenticationRule 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.AuthenticationRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.AuthenticationRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.AuthenticationRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.AuthenticationRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.AuthenticationRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.AuthenticationRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.AuthenticationRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.AuthenticationRule 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.AuthenticationRule 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.AuthenticationRule} + * + *
+   * Authentication rules for the service.
+   * By default, if a method has any authentication requirements, every request
+   * must include a valid credential matching one of the requirements.
+   * It's an error to include more than one kind of credential in a single
+   * request.
+   * If a method doesn't have any auth requirements, request credentials will be
+   * ignored.
+   * (--GOOGLE_INTERNAL:
+   * If a method doesn't have any matching auth rules, One Platform auth isn't
+   * enforced. Instead, ESF acts as a stubby proxy. Any side channel credentials
+   * will be forwarded to the application without verification. If
+   * --enable_esf_delegation=true and --rpc_proxy_whitelist allows it, the API
+   * backend will also be sent the client's LOAS role. See
+   * wiki/Main/StubbyDelegation for more information.
+   * --)
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.AuthenticationRule) + com.google.api.AuthenticationRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.AuthenticationRule.class, com.google.api.AuthenticationRule.Builder.class); + } + + // Construct using com.google.api.AuthenticationRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRequirementsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + selector_ = ""; + + if (oauthBuilder_ == null) { + oauth_ = null; + } else { + oauth_ = null; + oauthBuilder_ = null; + } + allowWithoutCredential_ = false; + + if (requirementsBuilder_ == null) { + requirements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + requirementsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_descriptor; + } + + public com.google.api.AuthenticationRule getDefaultInstanceForType() { + return com.google.api.AuthenticationRule.getDefaultInstance(); + } + + public com.google.api.AuthenticationRule build() { + com.google.api.AuthenticationRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.AuthenticationRule buildPartial() { + com.google.api.AuthenticationRule result = new com.google.api.AuthenticationRule(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.selector_ = selector_; + if (oauthBuilder_ == null) { + result.oauth_ = oauth_; + } else { + result.oauth_ = oauthBuilder_.build(); + } + result.allowWithoutCredential_ = allowWithoutCredential_; + if (requirementsBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + requirements_ = java.util.Collections.unmodifiableList(requirements_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.requirements_ = requirements_; + } else { + result.requirements_ = requirementsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.AuthenticationRule) { + return mergeFrom((com.google.api.AuthenticationRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.AuthenticationRule other) { + if (other == com.google.api.AuthenticationRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + onChanged(); + } + if (other.hasOauth()) { + mergeOauth(other.getOauth()); + } + if (other.getAllowWithoutCredential() != false) { + setAllowWithoutCredential(other.getAllowWithoutCredential()); + } + if (requirementsBuilder_ == null) { + if (!other.requirements_.isEmpty()) { + if (requirements_.isEmpty()) { + requirements_ = other.requirements_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureRequirementsIsMutable(); + requirements_.addAll(other.requirements_); + } + onChanged(); + } + } else { + if (!other.requirements_.isEmpty()) { + if (requirementsBuilder_.isEmpty()) { + requirementsBuilder_.dispose(); + requirementsBuilder_ = null; + requirements_ = other.requirements_; + bitField0_ = (bitField0_ & ~0x00000008); + requirementsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRequirementsFieldBuilder() : null; + } else { + requirementsBuilder_.addAllMessages(other.requirements_); + } + } + } + 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.AuthenticationRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.AuthenticationRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public com.google.protobuf.ByteString + getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public Builder setSelector( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + selector_ = value; + onChanged(); + return this; + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public Builder clearSelector() { + + selector_ = getDefaultInstance().getSelector(); + onChanged(); + return this; + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public Builder setSelectorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + selector_ = value; + onChanged(); + return this; + } + + private com.google.api.OAuthRequirements oauth_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.OAuthRequirements, com.google.api.OAuthRequirements.Builder, com.google.api.OAuthRequirementsOrBuilder> oauthBuilder_; + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+     * The requirements for OAuth credentials.
+     * 
+ */ + public boolean hasOauth() { + return oauthBuilder_ != null || oauth_ != null; + } + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+     * The requirements for OAuth credentials.
+     * 
+ */ + public com.google.api.OAuthRequirements getOauth() { + if (oauthBuilder_ == null) { + return oauth_ == null ? com.google.api.OAuthRequirements.getDefaultInstance() : oauth_; + } else { + return oauthBuilder_.getMessage(); + } + } + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+     * The requirements for OAuth credentials.
+     * 
+ */ + public Builder setOauth(com.google.api.OAuthRequirements value) { + if (oauthBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oauth_ = value; + onChanged(); + } else { + oauthBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+     * The requirements for OAuth credentials.
+     * 
+ */ + public Builder setOauth( + com.google.api.OAuthRequirements.Builder builderForValue) { + if (oauthBuilder_ == null) { + oauth_ = builderForValue.build(); + onChanged(); + } else { + oauthBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+     * The requirements for OAuth credentials.
+     * 
+ */ + public Builder mergeOauth(com.google.api.OAuthRequirements value) { + if (oauthBuilder_ == null) { + if (oauth_ != null) { + oauth_ = + com.google.api.OAuthRequirements.newBuilder(oauth_).mergeFrom(value).buildPartial(); + } else { + oauth_ = value; + } + onChanged(); + } else { + oauthBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+     * The requirements for OAuth credentials.
+     * 
+ */ + public Builder clearOauth() { + if (oauthBuilder_ == null) { + oauth_ = null; + onChanged(); + } else { + oauth_ = null; + oauthBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+     * The requirements for OAuth credentials.
+     * 
+ */ + public com.google.api.OAuthRequirements.Builder getOauthBuilder() { + + onChanged(); + return getOauthFieldBuilder().getBuilder(); + } + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+     * The requirements for OAuth credentials.
+     * 
+ */ + public com.google.api.OAuthRequirementsOrBuilder getOauthOrBuilder() { + if (oauthBuilder_ != null) { + return oauthBuilder_.getMessageOrBuilder(); + } else { + return oauth_ == null ? + com.google.api.OAuthRequirements.getDefaultInstance() : oauth_; + } + } + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+     * The requirements for OAuth credentials.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.OAuthRequirements, com.google.api.OAuthRequirements.Builder, com.google.api.OAuthRequirementsOrBuilder> + getOauthFieldBuilder() { + if (oauthBuilder_ == null) { + oauthBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.OAuthRequirements, com.google.api.OAuthRequirements.Builder, com.google.api.OAuthRequirementsOrBuilder>( + getOauth(), + getParentForChildren(), + isClean()); + oauth_ = null; + } + return oauthBuilder_; + } + + private boolean allowWithoutCredential_ ; + /** + * optional bool allow_without_credential = 5; + * + *
+     * Whether to allow requests without a credential.
+     * 
+ */ + public boolean getAllowWithoutCredential() { + return allowWithoutCredential_; + } + /** + * optional bool allow_without_credential = 5; + * + *
+     * Whether to allow requests without a credential.
+     * 
+ */ + public Builder setAllowWithoutCredential(boolean value) { + + allowWithoutCredential_ = value; + onChanged(); + return this; + } + /** + * optional bool allow_without_credential = 5; + * + *
+     * Whether to allow requests without a credential.
+     * 
+ */ + public Builder clearAllowWithoutCredential() { + + allowWithoutCredential_ = false; + onChanged(); + return this; + } + + private java.util.List requirements_ = + java.util.Collections.emptyList(); + private void ensureRequirementsIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + requirements_ = new java.util.ArrayList(requirements_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.AuthRequirement, com.google.api.AuthRequirement.Builder, com.google.api.AuthRequirementOrBuilder> requirementsBuilder_; + + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public java.util.List getRequirementsList() { + if (requirementsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requirements_); + } else { + return requirementsBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public int getRequirementsCount() { + if (requirementsBuilder_ == null) { + return requirements_.size(); + } else { + return requirementsBuilder_.getCount(); + } + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public com.google.api.AuthRequirement getRequirements(int index) { + if (requirementsBuilder_ == null) { + return requirements_.get(index); + } else { + return requirementsBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public Builder setRequirements( + int index, com.google.api.AuthRequirement value) { + if (requirementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequirementsIsMutable(); + requirements_.set(index, value); + onChanged(); + } else { + requirementsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public Builder setRequirements( + int index, com.google.api.AuthRequirement.Builder builderForValue) { + if (requirementsBuilder_ == null) { + ensureRequirementsIsMutable(); + requirements_.set(index, builderForValue.build()); + onChanged(); + } else { + requirementsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public Builder addRequirements(com.google.api.AuthRequirement value) { + if (requirementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequirementsIsMutable(); + requirements_.add(value); + onChanged(); + } else { + requirementsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public Builder addRequirements( + int index, com.google.api.AuthRequirement value) { + if (requirementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequirementsIsMutable(); + requirements_.add(index, value); + onChanged(); + } else { + requirementsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public Builder addRequirements( + com.google.api.AuthRequirement.Builder builderForValue) { + if (requirementsBuilder_ == null) { + ensureRequirementsIsMutable(); + requirements_.add(builderForValue.build()); + onChanged(); + } else { + requirementsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public Builder addRequirements( + int index, com.google.api.AuthRequirement.Builder builderForValue) { + if (requirementsBuilder_ == null) { + ensureRequirementsIsMutable(); + requirements_.add(index, builderForValue.build()); + onChanged(); + } else { + requirementsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public Builder addAllRequirements( + java.lang.Iterable values) { + if (requirementsBuilder_ == null) { + ensureRequirementsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requirements_); + onChanged(); + } else { + requirementsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public Builder clearRequirements() { + if (requirementsBuilder_ == null) { + requirements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + requirementsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public Builder removeRequirements(int index) { + if (requirementsBuilder_ == null) { + ensureRequirementsIsMutable(); + requirements_.remove(index); + onChanged(); + } else { + requirementsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public com.google.api.AuthRequirement.Builder getRequirementsBuilder( + int index) { + return getRequirementsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public com.google.api.AuthRequirementOrBuilder getRequirementsOrBuilder( + int index) { + if (requirementsBuilder_ == null) { + return requirements_.get(index); } else { + return requirementsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public java.util.List + getRequirementsOrBuilderList() { + if (requirementsBuilder_ != null) { + return requirementsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requirements_); + } + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public com.google.api.AuthRequirement.Builder addRequirementsBuilder() { + return getRequirementsFieldBuilder().addBuilder( + com.google.api.AuthRequirement.getDefaultInstance()); + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public com.google.api.AuthRequirement.Builder addRequirementsBuilder( + int index) { + return getRequirementsFieldBuilder().addBuilder( + index, com.google.api.AuthRequirement.getDefaultInstance()); + } + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+     * Requirements for additional authentication providers.
+     * 
+ */ + public java.util.List + getRequirementsBuilderList() { + return getRequirementsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.AuthRequirement, com.google.api.AuthRequirement.Builder, com.google.api.AuthRequirementOrBuilder> + getRequirementsFieldBuilder() { + if (requirementsBuilder_ == null) { + requirementsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.AuthRequirement, com.google.api.AuthRequirement.Builder, com.google.api.AuthRequirementOrBuilder>( + requirements_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + requirements_ = null; + } + return requirementsBuilder_; + } + 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.AuthenticationRule) + } + + // @@protoc_insertion_point(class_scope:google.api.AuthenticationRule) + private static final com.google.api.AuthenticationRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.AuthenticationRule(); + } + + public static com.google.api.AuthenticationRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public AuthenticationRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new AuthenticationRule(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.AuthenticationRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRuleOrBuilder.java new file mode 100644 index 000000000000..166fa3f2c585 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/AuthenticationRuleOrBuilder.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public interface AuthenticationRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.AuthenticationRule) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + java.lang.String getSelector(); + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+   * The requirements for OAuth credentials.
+   * 
+ */ + boolean hasOauth(); + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+   * The requirements for OAuth credentials.
+   * 
+ */ + com.google.api.OAuthRequirements getOauth(); + /** + * optional .google.api.OAuthRequirements oauth = 2; + * + *
+   * The requirements for OAuth credentials.
+   * 
+ */ + com.google.api.OAuthRequirementsOrBuilder getOauthOrBuilder(); + + /** + * optional bool allow_without_credential = 5; + * + *
+   * Whether to allow requests without a credential.
+   * 
+ */ + boolean getAllowWithoutCredential(); + + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+   * Requirements for additional authentication providers.
+   * 
+ */ + java.util.List + getRequirementsList(); + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+   * Requirements for additional authentication providers.
+   * 
+ */ + com.google.api.AuthRequirement getRequirements(int index); + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+   * Requirements for additional authentication providers.
+   * 
+ */ + int getRequirementsCount(); + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+   * Requirements for additional authentication providers.
+   * 
+ */ + java.util.List + getRequirementsOrBuilderList(); + /** + * repeated .google.api.AuthRequirement requirements = 7; + * + *
+   * Requirements for additional authentication providers.
+   * 
+ */ + com.google.api.AuthRequirementOrBuilder getRequirementsOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Control.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Control.java new file mode 100644 index 000000000000..e09a286a278e --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/Control.java @@ -0,0 +1,507 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/control.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Control} + * + *
+ * Selects and configures the service controller used by the service.  The
+ * service controller handles features like abuse, quota, billing, logging,
+ * monitoring, etc.
+ * Example:
+ *     control:
+ *       environment: usagemanager.googleprod.com
+ * Supported Usage Manager environments:
+ * * `usagemanager.googleprod.com`
+ * * `staging-usagemanager.googleprod.com`
+ * Supported Service Control environments:
+ * * `servicecontrol.googleapis.com`
+ * * `staging-servicecontrol.sandbox.googleapis.com`
+ * * `testgaia-servicecontrol.sandbox.googleapis.com`
+ * 
+ */ +public final class Control extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Control) + ControlOrBuilder { + // Use Control.newBuilder() to construct. + private Control(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Control() { + environment_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Control( + 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(); + + environment_ = s; + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ControlProto.internal_static_google_api_Control_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ControlProto.internal_static_google_api_Control_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Control.class, com.google.api.Control.Builder.class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + private volatile java.lang.Object environment_; + /** + * optional string environment = 1; + * + *
+   * The service control environment to use. If empty, no control plane
+   * feature (like quota and billing) will be enabled.
+   * 
+ */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * optional string environment = 1; + * + *
+   * The service control environment to use. If empty, no control plane
+   * feature (like quota and billing) will be enabled.
+   * 
+ */ + public com.google.protobuf.ByteString + getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 { + if (!getEnvironmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, environment_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEnvironmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, environment_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Control parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Control 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.Control parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Control parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Control parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Control parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Control parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Control parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Control parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Control 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.Control 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.Control} + * + *
+   * Selects and configures the service controller used by the service.  The
+   * service controller handles features like abuse, quota, billing, logging,
+   * monitoring, etc.
+   * Example:
+   *     control:
+   *       environment: usagemanager.googleprod.com
+   * Supported Usage Manager environments:
+   * * `usagemanager.googleprod.com`
+   * * `staging-usagemanager.googleprod.com`
+   * Supported Service Control environments:
+   * * `servicecontrol.googleapis.com`
+   * * `staging-servicecontrol.sandbox.googleapis.com`
+   * * `testgaia-servicecontrol.sandbox.googleapis.com`
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Control) + com.google.api.ControlOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ControlProto.internal_static_google_api_Control_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ControlProto.internal_static_google_api_Control_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Control.class, com.google.api.Control.Builder.class); + } + + // Construct using com.google.api.Control.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + environment_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.ControlProto.internal_static_google_api_Control_descriptor; + } + + public com.google.api.Control getDefaultInstanceForType() { + return com.google.api.Control.getDefaultInstance(); + } + + public com.google.api.Control build() { + com.google.api.Control result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Control buildPartial() { + com.google.api.Control result = new com.google.api.Control(this); + result.environment_ = environment_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Control) { + return mergeFrom((com.google.api.Control)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Control other) { + if (other == com.google.api.Control.getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + onChanged(); + } + 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.Control parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Control) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object environment_ = ""; + /** + * optional string environment = 1; + * + *
+     * The service control environment to use. If empty, no control plane
+     * feature (like quota and billing) will be enabled.
+     * 
+ */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string environment = 1; + * + *
+     * The service control environment to use. If empty, no control plane
+     * feature (like quota and billing) will be enabled.
+     * 
+ */ + public com.google.protobuf.ByteString + getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string environment = 1; + * + *
+     * The service control environment to use. If empty, no control plane
+     * feature (like quota and billing) will be enabled.
+     * 
+ */ + public Builder setEnvironment( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + environment_ = value; + onChanged(); + return this; + } + /** + * optional string environment = 1; + * + *
+     * The service control environment to use. If empty, no control plane
+     * feature (like quota and billing) will be enabled.
+     * 
+ */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + * optional string environment = 1; + * + *
+     * The service control environment to use. If empty, no control plane
+     * feature (like quota and billing) will be enabled.
+     * 
+ */ + public Builder setEnvironmentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + environment_ = value; + onChanged(); + return this; + } + 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.Control) + } + + // @@protoc_insertion_point(class_scope:google.api.Control) + private static final com.google.api.Control DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Control(); + } + + public static com.google.api.Control getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Control parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Control(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.Control getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ControlOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ControlOrBuilder.java new file mode 100644 index 000000000000..3454d017d232 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/ControlOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/control.proto + +package com.google.api; + +public interface ControlOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Control) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string environment = 1; + * + *
+   * The service control environment to use. If empty, no control plane
+   * feature (like quota and billing) will be enabled.
+   * 
+ */ + java.lang.String getEnvironment(); + /** + * optional string environment = 1; + * + *
+   * The service control environment to use. If empty, no control plane
+   * feature (like quota and billing) will be enabled.
+   * 
+ */ + com.google.protobuf.ByteString + getEnvironmentBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ControlProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ControlProto.java new file mode 100644 index 000000000000..1409a6f04169 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/ControlProto.java @@ -0,0 +1,50 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/control.proto + +package com.google.api; + +public final class ControlProto { + private ControlProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Control_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Control_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030google/api/control.proto\022\ngoogle.api\"\036" + + "\n\007Control\022\023\n\013environment\030\001 \001(\tB \n\016com.go" + + "ogle.apiB\014ControlProtoP\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_api_Control_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Control_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Control_descriptor, + new java.lang.String[] { "Environment", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptor.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptor.java new file mode 100644 index 000000000000..8a760cc4815c --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptor.java @@ -0,0 +1,864 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/label.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.LabelDescriptor} + * + *
+ * A description of a label. For details, see [this document](go/api-label).
+ * 
+ */ +public final class LabelDescriptor extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.LabelDescriptor) + LabelDescriptorOrBuilder { + // Use LabelDescriptor.newBuilder() to construct. + private LabelDescriptor(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LabelDescriptor() { + key_ = ""; + valueType_ = 0; + description_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private LabelDescriptor( + 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(); + + key_ = s; + break; + } + case 16: { + int rawValue = input.readEnum(); + + valueType_ = rawValue; + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + description_ = s; + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.LabelDescriptor.class, com.google.api.LabelDescriptor.Builder.class); + } + + /** + * Protobuf enum {@code google.api.LabelDescriptor.ValueType} + * + *
+   * Value types that can be used as label values.
+   * 
+ */ + public enum ValueType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * STRING = 0; + * + *
+     * A variable-length string. This is the default.
+     * 
+ */ + STRING(0, 0), + /** + * BOOL = 1; + * + *
+     * Boolean; true or false.
+     * 
+ */ + BOOL(1, 1), + /** + * INT64 = 2; + * + *
+     * A 64-bit signed integer.
+     * 
+ */ + INT64(2, 2), + UNRECOGNIZED(-1, -1), + ; + + /** + * STRING = 0; + * + *
+     * A variable-length string. This is the default.
+     * 
+ */ + public static final int STRING_VALUE = 0; + /** + * BOOL = 1; + * + *
+     * Boolean; true or false.
+     * 
+ */ + public static final int BOOL_VALUE = 1; + /** + * INT64 = 2; + * + *
+     * A 64-bit signed integer.
+     * 
+ */ + public static final int INT64_VALUE = 2; + + + 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 ValueType valueOf(int value) { + switch (value) { + case 0: return STRING; + case 1: return BOOL; + case 2: return INT64; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ValueType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ValueType findValueByNumber(int number) { + return ValueType.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.LabelDescriptor.getDescriptor().getEnumTypes().get(0); + } + + private static final ValueType[] VALUES = values(); + + public static ValueType 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 ValueType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.LabelDescriptor.ValueType) + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object key_; + /** + * optional string key = 1; + * + *
+   * The label key. Details are described [here](go/api-label#label_keys).
+   * 
+ */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * optional string key = 1; + * + *
+   * The label key. Details are described [here](go/api-label#label_keys).
+   * 
+ */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_TYPE_FIELD_NUMBER = 2; + private int valueType_; + /** + * optional .google.api.LabelDescriptor.ValueType value_type = 2; + * + *
+   * The type of data that can be assigned to the label.
+   * 
+ */ + public int getValueTypeValue() { + return valueType_; + } + /** + * optional .google.api.LabelDescriptor.ValueType value_type = 2; + * + *
+   * The type of data that can be assigned to the label.
+   * 
+ */ + public com.google.api.LabelDescriptor.ValueType getValueType() { + com.google.api.LabelDescriptor.ValueType result = com.google.api.LabelDescriptor.ValueType.valueOf(valueType_); + return result == null ? com.google.api.LabelDescriptor.ValueType.UNRECOGNIZED : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * optional string description = 3; + * + *
+   * A human-readable description for the label.
+   * 
+ */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * optional string description = 3; + * + *
+   * A human-readable description for the label.
+   * 
+ */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + 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 { + if (!getKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, key_); + } + if (valueType_ != com.google.api.LabelDescriptor.ValueType.STRING.getNumber()) { + output.writeEnum(2, valueType_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_); + } + if (valueType_ != com.google.api.LabelDescriptor.ValueType.STRING.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, valueType_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.LabelDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.LabelDescriptor 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.LabelDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.LabelDescriptor parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.LabelDescriptor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.LabelDescriptor parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.LabelDescriptor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.LabelDescriptor parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.LabelDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.LabelDescriptor 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.LabelDescriptor 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.LabelDescriptor} + * + *
+   * A description of a label. For details, see [this document](go/api-label).
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.LabelDescriptor) + com.google.api.LabelDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.LabelDescriptor.class, com.google.api.LabelDescriptor.Builder.class); + } + + // Construct using com.google.api.LabelDescriptor.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + key_ = ""; + + valueType_ = 0; + + description_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_descriptor; + } + + public com.google.api.LabelDescriptor getDefaultInstanceForType() { + return com.google.api.LabelDescriptor.getDefaultInstance(); + } + + public com.google.api.LabelDescriptor build() { + com.google.api.LabelDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.LabelDescriptor buildPartial() { + com.google.api.LabelDescriptor result = new com.google.api.LabelDescriptor(this); + result.key_ = key_; + result.valueType_ = valueType_; + result.description_ = description_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.LabelDescriptor) { + return mergeFrom((com.google.api.LabelDescriptor)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.LabelDescriptor other) { + if (other == com.google.api.LabelDescriptor.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + if (other.valueType_ != 0) { + setValueTypeValue(other.getValueTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + 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.LabelDescriptor parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.LabelDescriptor) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object key_ = ""; + /** + * optional string key = 1; + * + *
+     * The label key. Details are described [here](go/api-label#label_keys).
+     * 
+ */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string key = 1; + * + *
+     * The label key. Details are described [here](go/api-label#label_keys).
+     * 
+ */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string key = 1; + * + *
+     * The label key. Details are described [here](go/api-label#label_keys).
+     * 
+ */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + * optional string key = 1; + * + *
+     * The label key. Details are described [here](go/api-label#label_keys).
+     * 
+ */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * optional string key = 1; + * + *
+     * The label key. Details are described [here](go/api-label#label_keys).
+     * 
+ */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + + private int valueType_ = 0; + /** + * optional .google.api.LabelDescriptor.ValueType value_type = 2; + * + *
+     * The type of data that can be assigned to the label.
+     * 
+ */ + public int getValueTypeValue() { + return valueType_; + } + /** + * optional .google.api.LabelDescriptor.ValueType value_type = 2; + * + *
+     * The type of data that can be assigned to the label.
+     * 
+ */ + public Builder setValueTypeValue(int value) { + valueType_ = value; + onChanged(); + return this; + } + /** + * optional .google.api.LabelDescriptor.ValueType value_type = 2; + * + *
+     * The type of data that can be assigned to the label.
+     * 
+ */ + public com.google.api.LabelDescriptor.ValueType getValueType() { + com.google.api.LabelDescriptor.ValueType result = com.google.api.LabelDescriptor.ValueType.valueOf(valueType_); + return result == null ? com.google.api.LabelDescriptor.ValueType.UNRECOGNIZED : result; + } + /** + * optional .google.api.LabelDescriptor.ValueType value_type = 2; + * + *
+     * The type of data that can be assigned to the label.
+     * 
+ */ + public Builder setValueType(com.google.api.LabelDescriptor.ValueType value) { + if (value == null) { + throw new NullPointerException(); + } + + valueType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.api.LabelDescriptor.ValueType value_type = 2; + * + *
+     * The type of data that can be assigned to the label.
+     * 
+ */ + public Builder clearValueType() { + + valueType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * optional string description = 3; + * + *
+     * A human-readable description for the label.
+     * 
+ */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string description = 3; + * + *
+     * A human-readable description for the label.
+     * 
+ */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string description = 3; + * + *
+     * A human-readable description for the label.
+     * 
+ */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * optional string description = 3; + * + *
+     * A human-readable description for the label.
+     * 
+ */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * optional string description = 3; + * + *
+     * A human-readable description for the label.
+     * 
+ */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + 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.LabelDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.api.LabelDescriptor) + private static final com.google.api.LabelDescriptor DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.LabelDescriptor(); + } + + public static com.google.api.LabelDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public LabelDescriptor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new LabelDescriptor(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.LabelDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptorOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptorOrBuilder.java new file mode 100644 index 000000000000..9ccfcbb24c33 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/LabelDescriptorOrBuilder.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/label.proto + +package com.google.api; + +public interface LabelDescriptorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.LabelDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string key = 1; + * + *
+   * The label key. Details are described [here](go/api-label#label_keys).
+   * 
+ */ + java.lang.String getKey(); + /** + * optional string key = 1; + * + *
+   * The label key. Details are described [here](go/api-label#label_keys).
+   * 
+ */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * optional .google.api.LabelDescriptor.ValueType value_type = 2; + * + *
+   * The type of data that can be assigned to the label.
+   * 
+ */ + int getValueTypeValue(); + /** + * optional .google.api.LabelDescriptor.ValueType value_type = 2; + * + *
+   * The type of data that can be assigned to the label.
+   * 
+ */ + com.google.api.LabelDescriptor.ValueType getValueType(); + + /** + * optional string description = 3; + * + *
+   * A human-readable description for the label.
+   * 
+ */ + java.lang.String getDescription(); + /** + * optional string description = 3; + * + *
+   * A human-readable description for the label.
+   * 
+ */ + com.google.protobuf.ByteString + getDescriptionBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LabelProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LabelProto.java new file mode 100644 index 000000000000..b7a2276a25b9 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/LabelProto.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/label.proto + +package com.google.api; + +public final class LabelProto { + private LabelProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_LabelDescriptor_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_LabelDescriptor_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026google/api/label.proto\022\ngoogle.api\"\234\001\n" + + "\017LabelDescriptor\022\013\n\003key\030\001 \001(\t\0229\n\nvalue_t" + + "ype\030\002 \001(\0162%.google.api.LabelDescriptor.V" + + "alueType\022\023\n\013description\030\003 \001(\t\",\n\tValueTy" + + "pe\022\n\n\006STRING\020\000\022\010\n\004BOOL\020\001\022\t\n\005INT64\020\002B\036\n\016c" + + "om.google.apiB\nLabelProtoP\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_api_LabelDescriptor_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_LabelDescriptor_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_LabelDescriptor_descriptor, + new java.lang.String[] { "Key", "ValueType", "Description", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptor.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptor.java new file mode 100644 index 000000000000..075036cb7859 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptor.java @@ -0,0 +1,1304 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/log.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.LogDescriptor} + * + *
+ * A description of a log type. Example in YAML format:
+ *     - name: library.googleapis.com/activity_history
+ *       description: The history of borrowing and returning library items.
+ *       display_name: Activity
+ *       labels:
+ *       - key: /customer_id
+ *         description: Identifier of a library customer
+ * 
+ */ +public final class LogDescriptor extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.LogDescriptor) + LogDescriptorOrBuilder { + // Use LogDescriptor.newBuilder() to construct. + private LogDescriptor(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LogDescriptor() { + name_ = ""; + labels_ = java.util.Collections.emptyList(); + description_ = ""; + displayName_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private LogDescriptor( + 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(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + labels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + labels_.add(input.readMessage(com.google.api.LabelDescriptor.parser(), extensionRegistry)); + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + displayName_ = s; + 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)) { + labels_ = java.util.Collections.unmodifiableList(labels_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.LogProto.internal_static_google_api_LogDescriptor_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LogProto.internal_static_google_api_LogDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.LogDescriptor.class, com.google.api.LogDescriptor.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the log. It must be less than 512 characters long and can
+   * include the following characters: upper- and lower-case alphanumeric
+   * characters [A-Za-z0-9], and punctuation characters including
+   * slash, underscore, hyphen, period [/_-.].
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * The name of the log. It must be less than 512 characters long and can
+   * include the following characters: upper- and lower-case alphanumeric
+   * characters [A-Za-z0-9], and punctuation characters including
+   * slash, underscore, hyphen, period [/_-.].
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 2; + private java.util.List labels_; + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ */ + public java.util.List getLabelsList() { + return labels_; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ */ + public java.util.List + getLabelsOrBuilderList() { + return labels_; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ */ + public int getLabelsCount() { + return labels_.size(); + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ */ + public com.google.api.LabelDescriptor getLabels(int index) { + return labels_.get(index); + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ */ + public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( + int index) { + return labels_.get(index); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * optional string description = 3; + * + *
+   * A human-readable description of this log. This information appears in
+   * the documentation and can contain details.
+   * 
+ */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * optional string description = 3; + * + *
+   * A human-readable description of this log. This information appears in
+   * the documentation and can contain details.
+   * 
+ */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object displayName_; + /** + * optional string display_name = 4; + * + *
+   * The human-readable name for this log. This information appears on
+   * the user interface and should be concise.
+   * 
+ */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * optional string display_name = 4; + * + *
+   * The human-readable name for this log. This information appears on
+   * the user interface and should be concise.
+   * 
+ */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + for (int i = 0; i < labels_.size(); i++) { + output.writeMessage(2, labels_.get(i)); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, displayName_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + for (int i = 0; i < labels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, labels_.get(i)); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, displayName_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.LogDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.LogDescriptor 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.LogDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.LogDescriptor parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.LogDescriptor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.LogDescriptor parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.LogDescriptor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.LogDescriptor parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.LogDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.LogDescriptor 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.LogDescriptor 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.LogDescriptor} + * + *
+   * A description of a log type. Example in YAML format:
+   *     - name: library.googleapis.com/activity_history
+   *       description: The history of borrowing and returning library items.
+   *       display_name: Activity
+   *       labels:
+   *       - key: /customer_id
+   *         description: Identifier of a library customer
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.LogDescriptor) + com.google.api.LogDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.LogProto.internal_static_google_api_LogDescriptor_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LogProto.internal_static_google_api_LogDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.LogDescriptor.class, com.google.api.LogDescriptor.Builder.class); + } + + // Construct using com.google.api.LogDescriptor.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getLabelsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + labelsBuilder_.clear(); + } + description_ = ""; + + displayName_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.LogProto.internal_static_google_api_LogDescriptor_descriptor; + } + + public com.google.api.LogDescriptor getDefaultInstanceForType() { + return com.google.api.LogDescriptor.getDefaultInstance(); + } + + public com.google.api.LogDescriptor build() { + com.google.api.LogDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.LogDescriptor buildPartial() { + com.google.api.LogDescriptor result = new com.google.api.LogDescriptor(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (labelsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + labels_ = java.util.Collections.unmodifiableList(labels_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.labels_ = labels_; + } else { + result.labels_ = labelsBuilder_.build(); + } + result.description_ = description_; + result.displayName_ = displayName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.LogDescriptor) { + return mergeFrom((com.google.api.LogDescriptor)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.LogDescriptor other) { + if (other == com.google.api.LogDescriptor.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (labelsBuilder_ == null) { + if (!other.labels_.isEmpty()) { + if (labels_.isEmpty()) { + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLabelsIsMutable(); + labels_.addAll(other.labels_); + } + onChanged(); + } + } else { + if (!other.labels_.isEmpty()) { + if (labelsBuilder_.isEmpty()) { + labelsBuilder_.dispose(); + labelsBuilder_ = null; + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000002); + labelsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLabelsFieldBuilder() : null; + } else { + labelsBuilder_.addAllMessages(other.labels_); + } + } + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + 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.LogDescriptor parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.LogDescriptor) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the log. It must be less than 512 characters long and can
+     * include the following characters: upper- and lower-case alphanumeric
+     * characters [A-Za-z0-9], and punctuation characters including
+     * slash, underscore, hyphen, period [/_-.].
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The name of the log. It must be less than 512 characters long and can
+     * include the following characters: upper- and lower-case alphanumeric
+     * characters [A-Za-z0-9], and punctuation characters including
+     * slash, underscore, hyphen, period [/_-.].
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The name of the log. It must be less than 512 characters long and can
+     * include the following characters: upper- and lower-case alphanumeric
+     * characters [A-Za-z0-9], and punctuation characters including
+     * slash, underscore, hyphen, period [/_-.].
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the log. It must be less than 512 characters long and can
+     * include the following characters: upper- and lower-case alphanumeric
+     * characters [A-Za-z0-9], and punctuation characters including
+     * slash, underscore, hyphen, period [/_-.].
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the log. It must be less than 512 characters long and can
+     * include the following characters: upper- and lower-case alphanumeric
+     * characters [A-Za-z0-9], and punctuation characters including
+     * slash, underscore, hyphen, period [/_-.].
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List labels_ = + java.util.Collections.emptyList(); + private void ensureLabelsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + labels_ = new java.util.ArrayList(labels_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder> labelsBuilder_; + + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public java.util.List getLabelsList() { + if (labelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labels_); + } else { + return labelsBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public int getLabelsCount() { + if (labelsBuilder_ == null) { + return labels_.size(); + } else { + return labelsBuilder_.getCount(); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public com.google.api.LabelDescriptor getLabels(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public Builder setLabels( + int index, com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.set(index, value); + onChanged(); + } else { + labelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public Builder setLabels( + int index, com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.set(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public Builder addLabels(com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(value); + onChanged(); + } else { + labelsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public Builder addLabels( + int index, com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(index, value); + onChanged(); + } else { + labelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public Builder addLabels( + com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public Builder addLabels( + int index, com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public Builder addAllLabels( + java.lang.Iterable values) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, labels_); + onChanged(); + } else { + labelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public Builder clearLabels() { + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + labelsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public Builder removeLabels(int index) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.remove(index); + onChanged(); + } else { + labelsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public com.google.api.LabelDescriptor.Builder getLabelsBuilder( + int index) { + return getLabelsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( + int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); } else { + return labelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public java.util.List + getLabelsOrBuilderList() { + if (labelsBuilder_ != null) { + return labelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labels_); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public com.google.api.LabelDescriptor.Builder addLabelsBuilder() { + return getLabelsFieldBuilder().addBuilder( + com.google.api.LabelDescriptor.getDefaultInstance()); + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public com.google.api.LabelDescriptor.Builder addLabelsBuilder( + int index) { + return getLabelsFieldBuilder().addBuilder( + index, com.google.api.LabelDescriptor.getDefaultInstance()); + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ */ + public java.util.List + getLabelsBuilderList() { + return getLabelsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder> + getLabelsFieldBuilder() { + if (labelsBuilder_ == null) { + labelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder>( + labels_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + labels_ = null; + } + return labelsBuilder_; + } + + private java.lang.Object description_ = ""; + /** + * optional string description = 3; + * + *
+     * A human-readable description of this log. This information appears in
+     * the documentation and can contain details.
+     * 
+ */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string description = 3; + * + *
+     * A human-readable description of this log. This information appears in
+     * the documentation and can contain details.
+     * 
+ */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string description = 3; + * + *
+     * A human-readable description of this log. This information appears in
+     * the documentation and can contain details.
+     * 
+ */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * optional string description = 3; + * + *
+     * A human-readable description of this log. This information appears in
+     * the documentation and can contain details.
+     * 
+ */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * optional string description = 3; + * + *
+     * A human-readable description of this log. This information appears in
+     * the documentation and can contain details.
+     * 
+ */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * optional string display_name = 4; + * + *
+     * The human-readable name for this log. This information appears on
+     * the user interface and should be concise.
+     * 
+ */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string display_name = 4; + * + *
+     * The human-readable name for this log. This information appears on
+     * the user interface and should be concise.
+     * 
+ */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string display_name = 4; + * + *
+     * The human-readable name for this log. This information appears on
+     * the user interface and should be concise.
+     * 
+ */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * optional string display_name = 4; + * + *
+     * The human-readable name for this log. This information appears on
+     * the user interface and should be concise.
+     * 
+ */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * optional string display_name = 4; + * + *
+     * The human-readable name for this log. This information appears on
+     * the user interface and should be concise.
+     * 
+ */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + 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.LogDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.api.LogDescriptor) + private static final com.google.api.LogDescriptor DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.LogDescriptor(); + } + + public static com.google.api.LogDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public LogDescriptor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new LogDescriptor(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.LogDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptorOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptorOrBuilder.java new file mode 100644 index 000000000000..cfa2c501cf17 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/LogDescriptorOrBuilder.java @@ -0,0 +1,127 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/log.proto + +package com.google.api; + +public interface LogDescriptorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.LogDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the log. It must be less than 512 characters long and can
+   * include the following characters: upper- and lower-case alphanumeric
+   * characters [A-Za-z0-9], and punctuation characters including
+   * slash, underscore, hyphen, period [/_-.].
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the log. It must be less than 512 characters long and can
+   * include the following characters: upper- and lower-case alphanumeric
+   * characters [A-Za-z0-9], and punctuation characters including
+   * slash, underscore, hyphen, period [/_-.].
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ */ + java.util.List + getLabelsList(); + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ */ + com.google.api.LabelDescriptor getLabels(int index); + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ */ + int getLabelsCount(); + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ */ + java.util.List + getLabelsOrBuilderList(); + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ */ + com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( + int index); + + /** + * optional string description = 3; + * + *
+   * A human-readable description of this log. This information appears in
+   * the documentation and can contain details.
+   * 
+ */ + java.lang.String getDescription(); + /** + * optional string description = 3; + * + *
+   * A human-readable description of this log. This information appears in
+   * the documentation and can contain details.
+   * 
+ */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + * optional string display_name = 4; + * + *
+   * The human-readable name for this log. This information appears on
+   * the user interface and should be concise.
+   * 
+ */ + java.lang.String getDisplayName(); + /** + * optional string display_name = 4; + * + *
+   * The human-readable name for this log. This information appears on
+   * the user interface and should be concise.
+   * 
+ */ + com.google.protobuf.ByteString + getDisplayNameBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LogProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LogProto.java new file mode 100644 index 000000000000..747ad84d3e13 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/LogProto.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/log.proto + +package com.google.api; + +public final class LogProto { + private LogProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_LogDescriptor_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_LogDescriptor_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024google/api/log.proto\022\ngoogle.api\032\026goog" + + "le/api/label.proto\"u\n\rLogDescriptor\022\014\n\004n" + + "ame\030\001 \001(\t\022+\n\006labels\030\002 \003(\0132\033.google.api.L" + + "abelDescriptor\022\023\n\013description\030\003 \001(\t\022\024\n\014d" + + "isplay_name\030\004 \001(\tB\034\n\016com.google.apiB\010Log" + + "ProtoP\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.LabelProto.getDescriptor(), + }, assigner); + internal_static_google_api_LogDescriptor_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_LogDescriptor_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_LogDescriptor_descriptor, + new java.lang.String[] { "Name", "Labels", "Description", "DisplayName", }); + com.google.api.LabelProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Logging.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Logging.java new file mode 100644 index 000000000000..c07fa28b7cc4 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/Logging.java @@ -0,0 +1,2176 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/logging.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Logging} + * + *
+ * Logging configuration of the service.
+ * The following example shows how to configure logs to be sent to the
+ * producer and consumer projects. In the example,
+ * the `library.googleapis.com/activity_history` log is
+ * sent to both the producer and consumer projects, whereas
+ * the `library.googleapis.com/purchase_history` log is only sent to the
+ * producer project:
+ *     monitored_resources:
+ *     - type: library.googleapis.com/branch
+ *       labels:
+ *       - key: /city
+ *         description: The city where the library branch is located in.
+ *       - key: /name
+ *         description: The name of the branch.
+ *     logs:
+ *     - name: library.googleapis.com/activity_history
+ *       labels:
+ *       - key: /customer_id
+ *     - name: library.googleapis.com/purchase_history
+ *     logging:
+ *       producer_destinations:
+ *       - monitored_resource: library.googleapis.com/branch
+ *         logs:
+ *         - library.googleapis.com/activity_history
+ *         - library.googleapis.com/purchase_history
+ *       consumer_destinations:
+ *       - monitored_resource: library.googleapis.com/branch
+ *         logs:
+ *         - library.googleapis.com/activity_history
+ * (-- GOOGLE_INTERNAL:
+ * This example shows how to configure a log to be sent to the consumer project,
+ * and skip fine grained ACL check since the service is a trusted
+ * Google service:
+ *     logging:
+ *       consumer_destination:
+ *         logs:
+ *         - library.googleapis.com/activity_history
+ *         acl:
+ *           model: SKIP
+ * --)
+ * 
+ */ +public final class Logging extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Logging) + LoggingOrBuilder { + // Use Logging.newBuilder() to construct. + private Logging(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Logging() { + producerDestinations_ = java.util.Collections.emptyList(); + consumerDestinations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Logging( + 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: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + producerDestinations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + producerDestinations_.add(input.readMessage(com.google.api.Logging.LoggingDestination.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + consumerDestinations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + consumerDestinations_.add(input.readMessage(com.google.api.Logging.LoggingDestination.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_ & 0x00000001) == 0x00000001)) { + producerDestinations_ = java.util.Collections.unmodifiableList(producerDestinations_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Logging.class, com.google.api.Logging.Builder.class); + } + + public interface LoggingDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Logging.LoggingDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string monitored_resource = 3; + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][] section.
+     * 
+ */ + java.lang.String getMonitoredResource(); + /** + * optional string monitored_resource = 3; + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][] section.
+     * 
+ */ + com.google.protobuf.ByteString + getMonitoredResourceBytes(); + + /** + * repeated string logs = 1; + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][] section.
+     * 
+ */ + com.google.protobuf.ProtocolStringList + getLogsList(); + /** + * repeated string logs = 1; + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][] section.
+     * 
+ */ + int getLogsCount(); + /** + * repeated string logs = 1; + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][] section.
+     * 
+ */ + java.lang.String getLogs(int index); + /** + * repeated string logs = 1; + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][] section.
+     * 
+ */ + com.google.protobuf.ByteString + getLogsBytes(int index); + } + /** + * Protobuf type {@code google.api.Logging.LoggingDestination} + * + *
+   * Configuration of a specific logging destination (the producer project
+   * or the consumer project).
+   * 
+ */ + public static final class LoggingDestination extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Logging.LoggingDestination) + LoggingDestinationOrBuilder { + // Use LoggingDestination.newBuilder() to construct. + private LoggingDestination(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LoggingDestination() { + monitoredResource_ = ""; + logs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private LoggingDestination( + 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)) { + logs_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + logs_.add(s); + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + monitoredResource_ = s; + 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)) { + logs_ = logs_.getUnmodifiableView(); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_LoggingDestination_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_LoggingDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Logging.LoggingDestination.class, com.google.api.Logging.LoggingDestination.Builder.class); + } + + private int bitField0_; + public static final int MONITORED_RESOURCE_FIELD_NUMBER = 3; + private volatile java.lang.Object monitoredResource_; + /** + * optional string monitored_resource = 3; + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][] section.
+     * 
+ */ + public java.lang.String getMonitoredResource() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + monitoredResource_ = s; + return s; + } + } + /** + * optional string monitored_resource = 3; + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][] section.
+     * 
+ */ + public com.google.protobuf.ByteString + getMonitoredResourceBytes() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + monitoredResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList logs_; + /** + * repeated string logs = 1; + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][] section.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getLogsList() { + return logs_; + } + /** + * repeated string logs = 1; + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][] section.
+     * 
+ */ + public int getLogsCount() { + return logs_.size(); + } + /** + * repeated string logs = 1; + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][] section.
+     * 
+ */ + public java.lang.String getLogs(int index) { + return logs_.get(index); + } + /** + * repeated string logs = 1; + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][] section.
+     * 
+ */ + public com.google.protobuf.ByteString + getLogsBytes(int index) { + return logs_.getByteString(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 < logs_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, logs_.getRaw(i)); + } + if (!getMonitoredResourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, monitoredResource_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < logs_.size(); i++) { + dataSize += computeStringSizeNoTag(logs_.getRaw(i)); + } + size += dataSize; + size += 1 * getLogsList().size(); + } + if (!getMonitoredResourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, monitoredResource_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Logging.LoggingDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Logging.LoggingDestination 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.Logging.LoggingDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Logging.LoggingDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Logging.LoggingDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Logging.LoggingDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Logging.LoggingDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Logging.LoggingDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Logging.LoggingDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Logging.LoggingDestination 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.Logging.LoggingDestination 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.Logging.LoggingDestination} + * + *
+     * Configuration of a specific logging destination (the producer project
+     * or the consumer project).
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Logging.LoggingDestination) + com.google.api.Logging.LoggingDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_LoggingDestination_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_LoggingDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Logging.LoggingDestination.class, com.google.api.Logging.LoggingDestination.Builder.class); + } + + // Construct using com.google.api.Logging.LoggingDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + monitoredResource_ = ""; + + logs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_LoggingDestination_descriptor; + } + + public com.google.api.Logging.LoggingDestination getDefaultInstanceForType() { + return com.google.api.Logging.LoggingDestination.getDefaultInstance(); + } + + public com.google.api.Logging.LoggingDestination build() { + com.google.api.Logging.LoggingDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Logging.LoggingDestination buildPartial() { + com.google.api.Logging.LoggingDestination result = new com.google.api.Logging.LoggingDestination(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.monitoredResource_ = monitoredResource_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + logs_ = logs_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.logs_ = logs_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Logging.LoggingDestination) { + return mergeFrom((com.google.api.Logging.LoggingDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Logging.LoggingDestination other) { + if (other == com.google.api.Logging.LoggingDestination.getDefaultInstance()) return this; + if (!other.getMonitoredResource().isEmpty()) { + monitoredResource_ = other.monitoredResource_; + onChanged(); + } + if (!other.logs_.isEmpty()) { + if (logs_.isEmpty()) { + logs_ = other.logs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLogsIsMutable(); + logs_.addAll(other.logs_); + } + onChanged(); + } + 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.Logging.LoggingDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Logging.LoggingDestination) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object monitoredResource_ = ""; + /** + * optional string monitored_resource = 3; + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][] section.
+       * 
+ */ + public java.lang.String getMonitoredResource() { + java.lang.Object ref = monitoredResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + monitoredResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string monitored_resource = 3; + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][] section.
+       * 
+ */ + public com.google.protobuf.ByteString + getMonitoredResourceBytes() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + monitoredResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string monitored_resource = 3; + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][] section.
+       * 
+ */ + public Builder setMonitoredResource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + monitoredResource_ = value; + onChanged(); + return this; + } + /** + * optional string monitored_resource = 3; + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][] section.
+       * 
+ */ + public Builder clearMonitoredResource() { + + monitoredResource_ = getDefaultInstance().getMonitoredResource(); + onChanged(); + return this; + } + /** + * optional string monitored_resource = 3; + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][] section.
+       * 
+ */ + public Builder setMonitoredResourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + monitoredResource_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList logs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureLogsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + logs_ = new com.google.protobuf.LazyStringArrayList(logs_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated string logs = 1; + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][] section.
+       * 
+ */ + public com.google.protobuf.ProtocolStringList + getLogsList() { + return logs_.getUnmodifiableView(); + } + /** + * repeated string logs = 1; + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][] section.
+       * 
+ */ + public int getLogsCount() { + return logs_.size(); + } + /** + * repeated string logs = 1; + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][] section.
+       * 
+ */ + public java.lang.String getLogs(int index) { + return logs_.get(index); + } + /** + * repeated string logs = 1; + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][] section.
+       * 
+ */ + public com.google.protobuf.ByteString + getLogsBytes(int index) { + return logs_.getByteString(index); + } + /** + * repeated string logs = 1; + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][] section.
+       * 
+ */ + public Builder setLogs( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string logs = 1; + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][] section.
+       * 
+ */ + public Builder addLogs( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.add(value); + onChanged(); + return this; + } + /** + * repeated string logs = 1; + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][] section.
+       * 
+ */ + public Builder addAllLogs( + java.lang.Iterable values) { + ensureLogsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, logs_); + onChanged(); + return this; + } + /** + * repeated string logs = 1; + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][] section.
+       * 
+ */ + public Builder clearLogs() { + logs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated string logs = 1; + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][] section.
+       * 
+ */ + public Builder addLogsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLogsIsMutable(); + logs_.add(value); + onChanged(); + return this; + } + 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.Logging.LoggingDestination) + } + + // @@protoc_insertion_point(class_scope:google.api.Logging.LoggingDestination) + private static final com.google.api.Logging.LoggingDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Logging.LoggingDestination(); + } + + public static com.google.api.Logging.LoggingDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public LoggingDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new LoggingDestination(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.Logging.LoggingDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int PRODUCER_DESTINATIONS_FIELD_NUMBER = 1; + private java.util.List producerDestinations_; + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ */ + public java.util.List getProducerDestinationsList() { + return producerDestinations_; + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ */ + public java.util.List + getProducerDestinationsOrBuilderList() { + return producerDestinations_; + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ */ + public int getProducerDestinationsCount() { + return producerDestinations_.size(); + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ */ + public com.google.api.Logging.LoggingDestination getProducerDestinations(int index) { + return producerDestinations_.get(index); + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ */ + public com.google.api.Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder( + int index) { + return producerDestinations_.get(index); + } + + public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER = 2; + private java.util.List consumerDestinations_; + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ */ + public java.util.List getConsumerDestinationsList() { + return consumerDestinations_; + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ */ + public java.util.List + getConsumerDestinationsOrBuilderList() { + return consumerDestinations_; + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ */ + public int getConsumerDestinationsCount() { + return consumerDestinations_.size(); + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ */ + public com.google.api.Logging.LoggingDestination getConsumerDestinations(int index) { + return consumerDestinations_.get(index); + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ */ + public com.google.api.Logging.LoggingDestinationOrBuilder getConsumerDestinationsOrBuilder( + int index) { + return consumerDestinations_.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 < producerDestinations_.size(); i++) { + output.writeMessage(1, producerDestinations_.get(i)); + } + for (int i = 0; i < consumerDestinations_.size(); i++) { + output.writeMessage(2, consumerDestinations_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < producerDestinations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, producerDestinations_.get(i)); + } + for (int i = 0; i < consumerDestinations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, consumerDestinations_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Logging parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Logging 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.Logging parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Logging parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Logging parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Logging parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Logging parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Logging parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Logging parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Logging 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.Logging 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.Logging} + * + *
+   * Logging configuration of the service.
+   * The following example shows how to configure logs to be sent to the
+   * producer and consumer projects. In the example,
+   * the `library.googleapis.com/activity_history` log is
+   * sent to both the producer and consumer projects, whereas
+   * the `library.googleapis.com/purchase_history` log is only sent to the
+   * producer project:
+   *     monitored_resources:
+   *     - type: library.googleapis.com/branch
+   *       labels:
+   *       - key: /city
+   *         description: The city where the library branch is located in.
+   *       - key: /name
+   *         description: The name of the branch.
+   *     logs:
+   *     - name: library.googleapis.com/activity_history
+   *       labels:
+   *       - key: /customer_id
+   *     - name: library.googleapis.com/purchase_history
+   *     logging:
+   *       producer_destinations:
+   *       - monitored_resource: library.googleapis.com/branch
+   *         logs:
+   *         - library.googleapis.com/activity_history
+   *         - library.googleapis.com/purchase_history
+   *       consumer_destinations:
+   *       - monitored_resource: library.googleapis.com/branch
+   *         logs:
+   *         - library.googleapis.com/activity_history
+   * (-- GOOGLE_INTERNAL:
+   * This example shows how to configure a log to be sent to the consumer project,
+   * and skip fine grained ACL check since the service is a trusted
+   * Google service:
+   *     logging:
+   *       consumer_destination:
+   *         logs:
+   *         - library.googleapis.com/activity_history
+   *         acl:
+   *           model: SKIP
+   * --)
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Logging) + com.google.api.LoggingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Logging.class, com.google.api.Logging.Builder.class); + } + + // Construct using com.google.api.Logging.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getProducerDestinationsFieldBuilder(); + getConsumerDestinationsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (producerDestinationsBuilder_ == null) { + producerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + producerDestinationsBuilder_.clear(); + } + if (consumerDestinationsBuilder_ == null) { + consumerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + consumerDestinationsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_descriptor; + } + + public com.google.api.Logging getDefaultInstanceForType() { + return com.google.api.Logging.getDefaultInstance(); + } + + public com.google.api.Logging build() { + com.google.api.Logging result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Logging buildPartial() { + com.google.api.Logging result = new com.google.api.Logging(this); + int from_bitField0_ = bitField0_; + if (producerDestinationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + producerDestinations_ = java.util.Collections.unmodifiableList(producerDestinations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.producerDestinations_ = producerDestinations_; + } else { + result.producerDestinations_ = producerDestinationsBuilder_.build(); + } + if (consumerDestinationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.consumerDestinations_ = consumerDestinations_; + } else { + result.consumerDestinations_ = consumerDestinationsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Logging) { + return mergeFrom((com.google.api.Logging)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Logging other) { + if (other == com.google.api.Logging.getDefaultInstance()) return this; + if (producerDestinationsBuilder_ == null) { + if (!other.producerDestinations_.isEmpty()) { + if (producerDestinations_.isEmpty()) { + producerDestinations_ = other.producerDestinations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProducerDestinationsIsMutable(); + producerDestinations_.addAll(other.producerDestinations_); + } + onChanged(); + } + } else { + if (!other.producerDestinations_.isEmpty()) { + if (producerDestinationsBuilder_.isEmpty()) { + producerDestinationsBuilder_.dispose(); + producerDestinationsBuilder_ = null; + producerDestinations_ = other.producerDestinations_; + bitField0_ = (bitField0_ & ~0x00000001); + producerDestinationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getProducerDestinationsFieldBuilder() : null; + } else { + producerDestinationsBuilder_.addAllMessages(other.producerDestinations_); + } + } + } + if (consumerDestinationsBuilder_ == null) { + if (!other.consumerDestinations_.isEmpty()) { + if (consumerDestinations_.isEmpty()) { + consumerDestinations_ = other.consumerDestinations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.addAll(other.consumerDestinations_); + } + onChanged(); + } + } else { + if (!other.consumerDestinations_.isEmpty()) { + if (consumerDestinationsBuilder_.isEmpty()) { + consumerDestinationsBuilder_.dispose(); + consumerDestinationsBuilder_ = null; + consumerDestinations_ = other.consumerDestinations_; + bitField0_ = (bitField0_ & ~0x00000002); + consumerDestinationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getConsumerDestinationsFieldBuilder() : null; + } else { + consumerDestinationsBuilder_.addAllMessages(other.consumerDestinations_); + } + } + } + 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.Logging parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Logging) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List producerDestinations_ = + java.util.Collections.emptyList(); + private void ensureProducerDestinationsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + producerDestinations_ = new java.util.ArrayList(producerDestinations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Logging.LoggingDestination, com.google.api.Logging.LoggingDestination.Builder, com.google.api.Logging.LoggingDestinationOrBuilder> producerDestinationsBuilder_; + + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public java.util.List getProducerDestinationsList() { + if (producerDestinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(producerDestinations_); + } else { + return producerDestinationsBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public int getProducerDestinationsCount() { + if (producerDestinationsBuilder_ == null) { + return producerDestinations_.size(); + } else { + return producerDestinationsBuilder_.getCount(); + } + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public com.google.api.Logging.LoggingDestination getProducerDestinations(int index) { + if (producerDestinationsBuilder_ == null) { + return producerDestinations_.get(index); + } else { + return producerDestinationsBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder setProducerDestinations( + int index, com.google.api.Logging.LoggingDestination value) { + if (producerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerDestinationsIsMutable(); + producerDestinations_.set(index, value); + onChanged(); + } else { + producerDestinationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder setProducerDestinations( + int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.set(index, builderForValue.build()); + onChanged(); + } else { + producerDestinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder addProducerDestinations(com.google.api.Logging.LoggingDestination value) { + if (producerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(value); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder addProducerDestinations( + int index, com.google.api.Logging.LoggingDestination value) { + if (producerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(index, value); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder addProducerDestinations( + com.google.api.Logging.LoggingDestination.Builder builderForValue) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(builderForValue.build()); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder addProducerDestinations( + int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(index, builderForValue.build()); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder addAllProducerDestinations( + java.lang.Iterable values) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, producerDestinations_); + onChanged(); + } else { + producerDestinationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder clearProducerDestinations() { + if (producerDestinationsBuilder_ == null) { + producerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + producerDestinationsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder removeProducerDestinations(int index) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.remove(index); + onChanged(); + } else { + producerDestinationsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public com.google.api.Logging.LoggingDestination.Builder getProducerDestinationsBuilder( + int index) { + return getProducerDestinationsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public com.google.api.Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder( + int index) { + if (producerDestinationsBuilder_ == null) { + return producerDestinations_.get(index); } else { + return producerDestinationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public java.util.List + getProducerDestinationsOrBuilderList() { + if (producerDestinationsBuilder_ != null) { + return producerDestinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(producerDestinations_); + } + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public com.google.api.Logging.LoggingDestination.Builder addProducerDestinationsBuilder() { + return getProducerDestinationsFieldBuilder().addBuilder( + com.google.api.Logging.LoggingDestination.getDefaultInstance()); + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public com.google.api.Logging.LoggingDestination.Builder addProducerDestinationsBuilder( + int index) { + return getProducerDestinationsFieldBuilder().addBuilder( + index, com.google.api.Logging.LoggingDestination.getDefaultInstance()); + } + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ */ + public java.util.List + getProducerDestinationsBuilderList() { + return getProducerDestinationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Logging.LoggingDestination, com.google.api.Logging.LoggingDestination.Builder, com.google.api.Logging.LoggingDestinationOrBuilder> + getProducerDestinationsFieldBuilder() { + if (producerDestinationsBuilder_ == null) { + producerDestinationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Logging.LoggingDestination, com.google.api.Logging.LoggingDestination.Builder, com.google.api.Logging.LoggingDestinationOrBuilder>( + producerDestinations_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + producerDestinations_ = null; + } + return producerDestinationsBuilder_; + } + + private java.util.List consumerDestinations_ = + java.util.Collections.emptyList(); + private void ensureConsumerDestinationsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + consumerDestinations_ = new java.util.ArrayList(consumerDestinations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Logging.LoggingDestination, com.google.api.Logging.LoggingDestination.Builder, com.google.api.Logging.LoggingDestinationOrBuilder> consumerDestinationsBuilder_; + + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public java.util.List getConsumerDestinationsList() { + if (consumerDestinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(consumerDestinations_); + } else { + return consumerDestinationsBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public int getConsumerDestinationsCount() { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.size(); + } else { + return consumerDestinationsBuilder_.getCount(); + } + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public com.google.api.Logging.LoggingDestination getConsumerDestinations(int index) { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.get(index); + } else { + return consumerDestinationsBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder setConsumerDestinations( + int index, com.google.api.Logging.LoggingDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.set(index, value); + onChanged(); + } else { + consumerDestinationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder setConsumerDestinations( + int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.set(index, builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder addConsumerDestinations(com.google.api.Logging.LoggingDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(value); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder addConsumerDestinations( + int index, com.google.api.Logging.LoggingDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(index, value); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder addConsumerDestinations( + com.google.api.Logging.LoggingDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder addConsumerDestinations( + int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(index, builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder addAllConsumerDestinations( + java.lang.Iterable values) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, consumerDestinations_); + onChanged(); + } else { + consumerDestinationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder clearConsumerDestinations() { + if (consumerDestinationsBuilder_ == null) { + consumerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + consumerDestinationsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder removeConsumerDestinations(int index) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.remove(index); + onChanged(); + } else { + consumerDestinationsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public com.google.api.Logging.LoggingDestination.Builder getConsumerDestinationsBuilder( + int index) { + return getConsumerDestinationsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public com.google.api.Logging.LoggingDestinationOrBuilder getConsumerDestinationsOrBuilder( + int index) { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.get(index); } else { + return consumerDestinationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public java.util.List + getConsumerDestinationsOrBuilderList() { + if (consumerDestinationsBuilder_ != null) { + return consumerDestinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(consumerDestinations_); + } + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public com.google.api.Logging.LoggingDestination.Builder addConsumerDestinationsBuilder() { + return getConsumerDestinationsFieldBuilder().addBuilder( + com.google.api.Logging.LoggingDestination.getDefaultInstance()); + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public com.google.api.Logging.LoggingDestination.Builder addConsumerDestinationsBuilder( + int index) { + return getConsumerDestinationsFieldBuilder().addBuilder( + index, com.google.api.Logging.LoggingDestination.getDefaultInstance()); + } + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ */ + public java.util.List + getConsumerDestinationsBuilderList() { + return getConsumerDestinationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Logging.LoggingDestination, com.google.api.Logging.LoggingDestination.Builder, com.google.api.Logging.LoggingDestinationOrBuilder> + getConsumerDestinationsFieldBuilder() { + if (consumerDestinationsBuilder_ == null) { + consumerDestinationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Logging.LoggingDestination, com.google.api.Logging.LoggingDestination.Builder, com.google.api.Logging.LoggingDestinationOrBuilder>( + consumerDestinations_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + consumerDestinations_ = null; + } + return consumerDestinationsBuilder_; + } + 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.Logging) + } + + // @@protoc_insertion_point(class_scope:google.api.Logging) + private static final com.google.api.Logging DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Logging(); + } + + public static com.google.api.Logging getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Logging parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Logging(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.Logging getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LoggingOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LoggingOrBuilder.java new file mode 100644 index 000000000000..23e37a541406 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/LoggingOrBuilder.java @@ -0,0 +1,127 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/logging.proto + +package com.google.api; + +public interface LoggingOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Logging) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ */ + java.util.List + getProducerDestinationsList(); + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ */ + com.google.api.Logging.LoggingDestination getProducerDestinations(int index); + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ */ + int getProducerDestinationsCount(); + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ */ + java.util.List + getProducerDestinationsOrBuilderList(); + /** + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ */ + com.google.api.Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder( + int index); + + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ */ + java.util.List + getConsumerDestinationsList(); + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ */ + com.google.api.Logging.LoggingDestination getConsumerDestinations(int index); + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ */ + int getConsumerDestinationsCount(); + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ */ + java.util.List + getConsumerDestinationsOrBuilderList(); + /** + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ */ + com.google.api.Logging.LoggingDestinationOrBuilder getConsumerDestinationsOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/LoggingProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/LoggingProto.java new file mode 100644 index 000000000000..191803347fcc --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/LoggingProto.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/logging.proto + +package com.google.api; + +public final class LoggingProto { + private LoggingProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Logging_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Logging_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Logging_LoggingDestination_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Logging_LoggingDestination_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030google/api/logging.proto\022\ngoogle.api\032\034" + + "google/api/annotations.proto\032\'google/api" + + "/service_control_access.proto\"\327\001\n\007Loggin" + + "g\022E\n\025producer_destinations\030\001 \003(\0132&.googl" + + "e.api.Logging.LoggingDestination\022E\n\025cons" + + "umer_destinations\030\002 \003(\0132&.google.api.Log" + + "ging.LoggingDestination\032>\n\022LoggingDestin" + + "ation\022\032\n\022monitored_resource\030\003 \001(\t\022\014\n\004log" + + "s\030\001 \003(\tB \n\016com.google.apiB\014LoggingProtoP" + + "\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ServiceControlAccessProto.getDescriptor(), + }, assigner); + internal_static_google_api_Logging_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Logging_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Logging_descriptor, + new java.lang.String[] { "ProducerDestinations", "ConsumerDestinations", }); + internal_static_google_api_Logging_LoggingDestination_descriptor = + internal_static_google_api_Logging_descriptor.getNestedTypes().get(0); + internal_static_google_api_Logging_LoggingDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Logging_LoggingDestination_descriptor, + new java.lang.String[] { "MonitoredResource", "Logs", }); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ServiceControlAccessProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptor.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptor.java new file mode 100644 index 000000000000..5bcfde55dda4 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptor.java @@ -0,0 +1,2450 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/metric.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.MetricDescriptor} + * + *
+ * A description of a type of metric.
+ * 
+ */ +public final class MetricDescriptor extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.MetricDescriptor) + MetricDescriptorOrBuilder { + // Use MetricDescriptor.newBuilder() to construct. + private MetricDescriptor(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MetricDescriptor() { + name_ = ""; + labels_ = java.util.Collections.emptyList(); + metricKind_ = 0; + valueType_ = 0; + unit_ = ""; + description_ = ""; + displayName_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private MetricDescriptor( + 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(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + labels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + labels_.add(input.readMessage(com.google.api.LabelDescriptor.parser(), extensionRegistry)); + break; + } + case 24: { + int rawValue = input.readEnum(); + + metricKind_ = rawValue; + break; + } + case 32: { + int rawValue = input.readEnum(); + + valueType_ = rawValue; + break; + } + case 42: { + String s = input.readStringRequireUtf8(); + + unit_ = s; + break; + } + case 50: { + String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 58: { + String s = input.readStringRequireUtf8(); + + displayName_ = s; + 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)) { + labels_ = java.util.Collections.unmodifiableList(labels_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MetricDescriptor.class, com.google.api.MetricDescriptor.Builder.class); + } + + /** + * Protobuf enum {@code google.api.MetricDescriptor.MetricKind} + * + *
+   * The kind of measurement. It describes how the data is reported.
+   * 
+ */ + public enum MetricKind + implements com.google.protobuf.ProtocolMessageEnum { + /** + * METRIC_KIND_UNSPECIFIED = 0; + * + *
+     * An unspecified metric kind. The metric descriptor must specify a value
+     * different from `METRIC_KIND_UNSPECIFIED`.
+     * 
+ */ + METRIC_KIND_UNSPECIFIED(0, 0), + /** + * GAUGE = 1; + * + *
+     * Instantaneous measurements of a varying quantity.
+     * 
+ */ + GAUGE(1, 1), + /** + * DELTA = 2; + * + *
+     * Changes over non-overlapping time intervals.
+     * 
+ */ + DELTA(2, 2), + /** + * CUMULATIVE = 3; + * + *
+     * Cumulative value over time intervals that can overlap.
+     * The overlapping intervals must have the same start time.
+     * 
+ */ + CUMULATIVE(3, 3), + UNRECOGNIZED(-1, -1), + ; + + /** + * METRIC_KIND_UNSPECIFIED = 0; + * + *
+     * An unspecified metric kind. The metric descriptor must specify a value
+     * different from `METRIC_KIND_UNSPECIFIED`.
+     * 
+ */ + public static final int METRIC_KIND_UNSPECIFIED_VALUE = 0; + /** + * GAUGE = 1; + * + *
+     * Instantaneous measurements of a varying quantity.
+     * 
+ */ + public static final int GAUGE_VALUE = 1; + /** + * DELTA = 2; + * + *
+     * Changes over non-overlapping time intervals.
+     * 
+ */ + public static final int DELTA_VALUE = 2; + /** + * CUMULATIVE = 3; + * + *
+     * Cumulative value over time intervals that can overlap.
+     * The overlapping intervals must have the same start time.
+     * 
+ */ + public static final int CUMULATIVE_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 MetricKind valueOf(int value) { + switch (value) { + case 0: return METRIC_KIND_UNSPECIFIED; + case 1: return GAUGE; + case 2: return DELTA; + case 3: return CUMULATIVE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + MetricKind> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetricKind findValueByNumber(int number) { + return MetricKind.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.MetricDescriptor.getDescriptor().getEnumTypes().get(0); + } + + private static final MetricKind[] VALUES = values(); + + public static MetricKind 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 MetricKind(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.MetricDescriptor.MetricKind) + } + + /** + * Protobuf enum {@code google.api.MetricDescriptor.ValueType} + * + *
+   * The value type of a metric.
+   * 
+ */ + public enum ValueType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * VALUE_TYPE_UNSPECIFIED = 0; + * + *
+     * An unspecified value type. The metric descriptor must specify a value
+     * different from `VALUE_TYPE_UNSPECIFIED`.
+     * 
+ */ + VALUE_TYPE_UNSPECIFIED(0, 0), + /** + * BOOL = 1; + * + *
+     * The value is a boolean.
+     * This value type can be used only if the metric kind is `GAUGE`.
+     * 
+ */ + BOOL(1, 1), + /** + * INT64 = 2; + * + *
+     * The value is a signed 64-bit integer.
+     * 
+ */ + INT64(2, 2), + /** + * DOUBLE = 3; + * + *
+     * The value is a double precision floating point number.
+     * 
+ */ + DOUBLE(3, 3), + /** + * STRING = 4; + * + *
+     * The value is a text string.
+     * This value type can be used only if the metric kind is `GAUGE`.
+     * 
+ */ + STRING(4, 4), + /** + * DISTRIBUTION = 5; + * + *
+     * The value is a distribution.
+     * 
+ */ + DISTRIBUTION(5, 5), + /** + * MONEY = 6; + * + *
+     * The value is money.
+     * 
+ */ + MONEY(6, 6), + UNRECOGNIZED(-1, -1), + ; + + /** + * VALUE_TYPE_UNSPECIFIED = 0; + * + *
+     * An unspecified value type. The metric descriptor must specify a value
+     * different from `VALUE_TYPE_UNSPECIFIED`.
+     * 
+ */ + public static final int VALUE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * BOOL = 1; + * + *
+     * The value is a boolean.
+     * This value type can be used only if the metric kind is `GAUGE`.
+     * 
+ */ + public static final int BOOL_VALUE = 1; + /** + * INT64 = 2; + * + *
+     * The value is a signed 64-bit integer.
+     * 
+ */ + public static final int INT64_VALUE = 2; + /** + * DOUBLE = 3; + * + *
+     * The value is a double precision floating point number.
+     * 
+ */ + public static final int DOUBLE_VALUE = 3; + /** + * STRING = 4; + * + *
+     * The value is a text string.
+     * This value type can be used only if the metric kind is `GAUGE`.
+     * 
+ */ + public static final int STRING_VALUE = 4; + /** + * DISTRIBUTION = 5; + * + *
+     * The value is a distribution.
+     * 
+ */ + public static final int DISTRIBUTION_VALUE = 5; + /** + * MONEY = 6; + * + *
+     * The value is money.
+     * 
+ */ + public static final int MONEY_VALUE = 6; + + + 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 ValueType valueOf(int value) { + switch (value) { + case 0: return VALUE_TYPE_UNSPECIFIED; + case 1: return BOOL; + case 2: return INT64; + case 3: return DOUBLE; + case 4: return STRING; + case 5: return DISTRIBUTION; + case 6: return MONEY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ValueType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ValueType findValueByNumber(int number) { + return ValueType.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.MetricDescriptor.getDescriptor().getEnumTypes().get(1); + } + + private static final ValueType[] VALUES = values(); + + public static ValueType 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 ValueType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.MetricDescriptor.ValueType) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the metric type, including a domain prefix, such as
+   * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
+   * should use a natural hierarchical grouping such as the following:
+   *     compute.googleapis.com/instance/cpu/utilization
+   *     compute.googleapis.com/instance/disk/read_ops_count
+   *     compute.googleapis.com/instance/network/received_bytes_count
+   * Note that if the metric name changes, the monitoring data will be
+   * discontinued, and anything depends on it will break, such as monitoring
+   * dashborads, alerting rules and quota limits. Therefore, once a metric has
+   * been published, its name should be immutable. You can use the display_name
+   * field to provide a user-friendly name for the metric.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * The name of the metric type, including a domain prefix, such as
+   * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
+   * should use a natural hierarchical grouping such as the following:
+   *     compute.googleapis.com/instance/cpu/utilization
+   *     compute.googleapis.com/instance/disk/read_ops_count
+   *     compute.googleapis.com/instance/network/received_bytes_count
+   * Note that if the metric name changes, the monitoring data will be
+   * discontinued, and anything depends on it will break, such as monitoring
+   * dashborads, alerting rules and quota limits. Therefore, once a metric has
+   * been published, its name should be immutable. You can use the display_name
+   * field to provide a user-friendly name for the metric.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 2; + private java.util.List labels_; + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that can be used to describe a specific instance of this
+   * metric type. For example, the
+   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+   * has a label, `loadbalanced`, that specifies whether the traffic was
+   * received through a load balanced IP address.
+   * 
+ */ + public java.util.List getLabelsList() { + return labels_; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that can be used to describe a specific instance of this
+   * metric type. For example, the
+   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+   * has a label, `loadbalanced`, that specifies whether the traffic was
+   * received through a load balanced IP address.
+   * 
+ */ + public java.util.List + getLabelsOrBuilderList() { + return labels_; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that can be used to describe a specific instance of this
+   * metric type. For example, the
+   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+   * has a label, `loadbalanced`, that specifies whether the traffic was
+   * received through a load balanced IP address.
+   * 
+ */ + public int getLabelsCount() { + return labels_.size(); + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that can be used to describe a specific instance of this
+   * metric type. For example, the
+   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+   * has a label, `loadbalanced`, that specifies whether the traffic was
+   * received through a load balanced IP address.
+   * 
+ */ + public com.google.api.LabelDescriptor getLabels(int index) { + return labels_.get(index); + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that can be used to describe a specific instance of this
+   * metric type. For example, the
+   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+   * has a label, `loadbalanced`, that specifies whether the traffic was
+   * received through a load balanced IP address.
+   * 
+ */ + public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( + int index) { + return labels_.get(index); + } + + public static final int METRIC_KIND_FIELD_NUMBER = 3; + private int metricKind_; + /** + * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + *
+   * Whether the metric records instantaneous values, changes to a value, etc.
+   * 
+ */ + public int getMetricKindValue() { + return metricKind_; + } + /** + * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + *
+   * Whether the metric records instantaneous values, changes to a value, etc.
+   * 
+ */ + public com.google.api.MetricDescriptor.MetricKind getMetricKind() { + com.google.api.MetricDescriptor.MetricKind result = com.google.api.MetricDescriptor.MetricKind.valueOf(metricKind_); + return result == null ? com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED : result; + } + + public static final int VALUE_TYPE_FIELD_NUMBER = 4; + private int valueType_; + /** + * optional .google.api.MetricDescriptor.ValueType value_type = 4; + * + *
+   * Whether the measurement is an integer, a floating-point number, etc.
+   * 
+ */ + public int getValueTypeValue() { + return valueType_; + } + /** + * optional .google.api.MetricDescriptor.ValueType value_type = 4; + * + *
+   * Whether the measurement is an integer, a floating-point number, etc.
+   * 
+ */ + public com.google.api.MetricDescriptor.ValueType getValueType() { + com.google.api.MetricDescriptor.ValueType result = com.google.api.MetricDescriptor.ValueType.valueOf(valueType_); + return result == null ? com.google.api.MetricDescriptor.ValueType.UNRECOGNIZED : result; + } + + public static final int UNIT_FIELD_NUMBER = 5; + private volatile java.lang.Object unit_; + /** + * optional string unit = 5; + * + *
+   * The unit in which the metric value is reported. It is only applicable
+   * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
+   * supported units are a subset of [The Unified Code for Units of
+   * Measure](http://unitsofmeasure.org/ucum.html) standard:
+   * **Basic units (UNIT)**
+   * * `bit`   bit
+   * * `By`    byte
+   * * `s`     second
+   * * `min`   minute
+   * * `h`     hour
+   * * `d`     day
+   * **Prefixes (PREFIX)**
+   * * `k`     kilo    (10**3)
+   * * `M`     mega    (10**6)
+   * * `G`     giga    (10**9)
+   * * `T`     tera    (10**12)
+   * * `P`     peta    (10**15)
+   * * `E`     exa     (10**18)
+   * * `Z`     zetta   (10**21)
+   * * `Y`     yotta   (10**24)
+   * * `m`     milli   (10**-3)
+   * * `u`     micro   (10**-6)
+   * * `n`     nano    (10**-9)
+   * * `p`     pico    (10**-12)
+   * * `f`     femto   (10**-15)
+   * * `a`     atto    (10**-18)
+   * * `z`     zepto   (10**-21)
+   * * `y`     yocto   (10**-24)
+   * * `Ki`    kibi    (2**10)
+   * * `Mi`    mebi    (2**20)
+   * * `Gi`    gibi    (2**30)
+   * * `Ti`    tebi    (2**40)
+   * **Grammar**
+   * The grammar includes the dimensionless unit `1`, such as `1/s`.
+   * The grammar also includes these connectors:
+   * * `/`    division (as an infix operator, e.g. `1/s`).
+   * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
+   * The grammar for a unit is as follows:
+   *     Expression = Component { "." Component } { "/" Component } ;
+   *     Component = [ PREFIX ] UNIT [ Annotation ]
+   *               | Annotation
+   *               | "1"
+   *               ;
+   *     Annotation = "{" NAME "}" ;
+   * Notes:
+   * * `Annotation` is just a comment if it follows a `UNIT` and is
+   *    equivalent to `1` if it is used alone. For examples,
+   *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
+   * * `NAME` is a sequence of non-blank printable ASCII characters not
+   *    containing '{' or '}'.
+   * 
+ */ + public java.lang.String getUnit() { + java.lang.Object ref = unit_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + unit_ = s; + return s; + } + } + /** + * optional string unit = 5; + * + *
+   * The unit in which the metric value is reported. It is only applicable
+   * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
+   * supported units are a subset of [The Unified Code for Units of
+   * Measure](http://unitsofmeasure.org/ucum.html) standard:
+   * **Basic units (UNIT)**
+   * * `bit`   bit
+   * * `By`    byte
+   * * `s`     second
+   * * `min`   minute
+   * * `h`     hour
+   * * `d`     day
+   * **Prefixes (PREFIX)**
+   * * `k`     kilo    (10**3)
+   * * `M`     mega    (10**6)
+   * * `G`     giga    (10**9)
+   * * `T`     tera    (10**12)
+   * * `P`     peta    (10**15)
+   * * `E`     exa     (10**18)
+   * * `Z`     zetta   (10**21)
+   * * `Y`     yotta   (10**24)
+   * * `m`     milli   (10**-3)
+   * * `u`     micro   (10**-6)
+   * * `n`     nano    (10**-9)
+   * * `p`     pico    (10**-12)
+   * * `f`     femto   (10**-15)
+   * * `a`     atto    (10**-18)
+   * * `z`     zepto   (10**-21)
+   * * `y`     yocto   (10**-24)
+   * * `Ki`    kibi    (2**10)
+   * * `Mi`    mebi    (2**20)
+   * * `Gi`    gibi    (2**30)
+   * * `Ti`    tebi    (2**40)
+   * **Grammar**
+   * The grammar includes the dimensionless unit `1`, such as `1/s`.
+   * The grammar also includes these connectors:
+   * * `/`    division (as an infix operator, e.g. `1/s`).
+   * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
+   * The grammar for a unit is as follows:
+   *     Expression = Component { "." Component } { "/" Component } ;
+   *     Component = [ PREFIX ] UNIT [ Annotation ]
+   *               | Annotation
+   *               | "1"
+   *               ;
+   *     Annotation = "{" NAME "}" ;
+   * Notes:
+   * * `Annotation` is just a comment if it follows a `UNIT` and is
+   *    equivalent to `1` if it is used alone. For examples,
+   *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
+   * * `NAME` is a sequence of non-blank printable ASCII characters not
+   *    containing '{' or '}'.
+   * 
+ */ + public com.google.protobuf.ByteString + getUnitBytes() { + java.lang.Object ref = unit_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + unit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + private volatile java.lang.Object description_; + /** + * optional string description = 6; + * + *
+   * A detailed description of the monitored resource type, which is used in
+   * documentation.
+   * 
+ */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * optional string description = 6; + * + *
+   * A detailed description of the monitored resource type, which is used in
+   * documentation.
+   * 
+ */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 7; + private volatile java.lang.Object displayName_; + /** + * optional string display_name = 7; + * + *
+   * A concise name for the monitored resource type, which is displayed in user
+   * interfaces.
+   * 
+ */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * optional string display_name = 7; + * + *
+   * A concise name for the monitored resource type, which is displayed in user
+   * interfaces.
+   * 
+ */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + for (int i = 0; i < labels_.size(); i++) { + output.writeMessage(2, labels_.get(i)); + } + if (metricKind_ != com.google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(3, metricKind_); + } + if (valueType_ != com.google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, valueType_); + } + if (!getUnitBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, unit_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, description_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, displayName_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + for (int i = 0; i < labels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, labels_.get(i)); + } + if (metricKind_ != com.google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, metricKind_); + } + if (valueType_ != com.google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, valueType_); + } + if (!getUnitBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, unit_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, displayName_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.MetricDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MetricDescriptor 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.MetricDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MetricDescriptor parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.MetricDescriptor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MetricDescriptor parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.MetricDescriptor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.MetricDescriptor parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.MetricDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MetricDescriptor 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.MetricDescriptor 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.MetricDescriptor} + * + *
+   * A description of a type of metric.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.MetricDescriptor) + com.google.api.MetricDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MetricDescriptor.class, com.google.api.MetricDescriptor.Builder.class); + } + + // Construct using com.google.api.MetricDescriptor.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getLabelsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + labelsBuilder_.clear(); + } + metricKind_ = 0; + + valueType_ = 0; + + unit_ = ""; + + description_ = ""; + + displayName_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_descriptor; + } + + public com.google.api.MetricDescriptor getDefaultInstanceForType() { + return com.google.api.MetricDescriptor.getDefaultInstance(); + } + + public com.google.api.MetricDescriptor build() { + com.google.api.MetricDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.MetricDescriptor buildPartial() { + com.google.api.MetricDescriptor result = new com.google.api.MetricDescriptor(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (labelsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + labels_ = java.util.Collections.unmodifiableList(labels_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.labels_ = labels_; + } else { + result.labels_ = labelsBuilder_.build(); + } + result.metricKind_ = metricKind_; + result.valueType_ = valueType_; + result.unit_ = unit_; + result.description_ = description_; + result.displayName_ = displayName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MetricDescriptor) { + return mergeFrom((com.google.api.MetricDescriptor)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MetricDescriptor other) { + if (other == com.google.api.MetricDescriptor.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (labelsBuilder_ == null) { + if (!other.labels_.isEmpty()) { + if (labels_.isEmpty()) { + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLabelsIsMutable(); + labels_.addAll(other.labels_); + } + onChanged(); + } + } else { + if (!other.labels_.isEmpty()) { + if (labelsBuilder_.isEmpty()) { + labelsBuilder_.dispose(); + labelsBuilder_ = null; + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000002); + labelsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLabelsFieldBuilder() : null; + } else { + labelsBuilder_.addAllMessages(other.labels_); + } + } + } + if (other.metricKind_ != 0) { + setMetricKindValue(other.getMetricKindValue()); + } + if (other.valueType_ != 0) { + setValueTypeValue(other.getValueTypeValue()); + } + if (!other.getUnit().isEmpty()) { + unit_ = other.unit_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + 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.MetricDescriptor parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.MetricDescriptor) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the metric type, including a domain prefix, such as
+     * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
+     * should use a natural hierarchical grouping such as the following:
+     *     compute.googleapis.com/instance/cpu/utilization
+     *     compute.googleapis.com/instance/disk/read_ops_count
+     *     compute.googleapis.com/instance/network/received_bytes_count
+     * Note that if the metric name changes, the monitoring data will be
+     * discontinued, and anything depends on it will break, such as monitoring
+     * dashborads, alerting rules and quota limits. Therefore, once a metric has
+     * been published, its name should be immutable. You can use the display_name
+     * field to provide a user-friendly name for the metric.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The name of the metric type, including a domain prefix, such as
+     * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
+     * should use a natural hierarchical grouping such as the following:
+     *     compute.googleapis.com/instance/cpu/utilization
+     *     compute.googleapis.com/instance/disk/read_ops_count
+     *     compute.googleapis.com/instance/network/received_bytes_count
+     * Note that if the metric name changes, the monitoring data will be
+     * discontinued, and anything depends on it will break, such as monitoring
+     * dashborads, alerting rules and quota limits. Therefore, once a metric has
+     * been published, its name should be immutable. You can use the display_name
+     * field to provide a user-friendly name for the metric.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The name of the metric type, including a domain prefix, such as
+     * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
+     * should use a natural hierarchical grouping such as the following:
+     *     compute.googleapis.com/instance/cpu/utilization
+     *     compute.googleapis.com/instance/disk/read_ops_count
+     *     compute.googleapis.com/instance/network/received_bytes_count
+     * Note that if the metric name changes, the monitoring data will be
+     * discontinued, and anything depends on it will break, such as monitoring
+     * dashborads, alerting rules and quota limits. Therefore, once a metric has
+     * been published, its name should be immutable. You can use the display_name
+     * field to provide a user-friendly name for the metric.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the metric type, including a domain prefix, such as
+     * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
+     * should use a natural hierarchical grouping such as the following:
+     *     compute.googleapis.com/instance/cpu/utilization
+     *     compute.googleapis.com/instance/disk/read_ops_count
+     *     compute.googleapis.com/instance/network/received_bytes_count
+     * Note that if the metric name changes, the monitoring data will be
+     * discontinued, and anything depends on it will break, such as monitoring
+     * dashborads, alerting rules and quota limits. Therefore, once a metric has
+     * been published, its name should be immutable. You can use the display_name
+     * field to provide a user-friendly name for the metric.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the metric type, including a domain prefix, such as
+     * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
+     * should use a natural hierarchical grouping such as the following:
+     *     compute.googleapis.com/instance/cpu/utilization
+     *     compute.googleapis.com/instance/disk/read_ops_count
+     *     compute.googleapis.com/instance/network/received_bytes_count
+     * Note that if the metric name changes, the monitoring data will be
+     * discontinued, and anything depends on it will break, such as monitoring
+     * dashborads, alerting rules and quota limits. Therefore, once a metric has
+     * been published, its name should be immutable. You can use the display_name
+     * field to provide a user-friendly name for the metric.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List labels_ = + java.util.Collections.emptyList(); + private void ensureLabelsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + labels_ = new java.util.ArrayList(labels_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder> labelsBuilder_; + + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public java.util.List getLabelsList() { + if (labelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labels_); + } else { + return labelsBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public int getLabelsCount() { + if (labelsBuilder_ == null) { + return labels_.size(); + } else { + return labelsBuilder_.getCount(); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public com.google.api.LabelDescriptor getLabels(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public Builder setLabels( + int index, com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.set(index, value); + onChanged(); + } else { + labelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public Builder setLabels( + int index, com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.set(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public Builder addLabels(com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(value); + onChanged(); + } else { + labelsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public Builder addLabels( + int index, com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(index, value); + onChanged(); + } else { + labelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public Builder addLabels( + com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public Builder addLabels( + int index, com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public Builder addAllLabels( + java.lang.Iterable values) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, labels_); + onChanged(); + } else { + labelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public Builder clearLabels() { + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + labelsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public Builder removeLabels(int index) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.remove(index); + onChanged(); + } else { + labelsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public com.google.api.LabelDescriptor.Builder getLabelsBuilder( + int index) { + return getLabelsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( + int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); } else { + return labelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public java.util.List + getLabelsOrBuilderList() { + if (labelsBuilder_ != null) { + return labelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labels_); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public com.google.api.LabelDescriptor.Builder addLabelsBuilder() { + return getLabelsFieldBuilder().addBuilder( + com.google.api.LabelDescriptor.getDefaultInstance()); + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public com.google.api.LabelDescriptor.Builder addLabelsBuilder( + int index) { + return getLabelsFieldBuilder().addBuilder( + index, com.google.api.LabelDescriptor.getDefaultInstance()); + } + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+     * The set of labels that can be used to describe a specific instance of this
+     * metric type. For example, the
+     * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+     * has a label, `loadbalanced`, that specifies whether the traffic was
+     * received through a load balanced IP address.
+     * 
+ */ + public java.util.List + getLabelsBuilderList() { + return getLabelsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder> + getLabelsFieldBuilder() { + if (labelsBuilder_ == null) { + labelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder>( + labels_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + labels_ = null; + } + return labelsBuilder_; + } + + private int metricKind_ = 0; + /** + * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + *
+     * Whether the metric records instantaneous values, changes to a value, etc.
+     * 
+ */ + public int getMetricKindValue() { + return metricKind_; + } + /** + * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + *
+     * Whether the metric records instantaneous values, changes to a value, etc.
+     * 
+ */ + public Builder setMetricKindValue(int value) { + metricKind_ = value; + onChanged(); + return this; + } + /** + * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + *
+     * Whether the metric records instantaneous values, changes to a value, etc.
+     * 
+ */ + public com.google.api.MetricDescriptor.MetricKind getMetricKind() { + com.google.api.MetricDescriptor.MetricKind result = com.google.api.MetricDescriptor.MetricKind.valueOf(metricKind_); + return result == null ? com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED : result; + } + /** + * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + *
+     * Whether the metric records instantaneous values, changes to a value, etc.
+     * 
+ */ + public Builder setMetricKind(com.google.api.MetricDescriptor.MetricKind value) { + if (value == null) { + throw new NullPointerException(); + } + + metricKind_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + *
+     * Whether the metric records instantaneous values, changes to a value, etc.
+     * 
+ */ + public Builder clearMetricKind() { + + metricKind_ = 0; + onChanged(); + return this; + } + + private int valueType_ = 0; + /** + * optional .google.api.MetricDescriptor.ValueType value_type = 4; + * + *
+     * Whether the measurement is an integer, a floating-point number, etc.
+     * 
+ */ + public int getValueTypeValue() { + return valueType_; + } + /** + * optional .google.api.MetricDescriptor.ValueType value_type = 4; + * + *
+     * Whether the measurement is an integer, a floating-point number, etc.
+     * 
+ */ + public Builder setValueTypeValue(int value) { + valueType_ = value; + onChanged(); + return this; + } + /** + * optional .google.api.MetricDescriptor.ValueType value_type = 4; + * + *
+     * Whether the measurement is an integer, a floating-point number, etc.
+     * 
+ */ + public com.google.api.MetricDescriptor.ValueType getValueType() { + com.google.api.MetricDescriptor.ValueType result = com.google.api.MetricDescriptor.ValueType.valueOf(valueType_); + return result == null ? com.google.api.MetricDescriptor.ValueType.UNRECOGNIZED : result; + } + /** + * optional .google.api.MetricDescriptor.ValueType value_type = 4; + * + *
+     * Whether the measurement is an integer, a floating-point number, etc.
+     * 
+ */ + public Builder setValueType(com.google.api.MetricDescriptor.ValueType value) { + if (value == null) { + throw new NullPointerException(); + } + + valueType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.api.MetricDescriptor.ValueType value_type = 4; + * + *
+     * Whether the measurement is an integer, a floating-point number, etc.
+     * 
+ */ + public Builder clearValueType() { + + valueType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object unit_ = ""; + /** + * optional string unit = 5; + * + *
+     * The unit in which the metric value is reported. It is only applicable
+     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
+     * supported units are a subset of [The Unified Code for Units of
+     * Measure](http://unitsofmeasure.org/ucum.html) standard:
+     * **Basic units (UNIT)**
+     * * `bit`   bit
+     * * `By`    byte
+     * * `s`     second
+     * * `min`   minute
+     * * `h`     hour
+     * * `d`     day
+     * **Prefixes (PREFIX)**
+     * * `k`     kilo    (10**3)
+     * * `M`     mega    (10**6)
+     * * `G`     giga    (10**9)
+     * * `T`     tera    (10**12)
+     * * `P`     peta    (10**15)
+     * * `E`     exa     (10**18)
+     * * `Z`     zetta   (10**21)
+     * * `Y`     yotta   (10**24)
+     * * `m`     milli   (10**-3)
+     * * `u`     micro   (10**-6)
+     * * `n`     nano    (10**-9)
+     * * `p`     pico    (10**-12)
+     * * `f`     femto   (10**-15)
+     * * `a`     atto    (10**-18)
+     * * `z`     zepto   (10**-21)
+     * * `y`     yocto   (10**-24)
+     * * `Ki`    kibi    (2**10)
+     * * `Mi`    mebi    (2**20)
+     * * `Gi`    gibi    (2**30)
+     * * `Ti`    tebi    (2**40)
+     * **Grammar**
+     * The grammar includes the dimensionless unit `1`, such as `1/s`.
+     * The grammar also includes these connectors:
+     * * `/`    division (as an infix operator, e.g. `1/s`).
+     * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
+     * The grammar for a unit is as follows:
+     *     Expression = Component { "." Component } { "/" Component } ;
+     *     Component = [ PREFIX ] UNIT [ Annotation ]
+     *               | Annotation
+     *               | "1"
+     *               ;
+     *     Annotation = "{" NAME "}" ;
+     * Notes:
+     * * `Annotation` is just a comment if it follows a `UNIT` and is
+     *    equivalent to `1` if it is used alone. For examples,
+     *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
+     * * `NAME` is a sequence of non-blank printable ASCII characters not
+     *    containing '{' or '}'.
+     * 
+ */ + public java.lang.String getUnit() { + java.lang.Object ref = unit_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + unit_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string unit = 5; + * + *
+     * The unit in which the metric value is reported. It is only applicable
+     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
+     * supported units are a subset of [The Unified Code for Units of
+     * Measure](http://unitsofmeasure.org/ucum.html) standard:
+     * **Basic units (UNIT)**
+     * * `bit`   bit
+     * * `By`    byte
+     * * `s`     second
+     * * `min`   minute
+     * * `h`     hour
+     * * `d`     day
+     * **Prefixes (PREFIX)**
+     * * `k`     kilo    (10**3)
+     * * `M`     mega    (10**6)
+     * * `G`     giga    (10**9)
+     * * `T`     tera    (10**12)
+     * * `P`     peta    (10**15)
+     * * `E`     exa     (10**18)
+     * * `Z`     zetta   (10**21)
+     * * `Y`     yotta   (10**24)
+     * * `m`     milli   (10**-3)
+     * * `u`     micro   (10**-6)
+     * * `n`     nano    (10**-9)
+     * * `p`     pico    (10**-12)
+     * * `f`     femto   (10**-15)
+     * * `a`     atto    (10**-18)
+     * * `z`     zepto   (10**-21)
+     * * `y`     yocto   (10**-24)
+     * * `Ki`    kibi    (2**10)
+     * * `Mi`    mebi    (2**20)
+     * * `Gi`    gibi    (2**30)
+     * * `Ti`    tebi    (2**40)
+     * **Grammar**
+     * The grammar includes the dimensionless unit `1`, such as `1/s`.
+     * The grammar also includes these connectors:
+     * * `/`    division (as an infix operator, e.g. `1/s`).
+     * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
+     * The grammar for a unit is as follows:
+     *     Expression = Component { "." Component } { "/" Component } ;
+     *     Component = [ PREFIX ] UNIT [ Annotation ]
+     *               | Annotation
+     *               | "1"
+     *               ;
+     *     Annotation = "{" NAME "}" ;
+     * Notes:
+     * * `Annotation` is just a comment if it follows a `UNIT` and is
+     *    equivalent to `1` if it is used alone. For examples,
+     *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
+     * * `NAME` is a sequence of non-blank printable ASCII characters not
+     *    containing '{' or '}'.
+     * 
+ */ + public com.google.protobuf.ByteString + getUnitBytes() { + java.lang.Object ref = unit_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + unit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string unit = 5; + * + *
+     * The unit in which the metric value is reported. It is only applicable
+     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
+     * supported units are a subset of [The Unified Code for Units of
+     * Measure](http://unitsofmeasure.org/ucum.html) standard:
+     * **Basic units (UNIT)**
+     * * `bit`   bit
+     * * `By`    byte
+     * * `s`     second
+     * * `min`   minute
+     * * `h`     hour
+     * * `d`     day
+     * **Prefixes (PREFIX)**
+     * * `k`     kilo    (10**3)
+     * * `M`     mega    (10**6)
+     * * `G`     giga    (10**9)
+     * * `T`     tera    (10**12)
+     * * `P`     peta    (10**15)
+     * * `E`     exa     (10**18)
+     * * `Z`     zetta   (10**21)
+     * * `Y`     yotta   (10**24)
+     * * `m`     milli   (10**-3)
+     * * `u`     micro   (10**-6)
+     * * `n`     nano    (10**-9)
+     * * `p`     pico    (10**-12)
+     * * `f`     femto   (10**-15)
+     * * `a`     atto    (10**-18)
+     * * `z`     zepto   (10**-21)
+     * * `y`     yocto   (10**-24)
+     * * `Ki`    kibi    (2**10)
+     * * `Mi`    mebi    (2**20)
+     * * `Gi`    gibi    (2**30)
+     * * `Ti`    tebi    (2**40)
+     * **Grammar**
+     * The grammar includes the dimensionless unit `1`, such as `1/s`.
+     * The grammar also includes these connectors:
+     * * `/`    division (as an infix operator, e.g. `1/s`).
+     * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
+     * The grammar for a unit is as follows:
+     *     Expression = Component { "." Component } { "/" Component } ;
+     *     Component = [ PREFIX ] UNIT [ Annotation ]
+     *               | Annotation
+     *               | "1"
+     *               ;
+     *     Annotation = "{" NAME "}" ;
+     * Notes:
+     * * `Annotation` is just a comment if it follows a `UNIT` and is
+     *    equivalent to `1` if it is used alone. For examples,
+     *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
+     * * `NAME` is a sequence of non-blank printable ASCII characters not
+     *    containing '{' or '}'.
+     * 
+ */ + public Builder setUnit( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + unit_ = value; + onChanged(); + return this; + } + /** + * optional string unit = 5; + * + *
+     * The unit in which the metric value is reported. It is only applicable
+     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
+     * supported units are a subset of [The Unified Code for Units of
+     * Measure](http://unitsofmeasure.org/ucum.html) standard:
+     * **Basic units (UNIT)**
+     * * `bit`   bit
+     * * `By`    byte
+     * * `s`     second
+     * * `min`   minute
+     * * `h`     hour
+     * * `d`     day
+     * **Prefixes (PREFIX)**
+     * * `k`     kilo    (10**3)
+     * * `M`     mega    (10**6)
+     * * `G`     giga    (10**9)
+     * * `T`     tera    (10**12)
+     * * `P`     peta    (10**15)
+     * * `E`     exa     (10**18)
+     * * `Z`     zetta   (10**21)
+     * * `Y`     yotta   (10**24)
+     * * `m`     milli   (10**-3)
+     * * `u`     micro   (10**-6)
+     * * `n`     nano    (10**-9)
+     * * `p`     pico    (10**-12)
+     * * `f`     femto   (10**-15)
+     * * `a`     atto    (10**-18)
+     * * `z`     zepto   (10**-21)
+     * * `y`     yocto   (10**-24)
+     * * `Ki`    kibi    (2**10)
+     * * `Mi`    mebi    (2**20)
+     * * `Gi`    gibi    (2**30)
+     * * `Ti`    tebi    (2**40)
+     * **Grammar**
+     * The grammar includes the dimensionless unit `1`, such as `1/s`.
+     * The grammar also includes these connectors:
+     * * `/`    division (as an infix operator, e.g. `1/s`).
+     * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
+     * The grammar for a unit is as follows:
+     *     Expression = Component { "." Component } { "/" Component } ;
+     *     Component = [ PREFIX ] UNIT [ Annotation ]
+     *               | Annotation
+     *               | "1"
+     *               ;
+     *     Annotation = "{" NAME "}" ;
+     * Notes:
+     * * `Annotation` is just a comment if it follows a `UNIT` and is
+     *    equivalent to `1` if it is used alone. For examples,
+     *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
+     * * `NAME` is a sequence of non-blank printable ASCII characters not
+     *    containing '{' or '}'.
+     * 
+ */ + public Builder clearUnit() { + + unit_ = getDefaultInstance().getUnit(); + onChanged(); + return this; + } + /** + * optional string unit = 5; + * + *
+     * The unit in which the metric value is reported. It is only applicable
+     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
+     * supported units are a subset of [The Unified Code for Units of
+     * Measure](http://unitsofmeasure.org/ucum.html) standard:
+     * **Basic units (UNIT)**
+     * * `bit`   bit
+     * * `By`    byte
+     * * `s`     second
+     * * `min`   minute
+     * * `h`     hour
+     * * `d`     day
+     * **Prefixes (PREFIX)**
+     * * `k`     kilo    (10**3)
+     * * `M`     mega    (10**6)
+     * * `G`     giga    (10**9)
+     * * `T`     tera    (10**12)
+     * * `P`     peta    (10**15)
+     * * `E`     exa     (10**18)
+     * * `Z`     zetta   (10**21)
+     * * `Y`     yotta   (10**24)
+     * * `m`     milli   (10**-3)
+     * * `u`     micro   (10**-6)
+     * * `n`     nano    (10**-9)
+     * * `p`     pico    (10**-12)
+     * * `f`     femto   (10**-15)
+     * * `a`     atto    (10**-18)
+     * * `z`     zepto   (10**-21)
+     * * `y`     yocto   (10**-24)
+     * * `Ki`    kibi    (2**10)
+     * * `Mi`    mebi    (2**20)
+     * * `Gi`    gibi    (2**30)
+     * * `Ti`    tebi    (2**40)
+     * **Grammar**
+     * The grammar includes the dimensionless unit `1`, such as `1/s`.
+     * The grammar also includes these connectors:
+     * * `/`    division (as an infix operator, e.g. `1/s`).
+     * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
+     * The grammar for a unit is as follows:
+     *     Expression = Component { "." Component } { "/" Component } ;
+     *     Component = [ PREFIX ] UNIT [ Annotation ]
+     *               | Annotation
+     *               | "1"
+     *               ;
+     *     Annotation = "{" NAME "}" ;
+     * Notes:
+     * * `Annotation` is just a comment if it follows a `UNIT` and is
+     *    equivalent to `1` if it is used alone. For examples,
+     *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
+     * * `NAME` is a sequence of non-blank printable ASCII characters not
+     *    containing '{' or '}'.
+     * 
+ */ + public Builder setUnitBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + unit_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * optional string description = 6; + * + *
+     * A detailed description of the monitored resource type, which is used in
+     * documentation.
+     * 
+ */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string description = 6; + * + *
+     * A detailed description of the monitored resource type, which is used in
+     * documentation.
+     * 
+ */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string description = 6; + * + *
+     * A detailed description of the monitored resource type, which is used in
+     * documentation.
+     * 
+ */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * optional string description = 6; + * + *
+     * A detailed description of the monitored resource type, which is used in
+     * documentation.
+     * 
+ */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * optional string description = 6; + * + *
+     * A detailed description of the monitored resource type, which is used in
+     * documentation.
+     * 
+ */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * optional string display_name = 7; + * + *
+     * A concise name for the monitored resource type, which is displayed in user
+     * interfaces.
+     * 
+ */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string display_name = 7; + * + *
+     * A concise name for the monitored resource type, which is displayed in user
+     * interfaces.
+     * 
+ */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string display_name = 7; + * + *
+     * A concise name for the monitored resource type, which is displayed in user
+     * interfaces.
+     * 
+ */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * optional string display_name = 7; + * + *
+     * A concise name for the monitored resource type, which is displayed in user
+     * interfaces.
+     * 
+ */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * optional string display_name = 7; + * + *
+     * A concise name for the monitored resource type, which is displayed in user
+     * interfaces.
+     * 
+ */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + 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.MetricDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.api.MetricDescriptor) + private static final com.google.api.MetricDescriptor DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.MetricDescriptor(); + } + + public static com.google.api.MetricDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MetricDescriptor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new MetricDescriptor(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.MetricDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptorOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptorOrBuilder.java new file mode 100644 index 000000000000..c686cb16c35d --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MetricDescriptorOrBuilder.java @@ -0,0 +1,301 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/metric.proto + +package com.google.api; + +public interface MetricDescriptorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.MetricDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the metric type, including a domain prefix, such as
+   * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
+   * should use a natural hierarchical grouping such as the following:
+   *     compute.googleapis.com/instance/cpu/utilization
+   *     compute.googleapis.com/instance/disk/read_ops_count
+   *     compute.googleapis.com/instance/network/received_bytes_count
+   * Note that if the metric name changes, the monitoring data will be
+   * discontinued, and anything depends on it will break, such as monitoring
+   * dashborads, alerting rules and quota limits. Therefore, once a metric has
+   * been published, its name should be immutable. You can use the display_name
+   * field to provide a user-friendly name for the metric.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the metric type, including a domain prefix, such as
+   * `"compute.googleapis.com/instance/cpu/utilization"`.  Metric type names
+   * should use a natural hierarchical grouping such as the following:
+   *     compute.googleapis.com/instance/cpu/utilization
+   *     compute.googleapis.com/instance/disk/read_ops_count
+   *     compute.googleapis.com/instance/network/received_bytes_count
+   * Note that if the metric name changes, the monitoring data will be
+   * discontinued, and anything depends on it will break, such as monitoring
+   * dashborads, alerting rules and quota limits. Therefore, once a metric has
+   * been published, its name should be immutable. You can use the display_name
+   * field to provide a user-friendly name for the metric.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that can be used to describe a specific instance of this
+   * metric type. For example, the
+   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+   * has a label, `loadbalanced`, that specifies whether the traffic was
+   * received through a load balanced IP address.
+   * 
+ */ + java.util.List + getLabelsList(); + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that can be used to describe a specific instance of this
+   * metric type. For example, the
+   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+   * has a label, `loadbalanced`, that specifies whether the traffic was
+   * received through a load balanced IP address.
+   * 
+ */ + com.google.api.LabelDescriptor getLabels(int index); + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that can be used to describe a specific instance of this
+   * metric type. For example, the
+   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+   * has a label, `loadbalanced`, that specifies whether the traffic was
+   * received through a load balanced IP address.
+   * 
+ */ + int getLabelsCount(); + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that can be used to describe a specific instance of this
+   * metric type. For example, the
+   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+   * has a label, `loadbalanced`, that specifies whether the traffic was
+   * received through a load balanced IP address.
+   * 
+ */ + java.util.List + getLabelsOrBuilderList(); + /** + * repeated .google.api.LabelDescriptor labels = 2; + * + *
+   * The set of labels that can be used to describe a specific instance of this
+   * metric type. For example, the
+   * `compute.googleapis.com/instance/network/received_bytes_count` metric type
+   * has a label, `loadbalanced`, that specifies whether the traffic was
+   * received through a load balanced IP address.
+   * 
+ */ + com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( + int index); + + /** + * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + *
+   * Whether the metric records instantaneous values, changes to a value, etc.
+   * 
+ */ + int getMetricKindValue(); + /** + * optional .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + *
+   * Whether the metric records instantaneous values, changes to a value, etc.
+   * 
+ */ + com.google.api.MetricDescriptor.MetricKind getMetricKind(); + + /** + * optional .google.api.MetricDescriptor.ValueType value_type = 4; + * + *
+   * Whether the measurement is an integer, a floating-point number, etc.
+   * 
+ */ + int getValueTypeValue(); + /** + * optional .google.api.MetricDescriptor.ValueType value_type = 4; + * + *
+   * Whether the measurement is an integer, a floating-point number, etc.
+   * 
+ */ + com.google.api.MetricDescriptor.ValueType getValueType(); + + /** + * optional string unit = 5; + * + *
+   * The unit in which the metric value is reported. It is only applicable
+   * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
+   * supported units are a subset of [The Unified Code for Units of
+   * Measure](http://unitsofmeasure.org/ucum.html) standard:
+   * **Basic units (UNIT)**
+   * * `bit`   bit
+   * * `By`    byte
+   * * `s`     second
+   * * `min`   minute
+   * * `h`     hour
+   * * `d`     day
+   * **Prefixes (PREFIX)**
+   * * `k`     kilo    (10**3)
+   * * `M`     mega    (10**6)
+   * * `G`     giga    (10**9)
+   * * `T`     tera    (10**12)
+   * * `P`     peta    (10**15)
+   * * `E`     exa     (10**18)
+   * * `Z`     zetta   (10**21)
+   * * `Y`     yotta   (10**24)
+   * * `m`     milli   (10**-3)
+   * * `u`     micro   (10**-6)
+   * * `n`     nano    (10**-9)
+   * * `p`     pico    (10**-12)
+   * * `f`     femto   (10**-15)
+   * * `a`     atto    (10**-18)
+   * * `z`     zepto   (10**-21)
+   * * `y`     yocto   (10**-24)
+   * * `Ki`    kibi    (2**10)
+   * * `Mi`    mebi    (2**20)
+   * * `Gi`    gibi    (2**30)
+   * * `Ti`    tebi    (2**40)
+   * **Grammar**
+   * The grammar includes the dimensionless unit `1`, such as `1/s`.
+   * The grammar also includes these connectors:
+   * * `/`    division (as an infix operator, e.g. `1/s`).
+   * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
+   * The grammar for a unit is as follows:
+   *     Expression = Component { "." Component } { "/" Component } ;
+   *     Component = [ PREFIX ] UNIT [ Annotation ]
+   *               | Annotation
+   *               | "1"
+   *               ;
+   *     Annotation = "{" NAME "}" ;
+   * Notes:
+   * * `Annotation` is just a comment if it follows a `UNIT` and is
+   *    equivalent to `1` if it is used alone. For examples,
+   *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
+   * * `NAME` is a sequence of non-blank printable ASCII characters not
+   *    containing '{' or '}'.
+   * 
+ */ + java.lang.String getUnit(); + /** + * optional string unit = 5; + * + *
+   * The unit in which the metric value is reported. It is only applicable
+   * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
+   * supported units are a subset of [The Unified Code for Units of
+   * Measure](http://unitsofmeasure.org/ucum.html) standard:
+   * **Basic units (UNIT)**
+   * * `bit`   bit
+   * * `By`    byte
+   * * `s`     second
+   * * `min`   minute
+   * * `h`     hour
+   * * `d`     day
+   * **Prefixes (PREFIX)**
+   * * `k`     kilo    (10**3)
+   * * `M`     mega    (10**6)
+   * * `G`     giga    (10**9)
+   * * `T`     tera    (10**12)
+   * * `P`     peta    (10**15)
+   * * `E`     exa     (10**18)
+   * * `Z`     zetta   (10**21)
+   * * `Y`     yotta   (10**24)
+   * * `m`     milli   (10**-3)
+   * * `u`     micro   (10**-6)
+   * * `n`     nano    (10**-9)
+   * * `p`     pico    (10**-12)
+   * * `f`     femto   (10**-15)
+   * * `a`     atto    (10**-18)
+   * * `z`     zepto   (10**-21)
+   * * `y`     yocto   (10**-24)
+   * * `Ki`    kibi    (2**10)
+   * * `Mi`    mebi    (2**20)
+   * * `Gi`    gibi    (2**30)
+   * * `Ti`    tebi    (2**40)
+   * **Grammar**
+   * The grammar includes the dimensionless unit `1`, such as `1/s`.
+   * The grammar also includes these connectors:
+   * * `/`    division (as an infix operator, e.g. `1/s`).
+   * * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
+   * The grammar for a unit is as follows:
+   *     Expression = Component { "." Component } { "/" Component } ;
+   *     Component = [ PREFIX ] UNIT [ Annotation ]
+   *               | Annotation
+   *               | "1"
+   *               ;
+   *     Annotation = "{" NAME "}" ;
+   * Notes:
+   * * `Annotation` is just a comment if it follows a `UNIT` and is
+   *    equivalent to `1` if it is used alone. For examples,
+   *    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
+   * * `NAME` is a sequence of non-blank printable ASCII characters not
+   *    containing '{' or '}'.
+   * 
+ */ + com.google.protobuf.ByteString + getUnitBytes(); + + /** + * optional string description = 6; + * + *
+   * A detailed description of the monitored resource type, which is used in
+   * documentation.
+   * 
+ */ + java.lang.String getDescription(); + /** + * optional string description = 6; + * + *
+   * A detailed description of the monitored resource type, which is used in
+   * documentation.
+   * 
+ */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + * optional string display_name = 7; + * + *
+   * A concise name for the monitored resource type, which is displayed in user
+   * interfaces.
+   * 
+ */ + java.lang.String getDisplayName(); + /** + * optional string display_name = 7; + * + *
+   * A concise name for the monitored resource type, which is displayed in user
+   * interfaces.
+   * 
+ */ + com.google.protobuf.ByteString + getDisplayNameBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MetricProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MetricProto.java new file mode 100644 index 000000000000..e6f859aa70d5 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MetricProto.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/metric.proto + +package com.google.api; + +public final class MetricProto { + private MetricProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MetricDescriptor_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_MetricDescriptor_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027google/api/metric.proto\022\ngoogle.api\032\026g" + + "oogle/api/label.proto\"\304\003\n\020MetricDescript" + + "or\022\014\n\004name\030\001 \001(\t\022+\n\006labels\030\002 \003(\0132\033.googl" + + "e.api.LabelDescriptor\022<\n\013metric_kind\030\003 \001" + + "(\0162\'.google.api.MetricDescriptor.MetricK" + + "ind\022:\n\nvalue_type\030\004 \001(\0162&.google.api.Met" + + "ricDescriptor.ValueType\022\014\n\004unit\030\005 \001(\t\022\023\n" + + "\013description\030\006 \001(\t\022\024\n\014display_name\030\007 \001(\t" + + "\"O\n\nMetricKind\022\033\n\027METRIC_KIND_UNSPECIFIE" + + "D\020\000\022\t\n\005GAUGE\020\001\022\t\n\005DELTA\020\002\022\016\n\nCUMULATIVE\020", + "\003\"q\n\tValueType\022\032\n\026VALUE_TYPE_UNSPECIFIED" + + "\020\000\022\010\n\004BOOL\020\001\022\t\n\005INT64\020\002\022\n\n\006DOUBLE\020\003\022\n\n\006S" + + "TRING\020\004\022\020\n\014DISTRIBUTION\020\005\022\t\n\005MONEY\020\006B\037\n\016" + + "com.google.apiB\013MetricProtoP\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.LabelProto.getDescriptor(), + }, assigner); + internal_static_google_api_MetricDescriptor_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_MetricDescriptor_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_MetricDescriptor_descriptor, + new java.lang.String[] { "Name", "Labels", "MetricKind", "ValueType", "Unit", "Description", "DisplayName", }); + com.google.api.LabelProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResource.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResource.java new file mode 100644 index 000000000000..c30b634b3951 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResource.java @@ -0,0 +1,670 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitored_resource.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.MonitoredResource} + * + *
+ * A specific monitored resource or a group of monitored resources.
+ * 
+ */ +public final class MonitoredResource extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.MonitoredResource) + MonitoredResourceOrBuilder { + // Use MonitoredResource.newBuilder() to construct. + private MonitoredResource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MonitoredResource() { + type_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private MonitoredResource( + 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(); + + type_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + labels = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels.getKey(), labels.getValue()); + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MonitoredResource.class, com.google.api.MonitoredResource.Builder.class); + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object type_; + /** + * optional string type = 1; + * + *
+   * The type of monitored resource. This field must match the value of the
+   * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
+   * `"cloudsql_database"` represents Cloud SQL databases.
+   * 
+ */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * optional string type = 1; + * + *
+   * The type of monitored resource. This field must match the value of the
+   * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
+   * `"cloudsql_database"` represents Cloud SQL databases.
+   * 
+ */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 2; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResource_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + /** + * map<string, string> labels = 2; + * + *
+   * Values for some or all of the labels listed in the associated monitored
+   * resource type. For example, specify a specific Cloud SQL database by
+   * supplying values for both the `"database_id"` and `"zone"` labels.  Specify
+   * the set of all Cloud SQL databases in a particular location by supplying a
+   * value for only the `"zone"` label.
+   * 
+ */ + + public java.util.Map getLabels() { + return internalGetLabels().getMap(); + } + + 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 { + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, type_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + output.writeMessage(2, labels); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, type_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, labels); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.MonitoredResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MonitoredResource 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.MonitoredResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MonitoredResource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.MonitoredResource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MonitoredResource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.MonitoredResource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.MonitoredResource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.MonitoredResource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MonitoredResource 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.MonitoredResource 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.MonitoredResource} + * + *
+   * A specific monitored resource or a group of monitored resources.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.MonitoredResource) + com.google.api.MonitoredResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MonitoredResource.class, com.google.api.MonitoredResource.Builder.class); + } + + // Construct using com.google.api.MonitoredResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + type_ = ""; + + internalGetMutableLabels().clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResource_descriptor; + } + + public com.google.api.MonitoredResource getDefaultInstanceForType() { + return com.google.api.MonitoredResource.getDefaultInstance(); + } + + public com.google.api.MonitoredResource build() { + com.google.api.MonitoredResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.MonitoredResource buildPartial() { + com.google.api.MonitoredResource result = new com.google.api.MonitoredResource(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.type_ = type_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MonitoredResource) { + return mergeFrom((com.google.api.MonitoredResource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MonitoredResource other) { + if (other == com.google.api.MonitoredResource.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + 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.MonitoredResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.MonitoredResource) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + * optional string type = 1; + * + *
+     * The type of monitored resource. This field must match the value of the
+     * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
+     * `"cloudsql_database"` represents Cloud SQL databases.
+     * 
+ */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string type = 1; + * + *
+     * The type of monitored resource. This field must match the value of the
+     * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
+     * `"cloudsql_database"` represents Cloud SQL databases.
+     * 
+ */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string type = 1; + * + *
+     * The type of monitored resource. This field must match the value of the
+     * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
+     * `"cloudsql_database"` represents Cloud SQL databases.
+     * 
+ */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * optional string type = 1; + * + *
+     * The type of monitored resource. This field must match the value of the
+     * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
+     * `"cloudsql_database"` represents Cloud SQL databases.
+     * 
+ */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * optional string type = 1; + * + *
+     * The type of monitored resource. This field must match the value of the
+     * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
+     * `"cloudsql_database"` represents Cloud SQL databases.
+     * 
+ */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + /** + * map<string, string> labels = 2; + * + *
+     * Values for some or all of the labels listed in the associated monitored
+     * resource type. For example, specify a specific Cloud SQL database by
+     * supplying values for both the `"database_id"` and `"zone"` labels.  Specify
+     * the set of all Cloud SQL databases in a particular location by supplying a
+     * value for only the `"zone"` label.
+     * 
+ */ + public java.util.Map getLabels() { + return internalGetLabels().getMap(); + } + /** + * map<string, string> labels = 2; + * + *
+     * Values for some or all of the labels listed in the associated monitored
+     * resource type. For example, specify a specific Cloud SQL database by
+     * supplying values for both the `"database_id"` and `"zone"` labels.  Specify
+     * the set of all Cloud SQL databases in a particular location by supplying a
+     * value for only the `"zone"` label.
+     * 
+ */ + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * map<string, string> labels = 2; + * + *
+     * Values for some or all of the labels listed in the associated monitored
+     * resource type. For example, specify a specific Cloud SQL database by
+     * supplying values for both the `"database_id"` and `"zone"` labels.  Specify
+     * the set of all Cloud SQL databases in a particular location by supplying a
+     * value for only the `"zone"` label.
+     * 
+ */ + public Builder putAllLabels( + java.util.Map values) { + getMutableLabels().putAll(values); + return this; + } + 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.MonitoredResource) + } + + // @@protoc_insertion_point(class_scope:google.api.MonitoredResource) + private static final com.google.api.MonitoredResource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.MonitoredResource(); + } + + public static com.google.api.MonitoredResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MonitoredResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new MonitoredResource(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.MonitoredResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptor.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptor.java new file mode 100644 index 000000000000..864003e6fa89 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptor.java @@ -0,0 +1,1278 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitored_resource.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.MonitoredResourceDescriptor} + * + *
+ * A description of a type of monitored resource.
+ * 
+ */ +public final class MonitoredResourceDescriptor extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.MonitoredResourceDescriptor) + MonitoredResourceDescriptorOrBuilder { + // Use MonitoredResourceDescriptor.newBuilder() to construct. + private MonitoredResourceDescriptor(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MonitoredResourceDescriptor() { + type_ = ""; + displayName_ = ""; + description_ = ""; + labels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private MonitoredResourceDescriptor( + 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(); + + type_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + labels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + labels_.add(input.readMessage(com.google.api.LabelDescriptor.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_ & 0x00000008) == 0x00000008)) { + labels_ = java.util.Collections.unmodifiableList(labels_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MonitoredResourceDescriptor.class, com.google.api.MonitoredResourceDescriptor.Builder.class); + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object type_; + /** + * optional string type = 1; + * + *
+   * The monitored resource type. For example, the type `"cloudsql_database"`
+   * represents databases in Google Cloud SQL.
+   * 
+ */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * optional string type = 1; + * + *
+   * The monitored resource type. For example, the type `"cloudsql_database"`
+   * represents databases in Google Cloud SQL.
+   * 
+ */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * optional string display_name = 2; + * + *
+   * A concise name for the monitored resource type, which is displayed in user
+   * interfaces. For example, `"Cloud SQL database"`.
+   * 
+ */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * optional string display_name = 2; + * + *
+   * A concise name for the monitored resource type, which is displayed in user
+   * interfaces. For example, `"Cloud SQL database"`.
+   * 
+ */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * optional string description = 3; + * + *
+   * A detailed description of the monitored resource type, which is used in
+   * documentation.
+   * 
+ */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * optional string description = 3; + * + *
+   * A detailed description of the monitored resource type, which is used in
+   * documentation.
+   * 
+ */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 4; + private java.util.List labels_; + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+   * A set of labels that can be used to describe instances of this monitored
+   * resource type. For example, Cloud SQL databases can be labeled with
+   * their `"database_id"` and their `"zone"`.
+   * 
+ */ + public java.util.List getLabelsList() { + return labels_; + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+   * A set of labels that can be used to describe instances of this monitored
+   * resource type. For example, Cloud SQL databases can be labeled with
+   * their `"database_id"` and their `"zone"`.
+   * 
+ */ + public java.util.List + getLabelsOrBuilderList() { + return labels_; + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+   * A set of labels that can be used to describe instances of this monitored
+   * resource type. For example, Cloud SQL databases can be labeled with
+   * their `"database_id"` and their `"zone"`.
+   * 
+ */ + public int getLabelsCount() { + return labels_.size(); + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+   * A set of labels that can be used to describe instances of this monitored
+   * resource type. For example, Cloud SQL databases can be labeled with
+   * their `"database_id"` and their `"zone"`.
+   * 
+ */ + public com.google.api.LabelDescriptor getLabels(int index) { + return labels_.get(index); + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+   * A set of labels that can be used to describe instances of this monitored
+   * resource type. For example, Cloud SQL databases can be labeled with
+   * their `"database_id"` and their `"zone"`.
+   * 
+ */ + public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( + int index) { + return labels_.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 { + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, type_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + for (int i = 0; i < labels_.size(); i++) { + output.writeMessage(4, labels_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, type_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + for (int i = 0; i < labels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labels_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.MonitoredResourceDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MonitoredResourceDescriptor 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.MonitoredResourceDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MonitoredResourceDescriptor parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.MonitoredResourceDescriptor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MonitoredResourceDescriptor parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.MonitoredResourceDescriptor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.MonitoredResourceDescriptor parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.MonitoredResourceDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MonitoredResourceDescriptor 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.MonitoredResourceDescriptor 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.MonitoredResourceDescriptor} + * + *
+   * A description of a type of monitored resource.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.MonitoredResourceDescriptor) + com.google.api.MonitoredResourceDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MonitoredResourceDescriptor.class, com.google.api.MonitoredResourceDescriptor.Builder.class); + } + + // Construct using com.google.api.MonitoredResourceDescriptor.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getLabelsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + type_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + labelsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_descriptor; + } + + public com.google.api.MonitoredResourceDescriptor getDefaultInstanceForType() { + return com.google.api.MonitoredResourceDescriptor.getDefaultInstance(); + } + + public com.google.api.MonitoredResourceDescriptor build() { + com.google.api.MonitoredResourceDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.MonitoredResourceDescriptor buildPartial() { + com.google.api.MonitoredResourceDescriptor result = new com.google.api.MonitoredResourceDescriptor(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.type_ = type_; + result.displayName_ = displayName_; + result.description_ = description_; + if (labelsBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + labels_ = java.util.Collections.unmodifiableList(labels_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.labels_ = labels_; + } else { + result.labels_ = labelsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MonitoredResourceDescriptor) { + return mergeFrom((com.google.api.MonitoredResourceDescriptor)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MonitoredResourceDescriptor other) { + if (other == com.google.api.MonitoredResourceDescriptor.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (labelsBuilder_ == null) { + if (!other.labels_.isEmpty()) { + if (labels_.isEmpty()) { + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureLabelsIsMutable(); + labels_.addAll(other.labels_); + } + onChanged(); + } + } else { + if (!other.labels_.isEmpty()) { + if (labelsBuilder_.isEmpty()) { + labelsBuilder_.dispose(); + labelsBuilder_ = null; + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000008); + labelsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLabelsFieldBuilder() : null; + } else { + labelsBuilder_.addAllMessages(other.labels_); + } + } + } + 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.MonitoredResourceDescriptor parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.MonitoredResourceDescriptor) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + * optional string type = 1; + * + *
+     * The monitored resource type. For example, the type `"cloudsql_database"`
+     * represents databases in Google Cloud SQL.
+     * 
+ */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string type = 1; + * + *
+     * The monitored resource type. For example, the type `"cloudsql_database"`
+     * represents databases in Google Cloud SQL.
+     * 
+ */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string type = 1; + * + *
+     * The monitored resource type. For example, the type `"cloudsql_database"`
+     * represents databases in Google Cloud SQL.
+     * 
+ */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * optional string type = 1; + * + *
+     * The monitored resource type. For example, the type `"cloudsql_database"`
+     * represents databases in Google Cloud SQL.
+     * 
+ */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * optional string type = 1; + * + *
+     * The monitored resource type. For example, the type `"cloudsql_database"`
+     * represents databases in Google Cloud SQL.
+     * 
+ */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * optional string display_name = 2; + * + *
+     * A concise name for the monitored resource type, which is displayed in user
+     * interfaces. For example, `"Cloud SQL database"`.
+     * 
+ */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string display_name = 2; + * + *
+     * A concise name for the monitored resource type, which is displayed in user
+     * interfaces. For example, `"Cloud SQL database"`.
+     * 
+ */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string display_name = 2; + * + *
+     * A concise name for the monitored resource type, which is displayed in user
+     * interfaces. For example, `"Cloud SQL database"`.
+     * 
+ */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * optional string display_name = 2; + * + *
+     * A concise name for the monitored resource type, which is displayed in user
+     * interfaces. For example, `"Cloud SQL database"`.
+     * 
+ */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * optional string display_name = 2; + * + *
+     * A concise name for the monitored resource type, which is displayed in user
+     * interfaces. For example, `"Cloud SQL database"`.
+     * 
+ */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * optional string description = 3; + * + *
+     * A detailed description of the monitored resource type, which is used in
+     * documentation.
+     * 
+ */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string description = 3; + * + *
+     * A detailed description of the monitored resource type, which is used in
+     * documentation.
+     * 
+ */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string description = 3; + * + *
+     * A detailed description of the monitored resource type, which is used in
+     * documentation.
+     * 
+ */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * optional string description = 3; + * + *
+     * A detailed description of the monitored resource type, which is used in
+     * documentation.
+     * 
+ */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * optional string description = 3; + * + *
+     * A detailed description of the monitored resource type, which is used in
+     * documentation.
+     * 
+ */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.util.List labels_ = + java.util.Collections.emptyList(); + private void ensureLabelsIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + labels_ = new java.util.ArrayList(labels_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder> labelsBuilder_; + + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public java.util.List getLabelsList() { + if (labelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labels_); + } else { + return labelsBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public int getLabelsCount() { + if (labelsBuilder_ == null) { + return labels_.size(); + } else { + return labelsBuilder_.getCount(); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public com.google.api.LabelDescriptor getLabels(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public Builder setLabels( + int index, com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.set(index, value); + onChanged(); + } else { + labelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public Builder setLabels( + int index, com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.set(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public Builder addLabels(com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(value); + onChanged(); + } else { + labelsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public Builder addLabels( + int index, com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(index, value); + onChanged(); + } else { + labelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public Builder addLabels( + com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public Builder addLabels( + int index, com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public Builder addAllLabels( + java.lang.Iterable values) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, labels_); + onChanged(); + } else { + labelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public Builder clearLabels() { + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + labelsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public Builder removeLabels(int index) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.remove(index); + onChanged(); + } else { + labelsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public com.google.api.LabelDescriptor.Builder getLabelsBuilder( + int index) { + return getLabelsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( + int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); } else { + return labelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public java.util.List + getLabelsOrBuilderList() { + if (labelsBuilder_ != null) { + return labelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labels_); + } + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public com.google.api.LabelDescriptor.Builder addLabelsBuilder() { + return getLabelsFieldBuilder().addBuilder( + com.google.api.LabelDescriptor.getDefaultInstance()); + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public com.google.api.LabelDescriptor.Builder addLabelsBuilder( + int index) { + return getLabelsFieldBuilder().addBuilder( + index, com.google.api.LabelDescriptor.getDefaultInstance()); + } + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+     * A set of labels that can be used to describe instances of this monitored
+     * resource type. For example, Cloud SQL databases can be labeled with
+     * their `"database_id"` and their `"zone"`.
+     * 
+ */ + public java.util.List + getLabelsBuilderList() { + return getLabelsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder> + getLabelsFieldBuilder() { + if (labelsBuilder_ == null) { + labelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.LabelDescriptor, com.google.api.LabelDescriptor.Builder, com.google.api.LabelDescriptorOrBuilder>( + labels_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + labels_ = null; + } + return labelsBuilder_; + } + 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.MonitoredResourceDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.api.MonitoredResourceDescriptor) + private static final com.google.api.MonitoredResourceDescriptor DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.MonitoredResourceDescriptor(); + } + + public static com.google.api.MonitoredResourceDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MonitoredResourceDescriptor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new MonitoredResourceDescriptor(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.MonitoredResourceDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptorOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptorOrBuilder.java new file mode 100644 index 000000000000..beb3f025a9c4 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceDescriptorOrBuilder.java @@ -0,0 +1,123 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitored_resource.proto + +package com.google.api; + +public interface MonitoredResourceDescriptorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.MonitoredResourceDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string type = 1; + * + *
+   * The monitored resource type. For example, the type `"cloudsql_database"`
+   * represents databases in Google Cloud SQL.
+   * 
+ */ + java.lang.String getType(); + /** + * optional string type = 1; + * + *
+   * The monitored resource type. For example, the type `"cloudsql_database"`
+   * represents databases in Google Cloud SQL.
+   * 
+ */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * optional string display_name = 2; + * + *
+   * A concise name for the monitored resource type, which is displayed in user
+   * interfaces. For example, `"Cloud SQL database"`.
+   * 
+ */ + java.lang.String getDisplayName(); + /** + * optional string display_name = 2; + * + *
+   * A concise name for the monitored resource type, which is displayed in user
+   * interfaces. For example, `"Cloud SQL database"`.
+   * 
+ */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + * optional string description = 3; + * + *
+   * A detailed description of the monitored resource type, which is used in
+   * documentation.
+   * 
+ */ + java.lang.String getDescription(); + /** + * optional string description = 3; + * + *
+   * A detailed description of the monitored resource type, which is used in
+   * documentation.
+   * 
+ */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+   * A set of labels that can be used to describe instances of this monitored
+   * resource type. For example, Cloud SQL databases can be labeled with
+   * their `"database_id"` and their `"zone"`.
+   * 
+ */ + java.util.List + getLabelsList(); + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+   * A set of labels that can be used to describe instances of this monitored
+   * resource type. For example, Cloud SQL databases can be labeled with
+   * their `"database_id"` and their `"zone"`.
+   * 
+ */ + com.google.api.LabelDescriptor getLabels(int index); + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+   * A set of labels that can be used to describe instances of this monitored
+   * resource type. For example, Cloud SQL databases can be labeled with
+   * their `"database_id"` and their `"zone"`.
+   * 
+ */ + int getLabelsCount(); + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+   * A set of labels that can be used to describe instances of this monitored
+   * resource type. For example, Cloud SQL databases can be labeled with
+   * their `"database_id"` and their `"zone"`.
+   * 
+ */ + java.util.List + getLabelsOrBuilderList(); + /** + * repeated .google.api.LabelDescriptor labels = 4; + * + *
+   * A set of labels that can be used to describe instances of this monitored
+   * resource type. For example, Cloud SQL databases can be labeled with
+   * their `"database_id"` and their `"zone"`.
+   * 
+ */ + com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceOrBuilder.java new file mode 100644 index 000000000000..21547c4a766c --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceOrBuilder.java @@ -0,0 +1,45 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitored_resource.proto + +package com.google.api; + +public interface MonitoredResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.MonitoredResource) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string type = 1; + * + *
+   * The type of monitored resource. This field must match the value of the
+   * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
+   * `"cloudsql_database"` represents Cloud SQL databases.
+   * 
+ */ + java.lang.String getType(); + /** + * optional string type = 1; + * + *
+   * The type of monitored resource. This field must match the value of the
+   * `type` field in a [MonitoredResourceDescriptor][] object.  For example,
+   * `"cloudsql_database"` represents Cloud SQL databases.
+   * 
+ */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * map<string, string> labels = 2; + * + *
+   * Values for some or all of the labels listed in the associated monitored
+   * resource type. For example, specify a specific Cloud SQL database by
+   * supplying values for both the `"database_id"` and `"zone"` labels.  Specify
+   * the set of all Cloud SQL databases in a particular location by supplying a
+   * value for only the `"zone"` label.
+   * 
+ */ + java.util.Map + getLabels(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceProto.java new file mode 100644 index 000000000000..acba4d139321 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoredResourceProto.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitored_resource.proto + +package com.google.api; + +public final class MonitoredResourceProto { + private MonitoredResourceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MonitoredResourceDescriptor_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MonitoredResource_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_MonitoredResource_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MonitoredResource_LabelsEntry_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_MonitoredResource_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n#google/api/monitored_resource.proto\022\ng" + + "oogle.api\032\026google/api/label.proto\"\203\001\n\033Mo" + + "nitoredResourceDescriptor\022\014\n\004type\030\001 \001(\t\022" + + "\024\n\014display_name\030\002 \001(\t\022\023\n\013description\030\003 \001" + + "(\t\022+\n\006labels\030\004 \003(\0132\033.google.api.LabelDes" + + "criptor\"\213\001\n\021MonitoredResource\022\014\n\004type\030\001 " + + "\001(\t\0229\n\006labels\030\002 \003(\0132).google.api.Monitor" + + "edResource.LabelsEntry\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B*\n\016com.goo" + + "gle.apiB\026MonitoredResourceProtoP\001b\006proto", + "3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.LabelProto.getDescriptor(), + }, assigner); + internal_static_google_api_MonitoredResourceDescriptor_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_MonitoredResourceDescriptor_descriptor, + new java.lang.String[] { "Type", "DisplayName", "Description", "Labels", }); + internal_static_google_api_MonitoredResource_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_MonitoredResource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_MonitoredResource_descriptor, + new java.lang.String[] { "Type", "Labels", }); + internal_static_google_api_MonitoredResource_LabelsEntry_descriptor = + internal_static_google_api_MonitoredResource_descriptor.getNestedTypes().get(0); + internal_static_google_api_MonitoredResource_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_MonitoredResource_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.google.api.LabelProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Monitoring.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Monitoring.java new file mode 100644 index 000000000000..7732b4e36ef3 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/Monitoring.java @@ -0,0 +1,2192 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitoring.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Monitoring} + * + *
+ * Monitoring configuration of the service.
+ * The example below shows how to configure monitored resources and metrics
+ * for monitoring. In the example, a monitored resource and two metrics are
+ * defined. The `library.googleapis.com/book/returned_count` metric is sent
+ * to both producer and consumer projects, whereas the
+ * `library.googleapis.com/book/overdue_count` metric is only sent to the
+ * consumer project.
+ *     monitored_resources:
+ *     - type: library.googleapis.com/branch
+ *       labels:
+ *       - key: /city
+ *         description: The city where the library branch is located in.
+ *       - key: /name
+ *         description: The name of the branch.
+ *     metrics:
+ *     - name: library.googleapis.com/book/returned_count
+ *       metric_kind: DELTA
+ *       value_type: INT64
+ *       labels:
+ *       - key: /customer_id
+ *     - name: library.googleapis.com/book/overdue_count
+ *       metric_kind: GAUGE
+ *       value_type: INT64
+ *       labels:
+ *       - key: /customer_id
+ *     monitoring:
+ *       producer_destinations:
+ *       - monitored_resource: library.googleapis.com/branch
+ *         metrics:
+ *         - library.googleapis.com/book/returned_count
+ *       consumer_destinations:
+ *       - monitored_resource: library.googleapis.com/branch
+ *         metrics:
+ *         - library.googleapis.com/book/returned_count
+ *         - library.googleapis.com/book/overdue_count
+ * (-- GOOGLE_INTERNAL:
+ * This example shows how to configure metrics to be sent to the consumer
+ * project, and skip fine grained ACL check since the service is a trusted
+ * Google service:
+ *     monitoring:
+ *       consumer_destinations:
+ *       - monitored_resource: library.googleapis.com/branch
+ *         metrics:
+ *         - library.googleapis.com/book/returned_count
+ *         - library.googleapis.com/book/overdue_count
+ *         acl:
+ *           model: SKIP
+ * --)
+ * 
+ */ +public final class Monitoring extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Monitoring) + MonitoringOrBuilder { + // Use Monitoring.newBuilder() to construct. + private Monitoring(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Monitoring() { + producerDestinations_ = java.util.Collections.emptyList(); + consumerDestinations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Monitoring( + 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: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + producerDestinations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + producerDestinations_.add(input.readMessage(com.google.api.Monitoring.MonitoringDestination.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + consumerDestinations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + consumerDestinations_.add(input.readMessage(com.google.api.Monitoring.MonitoringDestination.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_ & 0x00000001) == 0x00000001)) { + producerDestinations_ = java.util.Collections.unmodifiableList(producerDestinations_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Monitoring.class, com.google.api.Monitoring.Builder.class); + } + + public interface MonitoringDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Monitoring.MonitoringDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string monitored_resource = 1; + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][] section.
+     * 
+ */ + java.lang.String getMonitoredResource(); + /** + * optional string monitored_resource = 1; + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][] section.
+     * 
+ */ + com.google.protobuf.ByteString + getMonitoredResourceBytes(); + + /** + * repeated string metrics = 2; + * + *
+     * Names of the metrics to report to this monitoring destination.
+     * Each name must be defined in [Service.metrics][] section.
+     * 
+ */ + com.google.protobuf.ProtocolStringList + getMetricsList(); + /** + * repeated string metrics = 2; + * + *
+     * Names of the metrics to report to this monitoring destination.
+     * Each name must be defined in [Service.metrics][] section.
+     * 
+ */ + int getMetricsCount(); + /** + * repeated string metrics = 2; + * + *
+     * Names of the metrics to report to this monitoring destination.
+     * Each name must be defined in [Service.metrics][] section.
+     * 
+ */ + java.lang.String getMetrics(int index); + /** + * repeated string metrics = 2; + * + *
+     * Names of the metrics to report to this monitoring destination.
+     * Each name must be defined in [Service.metrics][] section.
+     * 
+ */ + com.google.protobuf.ByteString + getMetricsBytes(int index); + } + /** + * Protobuf type {@code google.api.Monitoring.MonitoringDestination} + * + *
+   * Configuration of a specific monitoring destination (the producer project
+   * or the consumer project).
+   * 
+ */ + public static final class MonitoringDestination extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Monitoring.MonitoringDestination) + MonitoringDestinationOrBuilder { + // Use MonitoringDestination.newBuilder() to construct. + private MonitoringDestination(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MonitoringDestination() { + monitoredResource_ = ""; + metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private MonitoringDestination( + 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(); + + monitoredResource_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + metrics_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + metrics_.add(s); + 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)) { + metrics_ = metrics_.getUnmodifiableView(); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Monitoring.MonitoringDestination.class, com.google.api.Monitoring.MonitoringDestination.Builder.class); + } + + private int bitField0_; + public static final int MONITORED_RESOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object monitoredResource_; + /** + * optional string monitored_resource = 1; + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][] section.
+     * 
+ */ + public java.lang.String getMonitoredResource() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + monitoredResource_ = s; + return s; + } + } + /** + * optional string monitored_resource = 1; + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][] section.
+     * 
+ */ + public com.google.protobuf.ByteString + getMonitoredResourceBytes() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + monitoredResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRICS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList metrics_; + /** + * repeated string metrics = 2; + * + *
+     * Names of the metrics to report to this monitoring destination.
+     * Each name must be defined in [Service.metrics][] section.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getMetricsList() { + return metrics_; + } + /** + * repeated string metrics = 2; + * + *
+     * Names of the metrics to report to this monitoring destination.
+     * Each name must be defined in [Service.metrics][] section.
+     * 
+ */ + public int getMetricsCount() { + return metrics_.size(); + } + /** + * repeated string metrics = 2; + * + *
+     * Names of the metrics to report to this monitoring destination.
+     * Each name must be defined in [Service.metrics][] section.
+     * 
+ */ + public java.lang.String getMetrics(int index) { + return metrics_.get(index); + } + /** + * repeated string metrics = 2; + * + *
+     * Names of the metrics to report to this monitoring destination.
+     * Each name must be defined in [Service.metrics][] section.
+     * 
+ */ + public com.google.protobuf.ByteString + getMetricsBytes(int index) { + return metrics_.getByteString(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 { + if (!getMonitoredResourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, monitoredResource_); + } + for (int i = 0; i < metrics_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, metrics_.getRaw(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMonitoredResourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, monitoredResource_); + } + { + int dataSize = 0; + for (int i = 0; i < metrics_.size(); i++) { + dataSize += computeStringSizeNoTag(metrics_.getRaw(i)); + } + size += dataSize; + size += 1 * getMetricsList().size(); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Monitoring.MonitoringDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Monitoring.MonitoringDestination 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.Monitoring.MonitoringDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Monitoring.MonitoringDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Monitoring.MonitoringDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Monitoring.MonitoringDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Monitoring.MonitoringDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Monitoring.MonitoringDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Monitoring.MonitoringDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Monitoring.MonitoringDestination 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.Monitoring.MonitoringDestination 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.Monitoring.MonitoringDestination} + * + *
+     * Configuration of a specific monitoring destination (the producer project
+     * or the consumer project).
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Monitoring.MonitoringDestination) + com.google.api.Monitoring.MonitoringDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Monitoring.MonitoringDestination.class, com.google.api.Monitoring.MonitoringDestination.Builder.class); + } + + // Construct using com.google.api.Monitoring.MonitoringDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + monitoredResource_ = ""; + + metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_descriptor; + } + + public com.google.api.Monitoring.MonitoringDestination getDefaultInstanceForType() { + return com.google.api.Monitoring.MonitoringDestination.getDefaultInstance(); + } + + public com.google.api.Monitoring.MonitoringDestination build() { + com.google.api.Monitoring.MonitoringDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Monitoring.MonitoringDestination buildPartial() { + com.google.api.Monitoring.MonitoringDestination result = new com.google.api.Monitoring.MonitoringDestination(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.monitoredResource_ = monitoredResource_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + metrics_ = metrics_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.metrics_ = metrics_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Monitoring.MonitoringDestination) { + return mergeFrom((com.google.api.Monitoring.MonitoringDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Monitoring.MonitoringDestination other) { + if (other == com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()) return this; + if (!other.getMonitoredResource().isEmpty()) { + monitoredResource_ = other.monitoredResource_; + onChanged(); + } + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + onChanged(); + } + 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.Monitoring.MonitoringDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Monitoring.MonitoringDestination) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object monitoredResource_ = ""; + /** + * optional string monitored_resource = 1; + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][] section.
+       * 
+ */ + public java.lang.String getMonitoredResource() { + java.lang.Object ref = monitoredResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + monitoredResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string monitored_resource = 1; + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][] section.
+       * 
+ */ + public com.google.protobuf.ByteString + getMonitoredResourceBytes() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + monitoredResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string monitored_resource = 1; + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][] section.
+       * 
+ */ + public Builder setMonitoredResource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + monitoredResource_ = value; + onChanged(); + return this; + } + /** + * optional string monitored_resource = 1; + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][] section.
+       * 
+ */ + public Builder clearMonitoredResource() { + + monitoredResource_ = getDefaultInstance().getMonitoredResource(); + onChanged(); + return this; + } + /** + * optional string monitored_resource = 1; + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][] section.
+       * 
+ */ + public Builder setMonitoredResourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + monitoredResource_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureMetricsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + metrics_ = new com.google.protobuf.LazyStringArrayList(metrics_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated string metrics = 2; + * + *
+       * Names of the metrics to report to this monitoring destination.
+       * Each name must be defined in [Service.metrics][] section.
+       * 
+ */ + public com.google.protobuf.ProtocolStringList + getMetricsList() { + return metrics_.getUnmodifiableView(); + } + /** + * repeated string metrics = 2; + * + *
+       * Names of the metrics to report to this monitoring destination.
+       * Each name must be defined in [Service.metrics][] section.
+       * 
+ */ + public int getMetricsCount() { + return metrics_.size(); + } + /** + * repeated string metrics = 2; + * + *
+       * Names of the metrics to report to this monitoring destination.
+       * Each name must be defined in [Service.metrics][] section.
+       * 
+ */ + public java.lang.String getMetrics(int index) { + return metrics_.get(index); + } + /** + * repeated string metrics = 2; + * + *
+       * Names of the metrics to report to this monitoring destination.
+       * Each name must be defined in [Service.metrics][] section.
+       * 
+ */ + public com.google.protobuf.ByteString + getMetricsBytes(int index) { + return metrics_.getByteString(index); + } + /** + * repeated string metrics = 2; + * + *
+       * Names of the metrics to report to this monitoring destination.
+       * Each name must be defined in [Service.metrics][] section.
+       * 
+ */ + public Builder setMetrics( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string metrics = 2; + * + *
+       * Names of the metrics to report to this monitoring destination.
+       * Each name must be defined in [Service.metrics][] section.
+       * 
+ */ + public Builder addMetrics( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + return this; + } + /** + * repeated string metrics = 2; + * + *
+       * Names of the metrics to report to this monitoring destination.
+       * Each name must be defined in [Service.metrics][] section.
+       * 
+ */ + public Builder addAllMetrics( + java.lang.Iterable values) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, metrics_); + onChanged(); + return this; + } + /** + * repeated string metrics = 2; + * + *
+       * Names of the metrics to report to this monitoring destination.
+       * Each name must be defined in [Service.metrics][] section.
+       * 
+ */ + public Builder clearMetrics() { + metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated string metrics = 2; + * + *
+       * Names of the metrics to report to this monitoring destination.
+       * Each name must be defined in [Service.metrics][] section.
+       * 
+ */ + public Builder addMetricsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + return this; + } + 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.Monitoring.MonitoringDestination) + } + + // @@protoc_insertion_point(class_scope:google.api.Monitoring.MonitoringDestination) + private static final com.google.api.Monitoring.MonitoringDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Monitoring.MonitoringDestination(); + } + + public static com.google.api.Monitoring.MonitoringDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MonitoringDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new MonitoringDestination(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.Monitoring.MonitoringDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int PRODUCER_DESTINATIONS_FIELD_NUMBER = 1; + private java.util.List producerDestinations_; + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one producer destination.
+   * 
+ */ + public java.util.List getProducerDestinationsList() { + return producerDestinations_; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one producer destination.
+   * 
+ */ + public java.util.List + getProducerDestinationsOrBuilderList() { + return producerDestinations_; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one producer destination.
+   * 
+ */ + public int getProducerDestinationsCount() { + return producerDestinations_.size(); + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one producer destination.
+   * 
+ */ + public com.google.api.Monitoring.MonitoringDestination getProducerDestinations(int index) { + return producerDestinations_.get(index); + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one producer destination.
+   * 
+ */ + public com.google.api.Monitoring.MonitoringDestinationOrBuilder getProducerDestinationsOrBuilder( + int index) { + return producerDestinations_.get(index); + } + + public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER = 2; + private java.util.List consumerDestinations_; + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ */ + public java.util.List getConsumerDestinationsList() { + return consumerDestinations_; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ */ + public java.util.List + getConsumerDestinationsOrBuilderList() { + return consumerDestinations_; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ */ + public int getConsumerDestinationsCount() { + return consumerDestinations_.size(); + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ */ + public com.google.api.Monitoring.MonitoringDestination getConsumerDestinations(int index) { + return consumerDestinations_.get(index); + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ */ + public com.google.api.Monitoring.MonitoringDestinationOrBuilder getConsumerDestinationsOrBuilder( + int index) { + return consumerDestinations_.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 < producerDestinations_.size(); i++) { + output.writeMessage(1, producerDestinations_.get(i)); + } + for (int i = 0; i < consumerDestinations_.size(); i++) { + output.writeMessage(2, consumerDestinations_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < producerDestinations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, producerDestinations_.get(i)); + } + for (int i = 0; i < consumerDestinations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, consumerDestinations_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Monitoring parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Monitoring 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.Monitoring parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Monitoring parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Monitoring parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Monitoring parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Monitoring parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Monitoring parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Monitoring parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Monitoring 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.Monitoring 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.Monitoring} + * + *
+   * Monitoring configuration of the service.
+   * The example below shows how to configure monitored resources and metrics
+   * for monitoring. In the example, a monitored resource and two metrics are
+   * defined. The `library.googleapis.com/book/returned_count` metric is sent
+   * to both producer and consumer projects, whereas the
+   * `library.googleapis.com/book/overdue_count` metric is only sent to the
+   * consumer project.
+   *     monitored_resources:
+   *     - type: library.googleapis.com/branch
+   *       labels:
+   *       - key: /city
+   *         description: The city where the library branch is located in.
+   *       - key: /name
+   *         description: The name of the branch.
+   *     metrics:
+   *     - name: library.googleapis.com/book/returned_count
+   *       metric_kind: DELTA
+   *       value_type: INT64
+   *       labels:
+   *       - key: /customer_id
+   *     - name: library.googleapis.com/book/overdue_count
+   *       metric_kind: GAUGE
+   *       value_type: INT64
+   *       labels:
+   *       - key: /customer_id
+   *     monitoring:
+   *       producer_destinations:
+   *       - monitored_resource: library.googleapis.com/branch
+   *         metrics:
+   *         - library.googleapis.com/book/returned_count
+   *       consumer_destinations:
+   *       - monitored_resource: library.googleapis.com/branch
+   *         metrics:
+   *         - library.googleapis.com/book/returned_count
+   *         - library.googleapis.com/book/overdue_count
+   * (-- GOOGLE_INTERNAL:
+   * This example shows how to configure metrics to be sent to the consumer
+   * project, and skip fine grained ACL check since the service is a trusted
+   * Google service:
+   *     monitoring:
+   *       consumer_destinations:
+   *       - monitored_resource: library.googleapis.com/branch
+   *         metrics:
+   *         - library.googleapis.com/book/returned_count
+   *         - library.googleapis.com/book/overdue_count
+   *         acl:
+   *           model: SKIP
+   * --)
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Monitoring) + com.google.api.MonitoringOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Monitoring.class, com.google.api.Monitoring.Builder.class); + } + + // Construct using com.google.api.Monitoring.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getProducerDestinationsFieldBuilder(); + getConsumerDestinationsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (producerDestinationsBuilder_ == null) { + producerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + producerDestinationsBuilder_.clear(); + } + if (consumerDestinationsBuilder_ == null) { + consumerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + consumerDestinationsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_descriptor; + } + + public com.google.api.Monitoring getDefaultInstanceForType() { + return com.google.api.Monitoring.getDefaultInstance(); + } + + public com.google.api.Monitoring build() { + com.google.api.Monitoring result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Monitoring buildPartial() { + com.google.api.Monitoring result = new com.google.api.Monitoring(this); + int from_bitField0_ = bitField0_; + if (producerDestinationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + producerDestinations_ = java.util.Collections.unmodifiableList(producerDestinations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.producerDestinations_ = producerDestinations_; + } else { + result.producerDestinations_ = producerDestinationsBuilder_.build(); + } + if (consumerDestinationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.consumerDestinations_ = consumerDestinations_; + } else { + result.consumerDestinations_ = consumerDestinationsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Monitoring) { + return mergeFrom((com.google.api.Monitoring)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Monitoring other) { + if (other == com.google.api.Monitoring.getDefaultInstance()) return this; + if (producerDestinationsBuilder_ == null) { + if (!other.producerDestinations_.isEmpty()) { + if (producerDestinations_.isEmpty()) { + producerDestinations_ = other.producerDestinations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProducerDestinationsIsMutable(); + producerDestinations_.addAll(other.producerDestinations_); + } + onChanged(); + } + } else { + if (!other.producerDestinations_.isEmpty()) { + if (producerDestinationsBuilder_.isEmpty()) { + producerDestinationsBuilder_.dispose(); + producerDestinationsBuilder_ = null; + producerDestinations_ = other.producerDestinations_; + bitField0_ = (bitField0_ & ~0x00000001); + producerDestinationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getProducerDestinationsFieldBuilder() : null; + } else { + producerDestinationsBuilder_.addAllMessages(other.producerDestinations_); + } + } + } + if (consumerDestinationsBuilder_ == null) { + if (!other.consumerDestinations_.isEmpty()) { + if (consumerDestinations_.isEmpty()) { + consumerDestinations_ = other.consumerDestinations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.addAll(other.consumerDestinations_); + } + onChanged(); + } + } else { + if (!other.consumerDestinations_.isEmpty()) { + if (consumerDestinationsBuilder_.isEmpty()) { + consumerDestinationsBuilder_.dispose(); + consumerDestinationsBuilder_ = null; + consumerDestinations_ = other.consumerDestinations_; + bitField0_ = (bitField0_ & ~0x00000002); + consumerDestinationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getConsumerDestinationsFieldBuilder() : null; + } else { + consumerDestinationsBuilder_.addAllMessages(other.consumerDestinations_); + } + } + } + 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.Monitoring parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Monitoring) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List producerDestinations_ = + java.util.Collections.emptyList(); + private void ensureProducerDestinationsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + producerDestinations_ = new java.util.ArrayList(producerDestinations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder> producerDestinationsBuilder_; + + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public java.util.List getProducerDestinationsList() { + if (producerDestinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(producerDestinations_); + } else { + return producerDestinationsBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public int getProducerDestinationsCount() { + if (producerDestinationsBuilder_ == null) { + return producerDestinations_.size(); + } else { + return producerDestinationsBuilder_.getCount(); + } + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public com.google.api.Monitoring.MonitoringDestination getProducerDestinations(int index) { + if (producerDestinationsBuilder_ == null) { + return producerDestinations_.get(index); + } else { + return producerDestinationsBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder setProducerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination value) { + if (producerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerDestinationsIsMutable(); + producerDestinations_.set(index, value); + onChanged(); + } else { + producerDestinationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder setProducerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.set(index, builderForValue.build()); + onChanged(); + } else { + producerDestinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder addProducerDestinations(com.google.api.Monitoring.MonitoringDestination value) { + if (producerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(value); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder addProducerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination value) { + if (producerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(index, value); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder addProducerDestinations( + com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(builderForValue.build()); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder addProducerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(index, builderForValue.build()); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder addAllProducerDestinations( + java.lang.Iterable values) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, producerDestinations_); + onChanged(); + } else { + producerDestinationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder clearProducerDestinations() { + if (producerDestinationsBuilder_ == null) { + producerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + producerDestinationsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public Builder removeProducerDestinations(int index) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.remove(index); + onChanged(); + } else { + producerDestinationsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public com.google.api.Monitoring.MonitoringDestination.Builder getProducerDestinationsBuilder( + int index) { + return getProducerDestinationsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public com.google.api.Monitoring.MonitoringDestinationOrBuilder getProducerDestinationsOrBuilder( + int index) { + if (producerDestinationsBuilder_ == null) { + return producerDestinations_.get(index); } else { + return producerDestinationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public java.util.List + getProducerDestinationsOrBuilderList() { + if (producerDestinationsBuilder_ != null) { + return producerDestinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(producerDestinations_); + } + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public com.google.api.Monitoring.MonitoringDestination.Builder addProducerDestinationsBuilder() { + return getProducerDestinationsFieldBuilder().addBuilder( + com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public com.google.api.Monitoring.MonitoringDestination.Builder addProducerDestinationsBuilder( + int index) { + return getProducerDestinationsFieldBuilder().addBuilder( + index, com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); + } + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one producer destination.
+     * 
+ */ + public java.util.List + getProducerDestinationsBuilderList() { + return getProducerDestinationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder> + getProducerDestinationsFieldBuilder() { + if (producerDestinationsBuilder_ == null) { + producerDestinationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder>( + producerDestinations_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + producerDestinations_ = null; + } + return producerDestinationsBuilder_; + } + + private java.util.List consumerDestinations_ = + java.util.Collections.emptyList(); + private void ensureConsumerDestinationsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + consumerDestinations_ = new java.util.ArrayList(consumerDestinations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder> consumerDestinationsBuilder_; + + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public java.util.List getConsumerDestinationsList() { + if (consumerDestinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(consumerDestinations_); + } else { + return consumerDestinationsBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public int getConsumerDestinationsCount() { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.size(); + } else { + return consumerDestinationsBuilder_.getCount(); + } + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public com.google.api.Monitoring.MonitoringDestination getConsumerDestinations(int index) { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.get(index); + } else { + return consumerDestinationsBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder setConsumerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.set(index, value); + onChanged(); + } else { + consumerDestinationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder setConsumerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.set(index, builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder addConsumerDestinations(com.google.api.Monitoring.MonitoringDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(value); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder addConsumerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(index, value); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder addConsumerDestinations( + com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder addConsumerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(index, builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder addAllConsumerDestinations( + java.lang.Iterable values) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, consumerDestinations_); + onChanged(); + } else { + consumerDestinationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder clearConsumerDestinations() { + if (consumerDestinationsBuilder_ == null) { + consumerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + consumerDestinationsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public Builder removeConsumerDestinations(int index) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.remove(index); + onChanged(); + } else { + consumerDestinationsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public com.google.api.Monitoring.MonitoringDestination.Builder getConsumerDestinationsBuilder( + int index) { + return getConsumerDestinationsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public com.google.api.Monitoring.MonitoringDestinationOrBuilder getConsumerDestinationsOrBuilder( + int index) { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.get(index); } else { + return consumerDestinationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public java.util.List + getConsumerDestinationsOrBuilderList() { + if (consumerDestinationsBuilder_ != null) { + return consumerDestinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(consumerDestinations_); + } + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public com.google.api.Monitoring.MonitoringDestination.Builder addConsumerDestinationsBuilder() { + return getConsumerDestinationsFieldBuilder().addBuilder( + com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public com.google.api.Monitoring.MonitoringDestination.Builder addConsumerDestinationsBuilder( + int index) { + return getConsumerDestinationsFieldBuilder().addBuilder( + index, com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); + } + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ */ + public java.util.List + getConsumerDestinationsBuilderList() { + return getConsumerDestinationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder> + getConsumerDestinationsFieldBuilder() { + if (consumerDestinationsBuilder_ == null) { + consumerDestinationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder>( + consumerDestinations_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + consumerDestinations_ = null; + } + return consumerDestinationsBuilder_; + } + 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.Monitoring) + } + + // @@protoc_insertion_point(class_scope:google.api.Monitoring) + private static final com.google.api.Monitoring DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Monitoring(); + } + + public static com.google.api.Monitoring getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Monitoring parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Monitoring(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.Monitoring getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringOrBuilder.java new file mode 100644 index 000000000000..4c47de40aed8 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringOrBuilder.java @@ -0,0 +1,127 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitoring.proto + +package com.google.api; + +public interface MonitoringOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Monitoring) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one producer destination.
+   * 
+ */ + java.util.List + getProducerDestinationsList(); + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one producer destination.
+   * 
+ */ + com.google.api.Monitoring.MonitoringDestination getProducerDestinations(int index); + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one producer destination.
+   * 
+ */ + int getProducerDestinationsCount(); + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one producer destination.
+   * 
+ */ + java.util.List + getProducerDestinationsOrBuilderList(); + /** + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one producer destination.
+   * 
+ */ + com.google.api.Monitoring.MonitoringDestinationOrBuilder getProducerDestinationsOrBuilder( + int index); + + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ */ + java.util.List + getConsumerDestinationsList(); + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ */ + com.google.api.Monitoring.MonitoringDestination getConsumerDestinations(int index); + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ */ + int getConsumerDestinationsCount(); + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ */ + java.util.List + getConsumerDestinationsOrBuilderList(); + /** + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ */ + com.google.api.Monitoring.MonitoringDestinationOrBuilder getConsumerDestinationsOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringProto.java new file mode 100644 index 000000000000..a88e408696e2 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MonitoringProto.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitoring.proto + +package com.google.api; + +public final class MonitoringProto { + private MonitoringProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Monitoring_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Monitoring_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Monitoring_MonitoringDestination_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Monitoring_MonitoringDestination_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033google/api/monitoring.proto\022\ngoogle.ap" + + "i\032\034google/api/annotations.proto\032\'google/" + + "api/service_control_access.proto\"\354\001\n\nMon" + + "itoring\022K\n\025producer_destinations\030\001 \003(\0132," + + ".google.api.Monitoring.MonitoringDestina" + + "tion\022K\n\025consumer_destinations\030\002 \003(\0132,.go" + + "ogle.api.Monitoring.MonitoringDestinatio" + + "n\032D\n\025MonitoringDestination\022\032\n\022monitored_" + + "resource\030\001 \001(\t\022\017\n\007metrics\030\002 \003(\tB#\n\016com.g" + + "oogle.apiB\017MonitoringProtoP\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ServiceControlAccessProto.getDescriptor(), + }, assigner); + internal_static_google_api_Monitoring_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Monitoring_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Monitoring_descriptor, + new java.lang.String[] { "ProducerDestinations", "ConsumerDestinations", }); + internal_static_google_api_Monitoring_MonitoringDestination_descriptor = + internal_static_google_api_Monitoring_descriptor.getNestedTypes().get(0); + internal_static_google_api_Monitoring_MonitoringDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Monitoring_MonitoringDestination_descriptor, + new java.lang.String[] { "MonitoredResource", "Metrics", }); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ServiceControlAccessProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirements.java b/gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirements.java new file mode 100644 index 000000000000..907dd4d8a721 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirements.java @@ -0,0 +1,532 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.OAuthRequirements} + * + *
+ * OAuth scopes are a way to define data and permissions on data. For example,
+ * there are scopes defined for "Read-only access to Google Calendar" and
+ * "Access to Cloud Platform". Users can consent to a scope for an application,
+ * giving it permission to access that data on their behalf.
+ * OAuth scope specifications should be fairly coarse grained; a user will need
+ * to see and understand the text description of what your scope means.
+ * In most cases: use one or at most two OAuth scopes for an entire family of
+ * products.  If your product has multiple APIs, you should probably be sharing
+ * the OAuth scope across all of those APIs.
+ * When you need finer grained OAuth consent screens: talk with your product
+ * management about how developers will use them in practice.
+ * (--GOOGLE_INTERNAL Do not do this:
+ * https://screenshot.googleplex.com/PHqgZGxetu.png
+ * See http://go/apiscopes for documentation on how to create
+ * a new API scope if you need one. --)
+ * 
+ */ +public final class OAuthRequirements extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.OAuthRequirements) + OAuthRequirementsOrBuilder { + // Use OAuthRequirements.newBuilder() to construct. + private OAuthRequirements(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private OAuthRequirements() { + canonicalScopes_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private OAuthRequirements( + 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(); + + canonicalScopes_ = s; + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.OAuthRequirements.class, com.google.api.OAuthRequirements.Builder.class); + } + + public static final int CANONICAL_SCOPES_FIELD_NUMBER = 1; + private volatile java.lang.Object canonicalScopes_; + /** + * optional string canonical_scopes = 1; + * + *
+   * The list of publicly documented OAuth scopes that are allowed access. An
+   * OAuth token containing any of these scopes will be accepted.
+   * Example:
+   *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+   *                        https://www.googleapis.com/auth/calendar.read
+   * 
+ */ + public java.lang.String getCanonicalScopes() { + java.lang.Object ref = canonicalScopes_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + canonicalScopes_ = s; + return s; + } + } + /** + * optional string canonical_scopes = 1; + * + *
+   * The list of publicly documented OAuth scopes that are allowed access. An
+   * OAuth token containing any of these scopes will be accepted.
+   * Example:
+   *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+   *                        https://www.googleapis.com/auth/calendar.read
+   * 
+ */ + public com.google.protobuf.ByteString + getCanonicalScopesBytes() { + java.lang.Object ref = canonicalScopes_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + canonicalScopes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 { + if (!getCanonicalScopesBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, canonicalScopes_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCanonicalScopesBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, canonicalScopes_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.OAuthRequirements parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.OAuthRequirements 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.OAuthRequirements parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.OAuthRequirements parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.OAuthRequirements parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.OAuthRequirements parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.OAuthRequirements parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.OAuthRequirements parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.OAuthRequirements parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.OAuthRequirements 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.OAuthRequirements 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.OAuthRequirements} + * + *
+   * OAuth scopes are a way to define data and permissions on data. For example,
+   * there are scopes defined for "Read-only access to Google Calendar" and
+   * "Access to Cloud Platform". Users can consent to a scope for an application,
+   * giving it permission to access that data on their behalf.
+   * OAuth scope specifications should be fairly coarse grained; a user will need
+   * to see and understand the text description of what your scope means.
+   * In most cases: use one or at most two OAuth scopes for an entire family of
+   * products.  If your product has multiple APIs, you should probably be sharing
+   * the OAuth scope across all of those APIs.
+   * When you need finer grained OAuth consent screens: talk with your product
+   * management about how developers will use them in practice.
+   * (--GOOGLE_INTERNAL Do not do this:
+   * https://screenshot.googleplex.com/PHqgZGxetu.png
+   * See http://go/apiscopes for documentation on how to create
+   * a new API scope if you need one. --)
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.OAuthRequirements) + com.google.api.OAuthRequirementsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.OAuthRequirements.class, com.google.api.OAuthRequirements.Builder.class); + } + + // Construct using com.google.api.OAuthRequirements.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + canonicalScopes_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_descriptor; + } + + public com.google.api.OAuthRequirements getDefaultInstanceForType() { + return com.google.api.OAuthRequirements.getDefaultInstance(); + } + + public com.google.api.OAuthRequirements build() { + com.google.api.OAuthRequirements result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.OAuthRequirements buildPartial() { + com.google.api.OAuthRequirements result = new com.google.api.OAuthRequirements(this); + result.canonicalScopes_ = canonicalScopes_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.OAuthRequirements) { + return mergeFrom((com.google.api.OAuthRequirements)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.OAuthRequirements other) { + if (other == com.google.api.OAuthRequirements.getDefaultInstance()) return this; + if (!other.getCanonicalScopes().isEmpty()) { + canonicalScopes_ = other.canonicalScopes_; + onChanged(); + } + 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.OAuthRequirements parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.OAuthRequirements) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object canonicalScopes_ = ""; + /** + * optional string canonical_scopes = 1; + * + *
+     * The list of publicly documented OAuth scopes that are allowed access. An
+     * OAuth token containing any of these scopes will be accepted.
+     * Example:
+     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+     *                        https://www.googleapis.com/auth/calendar.read
+     * 
+ */ + public java.lang.String getCanonicalScopes() { + java.lang.Object ref = canonicalScopes_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + canonicalScopes_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string canonical_scopes = 1; + * + *
+     * The list of publicly documented OAuth scopes that are allowed access. An
+     * OAuth token containing any of these scopes will be accepted.
+     * Example:
+     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+     *                        https://www.googleapis.com/auth/calendar.read
+     * 
+ */ + public com.google.protobuf.ByteString + getCanonicalScopesBytes() { + java.lang.Object ref = canonicalScopes_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + canonicalScopes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string canonical_scopes = 1; + * + *
+     * The list of publicly documented OAuth scopes that are allowed access. An
+     * OAuth token containing any of these scopes will be accepted.
+     * Example:
+     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+     *                        https://www.googleapis.com/auth/calendar.read
+     * 
+ */ + public Builder setCanonicalScopes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + canonicalScopes_ = value; + onChanged(); + return this; + } + /** + * optional string canonical_scopes = 1; + * + *
+     * The list of publicly documented OAuth scopes that are allowed access. An
+     * OAuth token containing any of these scopes will be accepted.
+     * Example:
+     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+     *                        https://www.googleapis.com/auth/calendar.read
+     * 
+ */ + public Builder clearCanonicalScopes() { + + canonicalScopes_ = getDefaultInstance().getCanonicalScopes(); + onChanged(); + return this; + } + /** + * optional string canonical_scopes = 1; + * + *
+     * The list of publicly documented OAuth scopes that are allowed access. An
+     * OAuth token containing any of these scopes will be accepted.
+     * Example:
+     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+     *                        https://www.googleapis.com/auth/calendar.read
+     * 
+ */ + public Builder setCanonicalScopesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + canonicalScopes_ = value; + onChanged(); + return this; + } + 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.OAuthRequirements) + } + + // @@protoc_insertion_point(class_scope:google.api.OAuthRequirements) + private static final com.google.api.OAuthRequirements DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.OAuthRequirements(); + } + + public static com.google.api.OAuthRequirements getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public OAuthRequirements parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new OAuthRequirements(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.OAuthRequirements getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirementsOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirementsOrBuilder.java new file mode 100644 index 000000000000..eaec6e43bf52 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/OAuthRequirementsOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public interface OAuthRequirementsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.OAuthRequirements) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string canonical_scopes = 1; + * + *
+   * The list of publicly documented OAuth scopes that are allowed access. An
+   * OAuth token containing any of these scopes will be accepted.
+   * Example:
+   *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+   *                        https://www.googleapis.com/auth/calendar.read
+   * 
+ */ + java.lang.String getCanonicalScopes(); + /** + * optional string canonical_scopes = 1; + * + *
+   * The list of publicly documented OAuth scopes that are allowed access. An
+   * OAuth token containing any of these scopes will be accepted.
+   * Example:
+   *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+   *                        https://www.googleapis.com/auth/calendar.read
+   * 
+ */ + com.google.protobuf.ByteString + getCanonicalScopesBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Service.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Service.java index 1ba6c8e37d79..dc6630982d66 100644 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Service.java +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/Service.java @@ -44,6 +44,9 @@ private Service() { apis_ = java.util.Collections.emptyList(); types_ = java.util.Collections.emptyList(); enums_ = java.util.Collections.emptyList(); + logs_ = java.util.Collections.emptyList(); + metrics_ = java.util.Collections.emptyList(); + monitoredResources_ = java.util.Collections.emptyList(); systemTypes_ = java.util.Collections.emptyList(); } @@ -146,6 +149,19 @@ private Service( break; } + case 90: { + com.google.api.Authentication.Builder subBuilder = null; + if (authentication_ != null) { + subBuilder = authentication_.toBuilder(); + } + authentication_ = input.readMessage(com.google.api.Authentication.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(authentication_); + authentication_ = subBuilder.buildPartial(); + } + + break; + } case 98: { com.google.api.Context.Builder subBuilder = null; if (context_ != null) { @@ -159,6 +175,19 @@ private Service( break; } + case 122: { + com.google.api.Usage.Builder subBuilder = null; + if (usage_ != null) { + subBuilder = usage_.toBuilder(); + } + usage_ = input.readMessage(com.google.api.Usage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(usage_); + usage_ = subBuilder.buildPartial(); + } + + break; + } case 130: { com.google.api.CustomError.Builder subBuilder = null; if (customError_ != null) { @@ -185,12 +214,75 @@ private Service( break; } + case 170: { + com.google.api.Control.Builder subBuilder = null; + if (control_ != null) { + subBuilder = control_.toBuilder(); + } + control_ = input.readMessage(com.google.api.Control.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(control_); + control_ = subBuilder.buildPartial(); + } + + break; + } case 178: { String s = input.readStringRequireUtf8(); producerProjectId_ = s; break; } + case 186: { + if (!((mutable_bitField0_ & 0x00008000) == 0x00008000)) { + logs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00008000; + } + logs_.add(input.readMessage(com.google.api.LogDescriptor.parser(), extensionRegistry)); + break; + } + case 194: { + if (!((mutable_bitField0_ & 0x00010000) == 0x00010000)) { + metrics_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00010000; + } + metrics_.add(input.readMessage(com.google.api.MetricDescriptor.parser(), extensionRegistry)); + break; + } + case 202: { + if (!((mutable_bitField0_ & 0x00020000) == 0x00020000)) { + monitoredResources_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00020000; + } + monitoredResources_.add(input.readMessage(com.google.api.MonitoredResourceDescriptor.parser(), extensionRegistry)); + break; + } + case 218: { + com.google.api.Logging.Builder subBuilder = null; + if (logging_ != null) { + subBuilder = logging_.toBuilder(); + } + logging_ = input.readMessage(com.google.api.Logging.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(logging_); + logging_ = subBuilder.buildPartial(); + } + + break; + } + case 226: { + com.google.api.Monitoring.Builder subBuilder = null; + if (monitoring_ != null) { + subBuilder = monitoring_.toBuilder(); + } + monitoring_ = input.readMessage(com.google.api.Monitoring.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(monitoring_); + monitoring_ = subBuilder.buildPartial(); + } + + break; + } case 802: { com.google.protobuf.Any.Builder subBuilder = null; if (derivedData_ != null) { @@ -205,9 +297,9 @@ private Service( break; } case 818: { - if (!((mutable_bitField0_ & 0x00002000) == 0x00002000)) { + if (!((mutable_bitField0_ & 0x00200000) == 0x00200000)) { systemTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00002000; + mutable_bitField0_ |= 0x00200000; } systemTypes_.add(input.readMessage(com.google.protobuf.Type.parser(), extensionRegistry)); break; @@ -230,7 +322,16 @@ private Service( if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { enums_ = java.util.Collections.unmodifiableList(enums_); } - if (((mutable_bitField0_ & 0x00002000) == 0x00002000)) { + if (((mutable_bitField0_ & 0x00008000) == 0x00008000)) { + logs_ = java.util.Collections.unmodifiableList(logs_); + } + if (((mutable_bitField0_ & 0x00010000) == 0x00010000)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + } + if (((mutable_bitField0_ & 0x00020000) == 0x00020000)) { + monitoredResources_ = java.util.Collections.unmodifiableList(monitoredResources_); + } + if (((mutable_bitField0_ & 0x00200000) == 0x00200000)) { systemTypes_ = java.util.Collections.unmodifiableList(systemTypes_); } makeExtensionsImmutable(); @@ -762,6 +863,39 @@ public com.google.api.HttpOrBuilder getHttpOrBuilder() { return getHttp(); } + public static final int AUTHENTICATION_FIELD_NUMBER = 11; + private com.google.api.Authentication authentication_; + /** + * optional .google.api.Authentication authentication = 11; + * + *
+   * Auth configuration.
+   * 
+ */ + public boolean hasAuthentication() { + return authentication_ != null; + } + /** + * optional .google.api.Authentication authentication = 11; + * + *
+   * Auth configuration.
+   * 
+ */ + public com.google.api.Authentication getAuthentication() { + return authentication_ == null ? com.google.api.Authentication.getDefaultInstance() : authentication_; + } + /** + * optional .google.api.Authentication authentication = 11; + * + *
+   * Auth configuration.
+   * 
+ */ + public com.google.api.AuthenticationOrBuilder getAuthenticationOrBuilder() { + return getAuthentication(); + } + public static final int CONTEXT_FIELD_NUMBER = 12; private com.google.api.Context context_; /** @@ -795,6 +929,39 @@ public com.google.api.ContextOrBuilder getContextOrBuilder() { return getContext(); } + public static final int USAGE_FIELD_NUMBER = 15; + private com.google.api.Usage usage_; + /** + * optional .google.api.Usage usage = 15; + * + *
+   * Configuration controlling usage of this service.
+   * 
+ */ + public boolean hasUsage() { + return usage_ != null; + } + /** + * optional .google.api.Usage usage = 15; + * + *
+   * Configuration controlling usage of this service.
+   * 
+ */ + public com.google.api.Usage getUsage() { + return usage_ == null ? com.google.api.Usage.getDefaultInstance() : usage_; + } + /** + * optional .google.api.Usage usage = 15; + * + *
+   * Configuration controlling usage of this service.
+   * 
+ */ + public com.google.api.UsageOrBuilder getUsageOrBuilder() { + return getUsage(); + } + public static final int CUSTOM_ERROR_FIELD_NUMBER = 16; private com.google.api.CustomError customError_; /** @@ -828,6 +995,300 @@ public com.google.api.CustomErrorOrBuilder getCustomErrorOrBuilder() { return getCustomError(); } + public static final int CONTROL_FIELD_NUMBER = 21; + private com.google.api.Control control_; + /** + * optional .google.api.Control control = 21; + * + *
+   * Configuration for the service control plane.
+   * 
+ */ + public boolean hasControl() { + return control_ != null; + } + /** + * optional .google.api.Control control = 21; + * + *
+   * Configuration for the service control plane.
+   * 
+ */ + public com.google.api.Control getControl() { + return control_ == null ? com.google.api.Control.getDefaultInstance() : control_; + } + /** + * optional .google.api.Control control = 21; + * + *
+   * Configuration for the service control plane.
+   * 
+ */ + public com.google.api.ControlOrBuilder getControlOrBuilder() { + return getControl(); + } + + public static final int LOGS_FIELD_NUMBER = 23; + private java.util.List logs_; + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+   * Defines the logs used by this service.
+   * 
+ */ + public java.util.List getLogsList() { + return logs_; + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+   * Defines the logs used by this service.
+   * 
+ */ + public java.util.List + getLogsOrBuilderList() { + return logs_; + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+   * Defines the logs used by this service.
+   * 
+ */ + public int getLogsCount() { + return logs_.size(); + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+   * Defines the logs used by this service.
+   * 
+ */ + public com.google.api.LogDescriptor getLogs(int index) { + return logs_.get(index); + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+   * Defines the logs used by this service.
+   * 
+ */ + public com.google.api.LogDescriptorOrBuilder getLogsOrBuilder( + int index) { + return logs_.get(index); + } + + public static final int METRICS_FIELD_NUMBER = 24; + private java.util.List metrics_; + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+   * Defines the metrics used by this service.
+   * 
+ */ + public java.util.List getMetricsList() { + return metrics_; + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+   * Defines the metrics used by this service.
+   * 
+ */ + public java.util.List + getMetricsOrBuilderList() { + return metrics_; + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+   * Defines the metrics used by this service.
+   * 
+ */ + public int getMetricsCount() { + return metrics_.size(); + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+   * Defines the metrics used by this service.
+   * 
+ */ + public com.google.api.MetricDescriptor getMetrics(int index) { + return metrics_.get(index); + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+   * Defines the metrics used by this service.
+   * 
+ */ + public com.google.api.MetricDescriptorOrBuilder getMetricsOrBuilder( + int index) { + return metrics_.get(index); + } + + public static final int MONITORED_RESOURCES_FIELD_NUMBER = 25; + private java.util.List monitoredResources_; + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+   * Defines the monitored resources used by this service. This is required
+   * by the [Service.monitoring][] configuration.
+   * (-- GOOGLE_INTERNAL: owners of Google services must review their
+   * monitored resource configuration with Monarch team and Chemist team
+   * to ensure consistency. See go/new-cloud-monitoring-howto and
+   * go/chemist-onboarding for details, and contact chemist-dev@google.com
+   * for help. --)
+   * 
+ */ + public java.util.List getMonitoredResourcesList() { + return monitoredResources_; + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+   * Defines the monitored resources used by this service. This is required
+   * by the [Service.monitoring][] configuration.
+   * (-- GOOGLE_INTERNAL: owners of Google services must review their
+   * monitored resource configuration with Monarch team and Chemist team
+   * to ensure consistency. See go/new-cloud-monitoring-howto and
+   * go/chemist-onboarding for details, and contact chemist-dev@google.com
+   * for help. --)
+   * 
+ */ + public java.util.List + getMonitoredResourcesOrBuilderList() { + return monitoredResources_; + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+   * Defines the monitored resources used by this service. This is required
+   * by the [Service.monitoring][] configuration.
+   * (-- GOOGLE_INTERNAL: owners of Google services must review their
+   * monitored resource configuration with Monarch team and Chemist team
+   * to ensure consistency. See go/new-cloud-monitoring-howto and
+   * go/chemist-onboarding for details, and contact chemist-dev@google.com
+   * for help. --)
+   * 
+ */ + public int getMonitoredResourcesCount() { + return monitoredResources_.size(); + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+   * Defines the monitored resources used by this service. This is required
+   * by the [Service.monitoring][] configuration.
+   * (-- GOOGLE_INTERNAL: owners of Google services must review their
+   * monitored resource configuration with Monarch team and Chemist team
+   * to ensure consistency. See go/new-cloud-monitoring-howto and
+   * go/chemist-onboarding for details, and contact chemist-dev@google.com
+   * for help. --)
+   * 
+ */ + public com.google.api.MonitoredResourceDescriptor getMonitoredResources(int index) { + return monitoredResources_.get(index); + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+   * Defines the monitored resources used by this service. This is required
+   * by the [Service.monitoring][] configuration.
+   * (-- GOOGLE_INTERNAL: owners of Google services must review their
+   * monitored resource configuration with Monarch team and Chemist team
+   * to ensure consistency. See go/new-cloud-monitoring-howto and
+   * go/chemist-onboarding for details, and contact chemist-dev@google.com
+   * for help. --)
+   * 
+ */ + public com.google.api.MonitoredResourceDescriptorOrBuilder getMonitoredResourcesOrBuilder( + int index) { + return monitoredResources_.get(index); + } + + public static final int LOGGING_FIELD_NUMBER = 27; + private com.google.api.Logging logging_; + /** + * optional .google.api.Logging logging = 27; + * + *
+   * Logging configuration of the service.
+   * 
+ */ + public boolean hasLogging() { + return logging_ != null; + } + /** + * optional .google.api.Logging logging = 27; + * + *
+   * Logging configuration of the service.
+   * 
+ */ + public com.google.api.Logging getLogging() { + return logging_ == null ? com.google.api.Logging.getDefaultInstance() : logging_; + } + /** + * optional .google.api.Logging logging = 27; + * + *
+   * Logging configuration of the service.
+   * 
+ */ + public com.google.api.LoggingOrBuilder getLoggingOrBuilder() { + return getLogging(); + } + + public static final int MONITORING_FIELD_NUMBER = 28; + private com.google.api.Monitoring monitoring_; + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+   * Monitoring configuration of the service.
+   * 
+ */ + public boolean hasMonitoring() { + return monitoring_ != null; + } + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+   * Monitoring configuration of the service.
+   * 
+ */ + public com.google.api.Monitoring getMonitoring() { + return monitoring_ == null ? com.google.api.Monitoring.getDefaultInstance() : monitoring_; + } + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+   * Monitoring configuration of the service.
+   * 
+ */ + public com.google.api.MonitoringOrBuilder getMonitoringOrBuilder() { + return getMonitoring(); + } + public static final int DERIVED_DATA_FIELD_NUMBER = 100; private com.google.protobuf.Any derivedData_; /** @@ -978,18 +1439,42 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (http_ != null) { output.writeMessage(9, getHttp()); } + if (authentication_ != null) { + output.writeMessage(11, getAuthentication()); + } if (context_ != null) { output.writeMessage(12, getContext()); } + if (usage_ != null) { + output.writeMessage(15, getUsage()); + } if (customError_ != null) { output.writeMessage(16, getCustomError()); } if (configVersion_ != null) { output.writeMessage(20, getConfigVersion()); } + if (control_ != null) { + output.writeMessage(21, getControl()); + } if (!getProducerProjectIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessage.writeString(output, 22, producerProjectId_); } + for (int i = 0; i < logs_.size(); i++) { + output.writeMessage(23, logs_.get(i)); + } + for (int i = 0; i < metrics_.size(); i++) { + output.writeMessage(24, metrics_.get(i)); + } + for (int i = 0; i < monitoredResources_.size(); i++) { + output.writeMessage(25, monitoredResources_.get(i)); + } + if (logging_ != null) { + output.writeMessage(27, getLogging()); + } + if (monitoring_ != null) { + output.writeMessage(28, getMonitoring()); + } if (derivedData_ != null) { output.writeMessage(100, getDerivedData()); } @@ -1033,10 +1518,18 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, getHttp()); } + if (authentication_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getAuthentication()); + } if (context_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(12, getContext()); } + if (usage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getUsage()); + } if (customError_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(16, getCustomError()); @@ -1045,22 +1538,46 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(20, getConfigVersion()); } + if (control_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getControl()); + } if (!getProducerProjectIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessage.computeStringSize(22, producerProjectId_); } - if (derivedData_ != null) { + for (int i = 0; i < logs_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getDerivedData()); + .computeMessageSize(23, logs_.get(i)); } - for (int i = 0; i < systemTypes_.size(); i++) { + for (int i = 0; i < metrics_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(102, systemTypes_.get(i)); + .computeMessageSize(24, metrics_.get(i)); } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; + for (int i = 0; i < monitoredResources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(25, monitoredResources_.get(i)); + } + if (logging_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(27, getLogging()); + } + if (monitoring_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(28, getMonitoring()); + } + if (derivedData_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getDerivedData()); + } + for (int i = 0; i < systemTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(102, systemTypes_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; public static com.google.api.Service parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1189,6 +1706,9 @@ private void maybeForceBuilderInitialization() { getApisFieldBuilder(); getTypesFieldBuilder(); getEnumsFieldBuilder(); + getLogsFieldBuilder(); + getMetricsFieldBuilder(); + getMonitoredResourcesFieldBuilder(); getSystemTypesFieldBuilder(); } } @@ -1242,18 +1762,66 @@ public Builder clear() { http_ = null; httpBuilder_ = null; } + if (authenticationBuilder_ == null) { + authentication_ = null; + } else { + authentication_ = null; + authenticationBuilder_ = null; + } if (contextBuilder_ == null) { context_ = null; } else { context_ = null; contextBuilder_ = null; } + if (usageBuilder_ == null) { + usage_ = null; + } else { + usage_ = null; + usageBuilder_ = null; + } if (customErrorBuilder_ == null) { customError_ = null; } else { customError_ = null; customErrorBuilder_ = null; } + if (controlBuilder_ == null) { + control_ = null; + } else { + control_ = null; + controlBuilder_ = null; + } + if (logsBuilder_ == null) { + logs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00008000); + } else { + logsBuilder_.clear(); + } + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00010000); + } else { + metricsBuilder_.clear(); + } + if (monitoredResourcesBuilder_ == null) { + monitoredResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00020000); + } else { + monitoredResourcesBuilder_.clear(); + } + if (loggingBuilder_ == null) { + logging_ = null; + } else { + logging_ = null; + loggingBuilder_ = null; + } + if (monitoringBuilder_ == null) { + monitoring_ = null; + } else { + monitoring_ = null; + monitoringBuilder_ = null; + } if (derivedDataBuilder_ == null) { derivedData_ = null; } else { @@ -1262,7 +1830,7 @@ public Builder clear() { } if (systemTypesBuilder_ == null) { systemTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00200000); } else { systemTypesBuilder_.clear(); } @@ -1340,25 +1908,77 @@ public com.google.api.Service buildPartial() { } else { result.http_ = httpBuilder_.build(); } + if (authenticationBuilder_ == null) { + result.authentication_ = authentication_; + } else { + result.authentication_ = authenticationBuilder_.build(); + } if (contextBuilder_ == null) { result.context_ = context_; } else { result.context_ = contextBuilder_.build(); } + if (usageBuilder_ == null) { + result.usage_ = usage_; + } else { + result.usage_ = usageBuilder_.build(); + } if (customErrorBuilder_ == null) { result.customError_ = customError_; } else { result.customError_ = customErrorBuilder_.build(); } + if (controlBuilder_ == null) { + result.control_ = control_; + } else { + result.control_ = controlBuilder_.build(); + } + if (logsBuilder_ == null) { + if (((bitField0_ & 0x00008000) == 0x00008000)) { + logs_ = java.util.Collections.unmodifiableList(logs_); + bitField0_ = (bitField0_ & ~0x00008000); + } + result.logs_ = logs_; + } else { + result.logs_ = logsBuilder_.build(); + } + if (metricsBuilder_ == null) { + if (((bitField0_ & 0x00010000) == 0x00010000)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + bitField0_ = (bitField0_ & ~0x00010000); + } + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + if (monitoredResourcesBuilder_ == null) { + if (((bitField0_ & 0x00020000) == 0x00020000)) { + monitoredResources_ = java.util.Collections.unmodifiableList(monitoredResources_); + bitField0_ = (bitField0_ & ~0x00020000); + } + result.monitoredResources_ = monitoredResources_; + } else { + result.monitoredResources_ = monitoredResourcesBuilder_.build(); + } + if (loggingBuilder_ == null) { + result.logging_ = logging_; + } else { + result.logging_ = loggingBuilder_.build(); + } + if (monitoringBuilder_ == null) { + result.monitoring_ = monitoring_; + } else { + result.monitoring_ = monitoringBuilder_.build(); + } if (derivedDataBuilder_ == null) { result.derivedData_ = derivedData_; } else { result.derivedData_ = derivedDataBuilder_.build(); } if (systemTypesBuilder_ == null) { - if (((bitField0_ & 0x00002000) == 0x00002000)) { + if (((bitField0_ & 0x00200000) == 0x00200000)) { systemTypes_ = java.util.Collections.unmodifiableList(systemTypes_); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00200000); } result.systemTypes_ = systemTypes_; } else { @@ -1482,12 +2102,105 @@ public Builder mergeFrom(com.google.api.Service other) { if (other.hasHttp()) { mergeHttp(other.getHttp()); } + if (other.hasAuthentication()) { + mergeAuthentication(other.getAuthentication()); + } if (other.hasContext()) { mergeContext(other.getContext()); } + if (other.hasUsage()) { + mergeUsage(other.getUsage()); + } if (other.hasCustomError()) { mergeCustomError(other.getCustomError()); } + if (other.hasControl()) { + mergeControl(other.getControl()); + } + if (logsBuilder_ == null) { + if (!other.logs_.isEmpty()) { + if (logs_.isEmpty()) { + logs_ = other.logs_; + bitField0_ = (bitField0_ & ~0x00008000); + } else { + ensureLogsIsMutable(); + logs_.addAll(other.logs_); + } + onChanged(); + } + } else { + if (!other.logs_.isEmpty()) { + if (logsBuilder_.isEmpty()) { + logsBuilder_.dispose(); + logsBuilder_ = null; + logs_ = other.logs_; + bitField0_ = (bitField0_ & ~0x00008000); + logsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLogsFieldBuilder() : null; + } else { + logsBuilder_.addAllMessages(other.logs_); + } + } + } + if (metricsBuilder_ == null) { + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00010000); + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + onChanged(); + } + } else { + if (!other.metrics_.isEmpty()) { + if (metricsBuilder_.isEmpty()) { + metricsBuilder_.dispose(); + metricsBuilder_ = null; + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00010000); + metricsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMetricsFieldBuilder() : null; + } else { + metricsBuilder_.addAllMessages(other.metrics_); + } + } + } + if (monitoredResourcesBuilder_ == null) { + if (!other.monitoredResources_.isEmpty()) { + if (monitoredResources_.isEmpty()) { + monitoredResources_ = other.monitoredResources_; + bitField0_ = (bitField0_ & ~0x00020000); + } else { + ensureMonitoredResourcesIsMutable(); + monitoredResources_.addAll(other.monitoredResources_); + } + onChanged(); + } + } else { + if (!other.monitoredResources_.isEmpty()) { + if (monitoredResourcesBuilder_.isEmpty()) { + monitoredResourcesBuilder_.dispose(); + monitoredResourcesBuilder_ = null; + monitoredResources_ = other.monitoredResources_; + bitField0_ = (bitField0_ & ~0x00020000); + monitoredResourcesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMonitoredResourcesFieldBuilder() : null; + } else { + monitoredResourcesBuilder_.addAllMessages(other.monitoredResources_); + } + } + } + if (other.hasLogging()) { + mergeLogging(other.getLogging()); + } + if (other.hasMonitoring()) { + mergeMonitoring(other.getMonitoring()); + } if (other.hasDerivedData()) { mergeDerivedData(other.getDerivedData()); } @@ -1495,7 +2208,7 @@ public Builder mergeFrom(com.google.api.Service other) { if (!other.systemTypes_.isEmpty()) { if (systemTypes_.isEmpty()) { systemTypes_ = other.systemTypes_; - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00200000); } else { ensureSystemTypesIsMutable(); systemTypes_.addAll(other.systemTypes_); @@ -1508,7 +2221,7 @@ public Builder mergeFrom(com.google.api.Service other) { systemTypesBuilder_.dispose(); systemTypesBuilder_ = null; systemTypes_ = other.systemTypes_; - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00200000); systemTypesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getSystemTypesFieldBuilder() : null; @@ -3671,6 +4384,159 @@ public com.google.api.HttpOrBuilder getHttpOrBuilder() { return httpBuilder_; } + private com.google.api.Authentication authentication_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Authentication, com.google.api.Authentication.Builder, com.google.api.AuthenticationOrBuilder> authenticationBuilder_; + /** + * optional .google.api.Authentication authentication = 11; + * + *
+     * Auth configuration.
+     * 
+ */ + public boolean hasAuthentication() { + return authenticationBuilder_ != null || authentication_ != null; + } + /** + * optional .google.api.Authentication authentication = 11; + * + *
+     * Auth configuration.
+     * 
+ */ + public com.google.api.Authentication getAuthentication() { + if (authenticationBuilder_ == null) { + return authentication_ == null ? com.google.api.Authentication.getDefaultInstance() : authentication_; + } else { + return authenticationBuilder_.getMessage(); + } + } + /** + * optional .google.api.Authentication authentication = 11; + * + *
+     * Auth configuration.
+     * 
+ */ + public Builder setAuthentication(com.google.api.Authentication value) { + if (authenticationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authentication_ = value; + onChanged(); + } else { + authenticationBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.Authentication authentication = 11; + * + *
+     * Auth configuration.
+     * 
+ */ + public Builder setAuthentication( + com.google.api.Authentication.Builder builderForValue) { + if (authenticationBuilder_ == null) { + authentication_ = builderForValue.build(); + onChanged(); + } else { + authenticationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.Authentication authentication = 11; + * + *
+     * Auth configuration.
+     * 
+ */ + public Builder mergeAuthentication(com.google.api.Authentication value) { + if (authenticationBuilder_ == null) { + if (authentication_ != null) { + authentication_ = + com.google.api.Authentication.newBuilder(authentication_).mergeFrom(value).buildPartial(); + } else { + authentication_ = value; + } + onChanged(); + } else { + authenticationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.Authentication authentication = 11; + * + *
+     * Auth configuration.
+     * 
+ */ + public Builder clearAuthentication() { + if (authenticationBuilder_ == null) { + authentication_ = null; + onChanged(); + } else { + authentication_ = null; + authenticationBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.Authentication authentication = 11; + * + *
+     * Auth configuration.
+     * 
+ */ + public com.google.api.Authentication.Builder getAuthenticationBuilder() { + + onChanged(); + return getAuthenticationFieldBuilder().getBuilder(); + } + /** + * optional .google.api.Authentication authentication = 11; + * + *
+     * Auth configuration.
+     * 
+ */ + public com.google.api.AuthenticationOrBuilder getAuthenticationOrBuilder() { + if (authenticationBuilder_ != null) { + return authenticationBuilder_.getMessageOrBuilder(); + } else { + return authentication_ == null ? + com.google.api.Authentication.getDefaultInstance() : authentication_; + } + } + /** + * optional .google.api.Authentication authentication = 11; + * + *
+     * Auth configuration.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Authentication, com.google.api.Authentication.Builder, com.google.api.AuthenticationOrBuilder> + getAuthenticationFieldBuilder() { + if (authenticationBuilder_ == null) { + authenticationBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Authentication, com.google.api.Authentication.Builder, com.google.api.AuthenticationOrBuilder>( + getAuthentication(), + getParentForChildren(), + isClean()); + authentication_ = null; + } + return authenticationBuilder_; + } + private com.google.api.Context context_ = null; private com.google.protobuf.SingleFieldBuilder< com.google.api.Context, com.google.api.Context.Builder, com.google.api.ContextOrBuilder> contextBuilder_; @@ -3824,157 +4690,1813 @@ public com.google.api.ContextOrBuilder getContextOrBuilder() { return contextBuilder_; } - private com.google.api.CustomError customError_ = null; + private com.google.api.Usage usage_ = null; private com.google.protobuf.SingleFieldBuilder< - com.google.api.CustomError, com.google.api.CustomError.Builder, com.google.api.CustomErrorOrBuilder> customErrorBuilder_; + com.google.api.Usage, com.google.api.Usage.Builder, com.google.api.UsageOrBuilder> usageBuilder_; /** - * optional .google.api.CustomError custom_error = 16; + * optional .google.api.Usage usage = 15; * *
-     * Custom error configuration.
+     * Configuration controlling usage of this service.
      * 
*/ - public boolean hasCustomError() { - return customErrorBuilder_ != null || customError_ != null; + public boolean hasUsage() { + return usageBuilder_ != null || usage_ != null; } /** - * optional .google.api.CustomError custom_error = 16; + * optional .google.api.Usage usage = 15; * *
-     * Custom error configuration.
+     * Configuration controlling usage of this service.
      * 
*/ - public com.google.api.CustomError getCustomError() { - if (customErrorBuilder_ == null) { - return customError_ == null ? com.google.api.CustomError.getDefaultInstance() : customError_; + public com.google.api.Usage getUsage() { + if (usageBuilder_ == null) { + return usage_ == null ? com.google.api.Usage.getDefaultInstance() : usage_; } else { - return customErrorBuilder_.getMessage(); + return usageBuilder_.getMessage(); } } /** - * optional .google.api.CustomError custom_error = 16; + * optional .google.api.Usage usage = 15; * *
-     * Custom error configuration.
+     * Configuration controlling usage of this service.
      * 
*/ - public Builder setCustomError(com.google.api.CustomError value) { - if (customErrorBuilder_ == null) { + public Builder setUsage(com.google.api.Usage value) { + if (usageBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - customError_ = value; + usage_ = value; onChanged(); } else { - customErrorBuilder_.setMessage(value); + usageBuilder_.setMessage(value); } return this; } /** - * optional .google.api.CustomError custom_error = 16; + * optional .google.api.Usage usage = 15; * *
-     * Custom error configuration.
+     * Configuration controlling usage of this service.
      * 
*/ - public Builder setCustomError( - com.google.api.CustomError.Builder builderForValue) { - if (customErrorBuilder_ == null) { - customError_ = builderForValue.build(); + public Builder setUsage( + com.google.api.Usage.Builder builderForValue) { + if (usageBuilder_ == null) { + usage_ = builderForValue.build(); onChanged(); } else { - customErrorBuilder_.setMessage(builderForValue.build()); + usageBuilder_.setMessage(builderForValue.build()); } return this; } /** - * optional .google.api.CustomError custom_error = 16; + * optional .google.api.Usage usage = 15; * *
-     * Custom error configuration.
+     * Configuration controlling usage of this service.
      * 
*/ - public Builder mergeCustomError(com.google.api.CustomError value) { - if (customErrorBuilder_ == null) { - if (customError_ != null) { - customError_ = - com.google.api.CustomError.newBuilder(customError_).mergeFrom(value).buildPartial(); + public Builder mergeUsage(com.google.api.Usage value) { + if (usageBuilder_ == null) { + if (usage_ != null) { + usage_ = + com.google.api.Usage.newBuilder(usage_).mergeFrom(value).buildPartial(); } else { - customError_ = value; + usage_ = value; } onChanged(); } else { - customErrorBuilder_.mergeFrom(value); + usageBuilder_.mergeFrom(value); } return this; } /** - * optional .google.api.CustomError custom_error = 16; + * optional .google.api.Usage usage = 15; * *
-     * Custom error configuration.
+     * Configuration controlling usage of this service.
      * 
*/ - public Builder clearCustomError() { - if (customErrorBuilder_ == null) { - customError_ = null; + public Builder clearUsage() { + if (usageBuilder_ == null) { + usage_ = null; onChanged(); } else { - customError_ = null; - customErrorBuilder_ = null; + usage_ = null; + usageBuilder_ = null; } return this; } /** - * optional .google.api.CustomError custom_error = 16; + * optional .google.api.Usage usage = 15; * *
-     * Custom error configuration.
+     * Configuration controlling usage of this service.
      * 
*/ - public com.google.api.CustomError.Builder getCustomErrorBuilder() { + public com.google.api.Usage.Builder getUsageBuilder() { onChanged(); - return getCustomErrorFieldBuilder().getBuilder(); + return getUsageFieldBuilder().getBuilder(); } /** - * optional .google.api.CustomError custom_error = 16; + * optional .google.api.Usage usage = 15; * *
-     * Custom error configuration.
+     * Configuration controlling usage of this service.
      * 
*/ - public com.google.api.CustomErrorOrBuilder getCustomErrorOrBuilder() { - if (customErrorBuilder_ != null) { - return customErrorBuilder_.getMessageOrBuilder(); + public com.google.api.UsageOrBuilder getUsageOrBuilder() { + if (usageBuilder_ != null) { + return usageBuilder_.getMessageOrBuilder(); } else { - return customError_ == null ? - com.google.api.CustomError.getDefaultInstance() : customError_; + return usage_ == null ? + com.google.api.Usage.getDefaultInstance() : usage_; } } /** - * optional .google.api.CustomError custom_error = 16; + * optional .google.api.Usage usage = 15; * *
-     * Custom error configuration.
+     * Configuration controlling usage of this service.
      * 
*/ private com.google.protobuf.SingleFieldBuilder< - com.google.api.CustomError, com.google.api.CustomError.Builder, com.google.api.CustomErrorOrBuilder> - getCustomErrorFieldBuilder() { - if (customErrorBuilder_ == null) { - customErrorBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.CustomError, com.google.api.CustomError.Builder, com.google.api.CustomErrorOrBuilder>( - getCustomError(), + com.google.api.Usage, com.google.api.Usage.Builder, com.google.api.UsageOrBuilder> + getUsageFieldBuilder() { + if (usageBuilder_ == null) { + usageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Usage, com.google.api.Usage.Builder, com.google.api.UsageOrBuilder>( + getUsage(), getParentForChildren(), isClean()); - customError_ = null; + usage_ = null; } - return customErrorBuilder_; + return usageBuilder_; + } + + private com.google.api.CustomError customError_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.CustomError, com.google.api.CustomError.Builder, com.google.api.CustomErrorOrBuilder> customErrorBuilder_; + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+     * Custom error configuration.
+     * 
+ */ + public boolean hasCustomError() { + return customErrorBuilder_ != null || customError_ != null; + } + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+     * Custom error configuration.
+     * 
+ */ + public com.google.api.CustomError getCustomError() { + if (customErrorBuilder_ == null) { + return customError_ == null ? com.google.api.CustomError.getDefaultInstance() : customError_; + } else { + return customErrorBuilder_.getMessage(); + } + } + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+     * Custom error configuration.
+     * 
+ */ + public Builder setCustomError(com.google.api.CustomError value) { + if (customErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customError_ = value; + onChanged(); + } else { + customErrorBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+     * Custom error configuration.
+     * 
+ */ + public Builder setCustomError( + com.google.api.CustomError.Builder builderForValue) { + if (customErrorBuilder_ == null) { + customError_ = builderForValue.build(); + onChanged(); + } else { + customErrorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+     * Custom error configuration.
+     * 
+ */ + public Builder mergeCustomError(com.google.api.CustomError value) { + if (customErrorBuilder_ == null) { + if (customError_ != null) { + customError_ = + com.google.api.CustomError.newBuilder(customError_).mergeFrom(value).buildPartial(); + } else { + customError_ = value; + } + onChanged(); + } else { + customErrorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+     * Custom error configuration.
+     * 
+ */ + public Builder clearCustomError() { + if (customErrorBuilder_ == null) { + customError_ = null; + onChanged(); + } else { + customError_ = null; + customErrorBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+     * Custom error configuration.
+     * 
+ */ + public com.google.api.CustomError.Builder getCustomErrorBuilder() { + + onChanged(); + return getCustomErrorFieldBuilder().getBuilder(); + } + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+     * Custom error configuration.
+     * 
+ */ + public com.google.api.CustomErrorOrBuilder getCustomErrorOrBuilder() { + if (customErrorBuilder_ != null) { + return customErrorBuilder_.getMessageOrBuilder(); + } else { + return customError_ == null ? + com.google.api.CustomError.getDefaultInstance() : customError_; + } + } + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+     * Custom error configuration.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.CustomError, com.google.api.CustomError.Builder, com.google.api.CustomErrorOrBuilder> + getCustomErrorFieldBuilder() { + if (customErrorBuilder_ == null) { + customErrorBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.CustomError, com.google.api.CustomError.Builder, com.google.api.CustomErrorOrBuilder>( + getCustomError(), + getParentForChildren(), + isClean()); + customError_ = null; + } + return customErrorBuilder_; + } + + private com.google.api.Control control_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Control, com.google.api.Control.Builder, com.google.api.ControlOrBuilder> controlBuilder_; + /** + * optional .google.api.Control control = 21; + * + *
+     * Configuration for the service control plane.
+     * 
+ */ + public boolean hasControl() { + return controlBuilder_ != null || control_ != null; + } + /** + * optional .google.api.Control control = 21; + * + *
+     * Configuration for the service control plane.
+     * 
+ */ + public com.google.api.Control getControl() { + if (controlBuilder_ == null) { + return control_ == null ? com.google.api.Control.getDefaultInstance() : control_; + } else { + return controlBuilder_.getMessage(); + } + } + /** + * optional .google.api.Control control = 21; + * + *
+     * Configuration for the service control plane.
+     * 
+ */ + public Builder setControl(com.google.api.Control value) { + if (controlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + control_ = value; + onChanged(); + } else { + controlBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.Control control = 21; + * + *
+     * Configuration for the service control plane.
+     * 
+ */ + public Builder setControl( + com.google.api.Control.Builder builderForValue) { + if (controlBuilder_ == null) { + control_ = builderForValue.build(); + onChanged(); + } else { + controlBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.Control control = 21; + * + *
+     * Configuration for the service control plane.
+     * 
+ */ + public Builder mergeControl(com.google.api.Control value) { + if (controlBuilder_ == null) { + if (control_ != null) { + control_ = + com.google.api.Control.newBuilder(control_).mergeFrom(value).buildPartial(); + } else { + control_ = value; + } + onChanged(); + } else { + controlBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.Control control = 21; + * + *
+     * Configuration for the service control plane.
+     * 
+ */ + public Builder clearControl() { + if (controlBuilder_ == null) { + control_ = null; + onChanged(); + } else { + control_ = null; + controlBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.Control control = 21; + * + *
+     * Configuration for the service control plane.
+     * 
+ */ + public com.google.api.Control.Builder getControlBuilder() { + + onChanged(); + return getControlFieldBuilder().getBuilder(); + } + /** + * optional .google.api.Control control = 21; + * + *
+     * Configuration for the service control plane.
+     * 
+ */ + public com.google.api.ControlOrBuilder getControlOrBuilder() { + if (controlBuilder_ != null) { + return controlBuilder_.getMessageOrBuilder(); + } else { + return control_ == null ? + com.google.api.Control.getDefaultInstance() : control_; + } + } + /** + * optional .google.api.Control control = 21; + * + *
+     * Configuration for the service control plane.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Control, com.google.api.Control.Builder, com.google.api.ControlOrBuilder> + getControlFieldBuilder() { + if (controlBuilder_ == null) { + controlBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Control, com.google.api.Control.Builder, com.google.api.ControlOrBuilder>( + getControl(), + getParentForChildren(), + isClean()); + control_ = null; + } + return controlBuilder_; + } + + private java.util.List logs_ = + java.util.Collections.emptyList(); + private void ensureLogsIsMutable() { + if (!((bitField0_ & 0x00008000) == 0x00008000)) { + logs_ = new java.util.ArrayList(logs_); + bitField0_ |= 0x00008000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.LogDescriptor, com.google.api.LogDescriptor.Builder, com.google.api.LogDescriptorOrBuilder> logsBuilder_; + + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public java.util.List getLogsList() { + if (logsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logs_); + } else { + return logsBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public int getLogsCount() { + if (logsBuilder_ == null) { + return logs_.size(); + } else { + return logsBuilder_.getCount(); + } + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public com.google.api.LogDescriptor getLogs(int index) { + if (logsBuilder_ == null) { + return logs_.get(index); + } else { + return logsBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public Builder setLogs( + int index, com.google.api.LogDescriptor value) { + if (logsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.set(index, value); + onChanged(); + } else { + logsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public Builder setLogs( + int index, com.google.api.LogDescriptor.Builder builderForValue) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.set(index, builderForValue.build()); + onChanged(); + } else { + logsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public Builder addLogs(com.google.api.LogDescriptor value) { + if (logsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.add(value); + onChanged(); + } else { + logsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public Builder addLogs( + int index, com.google.api.LogDescriptor value) { + if (logsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.add(index, value); + onChanged(); + } else { + logsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public Builder addLogs( + com.google.api.LogDescriptor.Builder builderForValue) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.add(builderForValue.build()); + onChanged(); + } else { + logsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public Builder addLogs( + int index, com.google.api.LogDescriptor.Builder builderForValue) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.add(index, builderForValue.build()); + onChanged(); + } else { + logsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public Builder addAllLogs( + java.lang.Iterable values) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, logs_); + onChanged(); + } else { + logsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public Builder clearLogs() { + if (logsBuilder_ == null) { + logs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + } else { + logsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public Builder removeLogs(int index) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.remove(index); + onChanged(); + } else { + logsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public com.google.api.LogDescriptor.Builder getLogsBuilder( + int index) { + return getLogsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public com.google.api.LogDescriptorOrBuilder getLogsOrBuilder( + int index) { + if (logsBuilder_ == null) { + return logs_.get(index); } else { + return logsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public java.util.List + getLogsOrBuilderList() { + if (logsBuilder_ != null) { + return logsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logs_); + } + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public com.google.api.LogDescriptor.Builder addLogsBuilder() { + return getLogsFieldBuilder().addBuilder( + com.google.api.LogDescriptor.getDefaultInstance()); + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public com.google.api.LogDescriptor.Builder addLogsBuilder( + int index) { + return getLogsFieldBuilder().addBuilder( + index, com.google.api.LogDescriptor.getDefaultInstance()); + } + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+     * Defines the logs used by this service.
+     * 
+ */ + public java.util.List + getLogsBuilderList() { + return getLogsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.LogDescriptor, com.google.api.LogDescriptor.Builder, com.google.api.LogDescriptorOrBuilder> + getLogsFieldBuilder() { + if (logsBuilder_ == null) { + logsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.LogDescriptor, com.google.api.LogDescriptor.Builder, com.google.api.LogDescriptorOrBuilder>( + logs_, + ((bitField0_ & 0x00008000) == 0x00008000), + getParentForChildren(), + isClean()); + logs_ = null; + } + return logsBuilder_; + } + + private java.util.List metrics_ = + java.util.Collections.emptyList(); + private void ensureMetricsIsMutable() { + if (!((bitField0_ & 0x00010000) == 0x00010000)) { + metrics_ = new java.util.ArrayList(metrics_); + bitField0_ |= 0x00010000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.MetricDescriptor, com.google.api.MetricDescriptor.Builder, com.google.api.MetricDescriptorOrBuilder> metricsBuilder_; + + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public java.util.List getMetricsList() { + if (metricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metrics_); + } else { + return metricsBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public int getMetricsCount() { + if (metricsBuilder_ == null) { + return metrics_.size(); + } else { + return metricsBuilder_.getCount(); + } + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public com.google.api.MetricDescriptor getMetrics(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public Builder setMetrics( + int index, com.google.api.MetricDescriptor value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + onChanged(); + } else { + metricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public Builder setMetrics( + int index, com.google.api.MetricDescriptor.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.set(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public Builder addMetrics(com.google.api.MetricDescriptor value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + } else { + metricsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public Builder addMetrics( + int index, com.google.api.MetricDescriptor value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(index, value); + onChanged(); + } else { + metricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public Builder addMetrics( + com.google.api.MetricDescriptor.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public Builder addMetrics( + int index, com.google.api.MetricDescriptor.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public Builder addAllMetrics( + java.lang.Iterable values) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, metrics_); + onChanged(); + } else { + metricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + } else { + metricsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public Builder removeMetrics(int index) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.remove(index); + onChanged(); + } else { + metricsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public com.google.api.MetricDescriptor.Builder getMetricsBuilder( + int index) { + return getMetricsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public com.google.api.MetricDescriptorOrBuilder getMetricsOrBuilder( + int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); } else { + return metricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public java.util.List + getMetricsOrBuilderList() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metrics_); + } + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public com.google.api.MetricDescriptor.Builder addMetricsBuilder() { + return getMetricsFieldBuilder().addBuilder( + com.google.api.MetricDescriptor.getDefaultInstance()); + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public com.google.api.MetricDescriptor.Builder addMetricsBuilder( + int index) { + return getMetricsFieldBuilder().addBuilder( + index, com.google.api.MetricDescriptor.getDefaultInstance()); + } + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+     * Defines the metrics used by this service.
+     * 
+ */ + public java.util.List + getMetricsBuilderList() { + return getMetricsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.MetricDescriptor, com.google.api.MetricDescriptor.Builder, com.google.api.MetricDescriptorOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.MetricDescriptor, com.google.api.MetricDescriptor.Builder, com.google.api.MetricDescriptorOrBuilder>( + metrics_, + ((bitField0_ & 0x00010000) == 0x00010000), + getParentForChildren(), + isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + private java.util.List monitoredResources_ = + java.util.Collections.emptyList(); + private void ensureMonitoredResourcesIsMutable() { + if (!((bitField0_ & 0x00020000) == 0x00020000)) { + monitoredResources_ = new java.util.ArrayList(monitoredResources_); + bitField0_ |= 0x00020000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.MonitoredResourceDescriptor, com.google.api.MonitoredResourceDescriptor.Builder, com.google.api.MonitoredResourceDescriptorOrBuilder> monitoredResourcesBuilder_; + + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public java.util.List getMonitoredResourcesList() { + if (monitoredResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(monitoredResources_); + } else { + return monitoredResourcesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public int getMonitoredResourcesCount() { + if (monitoredResourcesBuilder_ == null) { + return monitoredResources_.size(); + } else { + return monitoredResourcesBuilder_.getCount(); + } + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public com.google.api.MonitoredResourceDescriptor getMonitoredResources(int index) { + if (monitoredResourcesBuilder_ == null) { + return monitoredResources_.get(index); + } else { + return monitoredResourcesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public Builder setMonitoredResources( + int index, com.google.api.MonitoredResourceDescriptor value) { + if (monitoredResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMonitoredResourcesIsMutable(); + monitoredResources_.set(index, value); + onChanged(); + } else { + monitoredResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public Builder setMonitoredResources( + int index, com.google.api.MonitoredResourceDescriptor.Builder builderForValue) { + if (monitoredResourcesBuilder_ == null) { + ensureMonitoredResourcesIsMutable(); + monitoredResources_.set(index, builderForValue.build()); + onChanged(); + } else { + monitoredResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public Builder addMonitoredResources(com.google.api.MonitoredResourceDescriptor value) { + if (monitoredResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMonitoredResourcesIsMutable(); + monitoredResources_.add(value); + onChanged(); + } else { + monitoredResourcesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public Builder addMonitoredResources( + int index, com.google.api.MonitoredResourceDescriptor value) { + if (monitoredResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMonitoredResourcesIsMutable(); + monitoredResources_.add(index, value); + onChanged(); + } else { + monitoredResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public Builder addMonitoredResources( + com.google.api.MonitoredResourceDescriptor.Builder builderForValue) { + if (monitoredResourcesBuilder_ == null) { + ensureMonitoredResourcesIsMutable(); + monitoredResources_.add(builderForValue.build()); + onChanged(); + } else { + monitoredResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public Builder addMonitoredResources( + int index, com.google.api.MonitoredResourceDescriptor.Builder builderForValue) { + if (monitoredResourcesBuilder_ == null) { + ensureMonitoredResourcesIsMutable(); + monitoredResources_.add(index, builderForValue.build()); + onChanged(); + } else { + monitoredResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public Builder addAllMonitoredResources( + java.lang.Iterable values) { + if (monitoredResourcesBuilder_ == null) { + ensureMonitoredResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, monitoredResources_); + onChanged(); + } else { + monitoredResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public Builder clearMonitoredResources() { + if (monitoredResourcesBuilder_ == null) { + monitoredResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + } else { + monitoredResourcesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public Builder removeMonitoredResources(int index) { + if (monitoredResourcesBuilder_ == null) { + ensureMonitoredResourcesIsMutable(); + monitoredResources_.remove(index); + onChanged(); + } else { + monitoredResourcesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public com.google.api.MonitoredResourceDescriptor.Builder getMonitoredResourcesBuilder( + int index) { + return getMonitoredResourcesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public com.google.api.MonitoredResourceDescriptorOrBuilder getMonitoredResourcesOrBuilder( + int index) { + if (monitoredResourcesBuilder_ == null) { + return monitoredResources_.get(index); } else { + return monitoredResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public java.util.List + getMonitoredResourcesOrBuilderList() { + if (monitoredResourcesBuilder_ != null) { + return monitoredResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(monitoredResources_); + } + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public com.google.api.MonitoredResourceDescriptor.Builder addMonitoredResourcesBuilder() { + return getMonitoredResourcesFieldBuilder().addBuilder( + com.google.api.MonitoredResourceDescriptor.getDefaultInstance()); + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public com.google.api.MonitoredResourceDescriptor.Builder addMonitoredResourcesBuilder( + int index) { + return getMonitoredResourcesFieldBuilder().addBuilder( + index, com.google.api.MonitoredResourceDescriptor.getDefaultInstance()); + } + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+     * Defines the monitored resources used by this service. This is required
+     * by the [Service.monitoring][] configuration.
+     * (-- GOOGLE_INTERNAL: owners of Google services must review their
+     * monitored resource configuration with Monarch team and Chemist team
+     * to ensure consistency. See go/new-cloud-monitoring-howto and
+     * go/chemist-onboarding for details, and contact chemist-dev@google.com
+     * for help. --)
+     * 
+ */ + public java.util.List + getMonitoredResourcesBuilderList() { + return getMonitoredResourcesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.MonitoredResourceDescriptor, com.google.api.MonitoredResourceDescriptor.Builder, com.google.api.MonitoredResourceDescriptorOrBuilder> + getMonitoredResourcesFieldBuilder() { + if (monitoredResourcesBuilder_ == null) { + monitoredResourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.MonitoredResourceDescriptor, com.google.api.MonitoredResourceDescriptor.Builder, com.google.api.MonitoredResourceDescriptorOrBuilder>( + monitoredResources_, + ((bitField0_ & 0x00020000) == 0x00020000), + getParentForChildren(), + isClean()); + monitoredResources_ = null; + } + return monitoredResourcesBuilder_; + } + + private com.google.api.Logging logging_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Logging, com.google.api.Logging.Builder, com.google.api.LoggingOrBuilder> loggingBuilder_; + /** + * optional .google.api.Logging logging = 27; + * + *
+     * Logging configuration of the service.
+     * 
+ */ + public boolean hasLogging() { + return loggingBuilder_ != null || logging_ != null; + } + /** + * optional .google.api.Logging logging = 27; + * + *
+     * Logging configuration of the service.
+     * 
+ */ + public com.google.api.Logging getLogging() { + if (loggingBuilder_ == null) { + return logging_ == null ? com.google.api.Logging.getDefaultInstance() : logging_; + } else { + return loggingBuilder_.getMessage(); + } + } + /** + * optional .google.api.Logging logging = 27; + * + *
+     * Logging configuration of the service.
+     * 
+ */ + public Builder setLogging(com.google.api.Logging value) { + if (loggingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + logging_ = value; + onChanged(); + } else { + loggingBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.Logging logging = 27; + * + *
+     * Logging configuration of the service.
+     * 
+ */ + public Builder setLogging( + com.google.api.Logging.Builder builderForValue) { + if (loggingBuilder_ == null) { + logging_ = builderForValue.build(); + onChanged(); + } else { + loggingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.Logging logging = 27; + * + *
+     * Logging configuration of the service.
+     * 
+ */ + public Builder mergeLogging(com.google.api.Logging value) { + if (loggingBuilder_ == null) { + if (logging_ != null) { + logging_ = + com.google.api.Logging.newBuilder(logging_).mergeFrom(value).buildPartial(); + } else { + logging_ = value; + } + onChanged(); + } else { + loggingBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.Logging logging = 27; + * + *
+     * Logging configuration of the service.
+     * 
+ */ + public Builder clearLogging() { + if (loggingBuilder_ == null) { + logging_ = null; + onChanged(); + } else { + logging_ = null; + loggingBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.Logging logging = 27; + * + *
+     * Logging configuration of the service.
+     * 
+ */ + public com.google.api.Logging.Builder getLoggingBuilder() { + + onChanged(); + return getLoggingFieldBuilder().getBuilder(); + } + /** + * optional .google.api.Logging logging = 27; + * + *
+     * Logging configuration of the service.
+     * 
+ */ + public com.google.api.LoggingOrBuilder getLoggingOrBuilder() { + if (loggingBuilder_ != null) { + return loggingBuilder_.getMessageOrBuilder(); + } else { + return logging_ == null ? + com.google.api.Logging.getDefaultInstance() : logging_; + } + } + /** + * optional .google.api.Logging logging = 27; + * + *
+     * Logging configuration of the service.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Logging, com.google.api.Logging.Builder, com.google.api.LoggingOrBuilder> + getLoggingFieldBuilder() { + if (loggingBuilder_ == null) { + loggingBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Logging, com.google.api.Logging.Builder, com.google.api.LoggingOrBuilder>( + getLogging(), + getParentForChildren(), + isClean()); + logging_ = null; + } + return loggingBuilder_; + } + + private com.google.api.Monitoring monitoring_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Monitoring, com.google.api.Monitoring.Builder, com.google.api.MonitoringOrBuilder> monitoringBuilder_; + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+     * Monitoring configuration of the service.
+     * 
+ */ + public boolean hasMonitoring() { + return monitoringBuilder_ != null || monitoring_ != null; + } + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+     * Monitoring configuration of the service.
+     * 
+ */ + public com.google.api.Monitoring getMonitoring() { + if (monitoringBuilder_ == null) { + return monitoring_ == null ? com.google.api.Monitoring.getDefaultInstance() : monitoring_; + } else { + return monitoringBuilder_.getMessage(); + } + } + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+     * Monitoring configuration of the service.
+     * 
+ */ + public Builder setMonitoring(com.google.api.Monitoring value) { + if (monitoringBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + monitoring_ = value; + onChanged(); + } else { + monitoringBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+     * Monitoring configuration of the service.
+     * 
+ */ + public Builder setMonitoring( + com.google.api.Monitoring.Builder builderForValue) { + if (monitoringBuilder_ == null) { + monitoring_ = builderForValue.build(); + onChanged(); + } else { + monitoringBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+     * Monitoring configuration of the service.
+     * 
+ */ + public Builder mergeMonitoring(com.google.api.Monitoring value) { + if (monitoringBuilder_ == null) { + if (monitoring_ != null) { + monitoring_ = + com.google.api.Monitoring.newBuilder(monitoring_).mergeFrom(value).buildPartial(); + } else { + monitoring_ = value; + } + onChanged(); + } else { + monitoringBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+     * Monitoring configuration of the service.
+     * 
+ */ + public Builder clearMonitoring() { + if (monitoringBuilder_ == null) { + monitoring_ = null; + onChanged(); + } else { + monitoring_ = null; + monitoringBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+     * Monitoring configuration of the service.
+     * 
+ */ + public com.google.api.Monitoring.Builder getMonitoringBuilder() { + + onChanged(); + return getMonitoringFieldBuilder().getBuilder(); + } + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+     * Monitoring configuration of the service.
+     * 
+ */ + public com.google.api.MonitoringOrBuilder getMonitoringOrBuilder() { + if (monitoringBuilder_ != null) { + return monitoringBuilder_.getMessageOrBuilder(); + } else { + return monitoring_ == null ? + com.google.api.Monitoring.getDefaultInstance() : monitoring_; + } + } + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+     * Monitoring configuration of the service.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Monitoring, com.google.api.Monitoring.Builder, com.google.api.MonitoringOrBuilder> + getMonitoringFieldBuilder() { + if (monitoringBuilder_ == null) { + monitoringBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Monitoring, com.google.api.Monitoring.Builder, com.google.api.MonitoringOrBuilder>( + getMonitoring(), + getParentForChildren(), + isClean()); + monitoring_ = null; + } + return monitoringBuilder_; } private com.google.protobuf.Any derivedData_ = null; @@ -4151,9 +6673,9 @@ public com.google.protobuf.AnyOrBuilder getDerivedDataOrBuilder() { private java.util.List systemTypes_ = java.util.Collections.emptyList(); private void ensureSystemTypesIsMutable() { - if (!((bitField0_ & 0x00002000) == 0x00002000)) { + if (!((bitField0_ & 0x00200000) == 0x00200000)) { systemTypes_ = new java.util.ArrayList(systemTypes_); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00200000; } } @@ -4391,7 +6913,7 @@ public Builder addAllSystemTypes( public Builder clearSystemTypes() { if (systemTypesBuilder_ == null) { systemTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00200000); onChanged(); } else { systemTypesBuilder_.clear(); @@ -4524,7 +7046,7 @@ public com.google.protobuf.Type.Builder addSystemTypesBuilder( systemTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder>( systemTypes_, - ((bitField0_ & 0x00002000) == 0x00002000), + ((bitField0_ & 0x00200000) == 0x00200000), getParentForChildren(), isClean()); systemTypes_ = null; diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceControlAccessProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceControlAccessProto.java new file mode 100644 index 000000000000..5b8085b2ee6a --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceControlAccessProto.java @@ -0,0 +1,42 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/service_control_access.proto + +package com.google.api; + +public final class ServiceControlAccessProto { + private ServiceControlAccessProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\'google/api/service_control_access.prot" + + "o\022\ngoogle.api\032\034google/api/annotations.pr" + + "otoB-\n\016com.google.apiB\031ServiceControlAcc" + + "essProtoP\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }, assigner); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceOrBuilder.java index f3a729e886a7..25840a6ba84b 100644 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceOrBuilder.java +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceOrBuilder.java @@ -383,6 +383,31 @@ com.google.protobuf.EnumOrBuilder getEnumsOrBuilder( */ com.google.api.HttpOrBuilder getHttpOrBuilder(); + /** + * optional .google.api.Authentication authentication = 11; + * + *
+   * Auth configuration.
+   * 
+ */ + boolean hasAuthentication(); + /** + * optional .google.api.Authentication authentication = 11; + * + *
+   * Auth configuration.
+   * 
+ */ + com.google.api.Authentication getAuthentication(); + /** + * optional .google.api.Authentication authentication = 11; + * + *
+   * Auth configuration.
+   * 
+ */ + com.google.api.AuthenticationOrBuilder getAuthenticationOrBuilder(); + /** * optional .google.api.Context context = 12; * @@ -408,6 +433,31 @@ com.google.protobuf.EnumOrBuilder getEnumsOrBuilder( */ com.google.api.ContextOrBuilder getContextOrBuilder(); + /** + * optional .google.api.Usage usage = 15; + * + *
+   * Configuration controlling usage of this service.
+   * 
+ */ + boolean hasUsage(); + /** + * optional .google.api.Usage usage = 15; + * + *
+   * Configuration controlling usage of this service.
+   * 
+ */ + com.google.api.Usage getUsage(); + /** + * optional .google.api.Usage usage = 15; + * + *
+   * Configuration controlling usage of this service.
+   * 
+ */ + com.google.api.UsageOrBuilder getUsageOrBuilder(); + /** * optional .google.api.CustomError custom_error = 16; * @@ -433,6 +483,243 @@ com.google.protobuf.EnumOrBuilder getEnumsOrBuilder( */ com.google.api.CustomErrorOrBuilder getCustomErrorOrBuilder(); + /** + * optional .google.api.Control control = 21; + * + *
+   * Configuration for the service control plane.
+   * 
+ */ + boolean hasControl(); + /** + * optional .google.api.Control control = 21; + * + *
+   * Configuration for the service control plane.
+   * 
+ */ + com.google.api.Control getControl(); + /** + * optional .google.api.Control control = 21; + * + *
+   * Configuration for the service control plane.
+   * 
+ */ + com.google.api.ControlOrBuilder getControlOrBuilder(); + + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+   * Defines the logs used by this service.
+   * 
+ */ + java.util.List + getLogsList(); + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+   * Defines the logs used by this service.
+   * 
+ */ + com.google.api.LogDescriptor getLogs(int index); + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+   * Defines the logs used by this service.
+   * 
+ */ + int getLogsCount(); + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+   * Defines the logs used by this service.
+   * 
+ */ + java.util.List + getLogsOrBuilderList(); + /** + * repeated .google.api.LogDescriptor logs = 23; + * + *
+   * Defines the logs used by this service.
+   * 
+ */ + com.google.api.LogDescriptorOrBuilder getLogsOrBuilder( + int index); + + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+   * Defines the metrics used by this service.
+   * 
+ */ + java.util.List + getMetricsList(); + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+   * Defines the metrics used by this service.
+   * 
+ */ + com.google.api.MetricDescriptor getMetrics(int index); + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+   * Defines the metrics used by this service.
+   * 
+ */ + int getMetricsCount(); + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+   * Defines the metrics used by this service.
+   * 
+ */ + java.util.List + getMetricsOrBuilderList(); + /** + * repeated .google.api.MetricDescriptor metrics = 24; + * + *
+   * Defines the metrics used by this service.
+   * 
+ */ + com.google.api.MetricDescriptorOrBuilder getMetricsOrBuilder( + int index); + + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+   * Defines the monitored resources used by this service. This is required
+   * by the [Service.monitoring][] configuration.
+   * (-- GOOGLE_INTERNAL: owners of Google services must review their
+   * monitored resource configuration with Monarch team and Chemist team
+   * to ensure consistency. See go/new-cloud-monitoring-howto and
+   * go/chemist-onboarding for details, and contact chemist-dev@google.com
+   * for help. --)
+   * 
+ */ + java.util.List + getMonitoredResourcesList(); + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+   * Defines the monitored resources used by this service. This is required
+   * by the [Service.monitoring][] configuration.
+   * (-- GOOGLE_INTERNAL: owners of Google services must review their
+   * monitored resource configuration with Monarch team and Chemist team
+   * to ensure consistency. See go/new-cloud-monitoring-howto and
+   * go/chemist-onboarding for details, and contact chemist-dev@google.com
+   * for help. --)
+   * 
+ */ + com.google.api.MonitoredResourceDescriptor getMonitoredResources(int index); + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+   * Defines the monitored resources used by this service. This is required
+   * by the [Service.monitoring][] configuration.
+   * (-- GOOGLE_INTERNAL: owners of Google services must review their
+   * monitored resource configuration with Monarch team and Chemist team
+   * to ensure consistency. See go/new-cloud-monitoring-howto and
+   * go/chemist-onboarding for details, and contact chemist-dev@google.com
+   * for help. --)
+   * 
+ */ + int getMonitoredResourcesCount(); + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+   * Defines the monitored resources used by this service. This is required
+   * by the [Service.monitoring][] configuration.
+   * (-- GOOGLE_INTERNAL: owners of Google services must review their
+   * monitored resource configuration with Monarch team and Chemist team
+   * to ensure consistency. See go/new-cloud-monitoring-howto and
+   * go/chemist-onboarding for details, and contact chemist-dev@google.com
+   * for help. --)
+   * 
+ */ + java.util.List + getMonitoredResourcesOrBuilderList(); + /** + * repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25; + * + *
+   * Defines the monitored resources used by this service. This is required
+   * by the [Service.monitoring][] configuration.
+   * (-- GOOGLE_INTERNAL: owners of Google services must review their
+   * monitored resource configuration with Monarch team and Chemist team
+   * to ensure consistency. See go/new-cloud-monitoring-howto and
+   * go/chemist-onboarding for details, and contact chemist-dev@google.com
+   * for help. --)
+   * 
+ */ + com.google.api.MonitoredResourceDescriptorOrBuilder getMonitoredResourcesOrBuilder( + int index); + + /** + * optional .google.api.Logging logging = 27; + * + *
+   * Logging configuration of the service.
+   * 
+ */ + boolean hasLogging(); + /** + * optional .google.api.Logging logging = 27; + * + *
+   * Logging configuration of the service.
+   * 
+ */ + com.google.api.Logging getLogging(); + /** + * optional .google.api.Logging logging = 27; + * + *
+   * Logging configuration of the service.
+   * 
+ */ + com.google.api.LoggingOrBuilder getLoggingOrBuilder(); + + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+   * Monitoring configuration of the service.
+   * 
+ */ + boolean hasMonitoring(); + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+   * Monitoring configuration of the service.
+   * 
+ */ + com.google.api.Monitoring getMonitoring(); + /** + * optional .google.api.Monitoring monitoring = 28; + * + *
+   * Monitoring configuration of the service.
+   * 
+ */ + com.google.api.MonitoringOrBuilder getMonitoringOrBuilder(); + /** * optional .google.protobuf.Any derived_data = 100; * diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceProto.java index fa6c564c7644..eb49ec2b0d6b 100644 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceProto.java +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceProto.java @@ -26,25 +26,40 @@ public static void registerAllExtensions( "google/protobuf/any.proto\032\031google/protob" + "uf/api.proto\032\032google/protobuf/type.proto" + "\032\036google/protobuf/wrappers.proto\032\034google" + - "/api/annotations.proto\032\030google/api/conte" + - "xt.proto\032\036google/api/documentation.proto" + - "\032\026google/api/error.proto\032\025google/api/htt" + - "p.proto\032\033google/api/visibility.proto\"\253\004\n" + - "\007Service\0224\n\016config_version\030\024 \001(\0132\034.googl" + - "e.protobuf.UInt32Value\022\014\n\004name\030\001 \001(\t\022\r\n\005", - "title\030\002 \001(\t\022\033\n\023producer_project_id\030\026 \001(\t" + - "\022\"\n\004apis\030\003 \003(\0132\024.google.protobuf.Api\022$\n\005" + - "types\030\004 \003(\0132\025.google.protobuf.Type\022$\n\005en" + - "ums\030\005 \003(\0132\025.google.protobuf.Enum\0220\n\rdocu" + - "mentation\030\006 \001(\0132\031.google.api.Documentati" + - "on\022*\n\nvisibility\030\007 \001(\0132\026.google.api.Visi" + - "bility\022\036\n\004http\030\t \001(\0132\020.google.api.Http\022$" + - "\n\007context\030\014 \001(\0132\023.google.api.Context\022-\n\014" + - "custom_error\030\020 \001(\0132\027.google.api.CustomEr" + - "ror\022@\n\014derived_data\030d \001(\0132\024.google.proto", - "buf.AnyB\024\372\322\344\223\002\016\022\014GOOGLE_TOOLS\022+\n\014system_" + - "types\030f \003(\0132\025.google.protobuf.TypeB \n\016co" + - "m.google.apiB\014ServiceProtoP\001b\006proto3" + "/api/annotations.proto\032\025google/api/auth." + + "proto\032\030google/api/context.proto\032\030google/" + + "api/control.proto\032\036google/api/documentat" + + "ion.proto\032\026google/api/error.proto\032\025googl" + + "e/api/http.proto\032\024google/api/log.proto\032\030" + + "google/api/logging.proto\032\027google/api/met", + "ric.proto\032#google/api/monitored_resource" + + ".proto\032\033google/api/monitoring.proto\032\026goo" + + "gle/api/usage.proto\032\033google/api/visibili" + + "ty.proto\"\227\007\n\007Service\0224\n\016config_version\030\024" + + " \001(\0132\034.google.protobuf.UInt32Value\022\014\n\004na" + + "me\030\001 \001(\t\022\r\n\005title\030\002 \001(\t\022\033\n\023producer_proj" + + "ect_id\030\026 \001(\t\022\"\n\004apis\030\003 \003(\0132\024.google.prot" + + "obuf.Api\022$\n\005types\030\004 \003(\0132\025.google.protobu" + + "f.Type\022$\n\005enums\030\005 \003(\0132\025.google.protobuf." + + "Enum\0220\n\rdocumentation\030\006 \001(\0132\031.google.api", + ".Documentation\022*\n\nvisibility\030\007 \001(\0132\026.goo" + + "gle.api.Visibility\022\036\n\004http\030\t \001(\0132\020.googl" + + "e.api.Http\0222\n\016authentication\030\013 \001(\0132\032.goo" + + "gle.api.Authentication\022$\n\007context\030\014 \001(\0132" + + "\023.google.api.Context\022 \n\005usage\030\017 \001(\0132\021.go" + + "ogle.api.Usage\022-\n\014custom_error\030\020 \001(\0132\027.g" + + "oogle.api.CustomError\022$\n\007control\030\025 \001(\0132\023" + + ".google.api.Control\022\'\n\004logs\030\027 \003(\0132\031.goog" + + "le.api.LogDescriptor\022-\n\007metrics\030\030 \003(\0132\034." + + "google.api.MetricDescriptor\022D\n\023monitored", + "_resources\030\031 \003(\0132\'.google.api.MonitoredR" + + "esourceDescriptor\022$\n\007logging\030\033 \001(\0132\023.goo" + + "gle.api.Logging\022*\n\nmonitoring\030\034 \001(\0132\026.go" + + "ogle.api.Monitoring\022@\n\014derived_data\030d \001(" + + "\0132\024.google.protobuf.AnyB\024\372\322\344\223\002\016\022\014GOOGLE_" + + "TOOLS\022+\n\014system_types\030f \003(\0132\025.google.pro" + + "tobuf.TypeB \n\016com.google.apiB\014ServicePro" + + "toP\001b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -62,10 +77,18 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.TypeProto.getDescriptor(), com.google.protobuf.WrappersProto.getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.AuthProto.getDescriptor(), com.google.api.ContextProto.getDescriptor(), + com.google.api.ControlProto.getDescriptor(), com.google.api.DocumentationProto.getDescriptor(), com.google.api.ErrorFormatProto.getDescriptor(), com.google.api.HttpProto.getDescriptor(), + com.google.api.LogProto.getDescriptor(), + com.google.api.LoggingProto.getDescriptor(), + com.google.api.MetricProto.getDescriptor(), + com.google.api.MonitoredResourceProto.getDescriptor(), + com.google.api.MonitoringProto.getDescriptor(), + com.google.api.UsageProto.getDescriptor(), com.google.api.VisibilityProto.getDescriptor(), }, assigner); internal_static_google_api_Service_descriptor = @@ -73,7 +96,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_api_Service_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_api_Service_descriptor, - new java.lang.String[] { "ConfigVersion", "Name", "Title", "ProducerProjectId", "Apis", "Types", "Enums", "Documentation", "Visibility", "Http", "Context", "CustomError", "DerivedData", "SystemTypes", }); + new java.lang.String[] { "ConfigVersion", "Name", "Title", "ProducerProjectId", "Apis", "Types", "Enums", "Documentation", "Visibility", "Http", "Authentication", "Context", "Usage", "CustomError", "Control", "Logs", "Metrics", "MonitoredResources", "Logging", "Monitoring", "DerivedData", "SystemTypes", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.AnnotationsProto.fieldVisibility); @@ -84,10 +107,18 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.TypeProto.getDescriptor(); com.google.protobuf.WrappersProto.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.AuthProto.getDescriptor(); com.google.api.ContextProto.getDescriptor(); + com.google.api.ControlProto.getDescriptor(); com.google.api.DocumentationProto.getDescriptor(); com.google.api.ErrorFormatProto.getDescriptor(); com.google.api.HttpProto.getDescriptor(); + com.google.api.LogProto.getDescriptor(); + com.google.api.LoggingProto.getDescriptor(); + com.google.api.MetricProto.getDescriptor(); + com.google.api.MonitoredResourceProto.getDescriptor(); + com.google.api.MonitoringProto.getDescriptor(); + com.google.api.UsageProto.getDescriptor(); com.google.api.VisibilityProto.getDescriptor(); } diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Usage.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Usage.java new file mode 100644 index 000000000000..2c98bd847a24 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/Usage.java @@ -0,0 +1,2088 @@ +// 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; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/UsageOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/UsageOrBuilder.java new file mode 100644 index 000000000000..283a6dbfcaa9 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/UsageOrBuilder.java @@ -0,0 +1,266 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/usage.proto + +package com.google.api; + +public interface UsageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Usage) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.api.Usage.ServiceAccess service_access = 4; + * + *
+   * Controls which users can see or activate the service.
+   * 
+ */ + int getServiceAccessValue(); + /** + * optional .google.api.Usage.ServiceAccess service_access = 4; + * + *
+   * Controls which users can see or activate the service.
+   * 
+ */ + com.google.api.Usage.ServiceAccess getServiceAccess(); + + /** + * 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'.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getRequirementsList(); + /** + * 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'.
+   * 
+ */ + int getRequirementsCount(); + /** + * 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'.
+   * 
+ */ + java.lang.String getRequirements(int 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'.
+   * 
+ */ + com.google.protobuf.ByteString + getRequirementsBytes(int 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`.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getDependsOnServicesList(); + /** + * 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`.
+   * 
+ */ + int getDependsOnServicesCount(); + /** + * 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`.
+   * 
+ */ + java.lang.String getDependsOnServices(int 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`.
+   * 
+ */ + com.google.protobuf.ByteString + getDependsOnServicesBytes(int 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'.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getActivationHooksList(); + /** + * 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'.
+   * 
+ */ + int getActivationHooksCount(); + /** + * 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'.
+   * 
+ */ + java.lang.String getActivationHooks(int 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'.
+   * 
+ */ + com.google.protobuf.ByteString + getActivationHooksBytes(int 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/'.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getDeactivationHooksList(); + /** + * 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/'.
+   * 
+ */ + int getDeactivationHooksCount(); + /** + * 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/'.
+   * 
+ */ + java.lang.String getDeactivationHooks(int 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/'.
+   * 
+ */ + com.google.protobuf.ByteString + getDeactivationHooksBytes(int index); + + /** + * repeated .google.api.UsageRule rules = 6; + * + *
+   * Individual rules for configuring usage on selected methods.
+   * 
+ */ + java.util.List + getRulesList(); + /** + * repeated .google.api.UsageRule rules = 6; + * + *
+   * Individual rules for configuring usage on selected methods.
+   * 
+ */ + com.google.api.UsageRule getRules(int index); + /** + * repeated .google.api.UsageRule rules = 6; + * + *
+   * Individual rules for configuring usage on selected methods.
+   * 
+ */ + int getRulesCount(); + /** + * repeated .google.api.UsageRule rules = 6; + * + *
+   * Individual rules for configuring usage on selected methods.
+   * 
+ */ + java.util.List + getRulesOrBuilderList(); + /** + * repeated .google.api.UsageRule rules = 6; + * + *
+   * Individual rules for configuring usage on selected methods.
+   * 
+ */ + com.google.api.UsageRuleOrBuilder getRulesOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/UsageProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/UsageProto.java new file mode 100644 index 000000000000..17ad592e6a09 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/UsageProto.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/usage.proto + +package com.google.api; + +public final class UsageProto { + private UsageProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Usage_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Usage_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_UsageRule_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_UsageRule_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026google/api/usage.proto\022\ngoogle.api\"\240\002\n" + + "\005Usage\0227\n\016service_access\030\004 \001(\0162\037.google." + + "api.Usage.ServiceAccess\022\024\n\014requirements\030" + + "\001 \003(\t\022\033\n\023depends_on_services\030\002 \003(\t\022\030\n\020ac" + + "tivation_hooks\030\003 \003(\t\022\032\n\022deactivation_hoo" + + "ks\030\005 \003(\t\022$\n\005rules\030\006 \003(\0132\025.google.api.Usa" + + "geRule\"O\n\rServiceAccess\022\016\n\nRESTRICTED\020\000\022" + + "\n\n\006PUBLIC\020\001\022\022\n\016ORG_RESTRICTED\020\002\022\016\n\nORG_P" + + "UBLIC\020\003\"?\n\tUsageRule\022\020\n\010selector\030\001 \001(\t\022 " + + "\n\030allow_unregistered_calls\030\002 \001(\010B\036\n\016com.", + "google.apiB\nUsageProtoP\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_api_Usage_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Usage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Usage_descriptor, + new java.lang.String[] { "ServiceAccess", "Requirements", "DependsOnServices", "ActivationHooks", "DeactivationHooks", "Rules", }); + internal_static_google_api_UsageRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_UsageRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_UsageRule_descriptor, + new java.lang.String[] { "Selector", "AllowUnregisteredCalls", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/UsageRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/UsageRule.java new file mode 100644 index 000000000000..228393c7cc58 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/UsageRule.java @@ -0,0 +1,600 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/usage.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.UsageRule} + * + *
+ * Usage configuration rules for the service.
+ * NOTE: Under development.
+ * (--GOOGLE_INTERNAL: There are no current plans to support this for ESF based
+ * services. If you require unregistered calls to an ESF based service please
+ * contact the one platform team and let us know your use case. --)
+ * Use this rule to configure unregistered calls for the service. Unregistered
+ * calls are calls that do not contain consumer project identity.
+ * (Example: calls that do not contain an API key).
+ * By default, API methods do not allow unregistered calls, and each method call
+ * must be identified by a consumer project identity. Use this rule to
+ * allow/disallow unregistered calls.
+ * Example of an API that wants to allow unregistered calls for entire service.
+ *     usage:
+ *       rules:
+ *       - selector: "*"
+ *         allow_unregistered_calls: true
+ * Example of a method that wants to allow unregistered calls.
+ *     usage:
+ *       rules:
+ *       - selector: "google.example.library.v1.LibraryService.CreateBook"
+ *         allow_unregistered_calls: true
+ * 
+ */ +public final class UsageRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.UsageRule) + UsageRuleOrBuilder { + // Use UsageRule.newBuilder() to construct. + private UsageRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private UsageRule() { + selector_ = ""; + allowUnregisteredCalls_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private UsageRule( + 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(); + + selector_ = s; + break; + } + case 16: { + + allowUnregisteredCalls_ = input.readBool(); + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.UsageProto.internal_static_google_api_UsageRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.UsageProto.internal_static_google_api_UsageRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.UsageRule.class, com.google.api.UsageRule.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object selector_; + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies. Use '*' to indicate all
+   * methods in all APIs.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies. Use '*' to indicate all
+   * methods in all APIs.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + public com.google.protobuf.ByteString + getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_UNREGISTERED_CALLS_FIELD_NUMBER = 2; + private boolean allowUnregisteredCalls_; + /** + * optional bool allow_unregistered_calls = 2; + * + *
+   * True, if the method allows unregistered calls; false otherwise.
+   * 
+ */ + public boolean getAllowUnregisteredCalls() { + return allowUnregisteredCalls_; + } + + 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 { + if (!getSelectorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_); + } + if (allowUnregisteredCalls_ != false) { + output.writeBool(2, allowUnregisteredCalls_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSelectorBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, selector_); + } + if (allowUnregisteredCalls_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, allowUnregisteredCalls_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.UsageRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.UsageRule 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.UsageRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.UsageRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.UsageRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.UsageRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.UsageRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.UsageRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.UsageRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.UsageRule 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.UsageRule 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.UsageRule} + * + *
+   * Usage configuration rules for the service.
+   * NOTE: Under development.
+   * (--GOOGLE_INTERNAL: There are no current plans to support this for ESF based
+   * services. If you require unregistered calls to an ESF based service please
+   * contact the one platform team and let us know your use case. --)
+   * Use this rule to configure unregistered calls for the service. Unregistered
+   * calls are calls that do not contain consumer project identity.
+   * (Example: calls that do not contain an API key).
+   * By default, API methods do not allow unregistered calls, and each method call
+   * must be identified by a consumer project identity. Use this rule to
+   * allow/disallow unregistered calls.
+   * Example of an API that wants to allow unregistered calls for entire service.
+   *     usage:
+   *       rules:
+   *       - selector: "*"
+   *         allow_unregistered_calls: true
+   * Example of a method that wants to allow unregistered calls.
+   *     usage:
+   *       rules:
+   *       - selector: "google.example.library.v1.LibraryService.CreateBook"
+   *         allow_unregistered_calls: true
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.UsageRule) + com.google.api.UsageRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.UsageProto.internal_static_google_api_UsageRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.UsageProto.internal_static_google_api_UsageRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.UsageRule.class, com.google.api.UsageRule.Builder.class); + } + + // Construct using com.google.api.UsageRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + selector_ = ""; + + allowUnregisteredCalls_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.UsageProto.internal_static_google_api_UsageRule_descriptor; + } + + public com.google.api.UsageRule getDefaultInstanceForType() { + return com.google.api.UsageRule.getDefaultInstance(); + } + + public com.google.api.UsageRule build() { + com.google.api.UsageRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.UsageRule buildPartial() { + com.google.api.UsageRule result = new com.google.api.UsageRule(this); + result.selector_ = selector_; + result.allowUnregisteredCalls_ = allowUnregisteredCalls_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.UsageRule) { + return mergeFrom((com.google.api.UsageRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.UsageRule other) { + if (other == com.google.api.UsageRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + onChanged(); + } + if (other.getAllowUnregisteredCalls() != false) { + setAllowUnregisteredCalls(other.getAllowUnregisteredCalls()); + } + 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.UsageRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.UsageRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object selector_ = ""; + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies. Use '*' to indicate all
+     * methods in all APIs.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies. Use '*' to indicate all
+     * methods in all APIs.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public com.google.protobuf.ByteString + getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies. Use '*' to indicate all
+     * methods in all APIs.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public Builder setSelector( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + selector_ = value; + onChanged(); + return this; + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies. Use '*' to indicate all
+     * methods in all APIs.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public Builder clearSelector() { + + selector_ = getDefaultInstance().getSelector(); + onChanged(); + return this; + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies. Use '*' to indicate all
+     * methods in all APIs.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public Builder setSelectorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + selector_ = value; + onChanged(); + return this; + } + + private boolean allowUnregisteredCalls_ ; + /** + * optional bool allow_unregistered_calls = 2; + * + *
+     * True, if the method allows unregistered calls; false otherwise.
+     * 
+ */ + public boolean getAllowUnregisteredCalls() { + return allowUnregisteredCalls_; + } + /** + * optional bool allow_unregistered_calls = 2; + * + *
+     * True, if the method allows unregistered calls; false otherwise.
+     * 
+ */ + public Builder setAllowUnregisteredCalls(boolean value) { + + allowUnregisteredCalls_ = value; + onChanged(); + return this; + } + /** + * optional bool allow_unregistered_calls = 2; + * + *
+     * True, if the method allows unregistered calls; false otherwise.
+     * 
+ */ + public Builder clearAllowUnregisteredCalls() { + + allowUnregisteredCalls_ = false; + onChanged(); + return this; + } + 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.UsageRule) + } + + // @@protoc_insertion_point(class_scope:google.api.UsageRule) + private static final com.google.api.UsageRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.UsageRule(); + } + + public static com.google.api.UsageRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public UsageRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new UsageRule(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.UsageRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/UsageRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/UsageRuleOrBuilder.java new file mode 100644 index 000000000000..56d05570d01f --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/UsageRuleOrBuilder.java @@ -0,0 +1,40 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/usage.proto + +package com.google.api; + +public interface UsageRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.UsageRule) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies. Use '*' to indicate all
+   * methods in all APIs.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + java.lang.String getSelector(); + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies. Use '*' to indicate all
+   * methods in all APIs.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + * optional bool allow_unregistered_calls = 2; + * + *
+   * True, if the method allows unregistered calls; false otherwise.
+   * 
+ */ + boolean getAllowUnregisteredCalls(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Any.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Any.java new file mode 100644 index 000000000000..bc8c82383acf --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Any.java @@ -0,0 +1,810 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/any.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Any} + * + *
+ * `Any` contains an arbitrary serialized message along with a URL
+ * that describes the type of the serialized message.
+ * (--GOOGLE_INTERNAL: The proto runtimes and/or compiler will eventually
+ *  provide utilities to pack/unpack Any values (projected Q4/15). See
+ *  http://goto/proto3-impl-status for each language status. --)
+ * JSON
+ * ====
+ * The JSON representation of an `Any` value uses the regular
+ * representation of the deserialized, embedded message, with an
+ * additional field `@type` which contains the type URL. Example:
+ *     package google.profile;
+ *     message Person {
+ *       string first_name = 1;
+ *       string last_name = 2;
+ *     }
+ *     {
+ *       "@type": "type.googleapis.com/google.profile.Person",
+ *       "firstName": <string>,
+ *       "lastName": <string>
+ *     }
+ * If the embedded message type is well-known and has a custom JSON
+ * representation, that representation will be embedded adding a field
+ * `value` which holds the custom JSON in addition to the the `@type`
+ * field. Example (for message [google.protobuf.Duration][]):
+ *     {
+ *       "@type": "type.googleapis.com/google.protobuf.Duration",
+ *       "value": "1.212s"
+ *     }
+ * 
+ */ +public final class Any extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Any) + AnyOrBuilder { + // Use Any.newBuilder() to construct. + private Any(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Any() { + typeUrl_ = ""; + value_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Any( + 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(); + + typeUrl_ = s; + break; + } + case 18: { + + value_ = input.readBytes(); + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Any.class, com.google.protobuf.Any.Builder.class); + } + + private static String getTypeUrl( + com.google.protobuf.Descriptors.Descriptor descriptor) { + return "type.googleapis.com/" + descriptor.getFullName(); + } + + public static Any pack( + T message) { + return Any.newBuilder() + .setTypeUrl(getTypeUrl(message.getDescriptorForType())) + .setValue(message.toByteString()) + .build(); + } + + public boolean is( + java.lang.Class clazz) { + T defaultInstance = + com.google.protobuf.Internal.getDefaultInstance(clazz); + return getTypeUrl().equals( + getTypeUrl(defaultInstance.getDescriptorForType())); + } + + private volatile com.google.protobuf.Message cachedUnpackValue; + + public T unpack( + java.lang.Class clazz) + throws com.google.protobuf.InvalidProtocolBufferException { + if (!is(clazz)) { + throw new com.google.protobuf.InvalidProtocolBufferException( + "Type of the Any message does not match the given class."); + } + if (cachedUnpackValue != null) { + return (T) cachedUnpackValue; + } + T defaultInstance = + com.google.protobuf.Internal.getDefaultInstance(clazz); + T result = (T) defaultInstance.getParserForType() + .parseFrom(getValue()); + cachedUnpackValue = result; + return result; + } + public static final int TYPE_URL_FIELD_NUMBER = 1; + private volatile java.lang.Object typeUrl_; + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+   * A URL/resource name whose content describes the type of the
+   * serialized message.
+   * For URLs which use the schema `http`, `https`, or no schema, the
+   * following restrictions and interpretations apply:
+   * * If no schema is provided, `https` is assumed.
+   * * The last segment of the URL's path must represent the fully
+   *   qualified name of the type (as in `path/google.protobuf.Duration`).
+   * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+   *   value in binary format, or produce an error.
+   * * Applications are allowed to cache lookup results based on the
+   *   URL, or have them precompiled into a binary to avoid any
+   *   lookup. Therefore, binary compatibility needs to be preserved
+   *   on changes to types. (Use versioned type names to manage
+   *   breaking changes.)
+   * Schemas other than `http`, `https` (or the empty schema) might be
+   * used with implementation specific semantics.
+   * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+   * namespace should use `type.googleapis.com/full.type.name` (without
+   * schema and path). A type service will eventually become available which
+   * serves those URLs (projected Q2/15). --)
+   * 
+ */ + public java.lang.String getTypeUrl() { + java.lang.Object ref = typeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeUrl_ = s; + return s; + } + } + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+   * A URL/resource name whose content describes the type of the
+   * serialized message.
+   * For URLs which use the schema `http`, `https`, or no schema, the
+   * following restrictions and interpretations apply:
+   * * If no schema is provided, `https` is assumed.
+   * * The last segment of the URL's path must represent the fully
+   *   qualified name of the type (as in `path/google.protobuf.Duration`).
+   * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+   *   value in binary format, or produce an error.
+   * * Applications are allowed to cache lookup results based on the
+   *   URL, or have them precompiled into a binary to avoid any
+   *   lookup. Therefore, binary compatibility needs to be preserved
+   *   on changes to types. (Use versioned type names to manage
+   *   breaking changes.)
+   * Schemas other than `http`, `https` (or the empty schema) might be
+   * used with implementation specific semantics.
+   * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+   * namespace should use `type.googleapis.com/full.type.name` (without
+   * schema and path). A type service will eventually become available which
+   * serves those URLs (projected Q2/15). --)
+   * 
+ */ + public com.google.protobuf.ByteString + getTypeUrlBytes() { + java.lang.Object ref = typeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString value_; + /** + * optional bytes value = 2 [ctype = CORD]; + * + *
+   * Must be valid serialized data of the above specified type.
+   * 
+ */ + public com.google.protobuf.ByteString getValue() { + return value_; + } + + 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 { + if (!getTypeUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, typeUrl_); + } + if (!value_.isEmpty()) { + output.writeBytes(2, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTypeUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, typeUrl_); + } + if (!value_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Any)) { + return super.equals(obj); + } + com.google.protobuf.Any other = (com.google.protobuf.Any) obj; + + boolean result = true; + result = result && getTypeUrl() + .equals(other.getTypeUrl()); + result = result && getValue() + .equals(other.getValue()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + TYPE_URL_FIELD_NUMBER; + hash = (53 * hash) + getTypeUrl().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Any parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Any 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.protobuf.Any parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Any parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Any parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Any parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Any parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Any parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Any parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Any 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.protobuf.Any 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.protobuf.Any} + * + *
+   * `Any` contains an arbitrary serialized message along with a URL
+   * that describes the type of the serialized message.
+   * (--GOOGLE_INTERNAL: The proto runtimes and/or compiler will eventually
+   *  provide utilities to pack/unpack Any values (projected Q4/15). See
+   *  http://goto/proto3-impl-status for each language status. --)
+   * JSON
+   * ====
+   * The JSON representation of an `Any` value uses the regular
+   * representation of the deserialized, embedded message, with an
+   * additional field `@type` which contains the type URL. Example:
+   *     package google.profile;
+   *     message Person {
+   *       string first_name = 1;
+   *       string last_name = 2;
+   *     }
+   *     {
+   *       "@type": "type.googleapis.com/google.profile.Person",
+   *       "firstName": <string>,
+   *       "lastName": <string>
+   *     }
+   * If the embedded message type is well-known and has a custom JSON
+   * representation, that representation will be embedded adding a field
+   * `value` which holds the custom JSON in addition to the the `@type`
+   * field. Example (for message [google.protobuf.Duration][]):
+   *     {
+   *       "@type": "type.googleapis.com/google.protobuf.Duration",
+   *       "value": "1.212s"
+   *     }
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Any) + com.google.protobuf.AnyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Any.class, com.google.protobuf.Any.Builder.class); + } + + // Construct using com.google.protobuf.Any.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + typeUrl_ = ""; + + value_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_descriptor; + } + + public com.google.protobuf.Any getDefaultInstanceForType() { + return com.google.protobuf.Any.getDefaultInstance(); + } + + public com.google.protobuf.Any build() { + com.google.protobuf.Any result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Any buildPartial() { + com.google.protobuf.Any result = new com.google.protobuf.Any(this); + result.typeUrl_ = typeUrl_; + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Any) { + return mergeFrom((com.google.protobuf.Any)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Any other) { + if (other == com.google.protobuf.Any.getDefaultInstance()) return this; + if (!other.getTypeUrl().isEmpty()) { + typeUrl_ = other.typeUrl_; + onChanged(); + } + if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { + setValue(other.getValue()); + } + 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.protobuf.Any parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Any) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object typeUrl_ = ""; + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+     * A URL/resource name whose content describes the type of the
+     * serialized message.
+     * For URLs which use the schema `http`, `https`, or no schema, the
+     * following restrictions and interpretations apply:
+     * * If no schema is provided, `https` is assumed.
+     * * The last segment of the URL's path must represent the fully
+     *   qualified name of the type (as in `path/google.protobuf.Duration`).
+     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+     *   value in binary format, or produce an error.
+     * * Applications are allowed to cache lookup results based on the
+     *   URL, or have them precompiled into a binary to avoid any
+     *   lookup. Therefore, binary compatibility needs to be preserved
+     *   on changes to types. (Use versioned type names to manage
+     *   breaking changes.)
+     * Schemas other than `http`, `https` (or the empty schema) might be
+     * used with implementation specific semantics.
+     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+     * namespace should use `type.googleapis.com/full.type.name` (without
+     * schema and path). A type service will eventually become available which
+     * serves those URLs (projected Q2/15). --)
+     * 
+ */ + public java.lang.String getTypeUrl() { + java.lang.Object ref = typeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+     * A URL/resource name whose content describes the type of the
+     * serialized message.
+     * For URLs which use the schema `http`, `https`, or no schema, the
+     * following restrictions and interpretations apply:
+     * * If no schema is provided, `https` is assumed.
+     * * The last segment of the URL's path must represent the fully
+     *   qualified name of the type (as in `path/google.protobuf.Duration`).
+     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+     *   value in binary format, or produce an error.
+     * * Applications are allowed to cache lookup results based on the
+     *   URL, or have them precompiled into a binary to avoid any
+     *   lookup. Therefore, binary compatibility needs to be preserved
+     *   on changes to types. (Use versioned type names to manage
+     *   breaking changes.)
+     * Schemas other than `http`, `https` (or the empty schema) might be
+     * used with implementation specific semantics.
+     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+     * namespace should use `type.googleapis.com/full.type.name` (without
+     * schema and path). A type service will eventually become available which
+     * serves those URLs (projected Q2/15). --)
+     * 
+ */ + public com.google.protobuf.ByteString + getTypeUrlBytes() { + java.lang.Object ref = typeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+     * A URL/resource name whose content describes the type of the
+     * serialized message.
+     * For URLs which use the schema `http`, `https`, or no schema, the
+     * following restrictions and interpretations apply:
+     * * If no schema is provided, `https` is assumed.
+     * * The last segment of the URL's path must represent the fully
+     *   qualified name of the type (as in `path/google.protobuf.Duration`).
+     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+     *   value in binary format, or produce an error.
+     * * Applications are allowed to cache lookup results based on the
+     *   URL, or have them precompiled into a binary to avoid any
+     *   lookup. Therefore, binary compatibility needs to be preserved
+     *   on changes to types. (Use versioned type names to manage
+     *   breaking changes.)
+     * Schemas other than `http`, `https` (or the empty schema) might be
+     * used with implementation specific semantics.
+     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+     * namespace should use `type.googleapis.com/full.type.name` (without
+     * schema and path). A type service will eventually become available which
+     * serves those URLs (projected Q2/15). --)
+     * 
+ */ + public Builder setTypeUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + typeUrl_ = value; + onChanged(); + return this; + } + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+     * A URL/resource name whose content describes the type of the
+     * serialized message.
+     * For URLs which use the schema `http`, `https`, or no schema, the
+     * following restrictions and interpretations apply:
+     * * If no schema is provided, `https` is assumed.
+     * * The last segment of the URL's path must represent the fully
+     *   qualified name of the type (as in `path/google.protobuf.Duration`).
+     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+     *   value in binary format, or produce an error.
+     * * Applications are allowed to cache lookup results based on the
+     *   URL, or have them precompiled into a binary to avoid any
+     *   lookup. Therefore, binary compatibility needs to be preserved
+     *   on changes to types. (Use versioned type names to manage
+     *   breaking changes.)
+     * Schemas other than `http`, `https` (or the empty schema) might be
+     * used with implementation specific semantics.
+     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+     * namespace should use `type.googleapis.com/full.type.name` (without
+     * schema and path). A type service will eventually become available which
+     * serves those URLs (projected Q2/15). --)
+     * 
+ */ + public Builder clearTypeUrl() { + + typeUrl_ = getDefaultInstance().getTypeUrl(); + onChanged(); + return this; + } + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+     * A URL/resource name whose content describes the type of the
+     * serialized message.
+     * For URLs which use the schema `http`, `https`, or no schema, the
+     * following restrictions and interpretations apply:
+     * * If no schema is provided, `https` is assumed.
+     * * The last segment of the URL's path must represent the fully
+     *   qualified name of the type (as in `path/google.protobuf.Duration`).
+     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+     *   value in binary format, or produce an error.
+     * * Applications are allowed to cache lookup results based on the
+     *   URL, or have them precompiled into a binary to avoid any
+     *   lookup. Therefore, binary compatibility needs to be preserved
+     *   on changes to types. (Use versioned type names to manage
+     *   breaking changes.)
+     * Schemas other than `http`, `https` (or the empty schema) might be
+     * used with implementation specific semantics.
+     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+     * namespace should use `type.googleapis.com/full.type.name` (without
+     * schema and path). A type service will eventually become available which
+     * serves those URLs (projected Q2/15). --)
+     * 
+ */ + public Builder setTypeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + typeUrl_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes value = 2 [ctype = CORD]; + * + *
+     * Must be valid serialized data of the above specified type.
+     * 
+ */ + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + * optional bytes value = 2 [ctype = CORD]; + * + *
+     * Must be valid serialized data of the above specified type.
+     * 
+ */ + public Builder setValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * optional bytes value = 2 [ctype = CORD]; + * + *
+     * Must be valid serialized data of the above specified type.
+     * 
+ */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + 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.protobuf.Any) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Any) + private static final com.google.protobuf.Any DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Any(); + } + + public static com.google.protobuf.Any getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Any parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Any(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.protobuf.Any getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyOrBuilder.java new file mode 100644 index 000000000000..e94d7325991d --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyOrBuilder.java @@ -0,0 +1,74 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/any.proto + +package com.google.protobuf; + +public interface AnyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Any) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+   * A URL/resource name whose content describes the type of the
+   * serialized message.
+   * For URLs which use the schema `http`, `https`, or no schema, the
+   * following restrictions and interpretations apply:
+   * * If no schema is provided, `https` is assumed.
+   * * The last segment of the URL's path must represent the fully
+   *   qualified name of the type (as in `path/google.protobuf.Duration`).
+   * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+   *   value in binary format, or produce an error.
+   * * Applications are allowed to cache lookup results based on the
+   *   URL, or have them precompiled into a binary to avoid any
+   *   lookup. Therefore, binary compatibility needs to be preserved
+   *   on changes to types. (Use versioned type names to manage
+   *   breaking changes.)
+   * Schemas other than `http`, `https` (or the empty schema) might be
+   * used with implementation specific semantics.
+   * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+   * namespace should use `type.googleapis.com/full.type.name` (without
+   * schema and path). A type service will eventually become available which
+   * serves those URLs (projected Q2/15). --)
+   * 
+ */ + java.lang.String getTypeUrl(); + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+   * A URL/resource name whose content describes the type of the
+   * serialized message.
+   * For URLs which use the schema `http`, `https`, or no schema, the
+   * following restrictions and interpretations apply:
+   * * If no schema is provided, `https` is assumed.
+   * * The last segment of the URL's path must represent the fully
+   *   qualified name of the type (as in `path/google.protobuf.Duration`).
+   * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+   *   value in binary format, or produce an error.
+   * * Applications are allowed to cache lookup results based on the
+   *   URL, or have them precompiled into a binary to avoid any
+   *   lookup. Therefore, binary compatibility needs to be preserved
+   *   on changes to types. (Use versioned type names to manage
+   *   breaking changes.)
+   * Schemas other than `http`, `https` (or the empty schema) might be
+   * used with implementation specific semantics.
+   * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+   * namespace should use `type.googleapis.com/full.type.name` (without
+   * schema and path). A type service will eventually become available which
+   * serves those URLs (projected Q2/15). --)
+   * 
+ */ + com.google.protobuf.ByteString + getTypeUrlBytes(); + + /** + * optional bytes value = 2 [ctype = CORD]; + * + *
+   * Must be valid serialized data of the above specified type.
+   * 
+ */ + com.google.protobuf.ByteString getValue(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyProto.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyProto.java new file mode 100644 index 000000000000..fa06d01c52be --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/AnyProto.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/any.proto + +package com.google.protobuf; + +public final class AnyProto { + private AnyProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_Any_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_Any_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031google/protobuf/any.proto\022\017google.prot" + + "obuf\".\n\003Any\022\024\n\010type_url\030\001 \001(\tB\002\010\002\022\021\n\005val" + + "ue\030\002 \001(\014B\002\010\001BK\n\023com.google.protobufB\010Any" + + "ProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Protobuf.WellK" + + "nownTypesb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_protobuf_Any_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_protobuf_Any_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_Any_descriptor, + new java.lang.String[] { "TypeUrl", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Api.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Api.java new file mode 100644 index 000000000000..f75ddaf045e1 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Api.java @@ -0,0 +1,2474 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Api} + * + *
+ * Api is a light-weight descriptor for a protocol buffer service.
+ * 
+ */ +public final class Api extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Api) + ApiOrBuilder { + // Use Api.newBuilder() to construct. + private Api(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Api() { + name_ = ""; + methods_ = java.util.Collections.emptyList(); + options_ = java.util.Collections.emptyList(); + version_ = ""; + mixins_ = java.util.Collections.emptyList(); + syntax_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Api( + 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(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + methods_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + methods_.add(input.readMessage(com.google.protobuf.Method.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + options_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 42: { + com.google.protobuf.SourceContext.Builder subBuilder = null; + if (sourceContext_ != null) { + subBuilder = sourceContext_.toBuilder(); + } + sourceContext_ = input.readMessage(com.google.protobuf.SourceContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sourceContext_); + sourceContext_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + mixins_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + mixins_.add(input.readMessage(com.google.protobuf.Mixin.parser(), extensionRegistry)); + break; + } + case 56: { + int rawValue = input.readEnum(); + + syntax_ = rawValue; + 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)) { + methods_ = java.util.Collections.unmodifiableList(methods_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + options_ = java.util.Collections.unmodifiableList(options_); + } + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + mixins_ = java.util.Collections.unmodifiableList(mixins_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Api.class, com.google.protobuf.Api.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The fully qualified name of this api, including package name
+   * followed by the api's simple name.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * The fully qualified name of this api, including package name
+   * followed by the api's simple name.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METHODS_FIELD_NUMBER = 2; + private java.util.List methods_; + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + public java.util.List getMethodsList() { + return methods_; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + public java.util.List + getMethodsOrBuilderList() { + return methods_; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + public int getMethodsCount() { + return methods_.size(); + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + public com.google.protobuf.Method getMethods(int index) { + return methods_.get(index); + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + public com.google.protobuf.MethodOrBuilder getMethodsOrBuilder( + int index) { + return methods_.get(index); + } + + public static final int OPTIONS_FIELD_NUMBER = 3; + private java.util.List options_; + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + public java.util.List getOptionsList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + public int getOptionsCount() { + return options_.size(); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + return options_.get(index); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + return options_.get(index); + } + + public static final int VERSION_FIELD_NUMBER = 4; + private volatile java.lang.Object version_; + /** + * optional string version = 4; + * + *
+   * A version string for this api. If specified, must have the form
+   * `major-version.minor-version`, as in `1.10`. If the minor version
+   * is omitted, it defaults to zero. If the entire version field is
+   * empty, the major version is derived from the package name, as
+   * outlined below. If the field is not empty, the version in the
+   * package name will be verified to be consistent with what is
+   * provided here.
+   * The versioning schema uses [semantic
+   * versioning](http://semver.org) where the major version number
+   * indicates a breaking change and the minor version an additive,
+   * non-breaking change. Both version numbers are signals to users
+   * what to expect from different versions, and should be carefully
+   * chosen based on the product plan.
+   * The major version is also reflected in the package name of the
+   * API, which must end in `v<major-version>`, as in
+   * `google.feature.v1`. For major versions 0 and 1, the suffix can
+   * be omitted. Zero major versions must only be used for
+   * experimental, none-GA apis.
+   * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+   * --)
+   * (-- TODO(wgg): determine whether we want to enable specifying
+   * this via an option in the proto file. --)
+   * 
+ */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * optional string version = 4; + * + *
+   * A version string for this api. If specified, must have the form
+   * `major-version.minor-version`, as in `1.10`. If the minor version
+   * is omitted, it defaults to zero. If the entire version field is
+   * empty, the major version is derived from the package name, as
+   * outlined below. If the field is not empty, the version in the
+   * package name will be verified to be consistent with what is
+   * provided here.
+   * The versioning schema uses [semantic
+   * versioning](http://semver.org) where the major version number
+   * indicates a breaking change and the minor version an additive,
+   * non-breaking change. Both version numbers are signals to users
+   * what to expect from different versions, and should be carefully
+   * chosen based on the product plan.
+   * The major version is also reflected in the package name of the
+   * API, which must end in `v<major-version>`, as in
+   * `google.feature.v1`. For major versions 0 and 1, the suffix can
+   * be omitted. Zero major versions must only be used for
+   * experimental, none-GA apis.
+   * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+   * --)
+   * (-- TODO(wgg): determine whether we want to enable specifying
+   * this via an option in the proto file. --)
+   * 
+ */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_CONTEXT_FIELD_NUMBER = 5; + private com.google.protobuf.SourceContext sourceContext_; + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+   * Source context for the protocol buffer service represented by this
+   * message.
+   * 
+ */ + public boolean hasSourceContext() { + return sourceContext_ != null; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+   * Source context for the protocol buffer service represented by this
+   * message.
+   * 
+ */ + public com.google.protobuf.SourceContext getSourceContext() { + return sourceContext_ == null ? com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+   * Source context for the protocol buffer service represented by this
+   * message.
+   * 
+ */ + public com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder() { + return getSourceContext(); + } + + public static final int MIXINS_FIELD_NUMBER = 6; + private java.util.List mixins_; + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + public java.util.List getMixinsList() { + return mixins_; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + public java.util.List + getMixinsOrBuilderList() { + return mixins_; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + public int getMixinsCount() { + return mixins_.size(); + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + public com.google.protobuf.Mixin getMixins(int index) { + return mixins_.get(index); + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + public com.google.protobuf.MixinOrBuilder getMixinsOrBuilder( + int index) { + return mixins_.get(index); + } + + public static final int SYNTAX_FIELD_NUMBER = 7; + private int syntax_; + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of the service.
+   * 
+ */ + public int getSyntaxValue() { + return syntax_; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of the service.
+   * 
+ */ + public com.google.protobuf.Syntax getSyntax() { + com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); + return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; + } + + 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 { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + for (int i = 0; i < methods_.size(); i++) { + output.writeMessage(2, methods_.get(i)); + } + for (int i = 0; i < options_.size(); i++) { + output.writeMessage(3, options_.get(i)); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, version_); + } + if (sourceContext_ != null) { + output.writeMessage(5, getSourceContext()); + } + for (int i = 0; i < mixins_.size(); i++) { + output.writeMessage(6, mixins_.get(i)); + } + if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { + output.writeEnum(7, syntax_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + for (int i = 0; i < methods_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, methods_.get(i)); + } + for (int i = 0; i < options_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, options_.get(i)); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, version_); + } + if (sourceContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getSourceContext()); + } + for (int i = 0; i < mixins_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, mixins_.get(i)); + } + if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, syntax_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Api)) { + return super.equals(obj); + } + com.google.protobuf.Api other = (com.google.protobuf.Api) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && getMethodsList() + .equals(other.getMethodsList()); + result = result && getOptionsList() + .equals(other.getOptionsList()); + result = result && getVersion() + .equals(other.getVersion()); + result = result && (hasSourceContext() == other.hasSourceContext()); + if (hasSourceContext()) { + result = result && getSourceContext() + .equals(other.getSourceContext()); + } + result = result && getMixinsList() + .equals(other.getMixinsList()); + result = result && syntax_ == other.syntax_; + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getMethodsCount() > 0) { + hash = (37 * hash) + METHODS_FIELD_NUMBER; + hash = (53 * hash) + getMethodsList().hashCode(); + } + if (getOptionsCount() > 0) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptionsList().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (hasSourceContext()) { + hash = (37 * hash) + SOURCE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getSourceContext().hashCode(); + } + if (getMixinsCount() > 0) { + hash = (37 * hash) + MIXINS_FIELD_NUMBER; + hash = (53 * hash) + getMixinsList().hashCode(); + } + hash = (37 * hash) + SYNTAX_FIELD_NUMBER; + hash = (53 * hash) + syntax_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Api parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Api 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.protobuf.Api parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Api parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Api parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Api parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Api parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Api parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Api parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Api 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.protobuf.Api 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.protobuf.Api} + * + *
+   * Api is a light-weight descriptor for a protocol buffer service.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Api) + com.google.protobuf.ApiOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Api.class, com.google.protobuf.Api.Builder.class); + } + + // Construct using com.google.protobuf.Api.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getMethodsFieldBuilder(); + getOptionsFieldBuilder(); + getMixinsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (methodsBuilder_ == null) { + methods_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + methodsBuilder_.clear(); + } + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + optionsBuilder_.clear(); + } + version_ = ""; + + if (sourceContextBuilder_ == null) { + sourceContext_ = null; + } else { + sourceContext_ = null; + sourceContextBuilder_ = null; + } + if (mixinsBuilder_ == null) { + mixins_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + mixinsBuilder_.clear(); + } + syntax_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_descriptor; + } + + public com.google.protobuf.Api getDefaultInstanceForType() { + return com.google.protobuf.Api.getDefaultInstance(); + } + + public com.google.protobuf.Api build() { + com.google.protobuf.Api result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Api buildPartial() { + com.google.protobuf.Api result = new com.google.protobuf.Api(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (methodsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + methods_ = java.util.Collections.unmodifiableList(methods_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.methods_ = methods_; + } else { + result.methods_ = methodsBuilder_.build(); + } + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + options_ = java.util.Collections.unmodifiableList(options_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + result.version_ = version_; + if (sourceContextBuilder_ == null) { + result.sourceContext_ = sourceContext_; + } else { + result.sourceContext_ = sourceContextBuilder_.build(); + } + if (mixinsBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { + mixins_ = java.util.Collections.unmodifiableList(mixins_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.mixins_ = mixins_; + } else { + result.mixins_ = mixinsBuilder_.build(); + } + result.syntax_ = syntax_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Api) { + return mergeFrom((com.google.protobuf.Api)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Api other) { + if (other == com.google.protobuf.Api.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (methodsBuilder_ == null) { + if (!other.methods_.isEmpty()) { + if (methods_.isEmpty()) { + methods_ = other.methods_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMethodsIsMutable(); + methods_.addAll(other.methods_); + } + onChanged(); + } + } else { + if (!other.methods_.isEmpty()) { + if (methodsBuilder_.isEmpty()) { + methodsBuilder_.dispose(); + methodsBuilder_ = null; + methods_ = other.methods_; + bitField0_ = (bitField0_ & ~0x00000002); + methodsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMethodsFieldBuilder() : null; + } else { + methodsBuilder_.addAllMessages(other.methods_); + } + } + } + if (optionsBuilder_ == null) { + if (!other.options_.isEmpty()) { + if (options_.isEmpty()) { + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureOptionsIsMutable(); + options_.addAll(other.options_); + } + onChanged(); + } + } else { + if (!other.options_.isEmpty()) { + if (optionsBuilder_.isEmpty()) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000004); + optionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOptionsFieldBuilder() : null; + } else { + optionsBuilder_.addAllMessages(other.options_); + } + } + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (other.hasSourceContext()) { + mergeSourceContext(other.getSourceContext()); + } + if (mixinsBuilder_ == null) { + if (!other.mixins_.isEmpty()) { + if (mixins_.isEmpty()) { + mixins_ = other.mixins_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureMixinsIsMutable(); + mixins_.addAll(other.mixins_); + } + onChanged(); + } + } else { + if (!other.mixins_.isEmpty()) { + if (mixinsBuilder_.isEmpty()) { + mixinsBuilder_.dispose(); + mixinsBuilder_ = null; + mixins_ = other.mixins_; + bitField0_ = (bitField0_ & ~0x00000020); + mixinsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMixinsFieldBuilder() : null; + } else { + mixinsBuilder_.addAllMessages(other.mixins_); + } + } + } + if (other.syntax_ != 0) { + setSyntaxValue(other.getSyntaxValue()); + } + 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.protobuf.Api parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Api) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The fully qualified name of this api, including package name
+     * followed by the api's simple name.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of this api, including package name
+     * followed by the api's simple name.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of this api, including package name
+     * followed by the api's simple name.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of this api, including package name
+     * followed by the api's simple name.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of this api, including package name
+     * followed by the api's simple name.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List methods_ = + java.util.Collections.emptyList(); + private void ensureMethodsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + methods_ = new java.util.ArrayList(methods_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Method, com.google.protobuf.Method.Builder, com.google.protobuf.MethodOrBuilder> methodsBuilder_; + + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public java.util.List getMethodsList() { + if (methodsBuilder_ == null) { + return java.util.Collections.unmodifiableList(methods_); + } else { + return methodsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public int getMethodsCount() { + if (methodsBuilder_ == null) { + return methods_.size(); + } else { + return methodsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public com.google.protobuf.Method getMethods(int index) { + if (methodsBuilder_ == null) { + return methods_.get(index); + } else { + return methodsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder setMethods( + int index, com.google.protobuf.Method value) { + if (methodsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodsIsMutable(); + methods_.set(index, value); + onChanged(); + } else { + methodsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder setMethods( + int index, com.google.protobuf.Method.Builder builderForValue) { + if (methodsBuilder_ == null) { + ensureMethodsIsMutable(); + methods_.set(index, builderForValue.build()); + onChanged(); + } else { + methodsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder addMethods(com.google.protobuf.Method value) { + if (methodsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodsIsMutable(); + methods_.add(value); + onChanged(); + } else { + methodsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder addMethods( + int index, com.google.protobuf.Method value) { + if (methodsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodsIsMutable(); + methods_.add(index, value); + onChanged(); + } else { + methodsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder addMethods( + com.google.protobuf.Method.Builder builderForValue) { + if (methodsBuilder_ == null) { + ensureMethodsIsMutable(); + methods_.add(builderForValue.build()); + onChanged(); + } else { + methodsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder addMethods( + int index, com.google.protobuf.Method.Builder builderForValue) { + if (methodsBuilder_ == null) { + ensureMethodsIsMutable(); + methods_.add(index, builderForValue.build()); + onChanged(); + } else { + methodsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder addAllMethods( + java.lang.Iterable values) { + if (methodsBuilder_ == null) { + ensureMethodsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, methods_); + onChanged(); + } else { + methodsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder clearMethods() { + if (methodsBuilder_ == null) { + methods_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + methodsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder removeMethods(int index) { + if (methodsBuilder_ == null) { + ensureMethodsIsMutable(); + methods_.remove(index); + onChanged(); + } else { + methodsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public com.google.protobuf.Method.Builder getMethodsBuilder( + int index) { + return getMethodsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public com.google.protobuf.MethodOrBuilder getMethodsOrBuilder( + int index) { + if (methodsBuilder_ == null) { + return methods_.get(index); } else { + return methodsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public java.util.List + getMethodsOrBuilderList() { + if (methodsBuilder_ != null) { + return methodsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(methods_); + } + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public com.google.protobuf.Method.Builder addMethodsBuilder() { + return getMethodsFieldBuilder().addBuilder( + com.google.protobuf.Method.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public com.google.protobuf.Method.Builder addMethodsBuilder( + int index) { + return getMethodsFieldBuilder().addBuilder( + index, com.google.protobuf.Method.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public java.util.List + getMethodsBuilderList() { + return getMethodsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Method, com.google.protobuf.Method.Builder, com.google.protobuf.MethodOrBuilder> + getMethodsFieldBuilder() { + if (methodsBuilder_ == null) { + methodsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Method, com.google.protobuf.Method.Builder, com.google.protobuf.MethodOrBuilder>( + methods_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + methods_ = null; + } + return methodsBuilder_; + } + + private java.util.List options_ = + java.util.Collections.emptyList(); + private void ensureOptionsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + options_ = new java.util.ArrayList(options_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; + + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public java.util.List getOptionsList() { + if (optionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(options_); + } else { + return optionsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public int getOptionsCount() { + if (optionsBuilder_ == null) { + return options_.size(); + } else { + return optionsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + if (optionsBuilder_ == null) { + return options_.get(index); + } else { + return optionsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.set(index, value); + onChanged(); + } else { + optionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.set(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder addOptions(com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(value); + onChanged(); + } else { + optionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(index, value); + onChanged(); + } else { + optionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder addOptions( + com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder addAllOptions( + java.lang.Iterable values) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, options_); + onChanged(); + } else { + optionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + optionsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder removeOptions(int index) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.remove(index); + onChanged(); + } else { + optionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public com.google.protobuf.Option.Builder getOptionsBuilder( + int index) { + return getOptionsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + if (optionsBuilder_ == null) { + return options_.get(index); } else { + return optionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(options_); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder() { + return getOptionsFieldBuilder().addBuilder( + com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder( + int index) { + return getOptionsFieldBuilder().addBuilder( + index, com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public java.util.List + getOptionsBuilderList() { + return getOptionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( + options_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private java.lang.Object version_ = ""; + /** + * optional string version = 4; + * + *
+     * A version string for this api. If specified, must have the form
+     * `major-version.minor-version`, as in `1.10`. If the minor version
+     * is omitted, it defaults to zero. If the entire version field is
+     * empty, the major version is derived from the package name, as
+     * outlined below. If the field is not empty, the version in the
+     * package name will be verified to be consistent with what is
+     * provided here.
+     * The versioning schema uses [semantic
+     * versioning](http://semver.org) where the major version number
+     * indicates a breaking change and the minor version an additive,
+     * non-breaking change. Both version numbers are signals to users
+     * what to expect from different versions, and should be carefully
+     * chosen based on the product plan.
+     * The major version is also reflected in the package name of the
+     * API, which must end in `v<major-version>`, as in
+     * `google.feature.v1`. For major versions 0 and 1, the suffix can
+     * be omitted. Zero major versions must only be used for
+     * experimental, none-GA apis.
+     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+     * --)
+     * (-- TODO(wgg): determine whether we want to enable specifying
+     * this via an option in the proto file. --)
+     * 
+ */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string version = 4; + * + *
+     * A version string for this api. If specified, must have the form
+     * `major-version.minor-version`, as in `1.10`. If the minor version
+     * is omitted, it defaults to zero. If the entire version field is
+     * empty, the major version is derived from the package name, as
+     * outlined below. If the field is not empty, the version in the
+     * package name will be verified to be consistent with what is
+     * provided here.
+     * The versioning schema uses [semantic
+     * versioning](http://semver.org) where the major version number
+     * indicates a breaking change and the minor version an additive,
+     * non-breaking change. Both version numbers are signals to users
+     * what to expect from different versions, and should be carefully
+     * chosen based on the product plan.
+     * The major version is also reflected in the package name of the
+     * API, which must end in `v<major-version>`, as in
+     * `google.feature.v1`. For major versions 0 and 1, the suffix can
+     * be omitted. Zero major versions must only be used for
+     * experimental, none-GA apis.
+     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+     * --)
+     * (-- TODO(wgg): determine whether we want to enable specifying
+     * this via an option in the proto file. --)
+     * 
+ */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string version = 4; + * + *
+     * A version string for this api. If specified, must have the form
+     * `major-version.minor-version`, as in `1.10`. If the minor version
+     * is omitted, it defaults to zero. If the entire version field is
+     * empty, the major version is derived from the package name, as
+     * outlined below. If the field is not empty, the version in the
+     * package name will be verified to be consistent with what is
+     * provided here.
+     * The versioning schema uses [semantic
+     * versioning](http://semver.org) where the major version number
+     * indicates a breaking change and the minor version an additive,
+     * non-breaking change. Both version numbers are signals to users
+     * what to expect from different versions, and should be carefully
+     * chosen based on the product plan.
+     * The major version is also reflected in the package name of the
+     * API, which must end in `v<major-version>`, as in
+     * `google.feature.v1`. For major versions 0 and 1, the suffix can
+     * be omitted. Zero major versions must only be used for
+     * experimental, none-GA apis.
+     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+     * --)
+     * (-- TODO(wgg): determine whether we want to enable specifying
+     * this via an option in the proto file. --)
+     * 
+ */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * optional string version = 4; + * + *
+     * A version string for this api. If specified, must have the form
+     * `major-version.minor-version`, as in `1.10`. If the minor version
+     * is omitted, it defaults to zero. If the entire version field is
+     * empty, the major version is derived from the package name, as
+     * outlined below. If the field is not empty, the version in the
+     * package name will be verified to be consistent with what is
+     * provided here.
+     * The versioning schema uses [semantic
+     * versioning](http://semver.org) where the major version number
+     * indicates a breaking change and the minor version an additive,
+     * non-breaking change. Both version numbers are signals to users
+     * what to expect from different versions, and should be carefully
+     * chosen based on the product plan.
+     * The major version is also reflected in the package name of the
+     * API, which must end in `v<major-version>`, as in
+     * `google.feature.v1`. For major versions 0 and 1, the suffix can
+     * be omitted. Zero major versions must only be used for
+     * experimental, none-GA apis.
+     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+     * --)
+     * (-- TODO(wgg): determine whether we want to enable specifying
+     * this via an option in the proto file. --)
+     * 
+ */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * optional string version = 4; + * + *
+     * A version string for this api. If specified, must have the form
+     * `major-version.minor-version`, as in `1.10`. If the minor version
+     * is omitted, it defaults to zero. If the entire version field is
+     * empty, the major version is derived from the package name, as
+     * outlined below. If the field is not empty, the version in the
+     * package name will be verified to be consistent with what is
+     * provided here.
+     * The versioning schema uses [semantic
+     * versioning](http://semver.org) where the major version number
+     * indicates a breaking change and the minor version an additive,
+     * non-breaking change. Both version numbers are signals to users
+     * what to expect from different versions, and should be carefully
+     * chosen based on the product plan.
+     * The major version is also reflected in the package name of the
+     * API, which must end in `v<major-version>`, as in
+     * `google.feature.v1`. For major versions 0 and 1, the suffix can
+     * be omitted. Zero major versions must only be used for
+     * experimental, none-GA apis.
+     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+     * --)
+     * (-- TODO(wgg): determine whether we want to enable specifying
+     * this via an option in the proto file. --)
+     * 
+ */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SourceContext sourceContext_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder> sourceContextBuilder_; + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public boolean hasSourceContext() { + return sourceContextBuilder_ != null || sourceContext_ != null; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public com.google.protobuf.SourceContext getSourceContext() { + if (sourceContextBuilder_ == null) { + return sourceContext_ == null ? com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; + } else { + return sourceContextBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public Builder setSourceContext(com.google.protobuf.SourceContext value) { + if (sourceContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceContext_ = value; + onChanged(); + } else { + sourceContextBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public Builder setSourceContext( + com.google.protobuf.SourceContext.Builder builderForValue) { + if (sourceContextBuilder_ == null) { + sourceContext_ = builderForValue.build(); + onChanged(); + } else { + sourceContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public Builder mergeSourceContext(com.google.protobuf.SourceContext value) { + if (sourceContextBuilder_ == null) { + if (sourceContext_ != null) { + sourceContext_ = + com.google.protobuf.SourceContext.newBuilder(sourceContext_).mergeFrom(value).buildPartial(); + } else { + sourceContext_ = value; + } + onChanged(); + } else { + sourceContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public Builder clearSourceContext() { + if (sourceContextBuilder_ == null) { + sourceContext_ = null; + onChanged(); + } else { + sourceContext_ = null; + sourceContextBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public com.google.protobuf.SourceContext.Builder getSourceContextBuilder() { + + onChanged(); + return getSourceContextFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder() { + if (sourceContextBuilder_ != null) { + return sourceContextBuilder_.getMessageOrBuilder(); + } else { + return sourceContext_ == null ? + com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; + } + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder> + getSourceContextFieldBuilder() { + if (sourceContextBuilder_ == null) { + sourceContextBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder>( + getSourceContext(), + getParentForChildren(), + isClean()); + sourceContext_ = null; + } + return sourceContextBuilder_; + } + + private java.util.List mixins_ = + java.util.Collections.emptyList(); + private void ensureMixinsIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + mixins_ = new java.util.ArrayList(mixins_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Mixin, com.google.protobuf.Mixin.Builder, com.google.protobuf.MixinOrBuilder> mixinsBuilder_; + + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public java.util.List getMixinsList() { + if (mixinsBuilder_ == null) { + return java.util.Collections.unmodifiableList(mixins_); + } else { + return mixinsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public int getMixinsCount() { + if (mixinsBuilder_ == null) { + return mixins_.size(); + } else { + return mixinsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public com.google.protobuf.Mixin getMixins(int index) { + if (mixinsBuilder_ == null) { + return mixins_.get(index); + } else { + return mixinsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder setMixins( + int index, com.google.protobuf.Mixin value) { + if (mixinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMixinsIsMutable(); + mixins_.set(index, value); + onChanged(); + } else { + mixinsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder setMixins( + int index, com.google.protobuf.Mixin.Builder builderForValue) { + if (mixinsBuilder_ == null) { + ensureMixinsIsMutable(); + mixins_.set(index, builderForValue.build()); + onChanged(); + } else { + mixinsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder addMixins(com.google.protobuf.Mixin value) { + if (mixinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMixinsIsMutable(); + mixins_.add(value); + onChanged(); + } else { + mixinsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder addMixins( + int index, com.google.protobuf.Mixin value) { + if (mixinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMixinsIsMutable(); + mixins_.add(index, value); + onChanged(); + } else { + mixinsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder addMixins( + com.google.protobuf.Mixin.Builder builderForValue) { + if (mixinsBuilder_ == null) { + ensureMixinsIsMutable(); + mixins_.add(builderForValue.build()); + onChanged(); + } else { + mixinsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder addMixins( + int index, com.google.protobuf.Mixin.Builder builderForValue) { + if (mixinsBuilder_ == null) { + ensureMixinsIsMutable(); + mixins_.add(index, builderForValue.build()); + onChanged(); + } else { + mixinsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder addAllMixins( + java.lang.Iterable values) { + if (mixinsBuilder_ == null) { + ensureMixinsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, mixins_); + onChanged(); + } else { + mixinsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder clearMixins() { + if (mixinsBuilder_ == null) { + mixins_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + mixinsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder removeMixins(int index) { + if (mixinsBuilder_ == null) { + ensureMixinsIsMutable(); + mixins_.remove(index); + onChanged(); + } else { + mixinsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public com.google.protobuf.Mixin.Builder getMixinsBuilder( + int index) { + return getMixinsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public com.google.protobuf.MixinOrBuilder getMixinsOrBuilder( + int index) { + if (mixinsBuilder_ == null) { + return mixins_.get(index); } else { + return mixinsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public java.util.List + getMixinsOrBuilderList() { + if (mixinsBuilder_ != null) { + return mixinsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mixins_); + } + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public com.google.protobuf.Mixin.Builder addMixinsBuilder() { + return getMixinsFieldBuilder().addBuilder( + com.google.protobuf.Mixin.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public com.google.protobuf.Mixin.Builder addMixinsBuilder( + int index) { + return getMixinsFieldBuilder().addBuilder( + index, com.google.protobuf.Mixin.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public java.util.List + getMixinsBuilderList() { + return getMixinsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Mixin, com.google.protobuf.Mixin.Builder, com.google.protobuf.MixinOrBuilder> + getMixinsFieldBuilder() { + if (mixinsBuilder_ == null) { + mixinsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Mixin, com.google.protobuf.Mixin.Builder, com.google.protobuf.MixinOrBuilder>( + mixins_, + ((bitField0_ & 0x00000020) == 0x00000020), + getParentForChildren(), + isClean()); + mixins_ = null; + } + return mixinsBuilder_; + } + + private int syntax_ = 0; + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of the service.
+     * 
+ */ + public int getSyntaxValue() { + return syntax_; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of the service.
+     * 
+ */ + public Builder setSyntaxValue(int value) { + syntax_ = value; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of the service.
+     * 
+ */ + public com.google.protobuf.Syntax getSyntax() { + com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); + return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of the service.
+     * 
+ */ + public Builder setSyntax(com.google.protobuf.Syntax value) { + if (value == null) { + throw new NullPointerException(); + } + + syntax_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of the service.
+     * 
+ */ + public Builder clearSyntax() { + + syntax_ = 0; + onChanged(); + return this; + } + 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.protobuf.Api) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Api) + private static final com.google.protobuf.Api DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Api(); + } + + public static com.google.protobuf.Api getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Api parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Api(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.protobuf.Api getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiOrBuilder.java new file mode 100644 index 000000000000..6cbec48994b9 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiOrBuilder.java @@ -0,0 +1,266 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +public interface ApiOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Api) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The fully qualified name of this api, including package name
+   * followed by the api's simple name.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The fully qualified name of this api, including package name
+   * followed by the api's simple name.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + java.util.List + getMethodsList(); + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + com.google.protobuf.Method getMethods(int index); + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + int getMethodsCount(); + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + java.util.List + getMethodsOrBuilderList(); + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + com.google.protobuf.MethodOrBuilder getMethodsOrBuilder( + int index); + + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + java.util.List + getOptionsList(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + com.google.protobuf.Option getOptions(int index); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + int getOptionsCount(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + java.util.List + getOptionsOrBuilderList(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index); + + /** + * optional string version = 4; + * + *
+   * A version string for this api. If specified, must have the form
+   * `major-version.minor-version`, as in `1.10`. If the minor version
+   * is omitted, it defaults to zero. If the entire version field is
+   * empty, the major version is derived from the package name, as
+   * outlined below. If the field is not empty, the version in the
+   * package name will be verified to be consistent with what is
+   * provided here.
+   * The versioning schema uses [semantic
+   * versioning](http://semver.org) where the major version number
+   * indicates a breaking change and the minor version an additive,
+   * non-breaking change. Both version numbers are signals to users
+   * what to expect from different versions, and should be carefully
+   * chosen based on the product plan.
+   * The major version is also reflected in the package name of the
+   * API, which must end in `v<major-version>`, as in
+   * `google.feature.v1`. For major versions 0 and 1, the suffix can
+   * be omitted. Zero major versions must only be used for
+   * experimental, none-GA apis.
+   * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+   * --)
+   * (-- TODO(wgg): determine whether we want to enable specifying
+   * this via an option in the proto file. --)
+   * 
+ */ + java.lang.String getVersion(); + /** + * optional string version = 4; + * + *
+   * A version string for this api. If specified, must have the form
+   * `major-version.minor-version`, as in `1.10`. If the minor version
+   * is omitted, it defaults to zero. If the entire version field is
+   * empty, the major version is derived from the package name, as
+   * outlined below. If the field is not empty, the version in the
+   * package name will be verified to be consistent with what is
+   * provided here.
+   * The versioning schema uses [semantic
+   * versioning](http://semver.org) where the major version number
+   * indicates a breaking change and the minor version an additive,
+   * non-breaking change. Both version numbers are signals to users
+   * what to expect from different versions, and should be carefully
+   * chosen based on the product plan.
+   * The major version is also reflected in the package name of the
+   * API, which must end in `v<major-version>`, as in
+   * `google.feature.v1`. For major versions 0 and 1, the suffix can
+   * be omitted. Zero major versions must only be used for
+   * experimental, none-GA apis.
+   * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+   * --)
+   * (-- TODO(wgg): determine whether we want to enable specifying
+   * this via an option in the proto file. --)
+   * 
+ */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+   * Source context for the protocol buffer service represented by this
+   * message.
+   * 
+ */ + boolean hasSourceContext(); + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+   * Source context for the protocol buffer service represented by this
+   * message.
+   * 
+ */ + com.google.protobuf.SourceContext getSourceContext(); + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+   * Source context for the protocol buffer service represented by this
+   * message.
+   * 
+ */ + com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder(); + + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + java.util.List + getMixinsList(); + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + com.google.protobuf.Mixin getMixins(int index); + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + int getMixinsCount(); + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + java.util.List + getMixinsOrBuilderList(); + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + com.google.protobuf.MixinOrBuilder getMixinsOrBuilder( + int index); + + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of the service.
+   * 
+ */ + int getSyntaxValue(); + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of the service.
+   * 
+ */ + com.google.protobuf.Syntax getSyntax(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiProto.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiProto.java new file mode 100644 index 000000000000..90130982e0e1 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ApiProto.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +public final class ApiProto { + private ApiProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_Api_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_Api_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_Method_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_Method_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_Mixin_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_Mixin_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031google/protobuf/api.proto\022\017google.prot" + + "obuf\032$google/protobuf/source_context.pro" + + "to\032\032google/protobuf/type.proto\"\201\002\n\003Api\022\014" + + "\n\004name\030\001 \001(\t\022(\n\007methods\030\002 \003(\0132\027.google.p" + + "rotobuf.Method\022(\n\007options\030\003 \003(\0132\027.google" + + ".protobuf.Option\022\017\n\007version\030\004 \001(\t\0226\n\016sou" + + "rce_context\030\005 \001(\0132\036.google.protobuf.Sour" + + "ceContext\022&\n\006mixins\030\006 \003(\0132\026.google.proto" + + "buf.Mixin\022\'\n\006syntax\030\007 \001(\0162\027.google.proto" + + "buf.Syntax\"\335\001\n\006Method\022\014\n\004name\030\001 \001(\t\022\034\n\020r", + "equest_type_url\030\002 \001(\tB\002\010\002\022\031\n\021request_str" + + "eaming\030\003 \001(\010\022\035\n\021response_type_url\030\004 \001(\tB" + + "\002\010\002\022\032\n\022response_streaming\030\005 \001(\010\022(\n\007optio" + + "ns\030\006 \003(\0132\027.google.protobuf.Option\022\'\n\006syn" + + "tax\030\007 \001(\0162\027.google.protobuf.Syntax\"#\n\005Mi" + + "xin\022\014\n\004name\030\001 \001(\t\022\014\n\004root\030\002 \001(\tBK\n\023com.g" + + "oogle.protobufB\010ApiProtoP\001\240\001\001\242\002\003GPB\252\002\036Go" + + "ogle.Protobuf.WellKnownTypesb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.SourceContextProto.getDescriptor(), + com.google.protobuf.TypeProto.getDescriptor(), + }, assigner); + internal_static_google_protobuf_Api_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_protobuf_Api_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_Api_descriptor, + new java.lang.String[] { "Name", "Methods", "Options", "Version", "SourceContext", "Mixins", "Syntax", }); + internal_static_google_protobuf_Method_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_protobuf_Method_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_Method_descriptor, + new java.lang.String[] { "Name", "RequestTypeUrl", "RequestStreaming", "ResponseTypeUrl", "ResponseStreaming", "Options", "Syntax", }); + internal_static_google_protobuf_Mixin_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_protobuf_Mixin_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_Mixin_descriptor, + new java.lang.String[] { "Name", "Root", }); + com.google.protobuf.SourceContextProto.getDescriptor(); + com.google.protobuf.TypeProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValue.java new file mode 100644 index 000000000000..a18c664aae5d --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValue.java @@ -0,0 +1,428 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.BoolValue} + * + *
+ * Wrapper message for `bool`.
+ * The JSON representation for `BoolValue` is JSON `true` and `false`.
+ * 
+ */ +public final class BoolValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.BoolValue) + BoolValueOrBuilder { + // Use BoolValue.newBuilder() to construct. + private BoolValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BoolValue() { + value_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private BoolValue( + 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 8: { + + value_ = input.readBool(); + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.BoolValue.class, com.google.protobuf.BoolValue.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private boolean value_; + /** + * optional bool value = 1; + * + *
+   * The bool value.
+   * 
+ */ + public boolean getValue() { + return value_; + } + + 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 { + if (value_ != false) { + output.writeBool(1, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.BoolValue)) { + return super.equals(obj); + } + com.google.protobuf.BoolValue other = (com.google.protobuf.BoolValue) obj; + + boolean result = true; + result = result && (getValue() + == other.getValue()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getValue()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.BoolValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.BoolValue 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.protobuf.BoolValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.BoolValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.BoolValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.BoolValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.BoolValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.BoolValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.BoolValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.BoolValue 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.protobuf.BoolValue 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.protobuf.BoolValue} + * + *
+   * Wrapper message for `bool`.
+   * The JSON representation for `BoolValue` is JSON `true` and `false`.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.BoolValue) + com.google.protobuf.BoolValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.BoolValue.class, com.google.protobuf.BoolValue.Builder.class); + } + + // Construct using com.google.protobuf.BoolValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + value_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_descriptor; + } + + public com.google.protobuf.BoolValue getDefaultInstanceForType() { + return com.google.protobuf.BoolValue.getDefaultInstance(); + } + + public com.google.protobuf.BoolValue build() { + com.google.protobuf.BoolValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.BoolValue buildPartial() { + com.google.protobuf.BoolValue result = new com.google.protobuf.BoolValue(this); + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.BoolValue) { + return mergeFrom((com.google.protobuf.BoolValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.BoolValue other) { + if (other == com.google.protobuf.BoolValue.getDefaultInstance()) return this; + if (other.getValue() != false) { + setValue(other.getValue()); + } + 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.protobuf.BoolValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.BoolValue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean value_ ; + /** + * optional bool value = 1; + * + *
+     * The bool value.
+     * 
+ */ + public boolean getValue() { + return value_; + } + /** + * optional bool value = 1; + * + *
+     * The bool value.
+     * 
+ */ + public Builder setValue(boolean value) { + + value_ = value; + onChanged(); + return this; + } + /** + * optional bool value = 1; + * + *
+     * The bool value.
+     * 
+ */ + public Builder clearValue() { + + value_ = false; + onChanged(); + return this; + } + 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.protobuf.BoolValue) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.BoolValue) + private static final com.google.protobuf.BoolValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.BoolValue(); + } + + public static com.google.protobuf.BoolValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public BoolValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new BoolValue(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.protobuf.BoolValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValueOrBuilder.java new file mode 100644 index 000000000000..17c3436d6fe2 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BoolValueOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +public interface BoolValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.BoolValue) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bool value = 1; + * + *
+   * The bool value.
+   * 
+ */ + boolean getValue(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValue.java new file mode 100644 index 000000000000..3d784ca7bc5c --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValue.java @@ -0,0 +1,430 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.BytesValue} + * + *
+ * Wrapper message for `bytes`.
+ * The JSON representation for `BytesValue` is JSON string.
+ * 
+ */ +public final class BytesValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.BytesValue) + BytesValueOrBuilder { + // Use BytesValue.newBuilder() to construct. + private BytesValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BytesValue() { + value_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private BytesValue( + 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: { + + value_ = input.readBytes(); + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.BytesValue.class, com.google.protobuf.BytesValue.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString value_; + /** + * optional bytes value = 1 [ctype = CORD]; + * + *
+   * The bytes value.
+   * 
+ */ + public com.google.protobuf.ByteString getValue() { + return value_; + } + + 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 { + if (!value_.isEmpty()) { + output.writeBytes(1, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!value_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.BytesValue)) { + return super.equals(obj); + } + com.google.protobuf.BytesValue other = (com.google.protobuf.BytesValue) obj; + + boolean result = true; + result = result && getValue() + .equals(other.getValue()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.BytesValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.BytesValue 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.protobuf.BytesValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.BytesValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.BytesValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.BytesValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.BytesValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.BytesValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.BytesValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.BytesValue 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.protobuf.BytesValue 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.protobuf.BytesValue} + * + *
+   * Wrapper message for `bytes`.
+   * The JSON representation for `BytesValue` is JSON string.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.BytesValue) + com.google.protobuf.BytesValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.BytesValue.class, com.google.protobuf.BytesValue.Builder.class); + } + + // Construct using com.google.protobuf.BytesValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + value_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_descriptor; + } + + public com.google.protobuf.BytesValue getDefaultInstanceForType() { + return com.google.protobuf.BytesValue.getDefaultInstance(); + } + + public com.google.protobuf.BytesValue build() { + com.google.protobuf.BytesValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.BytesValue buildPartial() { + com.google.protobuf.BytesValue result = new com.google.protobuf.BytesValue(this); + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.BytesValue) { + return mergeFrom((com.google.protobuf.BytesValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.BytesValue other) { + if (other == com.google.protobuf.BytesValue.getDefaultInstance()) return this; + if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { + setValue(other.getValue()); + } + 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.protobuf.BytesValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.BytesValue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes value = 1 [ctype = CORD]; + * + *
+     * The bytes value.
+     * 
+ */ + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + * optional bytes value = 1 [ctype = CORD]; + * + *
+     * The bytes value.
+     * 
+ */ + public Builder setValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * optional bytes value = 1 [ctype = CORD]; + * + *
+     * The bytes value.
+     * 
+ */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + 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.protobuf.BytesValue) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.BytesValue) + private static final com.google.protobuf.BytesValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.BytesValue(); + } + + public static com.google.protobuf.BytesValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public BytesValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new BytesValue(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.protobuf.BytesValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValueOrBuilder.java new file mode 100644 index 000000000000..5d27cb3133d8 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/BytesValueOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +public interface BytesValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.BytesValue) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bytes value = 1 [ctype = CORD]; + * + *
+   * The bytes value.
+   * 
+ */ + com.google.protobuf.ByteString getValue(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValue.java new file mode 100644 index 000000000000..2a964a8f8020 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValue.java @@ -0,0 +1,430 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.DoubleValue} + * + *
+ * Wrapper message for `double`.
+ * The JSON representation for `DoubleValue` is JSON number.
+ * 
+ */ +public final class DoubleValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.DoubleValue) + DoubleValueOrBuilder { + // Use DoubleValue.newBuilder() to construct. + private DoubleValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DoubleValue() { + value_ = 0D; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private DoubleValue( + 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 9: { + + value_ = input.readDouble(); + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.DoubleValue.class, com.google.protobuf.DoubleValue.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private double value_; + /** + * optional double value = 1; + * + *
+   * The double value.
+   * 
+ */ + public double getValue() { + return value_; + } + + 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 { + if (value_ != 0D) { + output.writeDouble(1, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.DoubleValue)) { + return super.equals(obj); + } + com.google.protobuf.DoubleValue other = (com.google.protobuf.DoubleValue) obj; + + boolean result = true; + result = result && ( + java.lang.Double.doubleToLongBits(getValue()) + == java.lang.Double.doubleToLongBits( + other.getValue())); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getValue())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.DoubleValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.DoubleValue 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.protobuf.DoubleValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.DoubleValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.DoubleValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.DoubleValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.DoubleValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.DoubleValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.DoubleValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.DoubleValue 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.protobuf.DoubleValue 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.protobuf.DoubleValue} + * + *
+   * Wrapper message for `double`.
+   * The JSON representation for `DoubleValue` is JSON number.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.DoubleValue) + com.google.protobuf.DoubleValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.DoubleValue.class, com.google.protobuf.DoubleValue.Builder.class); + } + + // Construct using com.google.protobuf.DoubleValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + value_ = 0D; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_descriptor; + } + + public com.google.protobuf.DoubleValue getDefaultInstanceForType() { + return com.google.protobuf.DoubleValue.getDefaultInstance(); + } + + public com.google.protobuf.DoubleValue build() { + com.google.protobuf.DoubleValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.DoubleValue buildPartial() { + com.google.protobuf.DoubleValue result = new com.google.protobuf.DoubleValue(this); + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.DoubleValue) { + return mergeFrom((com.google.protobuf.DoubleValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.DoubleValue other) { + if (other == com.google.protobuf.DoubleValue.getDefaultInstance()) return this; + if (other.getValue() != 0D) { + setValue(other.getValue()); + } + 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.protobuf.DoubleValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.DoubleValue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double value_ ; + /** + * optional double value = 1; + * + *
+     * The double value.
+     * 
+ */ + public double getValue() { + return value_; + } + /** + * optional double value = 1; + * + *
+     * The double value.
+     * 
+ */ + public Builder setValue(double value) { + + value_ = value; + onChanged(); + return this; + } + /** + * optional double value = 1; + * + *
+     * The double value.
+     * 
+ */ + public Builder clearValue() { + + value_ = 0D; + onChanged(); + return this; + } + 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.protobuf.DoubleValue) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.DoubleValue) + private static final com.google.protobuf.DoubleValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.DoubleValue(); + } + + public static com.google.protobuf.DoubleValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DoubleValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new DoubleValue(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.protobuf.DoubleValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValueOrBuilder.java new file mode 100644 index 000000000000..2b3c30eb3b25 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DoubleValueOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +public interface DoubleValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.DoubleValue) + com.google.protobuf.MessageOrBuilder { + + /** + * optional double value = 1; + * + *
+   * The double value.
+   * 
+ */ + double getValue(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Duration.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Duration.java new file mode 100644 index 000000000000..6a753cbe33c6 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Duration.java @@ -0,0 +1,586 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/duration.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Duration} + * + *
+ * A Duration represents a signed, fixed-length span of time represented
+ * as a count of seconds and fractions of seconds at nanosecond
+ * resolution. It is independent of any calendar and concepts like "day"
+ * or "month". It is related to Timestamp in that the difference between
+ * two Timestamp values is a Duration and it can be added or subtracted
+ * from a Timestamp. Range is approximately +-10,000 years.
+ * Example 1: Compute Duration from two Timestamps in pseudo code.
+ *     Timestamp start = ...;
+ *     Timestamp end = ...;
+ *     Duration duration = ...;
+ *     duration.seconds = end.seconds - start.seconds;
+ *     duration.nanos = end.nanos - start.nanos;
+ *     if (duration.seconds < 0 && duration.nanos > 0) {
+ *       duration.seconds += 1;
+ *       duration.nanos -= 1000000000;
+ *     } else if (durations.seconds > 0 && duration.nanos < 0) {
+ *       duration.seconds -= 1;
+ *       duration.nanos += 1000000000;
+ *     }
+ * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
+ *     Timestamp start = ...;
+ *     Duration duration = ...;
+ *     Timestamp end = ...;
+ *     end.seconds = start.seconds + duration.seconds;
+ *     end.nanos = start.nanos + duration.nanos;
+ *     if (end.nanos < 0) {
+ *       end.seconds -= 1;
+ *       end.nanos += 1000000000;
+ *     } else if (end.nanos >= 1000000000) {
+ *       end.seconds += 1;
+ *       end.nanos -= 1000000000;
+ *     }
+ * 
+ */ +public final class Duration extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Duration) + DurationOrBuilder { + // Use Duration.newBuilder() to construct. + private Duration(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Duration() { + seconds_ = 0L; + nanos_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Duration( + 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 8: { + + seconds_ = input.readInt64(); + break; + } + case 16: { + + nanos_ = input.readInt32(); + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Duration.class, com.google.protobuf.Duration.Builder.class); + } + + public static final int SECONDS_FIELD_NUMBER = 1; + private long seconds_; + /** + * optional int64 seconds = 1; + * + *
+   * Signed seconds of the span of time. Must be from -315,576,000,000
+   * to +315,576,000,000 inclusive.
+   * 
+ */ + public long getSeconds() { + return seconds_; + } + + public static final int NANOS_FIELD_NUMBER = 2; + private int nanos_; + /** + * optional int32 nanos = 2; + * + *
+   * Signed fractions of a second at nanosecond resolution of the span
+   * of time. Durations less than one second are represented with a 0
+   * `seconds` field and a positive or negative `nanos` field. For durations
+   * of one second or more, a non-zero value for the `nanos` field must be
+   * of the same sign as the `seconds` field. Must be from -999,999,999
+   * to +999,999,999 inclusive.
+   * 
+ */ + public int getNanos() { + return nanos_; + } + + 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 { + if (seconds_ != 0L) { + output.writeInt64(1, seconds_); + } + if (nanos_ != 0) { + output.writeInt32(2, nanos_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (seconds_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, seconds_); + } + if (nanos_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, nanos_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Duration)) { + return super.equals(obj); + } + com.google.protobuf.Duration other = (com.google.protobuf.Duration) obj; + + boolean result = true; + result = result && (getSeconds() + == other.getSeconds()); + result = result && (getNanos() + == other.getNanos()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + SECONDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSeconds()); + hash = (37 * hash) + NANOS_FIELD_NUMBER; + hash = (53 * hash) + getNanos(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Duration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Duration 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.protobuf.Duration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Duration parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Duration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Duration parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Duration parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Duration parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Duration parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Duration 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.protobuf.Duration 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.protobuf.Duration} + * + *
+   * A Duration represents a signed, fixed-length span of time represented
+   * as a count of seconds and fractions of seconds at nanosecond
+   * resolution. It is independent of any calendar and concepts like "day"
+   * or "month". It is related to Timestamp in that the difference between
+   * two Timestamp values is a Duration and it can be added or subtracted
+   * from a Timestamp. Range is approximately +-10,000 years.
+   * Example 1: Compute Duration from two Timestamps in pseudo code.
+   *     Timestamp start = ...;
+   *     Timestamp end = ...;
+   *     Duration duration = ...;
+   *     duration.seconds = end.seconds - start.seconds;
+   *     duration.nanos = end.nanos - start.nanos;
+   *     if (duration.seconds < 0 && duration.nanos > 0) {
+   *       duration.seconds += 1;
+   *       duration.nanos -= 1000000000;
+   *     } else if (durations.seconds > 0 && duration.nanos < 0) {
+   *       duration.seconds -= 1;
+   *       duration.nanos += 1000000000;
+   *     }
+   * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
+   *     Timestamp start = ...;
+   *     Duration duration = ...;
+   *     Timestamp end = ...;
+   *     end.seconds = start.seconds + duration.seconds;
+   *     end.nanos = start.nanos + duration.nanos;
+   *     if (end.nanos < 0) {
+   *       end.seconds -= 1;
+   *       end.nanos += 1000000000;
+   *     } else if (end.nanos >= 1000000000) {
+   *       end.seconds += 1;
+   *       end.nanos -= 1000000000;
+   *     }
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Duration) + com.google.protobuf.DurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Duration.class, com.google.protobuf.Duration.Builder.class); + } + + // Construct using com.google.protobuf.Duration.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + seconds_ = 0L; + + nanos_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_descriptor; + } + + public com.google.protobuf.Duration getDefaultInstanceForType() { + return com.google.protobuf.Duration.getDefaultInstance(); + } + + public com.google.protobuf.Duration build() { + com.google.protobuf.Duration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Duration buildPartial() { + com.google.protobuf.Duration result = new com.google.protobuf.Duration(this); + result.seconds_ = seconds_; + result.nanos_ = nanos_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Duration) { + return mergeFrom((com.google.protobuf.Duration)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Duration other) { + if (other == com.google.protobuf.Duration.getDefaultInstance()) return this; + if (other.getSeconds() != 0L) { + setSeconds(other.getSeconds()); + } + if (other.getNanos() != 0) { + setNanos(other.getNanos()); + } + 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.protobuf.Duration parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Duration) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long seconds_ ; + /** + * optional int64 seconds = 1; + * + *
+     * Signed seconds of the span of time. Must be from -315,576,000,000
+     * to +315,576,000,000 inclusive.
+     * 
+ */ + public long getSeconds() { + return seconds_; + } + /** + * optional int64 seconds = 1; + * + *
+     * Signed seconds of the span of time. Must be from -315,576,000,000
+     * to +315,576,000,000 inclusive.
+     * 
+ */ + public Builder setSeconds(long value) { + + seconds_ = value; + onChanged(); + return this; + } + /** + * optional int64 seconds = 1; + * + *
+     * Signed seconds of the span of time. Must be from -315,576,000,000
+     * to +315,576,000,000 inclusive.
+     * 
+ */ + public Builder clearSeconds() { + + seconds_ = 0L; + onChanged(); + return this; + } + + private int nanos_ ; + /** + * optional int32 nanos = 2; + * + *
+     * Signed fractions of a second at nanosecond resolution of the span
+     * of time. Durations less than one second are represented with a 0
+     * `seconds` field and a positive or negative `nanos` field. For durations
+     * of one second or more, a non-zero value for the `nanos` field must be
+     * of the same sign as the `seconds` field. Must be from -999,999,999
+     * to +999,999,999 inclusive.
+     * 
+ */ + public int getNanos() { + return nanos_; + } + /** + * optional int32 nanos = 2; + * + *
+     * Signed fractions of a second at nanosecond resolution of the span
+     * of time. Durations less than one second are represented with a 0
+     * `seconds` field and a positive or negative `nanos` field. For durations
+     * of one second or more, a non-zero value for the `nanos` field must be
+     * of the same sign as the `seconds` field. Must be from -999,999,999
+     * to +999,999,999 inclusive.
+     * 
+ */ + public Builder setNanos(int value) { + + nanos_ = value; + onChanged(); + return this; + } + /** + * optional int32 nanos = 2; + * + *
+     * Signed fractions of a second at nanosecond resolution of the span
+     * of time. Durations less than one second are represented with a 0
+     * `seconds` field and a positive or negative `nanos` field. For durations
+     * of one second or more, a non-zero value for the `nanos` field must be
+     * of the same sign as the `seconds` field. Must be from -999,999,999
+     * to +999,999,999 inclusive.
+     * 
+ */ + public Builder clearNanos() { + + nanos_ = 0; + onChanged(); + return this; + } + 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.protobuf.Duration) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Duration) + private static final com.google.protobuf.Duration DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Duration(); + } + + public static com.google.protobuf.Duration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Duration parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Duration(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.protobuf.Duration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationOrBuilder.java new file mode 100644 index 000000000000..ef4d57f2ff9c --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/duration.proto + +package com.google.protobuf; + +public interface DurationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Duration) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 seconds = 1; + * + *
+   * Signed seconds of the span of time. Must be from -315,576,000,000
+   * to +315,576,000,000 inclusive.
+   * 
+ */ + long getSeconds(); + + /** + * optional int32 nanos = 2; + * + *
+   * Signed fractions of a second at nanosecond resolution of the span
+   * of time. Durations less than one second are represented with a 0
+   * `seconds` field and a positive or negative `nanos` field. For durations
+   * of one second or more, a non-zero value for the `nanos` field must be
+   * of the same sign as the `seconds` field. Must be from -999,999,999
+   * to +999,999,999 inclusive.
+   * 
+ */ + int getNanos(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationProto.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationProto.java new file mode 100644 index 000000000000..a2c6c5c11797 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/DurationProto.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/duration.proto + +package com.google.protobuf; + +public final class DurationProto { + private DurationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_Duration_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_Duration_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036google/protobuf/duration.proto\022\017google" + + ".protobuf\"*\n\010Duration\022\017\n\007seconds\030\001 \001(\003\022\r" + + "\n\005nanos\030\002 \001(\005BS\n\023com.google.protobufB\rDu" + + "rationProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Protobuf" + + ".WellKnownTypes\260\002\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_protobuf_Duration_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_protobuf_Duration_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_Duration_descriptor, + new java.lang.String[] { "Seconds", "Nanos", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Empty.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Empty.java new file mode 100644 index 000000000000..e1548e9604e7 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Empty.java @@ -0,0 +1,362 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/empty.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Empty} + * + *
+ * A generic empty message that you can re-use to avoid defining duplicated
+ * empty messages in your APIs. A typical example is to use it as the request
+ * or the response type of an API method. For instance:
+ *     service Foo {
+ *       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
+ *     }
+ * The JSON representation for `Empty` is empty JSON object `{}`.
+ * 
+ */ +public final class Empty extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Empty) + EmptyOrBuilder { + // Use Empty.newBuilder() to construct. + private Empty(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Empty() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Empty( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + 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; + } + } + } + } 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Empty.class, com.google.protobuf.Empty.Builder.class); + } + + 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 { + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Empty)) { + return super.equals(obj); + } + com.google.protobuf.Empty other = (com.google.protobuf.Empty) obj; + + boolean result = true; + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Empty parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Empty 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.protobuf.Empty parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Empty parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Empty parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Empty parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Empty parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Empty parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Empty parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Empty 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.protobuf.Empty 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.protobuf.Empty} + * + *
+   * A generic empty message that you can re-use to avoid defining duplicated
+   * empty messages in your APIs. A typical example is to use it as the request
+   * or the response type of an API method. For instance:
+   *     service Foo {
+   *       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
+   *     }
+   * The JSON representation for `Empty` is empty JSON object `{}`.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Empty) + com.google.protobuf.EmptyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Empty.class, com.google.protobuf.Empty.Builder.class); + } + + // Construct using com.google.protobuf.Empty.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor; + } + + public com.google.protobuf.Empty getDefaultInstanceForType() { + return com.google.protobuf.Empty.getDefaultInstance(); + } + + public com.google.protobuf.Empty build() { + com.google.protobuf.Empty result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Empty buildPartial() { + com.google.protobuf.Empty result = new com.google.protobuf.Empty(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Empty) { + return mergeFrom((com.google.protobuf.Empty)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Empty other) { + if (other == com.google.protobuf.Empty.getDefaultInstance()) return this; + 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.protobuf.Empty parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Empty) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + 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.protobuf.Empty) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Empty) + private static final com.google.protobuf.Empty DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Empty(); + } + + public static com.google.protobuf.Empty getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Empty parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Empty(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.protobuf.Empty getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyOrBuilder.java new file mode 100644 index 000000000000..9a3816194fa7 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/empty.proto + +package com.google.protobuf; + +public interface EmptyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Empty) + com.google.protobuf.MessageOrBuilder { +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyProto.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyProto.java new file mode 100644 index 000000000000..4626e2303efd --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EmptyProto.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/empty.proto + +package com.google.protobuf; + +public final class EmptyProto { + private EmptyProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_Empty_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_Empty_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033google/protobuf/empty.proto\022\017google.pr" + + "otobuf\"\007\n\005EmptyBS\n\023com.google.protobufB\n" + + "EmptyProtoP\001\240\001\001\370\001\001\242\002\003GPB\252\002\036Google.Protob" + + "uf.WellKnownTypes\260\002\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_protobuf_Empty_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_protobuf_Empty_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_Empty_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Enum.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Enum.java new file mode 100644 index 000000000000..ef1f6961d53b --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Enum.java @@ -0,0 +1,1719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Enum} + * + *
+ * Enum type definition.
+ * 
+ */ +public final class Enum extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Enum) + EnumOrBuilder { + // Use Enum.newBuilder() to construct. + private Enum(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Enum() { + name_ = ""; + enumvalue_ = java.util.Collections.emptyList(); + options_ = java.util.Collections.emptyList(); + syntax_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Enum( + 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(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + enumvalue_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + enumvalue_.add(input.readMessage(com.google.protobuf.EnumValue.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + options_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); + break; + } + case 34: { + com.google.protobuf.SourceContext.Builder subBuilder = null; + if (sourceContext_ != null) { + subBuilder = sourceContext_.toBuilder(); + } + sourceContext_ = input.readMessage(com.google.protobuf.SourceContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sourceContext_); + sourceContext_ = subBuilder.buildPartial(); + } + + break; + } + case 40: { + int rawValue = input.readEnum(); + + syntax_ = rawValue; + 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)) { + enumvalue_ = java.util.Collections.unmodifiableList(enumvalue_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + options_ = java.util.Collections.unmodifiableList(options_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Enum.class, com.google.protobuf.Enum.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * Enum type name.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * Enum type name.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENUMVALUE_FIELD_NUMBER = 2; + private java.util.List enumvalue_; + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + public java.util.List getEnumvalueList() { + return enumvalue_; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + public java.util.List + getEnumvalueOrBuilderList() { + return enumvalue_; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + public int getEnumvalueCount() { + return enumvalue_.size(); + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + public com.google.protobuf.EnumValue getEnumvalue(int index) { + return enumvalue_.get(index); + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + public com.google.protobuf.EnumValueOrBuilder getEnumvalueOrBuilder( + int index) { + return enumvalue_.get(index); + } + + public static final int OPTIONS_FIELD_NUMBER = 3; + private java.util.List options_; + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public java.util.List getOptionsList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public int getOptionsCount() { + return options_.size(); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + return options_.get(index); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + return options_.get(index); + } + + public static final int SOURCE_CONTEXT_FIELD_NUMBER = 4; + private com.google.protobuf.SourceContext sourceContext_; + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+   * The source context.
+   * 
+ */ + public boolean hasSourceContext() { + return sourceContext_ != null; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+   * The source context.
+   * 
+ */ + public com.google.protobuf.SourceContext getSourceContext() { + return sourceContext_ == null ? com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+   * The source context.
+   * 
+ */ + public com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder() { + return getSourceContext(); + } + + public static final int SYNTAX_FIELD_NUMBER = 5; + private int syntax_; + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+   * The source syntax.
+   * 
+ */ + public int getSyntaxValue() { + return syntax_; + } + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+   * The source syntax.
+   * 
+ */ + public com.google.protobuf.Syntax getSyntax() { + com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); + return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; + } + + 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 { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + for (int i = 0; i < enumvalue_.size(); i++) { + output.writeMessage(2, enumvalue_.get(i)); + } + for (int i = 0; i < options_.size(); i++) { + output.writeMessage(3, options_.get(i)); + } + if (sourceContext_ != null) { + output.writeMessage(4, getSourceContext()); + } + if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { + output.writeEnum(5, syntax_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + for (int i = 0; i < enumvalue_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, enumvalue_.get(i)); + } + for (int i = 0; i < options_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, options_.get(i)); + } + if (sourceContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getSourceContext()); + } + if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, syntax_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Enum)) { + return super.equals(obj); + } + com.google.protobuf.Enum other = (com.google.protobuf.Enum) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && getEnumvalueList() + .equals(other.getEnumvalueList()); + result = result && getOptionsList() + .equals(other.getOptionsList()); + result = result && (hasSourceContext() == other.hasSourceContext()); + if (hasSourceContext()) { + result = result && getSourceContext() + .equals(other.getSourceContext()); + } + result = result && syntax_ == other.syntax_; + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getEnumvalueCount() > 0) { + hash = (37 * hash) + ENUMVALUE_FIELD_NUMBER; + hash = (53 * hash) + getEnumvalueList().hashCode(); + } + if (getOptionsCount() > 0) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptionsList().hashCode(); + } + if (hasSourceContext()) { + hash = (37 * hash) + SOURCE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getSourceContext().hashCode(); + } + hash = (37 * hash) + SYNTAX_FIELD_NUMBER; + hash = (53 * hash) + syntax_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Enum parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Enum 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.protobuf.Enum parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Enum parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Enum parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Enum parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Enum parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Enum parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Enum parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Enum 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.protobuf.Enum 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.protobuf.Enum} + * + *
+   * Enum type definition.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Enum) + com.google.protobuf.EnumOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Enum.class, com.google.protobuf.Enum.Builder.class); + } + + // Construct using com.google.protobuf.Enum.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getEnumvalueFieldBuilder(); + getOptionsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (enumvalueBuilder_ == null) { + enumvalue_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + enumvalueBuilder_.clear(); + } + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + optionsBuilder_.clear(); + } + if (sourceContextBuilder_ == null) { + sourceContext_ = null; + } else { + sourceContext_ = null; + sourceContextBuilder_ = null; + } + syntax_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_descriptor; + } + + public com.google.protobuf.Enum getDefaultInstanceForType() { + return com.google.protobuf.Enum.getDefaultInstance(); + } + + public com.google.protobuf.Enum build() { + com.google.protobuf.Enum result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Enum buildPartial() { + com.google.protobuf.Enum result = new com.google.protobuf.Enum(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (enumvalueBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + enumvalue_ = java.util.Collections.unmodifiableList(enumvalue_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.enumvalue_ = enumvalue_; + } else { + result.enumvalue_ = enumvalueBuilder_.build(); + } + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + options_ = java.util.Collections.unmodifiableList(options_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + if (sourceContextBuilder_ == null) { + result.sourceContext_ = sourceContext_; + } else { + result.sourceContext_ = sourceContextBuilder_.build(); + } + result.syntax_ = syntax_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Enum) { + return mergeFrom((com.google.protobuf.Enum)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Enum other) { + if (other == com.google.protobuf.Enum.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (enumvalueBuilder_ == null) { + if (!other.enumvalue_.isEmpty()) { + if (enumvalue_.isEmpty()) { + enumvalue_ = other.enumvalue_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEnumvalueIsMutable(); + enumvalue_.addAll(other.enumvalue_); + } + onChanged(); + } + } else { + if (!other.enumvalue_.isEmpty()) { + if (enumvalueBuilder_.isEmpty()) { + enumvalueBuilder_.dispose(); + enumvalueBuilder_ = null; + enumvalue_ = other.enumvalue_; + bitField0_ = (bitField0_ & ~0x00000002); + enumvalueBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getEnumvalueFieldBuilder() : null; + } else { + enumvalueBuilder_.addAllMessages(other.enumvalue_); + } + } + } + if (optionsBuilder_ == null) { + if (!other.options_.isEmpty()) { + if (options_.isEmpty()) { + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureOptionsIsMutable(); + options_.addAll(other.options_); + } + onChanged(); + } + } else { + if (!other.options_.isEmpty()) { + if (optionsBuilder_.isEmpty()) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000004); + optionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOptionsFieldBuilder() : null; + } else { + optionsBuilder_.addAllMessages(other.options_); + } + } + } + if (other.hasSourceContext()) { + mergeSourceContext(other.getSourceContext()); + } + if (other.syntax_ != 0) { + setSyntaxValue(other.getSyntaxValue()); + } + 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.protobuf.Enum parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Enum) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * Enum type name.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * Enum type name.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * Enum type name.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * Enum type name.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * Enum type name.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List enumvalue_ = + java.util.Collections.emptyList(); + private void ensureEnumvalueIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + enumvalue_ = new java.util.ArrayList(enumvalue_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.EnumValue, com.google.protobuf.EnumValue.Builder, com.google.protobuf.EnumValueOrBuilder> enumvalueBuilder_; + + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public java.util.List getEnumvalueList() { + if (enumvalueBuilder_ == null) { + return java.util.Collections.unmodifiableList(enumvalue_); + } else { + return enumvalueBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public int getEnumvalueCount() { + if (enumvalueBuilder_ == null) { + return enumvalue_.size(); + } else { + return enumvalueBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public com.google.protobuf.EnumValue getEnumvalue(int index) { + if (enumvalueBuilder_ == null) { + return enumvalue_.get(index); + } else { + return enumvalueBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder setEnumvalue( + int index, com.google.protobuf.EnumValue value) { + if (enumvalueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumvalueIsMutable(); + enumvalue_.set(index, value); + onChanged(); + } else { + enumvalueBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder setEnumvalue( + int index, com.google.protobuf.EnumValue.Builder builderForValue) { + if (enumvalueBuilder_ == null) { + ensureEnumvalueIsMutable(); + enumvalue_.set(index, builderForValue.build()); + onChanged(); + } else { + enumvalueBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder addEnumvalue(com.google.protobuf.EnumValue value) { + if (enumvalueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumvalueIsMutable(); + enumvalue_.add(value); + onChanged(); + } else { + enumvalueBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder addEnumvalue( + int index, com.google.protobuf.EnumValue value) { + if (enumvalueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumvalueIsMutable(); + enumvalue_.add(index, value); + onChanged(); + } else { + enumvalueBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder addEnumvalue( + com.google.protobuf.EnumValue.Builder builderForValue) { + if (enumvalueBuilder_ == null) { + ensureEnumvalueIsMutable(); + enumvalue_.add(builderForValue.build()); + onChanged(); + } else { + enumvalueBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder addEnumvalue( + int index, com.google.protobuf.EnumValue.Builder builderForValue) { + if (enumvalueBuilder_ == null) { + ensureEnumvalueIsMutable(); + enumvalue_.add(index, builderForValue.build()); + onChanged(); + } else { + enumvalueBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder addAllEnumvalue( + java.lang.Iterable values) { + if (enumvalueBuilder_ == null) { + ensureEnumvalueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, enumvalue_); + onChanged(); + } else { + enumvalueBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder clearEnumvalue() { + if (enumvalueBuilder_ == null) { + enumvalue_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + enumvalueBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder removeEnumvalue(int index) { + if (enumvalueBuilder_ == null) { + ensureEnumvalueIsMutable(); + enumvalue_.remove(index); + onChanged(); + } else { + enumvalueBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public com.google.protobuf.EnumValue.Builder getEnumvalueBuilder( + int index) { + return getEnumvalueFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public com.google.protobuf.EnumValueOrBuilder getEnumvalueOrBuilder( + int index) { + if (enumvalueBuilder_ == null) { + return enumvalue_.get(index); } else { + return enumvalueBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public java.util.List + getEnumvalueOrBuilderList() { + if (enumvalueBuilder_ != null) { + return enumvalueBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(enumvalue_); + } + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public com.google.protobuf.EnumValue.Builder addEnumvalueBuilder() { + return getEnumvalueFieldBuilder().addBuilder( + com.google.protobuf.EnumValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public com.google.protobuf.EnumValue.Builder addEnumvalueBuilder( + int index) { + return getEnumvalueFieldBuilder().addBuilder( + index, com.google.protobuf.EnumValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public java.util.List + getEnumvalueBuilderList() { + return getEnumvalueFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.EnumValue, com.google.protobuf.EnumValue.Builder, com.google.protobuf.EnumValueOrBuilder> + getEnumvalueFieldBuilder() { + if (enumvalueBuilder_ == null) { + enumvalueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.EnumValue, com.google.protobuf.EnumValue.Builder, com.google.protobuf.EnumValueOrBuilder>( + enumvalue_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + enumvalue_ = null; + } + return enumvalueBuilder_; + } + + private java.util.List options_ = + java.util.Collections.emptyList(); + private void ensureOptionsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + options_ = new java.util.ArrayList(options_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; + + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public java.util.List getOptionsList() { + if (optionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(options_); + } else { + return optionsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public int getOptionsCount() { + if (optionsBuilder_ == null) { + return options_.size(); + } else { + return optionsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + if (optionsBuilder_ == null) { + return options_.get(index); + } else { + return optionsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.set(index, value); + onChanged(); + } else { + optionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.set(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions(com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(value); + onChanged(); + } else { + optionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(index, value); + onChanged(); + } else { + optionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions( + com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addAllOptions( + java.lang.Iterable values) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, options_); + onChanged(); + } else { + optionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + optionsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder removeOptions(int index) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.remove(index); + onChanged(); + } else { + optionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder getOptionsBuilder( + int index) { + return getOptionsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + if (optionsBuilder_ == null) { + return options_.get(index); } else { + return optionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(options_); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder() { + return getOptionsFieldBuilder().addBuilder( + com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder( + int index) { + return getOptionsFieldBuilder().addBuilder( + index, com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public java.util.List + getOptionsBuilderList() { + return getOptionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( + options_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private com.google.protobuf.SourceContext sourceContext_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder> sourceContextBuilder_; + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public boolean hasSourceContext() { + return sourceContextBuilder_ != null || sourceContext_ != null; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public com.google.protobuf.SourceContext getSourceContext() { + if (sourceContextBuilder_ == null) { + return sourceContext_ == null ? com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; + } else { + return sourceContextBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public Builder setSourceContext(com.google.protobuf.SourceContext value) { + if (sourceContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceContext_ = value; + onChanged(); + } else { + sourceContextBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public Builder setSourceContext( + com.google.protobuf.SourceContext.Builder builderForValue) { + if (sourceContextBuilder_ == null) { + sourceContext_ = builderForValue.build(); + onChanged(); + } else { + sourceContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public Builder mergeSourceContext(com.google.protobuf.SourceContext value) { + if (sourceContextBuilder_ == null) { + if (sourceContext_ != null) { + sourceContext_ = + com.google.protobuf.SourceContext.newBuilder(sourceContext_).mergeFrom(value).buildPartial(); + } else { + sourceContext_ = value; + } + onChanged(); + } else { + sourceContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public Builder clearSourceContext() { + if (sourceContextBuilder_ == null) { + sourceContext_ = null; + onChanged(); + } else { + sourceContext_ = null; + sourceContextBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public com.google.protobuf.SourceContext.Builder getSourceContextBuilder() { + + onChanged(); + return getSourceContextFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder() { + if (sourceContextBuilder_ != null) { + return sourceContextBuilder_.getMessageOrBuilder(); + } else { + return sourceContext_ == null ? + com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; + } + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder> + getSourceContextFieldBuilder() { + if (sourceContextBuilder_ == null) { + sourceContextBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder>( + getSourceContext(), + getParentForChildren(), + isClean()); + sourceContext_ = null; + } + return sourceContextBuilder_; + } + + private int syntax_ = 0; + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+     * The source syntax.
+     * 
+ */ + public int getSyntaxValue() { + return syntax_; + } + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+     * The source syntax.
+     * 
+ */ + public Builder setSyntaxValue(int value) { + syntax_ = value; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+     * The source syntax.
+     * 
+ */ + public com.google.protobuf.Syntax getSyntax() { + com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); + return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; + } + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+     * The source syntax.
+     * 
+ */ + public Builder setSyntax(com.google.protobuf.Syntax value) { + if (value == null) { + throw new NullPointerException(); + } + + syntax_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+     * The source syntax.
+     * 
+ */ + public Builder clearSyntax() { + + syntax_ = 0; + onChanged(); + return this; + } + 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.protobuf.Enum) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Enum) + private static final com.google.protobuf.Enum DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Enum(); + } + + public static com.google.protobuf.Enum getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Enum parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Enum(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.protobuf.Enum getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumOrBuilder.java new file mode 100644 index 000000000000..b5e2686e6758 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumOrBuilder.java @@ -0,0 +1,157 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +public interface EnumOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Enum) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * Enum type name.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * Enum type name.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + java.util.List + getEnumvalueList(); + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + com.google.protobuf.EnumValue getEnumvalue(int index); + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + int getEnumvalueCount(); + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + java.util.List + getEnumvalueOrBuilderList(); + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + com.google.protobuf.EnumValueOrBuilder getEnumvalueOrBuilder( + int index); + + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + java.util.List + getOptionsList(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + com.google.protobuf.Option getOptions(int index); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + int getOptionsCount(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + java.util.List + getOptionsOrBuilderList(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index); + + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+   * The source context.
+   * 
+ */ + boolean hasSourceContext(); + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+   * The source context.
+   * 
+ */ + com.google.protobuf.SourceContext getSourceContext(); + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+   * The source context.
+   * 
+ */ + com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder(); + + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+   * The source syntax.
+   * 
+ */ + int getSyntaxValue(); + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+   * The source syntax.
+   * 
+ */ + com.google.protobuf.Syntax getSyntax(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValue.java new file mode 100644 index 000000000000..30403d2ad07c --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValue.java @@ -0,0 +1,1019 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.EnumValue} + * + *
+ * Enum value definition.
+ * 
+ */ +public final class EnumValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.EnumValue) + EnumValueOrBuilder { + // Use EnumValue.newBuilder() to construct. + private EnumValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private EnumValue() { + name_ = ""; + number_ = 0; + options_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private EnumValue( + 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(); + + name_ = s; + break; + } + case 16: { + + number_ = input.readInt32(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + options_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + options_.add(input.readMessage(com.google.protobuf.Option.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_ & 0x00000004) == 0x00000004)) { + options_ = java.util.Collections.unmodifiableList(options_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.EnumValue.class, com.google.protobuf.EnumValue.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * Enum value name.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * Enum value name.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NUMBER_FIELD_NUMBER = 2; + private int number_; + /** + * optional int32 number = 2; + * + *
+   * Enum value number.
+   * 
+ */ + public int getNumber() { + return number_; + } + + public static final int OPTIONS_FIELD_NUMBER = 3; + private java.util.List options_; + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public java.util.List getOptionsList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public int getOptionsCount() { + return options_.size(); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + return options_.get(index); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + return options_.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 { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (number_ != 0) { + output.writeInt32(2, number_); + } + for (int i = 0; i < options_.size(); i++) { + output.writeMessage(3, options_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (number_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, number_); + } + for (int i = 0; i < options_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, options_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.EnumValue)) { + return super.equals(obj); + } + com.google.protobuf.EnumValue other = (com.google.protobuf.EnumValue) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && (getNumber() + == other.getNumber()); + result = result && getOptionsList() + .equals(other.getOptionsList()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getNumber(); + if (getOptionsCount() > 0) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.EnumValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.EnumValue 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.protobuf.EnumValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.EnumValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.EnumValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.EnumValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.EnumValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.EnumValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.EnumValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.EnumValue 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.protobuf.EnumValue 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.protobuf.EnumValue} + * + *
+   * Enum value definition.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.EnumValue) + com.google.protobuf.EnumValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.EnumValue.class, com.google.protobuf.EnumValue.Builder.class); + } + + // Construct using com.google.protobuf.EnumValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getOptionsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + number_ = 0; + + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + optionsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_descriptor; + } + + public com.google.protobuf.EnumValue getDefaultInstanceForType() { + return com.google.protobuf.EnumValue.getDefaultInstance(); + } + + public com.google.protobuf.EnumValue build() { + com.google.protobuf.EnumValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.EnumValue buildPartial() { + com.google.protobuf.EnumValue result = new com.google.protobuf.EnumValue(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + result.number_ = number_; + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + options_ = java.util.Collections.unmodifiableList(options_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.EnumValue) { + return mergeFrom((com.google.protobuf.EnumValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.EnumValue other) { + if (other == com.google.protobuf.EnumValue.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getNumber() != 0) { + setNumber(other.getNumber()); + } + if (optionsBuilder_ == null) { + if (!other.options_.isEmpty()) { + if (options_.isEmpty()) { + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureOptionsIsMutable(); + options_.addAll(other.options_); + } + onChanged(); + } + } else { + if (!other.options_.isEmpty()) { + if (optionsBuilder_.isEmpty()) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000004); + optionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOptionsFieldBuilder() : null; + } else { + optionsBuilder_.addAllMessages(other.options_); + } + } + } + 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.protobuf.EnumValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.EnumValue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * Enum value name.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * Enum value name.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * Enum value name.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * Enum value name.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * Enum value name.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int number_ ; + /** + * optional int32 number = 2; + * + *
+     * Enum value number.
+     * 
+ */ + public int getNumber() { + return number_; + } + /** + * optional int32 number = 2; + * + *
+     * Enum value number.
+     * 
+ */ + public Builder setNumber(int value) { + + number_ = value; + onChanged(); + return this; + } + /** + * optional int32 number = 2; + * + *
+     * Enum value number.
+     * 
+ */ + public Builder clearNumber() { + + number_ = 0; + onChanged(); + return this; + } + + private java.util.List options_ = + java.util.Collections.emptyList(); + private void ensureOptionsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + options_ = new java.util.ArrayList(options_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; + + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public java.util.List getOptionsList() { + if (optionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(options_); + } else { + return optionsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public int getOptionsCount() { + if (optionsBuilder_ == null) { + return options_.size(); + } else { + return optionsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + if (optionsBuilder_ == null) { + return options_.get(index); + } else { + return optionsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.set(index, value); + onChanged(); + } else { + optionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.set(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions(com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(value); + onChanged(); + } else { + optionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(index, value); + onChanged(); + } else { + optionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions( + com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addAllOptions( + java.lang.Iterable values) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, options_); + onChanged(); + } else { + optionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + optionsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder removeOptions(int index) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.remove(index); + onChanged(); + } else { + optionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder getOptionsBuilder( + int index) { + return getOptionsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + if (optionsBuilder_ == null) { + return options_.get(index); } else { + return optionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(options_); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder() { + return getOptionsFieldBuilder().addBuilder( + com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder( + int index) { + return getOptionsFieldBuilder().addBuilder( + index, com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public java.util.List + getOptionsBuilderList() { + return getOptionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( + options_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + 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.protobuf.EnumValue) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.EnumValue) + private static final com.google.protobuf.EnumValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.EnumValue(); + } + + public static com.google.protobuf.EnumValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public EnumValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new EnumValue(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.protobuf.EnumValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValueOrBuilder.java new file mode 100644 index 000000000000..580ca1116e27 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/EnumValueOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +public interface EnumValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.EnumValue) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * Enum value name.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * Enum value name.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional int32 number = 2; + * + *
+   * Enum value number.
+   * 
+ */ + int getNumber(); + + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + java.util.List + getOptionsList(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + com.google.protobuf.Option getOptions(int index); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + int getOptionsCount(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + java.util.List + getOptionsOrBuilderList(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Field.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Field.java new file mode 100644 index 000000000000..ce6e5f426ae9 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Field.java @@ -0,0 +1,2413 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Field} + * + *
+ * A single field of a message type.
+ * 
+ */ +public final class Field extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Field) + FieldOrBuilder { + // Use Field.newBuilder() to construct. + private Field(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Field() { + kind_ = 0; + cardinality_ = 0; + number_ = 0; + name_ = ""; + typeUrl_ = ""; + oneofIndex_ = 0; + packed_ = false; + options_ = java.util.Collections.emptyList(); + jsonName_ = ""; + defaultValue_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Field( + 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 8: { + int rawValue = input.readEnum(); + + kind_ = rawValue; + break; + } + case 16: { + int rawValue = input.readEnum(); + + cardinality_ = rawValue; + break; + } + case 24: { + + number_ = input.readInt32(); + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 50: { + String s = input.readStringRequireUtf8(); + + typeUrl_ = s; + break; + } + case 56: { + + oneofIndex_ = input.readInt32(); + break; + } + case 64: { + + packed_ = input.readBool(); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + options_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000080; + } + options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); + break; + } + case 82: { + String s = input.readStringRequireUtf8(); + + jsonName_ = s; + break; + } + case 90: { + String s = input.readStringRequireUtf8(); + + defaultValue_ = s; + 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_ & 0x00000080) == 0x00000080)) { + options_ = java.util.Collections.unmodifiableList(options_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Field.class, com.google.protobuf.Field.Builder.class); + } + + /** + * Protobuf enum {@code google.protobuf.Field.Kind} + * + *
+   * Basic field types.
+   * 
+ */ + public enum Kind + implements com.google.protobuf.ProtocolMessageEnum { + /** + * TYPE_UNKNOWN = 0; + * + *
+     * Field type unknown.
+     * 
+ */ + TYPE_UNKNOWN(0, 0), + /** + * TYPE_DOUBLE = 1; + * + *
+     * Field type double.
+     * 
+ */ + TYPE_DOUBLE(1, 1), + /** + * TYPE_FLOAT = 2; + * + *
+     * Field type float.
+     * 
+ */ + TYPE_FLOAT(2, 2), + /** + * TYPE_INT64 = 3; + * + *
+     * Field type int64.
+     * 
+ */ + TYPE_INT64(3, 3), + /** + * TYPE_UINT64 = 4; + * + *
+     * Field type uint64.
+     * 
+ */ + TYPE_UINT64(4, 4), + /** + * TYPE_INT32 = 5; + * + *
+     * Field type int32.
+     * 
+ */ + TYPE_INT32(5, 5), + /** + * TYPE_FIXED64 = 6; + * + *
+     * Field type fixed64.
+     * 
+ */ + TYPE_FIXED64(6, 6), + /** + * TYPE_FIXED32 = 7; + * + *
+     * Field type fixed32.
+     * 
+ */ + TYPE_FIXED32(7, 7), + /** + * TYPE_BOOL = 8; + * + *
+     * Field type bool.
+     * 
+ */ + TYPE_BOOL(8, 8), + /** + * TYPE_STRING = 9; + * + *
+     * Field type string.
+     * 
+ */ + TYPE_STRING(9, 9), + /** + * TYPE_GROUP = 10; + * + *
+     * Field type group. Proto2 syntax only, and deprecated.
+     * 
+ */ + TYPE_GROUP(10, 10), + /** + * TYPE_MESSAGE = 11; + * + *
+     * Field type message.
+     * 
+ */ + TYPE_MESSAGE(11, 11), + /** + * TYPE_BYTES = 12; + * + *
+     * Field type bytes.
+     * 
+ */ + TYPE_BYTES(12, 12), + /** + * TYPE_UINT32 = 13; + * + *
+     * Field type uint32.
+     * 
+ */ + TYPE_UINT32(13, 13), + /** + * TYPE_ENUM = 14; + * + *
+     * Field type enum.
+     * 
+ */ + TYPE_ENUM(14, 14), + /** + * TYPE_SFIXED32 = 15; + * + *
+     * Field type sfixed32.
+     * 
+ */ + TYPE_SFIXED32(15, 15), + /** + * TYPE_SFIXED64 = 16; + * + *
+     * Field type sfixed64.
+     * 
+ */ + TYPE_SFIXED64(16, 16), + /** + * TYPE_SINT32 = 17; + * + *
+     * Field type sint32.
+     * 
+ */ + TYPE_SINT32(17, 17), + /** + * TYPE_SINT64 = 18; + * + *
+     * Field type sint64.
+     * 
+ */ + TYPE_SINT64(18, 18), + UNRECOGNIZED(-1, -1), + ; + + /** + * TYPE_UNKNOWN = 0; + * + *
+     * Field type unknown.
+     * 
+ */ + public static final int TYPE_UNKNOWN_VALUE = 0; + /** + * TYPE_DOUBLE = 1; + * + *
+     * Field type double.
+     * 
+ */ + public static final int TYPE_DOUBLE_VALUE = 1; + /** + * TYPE_FLOAT = 2; + * + *
+     * Field type float.
+     * 
+ */ + public static final int TYPE_FLOAT_VALUE = 2; + /** + * TYPE_INT64 = 3; + * + *
+     * Field type int64.
+     * 
+ */ + public static final int TYPE_INT64_VALUE = 3; + /** + * TYPE_UINT64 = 4; + * + *
+     * Field type uint64.
+     * 
+ */ + public static final int TYPE_UINT64_VALUE = 4; + /** + * TYPE_INT32 = 5; + * + *
+     * Field type int32.
+     * 
+ */ + public static final int TYPE_INT32_VALUE = 5; + /** + * TYPE_FIXED64 = 6; + * + *
+     * Field type fixed64.
+     * 
+ */ + public static final int TYPE_FIXED64_VALUE = 6; + /** + * TYPE_FIXED32 = 7; + * + *
+     * Field type fixed32.
+     * 
+ */ + public static final int TYPE_FIXED32_VALUE = 7; + /** + * TYPE_BOOL = 8; + * + *
+     * Field type bool.
+     * 
+ */ + public static final int TYPE_BOOL_VALUE = 8; + /** + * TYPE_STRING = 9; + * + *
+     * Field type string.
+     * 
+ */ + public static final int TYPE_STRING_VALUE = 9; + /** + * TYPE_GROUP = 10; + * + *
+     * Field type group. Proto2 syntax only, and deprecated.
+     * 
+ */ + public static final int TYPE_GROUP_VALUE = 10; + /** + * TYPE_MESSAGE = 11; + * + *
+     * Field type message.
+     * 
+ */ + public static final int TYPE_MESSAGE_VALUE = 11; + /** + * TYPE_BYTES = 12; + * + *
+     * Field type bytes.
+     * 
+ */ + public static final int TYPE_BYTES_VALUE = 12; + /** + * TYPE_UINT32 = 13; + * + *
+     * Field type uint32.
+     * 
+ */ + public static final int TYPE_UINT32_VALUE = 13; + /** + * TYPE_ENUM = 14; + * + *
+     * Field type enum.
+     * 
+ */ + public static final int TYPE_ENUM_VALUE = 14; + /** + * TYPE_SFIXED32 = 15; + * + *
+     * Field type sfixed32.
+     * 
+ */ + public static final int TYPE_SFIXED32_VALUE = 15; + /** + * TYPE_SFIXED64 = 16; + * + *
+     * Field type sfixed64.
+     * 
+ */ + public static final int TYPE_SFIXED64_VALUE = 16; + /** + * TYPE_SINT32 = 17; + * + *
+     * Field type sint32.
+     * 
+ */ + public static final int TYPE_SINT32_VALUE = 17; + /** + * TYPE_SINT64 = 18; + * + *
+     * Field type sint64.
+     * 
+ */ + public static final int TYPE_SINT64_VALUE = 18; + + + 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 Kind valueOf(int value) { + switch (value) { + case 0: return TYPE_UNKNOWN; + case 1: return TYPE_DOUBLE; + case 2: return TYPE_FLOAT; + case 3: return TYPE_INT64; + case 4: return TYPE_UINT64; + case 5: return TYPE_INT32; + case 6: return TYPE_FIXED64; + case 7: return TYPE_FIXED32; + case 8: return TYPE_BOOL; + case 9: return TYPE_STRING; + case 10: return TYPE_GROUP; + case 11: return TYPE_MESSAGE; + case 12: return TYPE_BYTES; + case 13: return TYPE_UINT32; + case 14: return TYPE_ENUM; + case 15: return TYPE_SFIXED32; + case 16: return TYPE_SFIXED64; + case 17: return TYPE_SINT32; + case 18: return TYPE_SINT64; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Kind> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Kind findValueByNumber(int number) { + return Kind.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.protobuf.Field.getDescriptor().getEnumTypes().get(0); + } + + private static final Kind[] VALUES = values(); + + public static Kind 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 Kind(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.protobuf.Field.Kind) + } + + /** + * Protobuf enum {@code google.protobuf.Field.Cardinality} + * + *
+   * Whether a field is optional, required, or repeated.
+   * 
+ */ + public enum Cardinality + implements com.google.protobuf.ProtocolMessageEnum { + /** + * CARDINALITY_UNKNOWN = 0; + * + *
+     * For fields with unknown cardinality.
+     * 
+ */ + CARDINALITY_UNKNOWN(0, 0), + /** + * CARDINALITY_OPTIONAL = 1; + * + *
+     * For optional fields.
+     * 
+ */ + CARDINALITY_OPTIONAL(1, 1), + /** + * CARDINALITY_REQUIRED = 2; + * + *
+     * For required fields. Proto2 syntax only.
+     * 
+ */ + CARDINALITY_REQUIRED(2, 2), + /** + * CARDINALITY_REPEATED = 3; + * + *
+     * For repeated fields.
+     * 
+ */ + CARDINALITY_REPEATED(3, 3), + UNRECOGNIZED(-1, -1), + ; + + /** + * CARDINALITY_UNKNOWN = 0; + * + *
+     * For fields with unknown cardinality.
+     * 
+ */ + public static final int CARDINALITY_UNKNOWN_VALUE = 0; + /** + * CARDINALITY_OPTIONAL = 1; + * + *
+     * For optional fields.
+     * 
+ */ + public static final int CARDINALITY_OPTIONAL_VALUE = 1; + /** + * CARDINALITY_REQUIRED = 2; + * + *
+     * For required fields. Proto2 syntax only.
+     * 
+ */ + public static final int CARDINALITY_REQUIRED_VALUE = 2; + /** + * CARDINALITY_REPEATED = 3; + * + *
+     * For repeated fields.
+     * 
+ */ + public static final int CARDINALITY_REPEATED_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 Cardinality valueOf(int value) { + switch (value) { + case 0: return CARDINALITY_UNKNOWN; + case 1: return CARDINALITY_OPTIONAL; + case 2: return CARDINALITY_REQUIRED; + case 3: return CARDINALITY_REPEATED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Cardinality> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Cardinality findValueByNumber(int number) { + return Cardinality.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.protobuf.Field.getDescriptor().getEnumTypes().get(1); + } + + private static final Cardinality[] VALUES = values(); + + public static Cardinality 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 Cardinality(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.protobuf.Field.Cardinality) + } + + private int bitField0_; + public static final int KIND_FIELD_NUMBER = 1; + private int kind_; + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+   * The field type.
+   * 
+ */ + public int getKindValue() { + return kind_; + } + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+   * The field type.
+   * 
+ */ + public com.google.protobuf.Field.Kind getKind() { + com.google.protobuf.Field.Kind result = com.google.protobuf.Field.Kind.valueOf(kind_); + return result == null ? com.google.protobuf.Field.Kind.UNRECOGNIZED : result; + } + + public static final int CARDINALITY_FIELD_NUMBER = 2; + private int cardinality_; + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+   * The field cardinality.
+   * 
+ */ + public int getCardinalityValue() { + return cardinality_; + } + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+   * The field cardinality.
+   * 
+ */ + public com.google.protobuf.Field.Cardinality getCardinality() { + com.google.protobuf.Field.Cardinality result = com.google.protobuf.Field.Cardinality.valueOf(cardinality_); + return result == null ? com.google.protobuf.Field.Cardinality.UNRECOGNIZED : result; + } + + public static final int NUMBER_FIELD_NUMBER = 3; + private int number_; + /** + * optional int32 number = 3; + * + *
+   * The field number.
+   * 
+ */ + public int getNumber() { + return number_; + } + + public static final int NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object name_; + /** + * optional string name = 4; + * + *
+   * The field name.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 4; + * + *
+   * The field name.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_URL_FIELD_NUMBER = 6; + private volatile java.lang.Object typeUrl_; + /** + * optional string type_url = 6; + * + *
+   * The field type URL, without the scheme, for message or enumeration
+   * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+   * 
+ */ + public java.lang.String getTypeUrl() { + java.lang.Object ref = typeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeUrl_ = s; + return s; + } + } + /** + * optional string type_url = 6; + * + *
+   * The field type URL, without the scheme, for message or enumeration
+   * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+   * 
+ */ + public com.google.protobuf.ByteString + getTypeUrlBytes() { + java.lang.Object ref = typeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ONEOF_INDEX_FIELD_NUMBER = 7; + private int oneofIndex_; + /** + * optional int32 oneof_index = 7; + * + *
+   * The index of the field type in `Type.oneofs`, for message or enumeration
+   * types. The first type has index 1; zero means the type is not in the list.
+   * 
+ */ + public int getOneofIndex() { + return oneofIndex_; + } + + public static final int PACKED_FIELD_NUMBER = 8; + private boolean packed_; + /** + * optional bool packed = 8; + * + *
+   * Whether to use alternative packed wire representation.
+   * 
+ */ + public boolean getPacked() { + return packed_; + } + + public static final int OPTIONS_FIELD_NUMBER = 9; + private java.util.List options_; + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + public java.util.List getOptionsList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + public int getOptionsCount() { + return options_.size(); + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + return options_.get(index); + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + return options_.get(index); + } + + public static final int JSON_NAME_FIELD_NUMBER = 10; + private volatile java.lang.Object jsonName_; + /** + * optional string json_name = 10; + * + *
+   * The field JSON name.
+   * 
+ */ + public java.lang.String getJsonName() { + java.lang.Object ref = jsonName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonName_ = s; + return s; + } + } + /** + * optional string json_name = 10; + * + *
+   * The field JSON name.
+   * 
+ */ + public com.google.protobuf.ByteString + getJsonNameBytes() { + java.lang.Object ref = jsonName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jsonName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_VALUE_FIELD_NUMBER = 11; + private volatile java.lang.Object defaultValue_; + /** + * optional string default_value = 11; + * + *
+   * The string value of the default value of this field. Proto2 syntax only.
+   * 
+ */ + public java.lang.String getDefaultValue() { + java.lang.Object ref = defaultValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultValue_ = s; + return s; + } + } + /** + * optional string default_value = 11; + * + *
+   * The string value of the default value of this field. Proto2 syntax only.
+   * 
+ */ + public com.google.protobuf.ByteString + getDefaultValueBytes() { + java.lang.Object ref = defaultValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 { + if (kind_ != com.google.protobuf.Field.Kind.TYPE_UNKNOWN.getNumber()) { + output.writeEnum(1, kind_); + } + if (cardinality_ != com.google.protobuf.Field.Cardinality.CARDINALITY_UNKNOWN.getNumber()) { + output.writeEnum(2, cardinality_); + } + if (number_ != 0) { + output.writeInt32(3, number_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, name_); + } + if (!getTypeUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, typeUrl_); + } + if (oneofIndex_ != 0) { + output.writeInt32(7, oneofIndex_); + } + if (packed_ != false) { + output.writeBool(8, packed_); + } + for (int i = 0; i < options_.size(); i++) { + output.writeMessage(9, options_.get(i)); + } + if (!getJsonNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, jsonName_); + } + if (!getDefaultValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, defaultValue_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kind_ != com.google.protobuf.Field.Kind.TYPE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, kind_); + } + if (cardinality_ != com.google.protobuf.Field.Cardinality.CARDINALITY_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, cardinality_); + } + if (number_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, number_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, name_); + } + if (!getTypeUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, typeUrl_); + } + if (oneofIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, oneofIndex_); + } + if (packed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, packed_); + } + for (int i = 0; i < options_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, options_.get(i)); + } + if (!getJsonNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, jsonName_); + } + if (!getDefaultValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, defaultValue_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Field)) { + return super.equals(obj); + } + com.google.protobuf.Field other = (com.google.protobuf.Field) obj; + + boolean result = true; + result = result && kind_ == other.kind_; + result = result && cardinality_ == other.cardinality_; + result = result && (getNumber() + == other.getNumber()); + result = result && getName() + .equals(other.getName()); + result = result && getTypeUrl() + .equals(other.getTypeUrl()); + result = result && (getOneofIndex() + == other.getOneofIndex()); + result = result && (getPacked() + == other.getPacked()); + result = result && getOptionsList() + .equals(other.getOptionsList()); + result = result && getJsonName() + .equals(other.getJsonName()); + result = result && getDefaultValue() + .equals(other.getDefaultValue()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + hash = (37 * hash) + CARDINALITY_FIELD_NUMBER; + hash = (53 * hash) + cardinality_; + hash = (37 * hash) + NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getNumber(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_URL_FIELD_NUMBER; + hash = (53 * hash) + getTypeUrl().hashCode(); + hash = (37 * hash) + ONEOF_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getOneofIndex(); + hash = (37 * hash) + PACKED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPacked()); + if (getOptionsCount() > 0) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptionsList().hashCode(); + } + hash = (37 * hash) + JSON_NAME_FIELD_NUMBER; + hash = (53 * hash) + getJsonName().hashCode(); + hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Field parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Field 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.protobuf.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Field parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Field parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Field parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Field parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Field parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Field parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Field 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.protobuf.Field 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.protobuf.Field} + * + *
+   * A single field of a message type.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Field) + com.google.protobuf.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Field.class, com.google.protobuf.Field.Builder.class); + } + + // Construct using com.google.protobuf.Field.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getOptionsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + kind_ = 0; + + cardinality_ = 0; + + number_ = 0; + + name_ = ""; + + typeUrl_ = ""; + + oneofIndex_ = 0; + + packed_ = false; + + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + } else { + optionsBuilder_.clear(); + } + jsonName_ = ""; + + defaultValue_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_descriptor; + } + + public com.google.protobuf.Field getDefaultInstanceForType() { + return com.google.protobuf.Field.getDefaultInstance(); + } + + public com.google.protobuf.Field build() { + com.google.protobuf.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Field buildPartial() { + com.google.protobuf.Field result = new com.google.protobuf.Field(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.kind_ = kind_; + result.cardinality_ = cardinality_; + result.number_ = number_; + result.name_ = name_; + result.typeUrl_ = typeUrl_; + result.oneofIndex_ = oneofIndex_; + result.packed_ = packed_; + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { + options_ = java.util.Collections.unmodifiableList(options_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + result.jsonName_ = jsonName_; + result.defaultValue_ = defaultValue_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Field) { + return mergeFrom((com.google.protobuf.Field)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Field other) { + if (other == com.google.protobuf.Field.getDefaultInstance()) return this; + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (other.cardinality_ != 0) { + setCardinalityValue(other.getCardinalityValue()); + } + if (other.getNumber() != 0) { + setNumber(other.getNumber()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getTypeUrl().isEmpty()) { + typeUrl_ = other.typeUrl_; + onChanged(); + } + if (other.getOneofIndex() != 0) { + setOneofIndex(other.getOneofIndex()); + } + if (other.getPacked() != false) { + setPacked(other.getPacked()); + } + if (optionsBuilder_ == null) { + if (!other.options_.isEmpty()) { + if (options_.isEmpty()) { + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureOptionsIsMutable(); + options_.addAll(other.options_); + } + onChanged(); + } + } else { + if (!other.options_.isEmpty()) { + if (optionsBuilder_.isEmpty()) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000080); + optionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOptionsFieldBuilder() : null; + } else { + optionsBuilder_.addAllMessages(other.options_); + } + } + } + if (!other.getJsonName().isEmpty()) { + jsonName_ = other.jsonName_; + onChanged(); + } + if (!other.getDefaultValue().isEmpty()) { + defaultValue_ = other.defaultValue_; + onChanged(); + } + 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.protobuf.Field parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Field) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int kind_ = 0; + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+     * The field type.
+     * 
+ */ + public int getKindValue() { + return kind_; + } + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+     * The field type.
+     * 
+ */ + public Builder setKindValue(int value) { + kind_ = value; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+     * The field type.
+     * 
+ */ + public com.google.protobuf.Field.Kind getKind() { + com.google.protobuf.Field.Kind result = com.google.protobuf.Field.Kind.valueOf(kind_); + return result == null ? com.google.protobuf.Field.Kind.UNRECOGNIZED : result; + } + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+     * The field type.
+     * 
+ */ + public Builder setKind(com.google.protobuf.Field.Kind value) { + if (value == null) { + throw new NullPointerException(); + } + + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+     * The field type.
+     * 
+ */ + public Builder clearKind() { + + kind_ = 0; + onChanged(); + return this; + } + + private int cardinality_ = 0; + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+     * The field cardinality.
+     * 
+ */ + public int getCardinalityValue() { + return cardinality_; + } + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+     * The field cardinality.
+     * 
+ */ + public Builder setCardinalityValue(int value) { + cardinality_ = value; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+     * The field cardinality.
+     * 
+ */ + public com.google.protobuf.Field.Cardinality getCardinality() { + com.google.protobuf.Field.Cardinality result = com.google.protobuf.Field.Cardinality.valueOf(cardinality_); + return result == null ? com.google.protobuf.Field.Cardinality.UNRECOGNIZED : result; + } + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+     * The field cardinality.
+     * 
+ */ + public Builder setCardinality(com.google.protobuf.Field.Cardinality value) { + if (value == null) { + throw new NullPointerException(); + } + + cardinality_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+     * The field cardinality.
+     * 
+ */ + public Builder clearCardinality() { + + cardinality_ = 0; + onChanged(); + return this; + } + + private int number_ ; + /** + * optional int32 number = 3; + * + *
+     * The field number.
+     * 
+ */ + public int getNumber() { + return number_; + } + /** + * optional int32 number = 3; + * + *
+     * The field number.
+     * 
+ */ + public Builder setNumber(int value) { + + number_ = value; + onChanged(); + return this; + } + /** + * optional int32 number = 3; + * + *
+     * The field number.
+     * 
+ */ + public Builder clearNumber() { + + number_ = 0; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 4; + * + *
+     * The field name.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 4; + * + *
+     * The field name.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 4; + * + *
+     * The field name.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 4; + * + *
+     * The field name.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 4; + * + *
+     * The field name.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object typeUrl_ = ""; + /** + * optional string type_url = 6; + * + *
+     * The field type URL, without the scheme, for message or enumeration
+     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+     * 
+ */ + public java.lang.String getTypeUrl() { + java.lang.Object ref = typeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string type_url = 6; + * + *
+     * The field type URL, without the scheme, for message or enumeration
+     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+     * 
+ */ + public com.google.protobuf.ByteString + getTypeUrlBytes() { + java.lang.Object ref = typeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string type_url = 6; + * + *
+     * The field type URL, without the scheme, for message or enumeration
+     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+     * 
+ */ + public Builder setTypeUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + typeUrl_ = value; + onChanged(); + return this; + } + /** + * optional string type_url = 6; + * + *
+     * The field type URL, without the scheme, for message or enumeration
+     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+     * 
+ */ + public Builder clearTypeUrl() { + + typeUrl_ = getDefaultInstance().getTypeUrl(); + onChanged(); + return this; + } + /** + * optional string type_url = 6; + * + *
+     * The field type URL, without the scheme, for message or enumeration
+     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+     * 
+ */ + public Builder setTypeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + typeUrl_ = value; + onChanged(); + return this; + } + + private int oneofIndex_ ; + /** + * optional int32 oneof_index = 7; + * + *
+     * The index of the field type in `Type.oneofs`, for message or enumeration
+     * types. The first type has index 1; zero means the type is not in the list.
+     * 
+ */ + public int getOneofIndex() { + return oneofIndex_; + } + /** + * optional int32 oneof_index = 7; + * + *
+     * The index of the field type in `Type.oneofs`, for message or enumeration
+     * types. The first type has index 1; zero means the type is not in the list.
+     * 
+ */ + public Builder setOneofIndex(int value) { + + oneofIndex_ = value; + onChanged(); + return this; + } + /** + * optional int32 oneof_index = 7; + * + *
+     * The index of the field type in `Type.oneofs`, for message or enumeration
+     * types. The first type has index 1; zero means the type is not in the list.
+     * 
+ */ + public Builder clearOneofIndex() { + + oneofIndex_ = 0; + onChanged(); + return this; + } + + private boolean packed_ ; + /** + * optional bool packed = 8; + * + *
+     * Whether to use alternative packed wire representation.
+     * 
+ */ + public boolean getPacked() { + return packed_; + } + /** + * optional bool packed = 8; + * + *
+     * Whether to use alternative packed wire representation.
+     * 
+ */ + public Builder setPacked(boolean value) { + + packed_ = value; + onChanged(); + return this; + } + /** + * optional bool packed = 8; + * + *
+     * Whether to use alternative packed wire representation.
+     * 
+ */ + public Builder clearPacked() { + + packed_ = false; + onChanged(); + return this; + } + + private java.util.List options_ = + java.util.Collections.emptyList(); + private void ensureOptionsIsMutable() { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { + options_ = new java.util.ArrayList(options_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; + + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public java.util.List getOptionsList() { + if (optionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(options_); + } else { + return optionsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public int getOptionsCount() { + if (optionsBuilder_ == null) { + return options_.size(); + } else { + return optionsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + if (optionsBuilder_ == null) { + return options_.get(index); + } else { + return optionsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.set(index, value); + onChanged(); + } else { + optionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.set(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder addOptions(com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(value); + onChanged(); + } else { + optionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(index, value); + onChanged(); + } else { + optionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder addOptions( + com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder addAllOptions( + java.lang.Iterable values) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, options_); + onChanged(); + } else { + optionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + optionsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder removeOptions(int index) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.remove(index); + onChanged(); + } else { + optionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder getOptionsBuilder( + int index) { + return getOptionsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + if (optionsBuilder_ == null) { + return options_.get(index); } else { + return optionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(options_); + } + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder() { + return getOptionsFieldBuilder().addBuilder( + com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder( + int index) { + return getOptionsFieldBuilder().addBuilder( + index, com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public java.util.List + getOptionsBuilderList() { + return getOptionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( + options_, + ((bitField0_ & 0x00000080) == 0x00000080), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private java.lang.Object jsonName_ = ""; + /** + * optional string json_name = 10; + * + *
+     * The field JSON name.
+     * 
+ */ + public java.lang.String getJsonName() { + java.lang.Object ref = jsonName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string json_name = 10; + * + *
+     * The field JSON name.
+     * 
+ */ + public com.google.protobuf.ByteString + getJsonNameBytes() { + java.lang.Object ref = jsonName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jsonName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string json_name = 10; + * + *
+     * The field JSON name.
+     * 
+ */ + public Builder setJsonName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jsonName_ = value; + onChanged(); + return this; + } + /** + * optional string json_name = 10; + * + *
+     * The field JSON name.
+     * 
+ */ + public Builder clearJsonName() { + + jsonName_ = getDefaultInstance().getJsonName(); + onChanged(); + return this; + } + /** + * optional string json_name = 10; + * + *
+     * The field JSON name.
+     * 
+ */ + public Builder setJsonNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jsonName_ = value; + onChanged(); + return this; + } + + private java.lang.Object defaultValue_ = ""; + /** + * optional string default_value = 11; + * + *
+     * The string value of the default value of this field. Proto2 syntax only.
+     * 
+ */ + public java.lang.String getDefaultValue() { + java.lang.Object ref = defaultValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string default_value = 11; + * + *
+     * The string value of the default value of this field. Proto2 syntax only.
+     * 
+ */ + public com.google.protobuf.ByteString + getDefaultValueBytes() { + java.lang.Object ref = defaultValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string default_value = 11; + * + *
+     * The string value of the default value of this field. Proto2 syntax only.
+     * 
+ */ + public Builder setDefaultValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + defaultValue_ = value; + onChanged(); + return this; + } + /** + * optional string default_value = 11; + * + *
+     * The string value of the default value of this field. Proto2 syntax only.
+     * 
+ */ + public Builder clearDefaultValue() { + + defaultValue_ = getDefaultInstance().getDefaultValue(); + onChanged(); + return this; + } + /** + * optional string default_value = 11; + * + *
+     * The string value of the default value of this field. Proto2 syntax only.
+     * 
+ */ + public Builder setDefaultValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + defaultValue_ = value; + onChanged(); + return this; + } + 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.protobuf.Field) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Field) + private static final com.google.protobuf.Field DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Field(); + } + + public static com.google.protobuf.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Field parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Field(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.protobuf.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMask.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMask.java new file mode 100644 index 000000000000..ec9e361e4426 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMask.java @@ -0,0 +1,763 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/field_mask.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.FieldMask} + * + *
+ * `FieldMask` represents a set of symbolic field paths, for example:
+ *     paths: "f.a"
+ *     paths: "f.b.d"
+ * Here `f` represents a field in some root message, `a` and `b`
+ * fields in the message found in `f`, and `d` a field found in the
+ * message in `f.b`.
+ * Field masks are used to specify a subset of fields that should be
+ * returned by a get operation or modified by an update operation.
+ * Field masks also have a custom JSON encoding (see below).
+ * # Field Masks in Projections
+ * When used in the context of a projection, a response message or
+ * sub-message is filtered by the API to only contain those fields as
+ * specified in the mask. For example, if the mask in the previous
+ * example is applied to a response message as follows:
+ *     f {
+ *       a : 22
+ *       b {
+ *         d : 1
+ *         x : 2
+ *       }
+ *       y : 13
+ *     }
+ *     z: 8
+ * The result will not contain specific values for fields x,y and z
+ * (there value will be set to the default, and omitted in proto text
+ * output):
+ *     f {
+ *       a : 22
+ *       b {
+ *         d : 1
+ *       }
+ *     }
+ * A repeated field is not allowed except at the last position of a
+ * field mask.
+ * If a FieldMask object is not present in a get operation, the
+ * operation applies to all fields (as if a FieldMask of all fields
+ * had been specified).
+ * Note that a field mask does not necessarily applies to the
+ * top-level response message. In case of a REST get operation, the
+ * field mask applies directly to the response, but in case of a REST
+ * list operation, the mask instead applies to each individual message
+ * in the returned resource list. In case of a REST custom method,
+ * other definitions may be used. Where the mask applies will be
+ * clearly documented together with its declaration in the API.  In
+ * any case, the effect on the returned resource/resources is required
+ * behavior for APIs.
+ * # Field Masks in Update Operations
+ * A field mask in update operations specifies which fields of the
+ * targeted resource are going to be updated. The API is required
+ * to only change the values of the fields as specified in the mask
+ * and leave the others untouched. If a resource is passed in to
+ * describe the updated values, the API ignores the values of all
+ * fields not covered by the mask.
+ * In order to reset a field's value to the default, the field must
+ * be in the mask and set to the default value in the provided resource.
+ * Hence, in order to reset all fields of a resource, provide a default
+ * instance of the resource and set all fields in the mask, or do
+ * not provide a mask as described below.
+ * If a field mask is not present on update, the operation applies to
+ * all fields (as if a field mask of all fields has been specified).
+ * Note that in the presence of schema evolution, this may mean that
+ * fields the client does not know and has therefore not filled into
+ * the request will be reset to their default. If this is unwanted
+ * behavior, a specific service may require a client to always specify
+ * a field mask, producing an error if not.
+ * As with get operations, the location of the resource which
+ * describes the updated values in the request message depends on the
+ * operation kind. In any case, the effect of the field mask is
+ * required to be honored by the API.
+ * ## Considerations for HTTP REST
+ * The HTTP kind of an update operation which uses a field mask must
+ * be set to PATCH instead of PUT in order to satisfy HTTP semantics
+ * (PUT must only be used for full updates).
+ * # JSON Encoding of Field Masks
+ * In JSON, a field mask is encoded as a single string where paths are
+ * separated by a comma. Fields name in each path are converted
+ * to/from lower-camel naming conventions.
+ * As an example, consider the following message declarations:
+ *     message Profile {
+ *       User user = 1;
+ *       Photo photo = 2;
+ *     }
+ *     message User {
+ *       string display_name = 1;
+ *       string address = 2;
+ *     }
+ * In proto a field mask for `Profile` may look as such:
+ *     mask {
+ *       paths: "user.display_name"
+ *       paths: "photo"
+ *     }
+ * In JSON, the same mask is represented as below:
+ *     {
+ *       mask: "user.displayName,photo"
+ *     }
+ * 
+ */ +public final class FieldMask extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.FieldMask) + FieldMaskOrBuilder { + // Use FieldMask.newBuilder() to construct. + private FieldMask(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FieldMask() { + paths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private FieldMask( + 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_ & 0x00000001) == 0x00000001)) { + paths_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + paths_.add(s); + 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_ & 0x00000001) == 0x00000001)) { + paths_ = paths_.getUnmodifiableView(); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.FieldMask.class, com.google.protobuf.FieldMask.Builder.class); + } + + public static final int PATHS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList paths_; + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + public com.google.protobuf.ProtocolStringList + getPathsList() { + return paths_; + } + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + public int getPathsCount() { + return paths_.size(); + } + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + public java.lang.String getPaths(int index) { + return paths_.get(index); + } + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + public com.google.protobuf.ByteString + getPathsBytes(int index) { + return paths_.getByteString(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 < paths_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, paths_.getRaw(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < paths_.size(); i++) { + dataSize += computeStringSizeNoTag(paths_.getRaw(i)); + } + size += dataSize; + size += 1 * getPathsList().size(); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.FieldMask)) { + return super.equals(obj); + } + com.google.protobuf.FieldMask other = (com.google.protobuf.FieldMask) obj; + + boolean result = true; + result = result && getPathsList() + .equals(other.getPathsList()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getPathsCount() > 0) { + hash = (37 * hash) + PATHS_FIELD_NUMBER; + hash = (53 * hash) + getPathsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.FieldMask parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.FieldMask 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.protobuf.FieldMask parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.FieldMask parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.FieldMask parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.FieldMask parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.FieldMask parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.FieldMask parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.FieldMask parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.FieldMask 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.protobuf.FieldMask 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.protobuf.FieldMask} + * + *
+   * `FieldMask` represents a set of symbolic field paths, for example:
+   *     paths: "f.a"
+   *     paths: "f.b.d"
+   * Here `f` represents a field in some root message, `a` and `b`
+   * fields in the message found in `f`, and `d` a field found in the
+   * message in `f.b`.
+   * Field masks are used to specify a subset of fields that should be
+   * returned by a get operation or modified by an update operation.
+   * Field masks also have a custom JSON encoding (see below).
+   * # Field Masks in Projections
+   * When used in the context of a projection, a response message or
+   * sub-message is filtered by the API to only contain those fields as
+   * specified in the mask. For example, if the mask in the previous
+   * example is applied to a response message as follows:
+   *     f {
+   *       a : 22
+   *       b {
+   *         d : 1
+   *         x : 2
+   *       }
+   *       y : 13
+   *     }
+   *     z: 8
+   * The result will not contain specific values for fields x,y and z
+   * (there value will be set to the default, and omitted in proto text
+   * output):
+   *     f {
+   *       a : 22
+   *       b {
+   *         d : 1
+   *       }
+   *     }
+   * A repeated field is not allowed except at the last position of a
+   * field mask.
+   * If a FieldMask object is not present in a get operation, the
+   * operation applies to all fields (as if a FieldMask of all fields
+   * had been specified).
+   * Note that a field mask does not necessarily applies to the
+   * top-level response message. In case of a REST get operation, the
+   * field mask applies directly to the response, but in case of a REST
+   * list operation, the mask instead applies to each individual message
+   * in the returned resource list. In case of a REST custom method,
+   * other definitions may be used. Where the mask applies will be
+   * clearly documented together with its declaration in the API.  In
+   * any case, the effect on the returned resource/resources is required
+   * behavior for APIs.
+   * # Field Masks in Update Operations
+   * A field mask in update operations specifies which fields of the
+   * targeted resource are going to be updated. The API is required
+   * to only change the values of the fields as specified in the mask
+   * and leave the others untouched. If a resource is passed in to
+   * describe the updated values, the API ignores the values of all
+   * fields not covered by the mask.
+   * In order to reset a field's value to the default, the field must
+   * be in the mask and set to the default value in the provided resource.
+   * Hence, in order to reset all fields of a resource, provide a default
+   * instance of the resource and set all fields in the mask, or do
+   * not provide a mask as described below.
+   * If a field mask is not present on update, the operation applies to
+   * all fields (as if a field mask of all fields has been specified).
+   * Note that in the presence of schema evolution, this may mean that
+   * fields the client does not know and has therefore not filled into
+   * the request will be reset to their default. If this is unwanted
+   * behavior, a specific service may require a client to always specify
+   * a field mask, producing an error if not.
+   * As with get operations, the location of the resource which
+   * describes the updated values in the request message depends on the
+   * operation kind. In any case, the effect of the field mask is
+   * required to be honored by the API.
+   * ## Considerations for HTTP REST
+   * The HTTP kind of an update operation which uses a field mask must
+   * be set to PATCH instead of PUT in order to satisfy HTTP semantics
+   * (PUT must only be used for full updates).
+   * # JSON Encoding of Field Masks
+   * In JSON, a field mask is encoded as a single string where paths are
+   * separated by a comma. Fields name in each path are converted
+   * to/from lower-camel naming conventions.
+   * As an example, consider the following message declarations:
+   *     message Profile {
+   *       User user = 1;
+   *       Photo photo = 2;
+   *     }
+   *     message User {
+   *       string display_name = 1;
+   *       string address = 2;
+   *     }
+   * In proto a field mask for `Profile` may look as such:
+   *     mask {
+   *       paths: "user.display_name"
+   *       paths: "photo"
+   *     }
+   * In JSON, the same mask is represented as below:
+   *     {
+   *       mask: "user.displayName,photo"
+   *     }
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.FieldMask) + com.google.protobuf.FieldMaskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.FieldMask.class, com.google.protobuf.FieldMask.Builder.class); + } + + // Construct using com.google.protobuf.FieldMask.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + paths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_descriptor; + } + + public com.google.protobuf.FieldMask getDefaultInstanceForType() { + return com.google.protobuf.FieldMask.getDefaultInstance(); + } + + public com.google.protobuf.FieldMask build() { + com.google.protobuf.FieldMask result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.FieldMask buildPartial() { + com.google.protobuf.FieldMask result = new com.google.protobuf.FieldMask(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + paths_ = paths_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.paths_ = paths_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.FieldMask) { + return mergeFrom((com.google.protobuf.FieldMask)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.FieldMask other) { + if (other == com.google.protobuf.FieldMask.getDefaultInstance()) return this; + if (!other.paths_.isEmpty()) { + if (paths_.isEmpty()) { + paths_ = other.paths_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePathsIsMutable(); + paths_.addAll(other.paths_); + } + onChanged(); + } + 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.protobuf.FieldMask parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.FieldMask) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList paths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensurePathsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + paths_ = new com.google.protobuf.LazyStringArrayList(paths_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getPathsList() { + return paths_.getUnmodifiableView(); + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public int getPathsCount() { + return paths_.size(); + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public java.lang.String getPaths(int index) { + return paths_.get(index); + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public com.google.protobuf.ByteString + getPathsBytes(int index) { + return paths_.getByteString(index); + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public Builder setPaths( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathsIsMutable(); + paths_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public Builder addPaths( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathsIsMutable(); + paths_.add(value); + onChanged(); + return this; + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public Builder addAllPaths( + java.lang.Iterable values) { + ensurePathsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, paths_); + onChanged(); + return this; + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public Builder clearPaths() { + paths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public Builder addPathsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePathsIsMutable(); + paths_.add(value); + onChanged(); + return this; + } + 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.protobuf.FieldMask) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.FieldMask) + private static final com.google.protobuf.FieldMask DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.FieldMask(); + } + + public static com.google.protobuf.FieldMask getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public FieldMask parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new FieldMask(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.protobuf.FieldMask getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskOrBuilder.java new file mode 100644 index 000000000000..b31a95584982 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskOrBuilder.java @@ -0,0 +1,44 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/field_mask.proto + +package com.google.protobuf; + +public interface FieldMaskOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.FieldMask) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getPathsList(); + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + int getPathsCount(); + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + java.lang.String getPaths(int index); + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + com.google.protobuf.ByteString + getPathsBytes(int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskProto.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskProto.java new file mode 100644 index 000000000000..bd0243eb602d --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldMaskProto.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/field_mask.proto + +package com.google.protobuf; + +public final class FieldMaskProto { + private FieldMaskProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_FieldMask_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_FieldMask_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n google/protobuf/field_mask.proto\022\017goog" + + "le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB" + + "T\n\023com.google.protobufB\016FieldMaskProtoP\001" + + "\240\001\001\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTyp" + + "es\260\002\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_protobuf_FieldMask_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_protobuf_FieldMask_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_FieldMask_descriptor, + new java.lang.String[] { "Paths", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldOrBuilder.java new file mode 100644 index 000000000000..091a3cdd4ec4 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FieldOrBuilder.java @@ -0,0 +1,189 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +public interface FieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+   * The field type.
+   * 
+ */ + int getKindValue(); + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+   * The field type.
+   * 
+ */ + com.google.protobuf.Field.Kind getKind(); + + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+   * The field cardinality.
+   * 
+ */ + int getCardinalityValue(); + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+   * The field cardinality.
+   * 
+ */ + com.google.protobuf.Field.Cardinality getCardinality(); + + /** + * optional int32 number = 3; + * + *
+   * The field number.
+   * 
+ */ + int getNumber(); + + /** + * optional string name = 4; + * + *
+   * The field name.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 4; + * + *
+   * The field name.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional string type_url = 6; + * + *
+   * The field type URL, without the scheme, for message or enumeration
+   * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+   * 
+ */ + java.lang.String getTypeUrl(); + /** + * optional string type_url = 6; + * + *
+   * The field type URL, without the scheme, for message or enumeration
+   * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+   * 
+ */ + com.google.protobuf.ByteString + getTypeUrlBytes(); + + /** + * optional int32 oneof_index = 7; + * + *
+   * The index of the field type in `Type.oneofs`, for message or enumeration
+   * types. The first type has index 1; zero means the type is not in the list.
+   * 
+ */ + int getOneofIndex(); + + /** + * optional bool packed = 8; + * + *
+   * Whether to use alternative packed wire representation.
+   * 
+ */ + boolean getPacked(); + + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + java.util.List + getOptionsList(); + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + com.google.protobuf.Option getOptions(int index); + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + int getOptionsCount(); + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + java.util.List + getOptionsOrBuilderList(); + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index); + + /** + * optional string json_name = 10; + * + *
+   * The field JSON name.
+   * 
+ */ + java.lang.String getJsonName(); + /** + * optional string json_name = 10; + * + *
+   * The field JSON name.
+   * 
+ */ + com.google.protobuf.ByteString + getJsonNameBytes(); + + /** + * optional string default_value = 11; + * + *
+   * The string value of the default value of this field. Proto2 syntax only.
+   * 
+ */ + java.lang.String getDefaultValue(); + /** + * optional string default_value = 11; + * + *
+   * The string value of the default value of this field. Proto2 syntax only.
+   * 
+ */ + com.google.protobuf.ByteString + getDefaultValueBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValue.java new file mode 100644 index 000000000000..4ad1e2a3aaac --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValue.java @@ -0,0 +1,430 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.FloatValue} + * + *
+ * Wrapper message for `float`.
+ * The JSON representation for `FloatValue` is JSON number.
+ * 
+ */ +public final class FloatValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.FloatValue) + FloatValueOrBuilder { + // Use FloatValue.newBuilder() to construct. + private FloatValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FloatValue() { + value_ = 0F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private FloatValue( + 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 13: { + + value_ = input.readFloat(); + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.FloatValue.class, com.google.protobuf.FloatValue.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private float value_; + /** + * optional float value = 1; + * + *
+   * The float value.
+   * 
+ */ + public float getValue() { + return value_; + } + + 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 { + if (value_ != 0F) { + output.writeFloat(1, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != 0F) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.FloatValue)) { + return super.equals(obj); + } + com.google.protobuf.FloatValue other = (com.google.protobuf.FloatValue) obj; + + boolean result = true; + result = result && ( + java.lang.Float.floatToIntBits(getValue()) + == java.lang.Float.floatToIntBits( + other.getValue())); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getValue()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.FloatValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.FloatValue 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.protobuf.FloatValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.FloatValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.FloatValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.FloatValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.FloatValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.FloatValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.FloatValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.FloatValue 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.protobuf.FloatValue 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.protobuf.FloatValue} + * + *
+   * Wrapper message for `float`.
+   * The JSON representation for `FloatValue` is JSON number.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.FloatValue) + com.google.protobuf.FloatValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.FloatValue.class, com.google.protobuf.FloatValue.Builder.class); + } + + // Construct using com.google.protobuf.FloatValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + value_ = 0F; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_descriptor; + } + + public com.google.protobuf.FloatValue getDefaultInstanceForType() { + return com.google.protobuf.FloatValue.getDefaultInstance(); + } + + public com.google.protobuf.FloatValue build() { + com.google.protobuf.FloatValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.FloatValue buildPartial() { + com.google.protobuf.FloatValue result = new com.google.protobuf.FloatValue(this); + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.FloatValue) { + return mergeFrom((com.google.protobuf.FloatValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.FloatValue other) { + if (other == com.google.protobuf.FloatValue.getDefaultInstance()) return this; + if (other.getValue() != 0F) { + setValue(other.getValue()); + } + 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.protobuf.FloatValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.FloatValue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float value_ ; + /** + * optional float value = 1; + * + *
+     * The float value.
+     * 
+ */ + public float getValue() { + return value_; + } + /** + * optional float value = 1; + * + *
+     * The float value.
+     * 
+ */ + public Builder setValue(float value) { + + value_ = value; + onChanged(); + return this; + } + /** + * optional float value = 1; + * + *
+     * The float value.
+     * 
+ */ + public Builder clearValue() { + + value_ = 0F; + onChanged(); + return this; + } + 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.protobuf.FloatValue) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.FloatValue) + private static final com.google.protobuf.FloatValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.FloatValue(); + } + + public static com.google.protobuf.FloatValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public FloatValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new FloatValue(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.protobuf.FloatValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValueOrBuilder.java new file mode 100644 index 000000000000..5e7b080689cf --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/FloatValueOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +public interface FloatValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.FloatValue) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float value = 1; + * + *
+   * The float value.
+   * 
+ */ + float getValue(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32Value.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32Value.java new file mode 100644 index 000000000000..901fa3d17755 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32Value.java @@ -0,0 +1,427 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Int32Value} + * + *
+ * Wrapper message for `int32`.
+ * The JSON representation for `Int32Value` is JSON number.
+ * 
+ */ +public final class Int32Value extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Int32Value) + Int32ValueOrBuilder { + // Use Int32Value.newBuilder() to construct. + private Int32Value(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Int32Value() { + value_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Int32Value( + 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 8: { + + value_ = input.readInt32(); + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Int32Value.class, com.google.protobuf.Int32Value.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private int value_; + /** + * optional int32 value = 1; + * + *
+   * The int32 value.
+   * 
+ */ + public int getValue() { + return value_; + } + + 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 { + if (value_ != 0) { + output.writeInt32(1, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Int32Value)) { + return super.equals(obj); + } + com.google.protobuf.Int32Value other = (com.google.protobuf.Int32Value) obj; + + boolean result = true; + result = result && (getValue() + == other.getValue()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Int32Value parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Int32Value 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.protobuf.Int32Value parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Int32Value parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Int32Value parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Int32Value parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Int32Value parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Int32Value parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Int32Value parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Int32Value 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.protobuf.Int32Value 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.protobuf.Int32Value} + * + *
+   * Wrapper message for `int32`.
+   * The JSON representation for `Int32Value` is JSON number.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Int32Value) + com.google.protobuf.Int32ValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Int32Value.class, com.google.protobuf.Int32Value.Builder.class); + } + + // Construct using com.google.protobuf.Int32Value.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + value_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_descriptor; + } + + public com.google.protobuf.Int32Value getDefaultInstanceForType() { + return com.google.protobuf.Int32Value.getDefaultInstance(); + } + + public com.google.protobuf.Int32Value build() { + com.google.protobuf.Int32Value result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Int32Value buildPartial() { + com.google.protobuf.Int32Value result = new com.google.protobuf.Int32Value(this); + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Int32Value) { + return mergeFrom((com.google.protobuf.Int32Value)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Int32Value other) { + if (other == com.google.protobuf.Int32Value.getDefaultInstance()) return this; + if (other.getValue() != 0) { + setValue(other.getValue()); + } + 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.protobuf.Int32Value parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Int32Value) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int value_ ; + /** + * optional int32 value = 1; + * + *
+     * The int32 value.
+     * 
+ */ + public int getValue() { + return value_; + } + /** + * optional int32 value = 1; + * + *
+     * The int32 value.
+     * 
+ */ + public Builder setValue(int value) { + + value_ = value; + onChanged(); + return this; + } + /** + * optional int32 value = 1; + * + *
+     * The int32 value.
+     * 
+ */ + public Builder clearValue() { + + value_ = 0; + onChanged(); + return this; + } + 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.protobuf.Int32Value) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Int32Value) + private static final com.google.protobuf.Int32Value DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Int32Value(); + } + + public static com.google.protobuf.Int32Value getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Int32Value parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Int32Value(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.protobuf.Int32Value getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32ValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32ValueOrBuilder.java new file mode 100644 index 000000000000..ac465c771031 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int32ValueOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +public interface Int32ValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Int32Value) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 value = 1; + * + *
+   * The int32 value.
+   * 
+ */ + int getValue(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64Value.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64Value.java new file mode 100644 index 000000000000..c17b2d50d9e2 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64Value.java @@ -0,0 +1,428 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Int64Value} + * + *
+ * Wrapper message for `int64`.
+ * The JSON representation for `Int64Value` is JSON string.
+ * 
+ */ +public final class Int64Value extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Int64Value) + Int64ValueOrBuilder { + // Use Int64Value.newBuilder() to construct. + private Int64Value(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Int64Value() { + value_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Int64Value( + 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 8: { + + value_ = input.readInt64(); + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Int64Value.class, com.google.protobuf.Int64Value.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private long value_; + /** + * optional int64 value = 1; + * + *
+   * The int64 value.
+   * 
+ */ + public long getValue() { + return value_; + } + + 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 { + if (value_ != 0L) { + output.writeInt64(1, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Int64Value)) { + return super.equals(obj); + } + com.google.protobuf.Int64Value other = (com.google.protobuf.Int64Value) obj; + + boolean result = true; + result = result && (getValue() + == other.getValue()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getValue()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Int64Value parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Int64Value 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.protobuf.Int64Value parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Int64Value parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Int64Value parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Int64Value parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Int64Value parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Int64Value parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Int64Value parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Int64Value 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.protobuf.Int64Value 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.protobuf.Int64Value} + * + *
+   * Wrapper message for `int64`.
+   * The JSON representation for `Int64Value` is JSON string.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Int64Value) + com.google.protobuf.Int64ValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Int64Value.class, com.google.protobuf.Int64Value.Builder.class); + } + + // Construct using com.google.protobuf.Int64Value.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + value_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_descriptor; + } + + public com.google.protobuf.Int64Value getDefaultInstanceForType() { + return com.google.protobuf.Int64Value.getDefaultInstance(); + } + + public com.google.protobuf.Int64Value build() { + com.google.protobuf.Int64Value result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Int64Value buildPartial() { + com.google.protobuf.Int64Value result = new com.google.protobuf.Int64Value(this); + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Int64Value) { + return mergeFrom((com.google.protobuf.Int64Value)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Int64Value other) { + if (other == com.google.protobuf.Int64Value.getDefaultInstance()) return this; + if (other.getValue() != 0L) { + setValue(other.getValue()); + } + 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.protobuf.Int64Value parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Int64Value) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long value_ ; + /** + * optional int64 value = 1; + * + *
+     * The int64 value.
+     * 
+ */ + public long getValue() { + return value_; + } + /** + * optional int64 value = 1; + * + *
+     * The int64 value.
+     * 
+ */ + public Builder setValue(long value) { + + value_ = value; + onChanged(); + return this; + } + /** + * optional int64 value = 1; + * + *
+     * The int64 value.
+     * 
+ */ + public Builder clearValue() { + + value_ = 0L; + onChanged(); + return this; + } + 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.protobuf.Int64Value) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Int64Value) + private static final com.google.protobuf.Int64Value DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Int64Value(); + } + + public static com.google.protobuf.Int64Value getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Int64Value parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Int64Value(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.protobuf.Int64Value getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64ValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64ValueOrBuilder.java new file mode 100644 index 000000000000..1931f4b23992 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Int64ValueOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +public interface Int64ValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Int64Value) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 value = 1; + * + *
+   * The int64 value.
+   * 
+ */ + long getValue(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValue.java new file mode 100644 index 000000000000..d1810635e3ab --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValue.java @@ -0,0 +1,789 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/struct.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.ListValue} + * + *
+ * `ListValue` is a wrapper around a repeated field of values.
+ * The JSON representation for `ListValue` is JSON array.
+ * 
+ */ +public final class ListValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.ListValue) + ListValueOrBuilder { + // Use ListValue.newBuilder() to construct. + private ListValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListValue() { + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private ListValue( + 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: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + values_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add(input.readMessage(com.google.protobuf.Value.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_ & 0x00000001) == 0x00000001)) { + values_ = java.util.Collections.unmodifiableList(values_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.ListValue.class, com.google.protobuf.ListValue.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private java.util.List values_; + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + public java.util.List getValuesList() { + return values_; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + public int getValuesCount() { + return values_.size(); + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + public com.google.protobuf.Value getValues(int index) { + return values_.get(index); + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + public com.google.protobuf.ValueOrBuilder getValuesOrBuilder( + int index) { + return values_.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 < values_.size(); i++) { + output.writeMessage(1, values_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, values_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.ListValue)) { + return super.equals(obj); + } + com.google.protobuf.ListValue other = (com.google.protobuf.ListValue) obj; + + boolean result = true; + result = result && getValuesList() + .equals(other.getValuesList()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.ListValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.ListValue 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.protobuf.ListValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.ListValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.ListValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.ListValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.ListValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.ListValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.ListValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.ListValue 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.protobuf.ListValue 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.protobuf.ListValue} + * + *
+   * `ListValue` is a wrapper around a repeated field of values.
+   * The JSON representation for `ListValue` is JSON array.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.ListValue) + com.google.protobuf.ListValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.ListValue.class, com.google.protobuf.ListValue.Builder.class); + } + + // Construct using com.google.protobuf.ListValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getValuesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + valuesBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_descriptor; + } + + public com.google.protobuf.ListValue getDefaultInstanceForType() { + return com.google.protobuf.ListValue.getDefaultInstance(); + } + + public com.google.protobuf.ListValue build() { + com.google.protobuf.ListValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.ListValue buildPartial() { + com.google.protobuf.ListValue result = new com.google.protobuf.ListValue(this); + int from_bitField0_ = bitField0_; + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.ListValue) { + return mergeFrom((com.google.protobuf.ListValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.ListValue other) { + if (other == com.google.protobuf.ListValue.getDefaultInstance()) return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValuesFieldBuilder() : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + 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.protobuf.ListValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.ListValue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List values_ = + java.util.Collections.emptyList(); + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> valuesBuilder_; + + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public com.google.protobuf.Value getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder setValues( + int index, com.google.protobuf.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder setValues( + int index, com.google.protobuf.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder addValues(com.google.protobuf.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder addValues( + int index, com.google.protobuf.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder addValues( + com.google.protobuf.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder addValues( + int index, com.google.protobuf.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public com.google.protobuf.Value.Builder getValuesBuilder( + int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public com.google.protobuf.ValueOrBuilder getValuesOrBuilder( + int index) { + if (valuesBuilder_ == null) { + return values_.get(index); } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public com.google.protobuf.Value.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder( + com.google.protobuf.Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public com.google.protobuf.Value.Builder addValuesBuilder( + int index) { + return getValuesFieldBuilder().addBuilder( + index, com.google.protobuf.Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder>( + values_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + values_ = null; + } + return valuesBuilder_; + } + 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.protobuf.ListValue) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.ListValue) + private static final com.google.protobuf.ListValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.ListValue(); + } + + public static com.google.protobuf.ListValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ListValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ListValue(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.protobuf.ListValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValueOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValueOrBuilder.java new file mode 100644 index 000000000000..f868e9d45082 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/ListValueOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/struct.proto + +package com.google.protobuf; + +public interface ListValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.ListValue) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + java.util.List + getValuesList(); + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + com.google.protobuf.Value getValues(int index); + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + int getValuesCount(); + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + java.util.List + getValuesOrBuilderList(); + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + com.google.protobuf.ValueOrBuilder getValuesOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Method.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Method.java new file mode 100644 index 000000000000..5c4daaf3e7dc --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Method.java @@ -0,0 +1,1516 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Method} + * + *
+ * Method represents a method of an api.
+ * 
+ */ +public final class Method extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Method) + MethodOrBuilder { + // Use Method.newBuilder() to construct. + private Method(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Method() { + name_ = ""; + requestTypeUrl_ = ""; + requestStreaming_ = false; + responseTypeUrl_ = ""; + responseStreaming_ = false; + options_ = java.util.Collections.emptyList(); + syntax_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Method( + 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(); + + name_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + requestTypeUrl_ = s; + break; + } + case 24: { + + requestStreaming_ = input.readBool(); + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + responseTypeUrl_ = s; + break; + } + case 40: { + + responseStreaming_ = input.readBool(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + options_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); + break; + } + case 56: { + int rawValue = input.readEnum(); + + syntax_ = rawValue; + 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_ & 0x00000020) == 0x00000020)) { + options_ = java.util.Collections.unmodifiableList(options_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Method.class, com.google.protobuf.Method.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The simple name of this method.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * The simple name of this method.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_TYPE_URL_FIELD_NUMBER = 2; + private volatile java.lang.Object requestTypeUrl_; + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+   * A URL of the input message type.
+   * 
+ */ + public java.lang.String getRequestTypeUrl() { + java.lang.Object ref = requestTypeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestTypeUrl_ = s; + return s; + } + } + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+   * A URL of the input message type.
+   * 
+ */ + public com.google.protobuf.ByteString + getRequestTypeUrlBytes() { + java.lang.Object ref = requestTypeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestTypeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_STREAMING_FIELD_NUMBER = 3; + private boolean requestStreaming_; + /** + * optional bool request_streaming = 3; + * + *
+   * If true, the request is streamed.
+   * 
+ */ + public boolean getRequestStreaming() { + return requestStreaming_; + } + + public static final int RESPONSE_TYPE_URL_FIELD_NUMBER = 4; + private volatile java.lang.Object responseTypeUrl_; + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+   * The URL of the output message type.
+   * 
+ */ + public java.lang.String getResponseTypeUrl() { + java.lang.Object ref = responseTypeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseTypeUrl_ = s; + return s; + } + } + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+   * The URL of the output message type.
+   * 
+ */ + public com.google.protobuf.ByteString + getResponseTypeUrlBytes() { + java.lang.Object ref = responseTypeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + responseTypeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESPONSE_STREAMING_FIELD_NUMBER = 5; + private boolean responseStreaming_; + /** + * optional bool response_streaming = 5; + * + *
+   * If true, the response is streamed.
+   * 
+ */ + public boolean getResponseStreaming() { + return responseStreaming_; + } + + public static final int OPTIONS_FIELD_NUMBER = 6; + private java.util.List options_; + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + public java.util.List getOptionsList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + public int getOptionsCount() { + return options_.size(); + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + return options_.get(index); + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + return options_.get(index); + } + + public static final int SYNTAX_FIELD_NUMBER = 7; + private int syntax_; + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of this method.
+   * 
+ */ + public int getSyntaxValue() { + return syntax_; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of this method.
+   * 
+ */ + public com.google.protobuf.Syntax getSyntax() { + com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); + return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; + } + + 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 { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!getRequestTypeUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestTypeUrl_); + } + if (requestStreaming_ != false) { + output.writeBool(3, requestStreaming_); + } + if (!getResponseTypeUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, responseTypeUrl_); + } + if (responseStreaming_ != false) { + output.writeBool(5, responseStreaming_); + } + for (int i = 0; i < options_.size(); i++) { + output.writeMessage(6, options_.get(i)); + } + if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { + output.writeEnum(7, syntax_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!getRequestTypeUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestTypeUrl_); + } + if (requestStreaming_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, requestStreaming_); + } + if (!getResponseTypeUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, responseTypeUrl_); + } + if (responseStreaming_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, responseStreaming_); + } + for (int i = 0; i < options_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, options_.get(i)); + } + if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, syntax_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Method)) { + return super.equals(obj); + } + com.google.protobuf.Method other = (com.google.protobuf.Method) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && getRequestTypeUrl() + .equals(other.getRequestTypeUrl()); + result = result && (getRequestStreaming() + == other.getRequestStreaming()); + result = result && getResponseTypeUrl() + .equals(other.getResponseTypeUrl()); + result = result && (getResponseStreaming() + == other.getResponseStreaming()); + result = result && getOptionsList() + .equals(other.getOptionsList()); + result = result && syntax_ == other.syntax_; + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_TYPE_URL_FIELD_NUMBER; + hash = (53 * hash) + getRequestTypeUrl().hashCode(); + hash = (37 * hash) + REQUEST_STREAMING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getRequestStreaming()); + hash = (37 * hash) + RESPONSE_TYPE_URL_FIELD_NUMBER; + hash = (53 * hash) + getResponseTypeUrl().hashCode(); + hash = (37 * hash) + RESPONSE_STREAMING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getResponseStreaming()); + if (getOptionsCount() > 0) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptionsList().hashCode(); + } + hash = (37 * hash) + SYNTAX_FIELD_NUMBER; + hash = (53 * hash) + syntax_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Method parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Method 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.protobuf.Method parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Method parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Method parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Method parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Method parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Method parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Method parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Method 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.protobuf.Method 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.protobuf.Method} + * + *
+   * Method represents a method of an api.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Method) + com.google.protobuf.MethodOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Method.class, com.google.protobuf.Method.Builder.class); + } + + // Construct using com.google.protobuf.Method.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getOptionsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + requestTypeUrl_ = ""; + + requestStreaming_ = false; + + responseTypeUrl_ = ""; + + responseStreaming_ = false; + + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + optionsBuilder_.clear(); + } + syntax_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_descriptor; + } + + public com.google.protobuf.Method getDefaultInstanceForType() { + return com.google.protobuf.Method.getDefaultInstance(); + } + + public com.google.protobuf.Method build() { + com.google.protobuf.Method result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Method buildPartial() { + com.google.protobuf.Method result = new com.google.protobuf.Method(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + result.requestTypeUrl_ = requestTypeUrl_; + result.requestStreaming_ = requestStreaming_; + result.responseTypeUrl_ = responseTypeUrl_; + result.responseStreaming_ = responseStreaming_; + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { + options_ = java.util.Collections.unmodifiableList(options_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + result.syntax_ = syntax_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Method) { + return mergeFrom((com.google.protobuf.Method)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Method other) { + if (other == com.google.protobuf.Method.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRequestTypeUrl().isEmpty()) { + requestTypeUrl_ = other.requestTypeUrl_; + onChanged(); + } + if (other.getRequestStreaming() != false) { + setRequestStreaming(other.getRequestStreaming()); + } + if (!other.getResponseTypeUrl().isEmpty()) { + responseTypeUrl_ = other.responseTypeUrl_; + onChanged(); + } + if (other.getResponseStreaming() != false) { + setResponseStreaming(other.getResponseStreaming()); + } + if (optionsBuilder_ == null) { + if (!other.options_.isEmpty()) { + if (options_.isEmpty()) { + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureOptionsIsMutable(); + options_.addAll(other.options_); + } + onChanged(); + } + } else { + if (!other.options_.isEmpty()) { + if (optionsBuilder_.isEmpty()) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000020); + optionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOptionsFieldBuilder() : null; + } else { + optionsBuilder_.addAllMessages(other.options_); + } + } + } + if (other.syntax_ != 0) { + setSyntaxValue(other.getSyntaxValue()); + } + 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.protobuf.Method parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Method) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The simple name of this method.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The simple name of this method.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The simple name of this method.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The simple name of this method.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The simple name of this method.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestTypeUrl_ = ""; + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+     * A URL of the input message type.
+     * 
+ */ + public java.lang.String getRequestTypeUrl() { + java.lang.Object ref = requestTypeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestTypeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+     * A URL of the input message type.
+     * 
+ */ + public com.google.protobuf.ByteString + getRequestTypeUrlBytes() { + java.lang.Object ref = requestTypeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestTypeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+     * A URL of the input message type.
+     * 
+ */ + public Builder setRequestTypeUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestTypeUrl_ = value; + onChanged(); + return this; + } + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+     * A URL of the input message type.
+     * 
+ */ + public Builder clearRequestTypeUrl() { + + requestTypeUrl_ = getDefaultInstance().getRequestTypeUrl(); + onChanged(); + return this; + } + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+     * A URL of the input message type.
+     * 
+ */ + public Builder setRequestTypeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestTypeUrl_ = value; + onChanged(); + return this; + } + + private boolean requestStreaming_ ; + /** + * optional bool request_streaming = 3; + * + *
+     * If true, the request is streamed.
+     * 
+ */ + public boolean getRequestStreaming() { + return requestStreaming_; + } + /** + * optional bool request_streaming = 3; + * + *
+     * If true, the request is streamed.
+     * 
+ */ + public Builder setRequestStreaming(boolean value) { + + requestStreaming_ = value; + onChanged(); + return this; + } + /** + * optional bool request_streaming = 3; + * + *
+     * If true, the request is streamed.
+     * 
+ */ + public Builder clearRequestStreaming() { + + requestStreaming_ = false; + onChanged(); + return this; + } + + private java.lang.Object responseTypeUrl_ = ""; + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+     * The URL of the output message type.
+     * 
+ */ + public java.lang.String getResponseTypeUrl() { + java.lang.Object ref = responseTypeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseTypeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+     * The URL of the output message type.
+     * 
+ */ + public com.google.protobuf.ByteString + getResponseTypeUrlBytes() { + java.lang.Object ref = responseTypeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + responseTypeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+     * The URL of the output message type.
+     * 
+ */ + public Builder setResponseTypeUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + responseTypeUrl_ = value; + onChanged(); + return this; + } + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+     * The URL of the output message type.
+     * 
+ */ + public Builder clearResponseTypeUrl() { + + responseTypeUrl_ = getDefaultInstance().getResponseTypeUrl(); + onChanged(); + return this; + } + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+     * The URL of the output message type.
+     * 
+ */ + public Builder setResponseTypeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + responseTypeUrl_ = value; + onChanged(); + return this; + } + + private boolean responseStreaming_ ; + /** + * optional bool response_streaming = 5; + * + *
+     * If true, the response is streamed.
+     * 
+ */ + public boolean getResponseStreaming() { + return responseStreaming_; + } + /** + * optional bool response_streaming = 5; + * + *
+     * If true, the response is streamed.
+     * 
+ */ + public Builder setResponseStreaming(boolean value) { + + responseStreaming_ = value; + onChanged(); + return this; + } + /** + * optional bool response_streaming = 5; + * + *
+     * If true, the response is streamed.
+     * 
+ */ + public Builder clearResponseStreaming() { + + responseStreaming_ = false; + onChanged(); + return this; + } + + private java.util.List options_ = + java.util.Collections.emptyList(); + private void ensureOptionsIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + options_ = new java.util.ArrayList(options_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; + + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public java.util.List getOptionsList() { + if (optionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(options_); + } else { + return optionsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public int getOptionsCount() { + if (optionsBuilder_ == null) { + return options_.size(); + } else { + return optionsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + if (optionsBuilder_ == null) { + return options_.get(index); + } else { + return optionsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.set(index, value); + onChanged(); + } else { + optionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.set(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder addOptions(com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(value); + onChanged(); + } else { + optionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(index, value); + onChanged(); + } else { + optionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder addOptions( + com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder addAllOptions( + java.lang.Iterable values) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, options_); + onChanged(); + } else { + optionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + optionsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder removeOptions(int index) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.remove(index); + onChanged(); + } else { + optionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public com.google.protobuf.Option.Builder getOptionsBuilder( + int index) { + return getOptionsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + if (optionsBuilder_ == null) { + return options_.get(index); } else { + return optionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(options_); + } + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder() { + return getOptionsFieldBuilder().addBuilder( + com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder( + int index) { + return getOptionsFieldBuilder().addBuilder( + index, com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public java.util.List + getOptionsBuilderList() { + return getOptionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( + options_, + ((bitField0_ & 0x00000020) == 0x00000020), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private int syntax_ = 0; + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of this method.
+     * 
+ */ + public int getSyntaxValue() { + return syntax_; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of this method.
+     * 
+ */ + public Builder setSyntaxValue(int value) { + syntax_ = value; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of this method.
+     * 
+ */ + public com.google.protobuf.Syntax getSyntax() { + com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); + return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of this method.
+     * 
+ */ + public Builder setSyntax(com.google.protobuf.Syntax value) { + if (value == null) { + throw new NullPointerException(); + } + + syntax_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of this method.
+     * 
+ */ + public Builder clearSyntax() { + + syntax_ = 0; + onChanged(); + return this; + } + 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.protobuf.Method) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Method) + private static final com.google.protobuf.Method DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Method(); + } + + public static com.google.protobuf.Method getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Method parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Method(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.protobuf.Method getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/MethodOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/MethodOrBuilder.java new file mode 100644 index 000000000000..592dd33ad01c --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/MethodOrBuilder.java @@ -0,0 +1,142 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +public interface MethodOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Method) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The simple name of this method.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The simple name of this method.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+   * A URL of the input message type.
+   * 
+ */ + java.lang.String getRequestTypeUrl(); + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+   * A URL of the input message type.
+   * 
+ */ + com.google.protobuf.ByteString + getRequestTypeUrlBytes(); + + /** + * optional bool request_streaming = 3; + * + *
+   * If true, the request is streamed.
+   * 
+ */ + boolean getRequestStreaming(); + + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+   * The URL of the output message type.
+   * 
+ */ + java.lang.String getResponseTypeUrl(); + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+   * The URL of the output message type.
+   * 
+ */ + com.google.protobuf.ByteString + getResponseTypeUrlBytes(); + + /** + * optional bool response_streaming = 5; + * + *
+   * If true, the response is streamed.
+   * 
+ */ + boolean getResponseStreaming(); + + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + java.util.List + getOptionsList(); + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + com.google.protobuf.Option getOptions(int index); + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + int getOptionsCount(); + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + java.util.List + getOptionsOrBuilderList(); + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index); + + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of this method.
+   * 
+ */ + int getSyntaxValue(); + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of this method.
+   * 
+ */ + com.google.protobuf.Syntax getSyntax(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Mixin.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Mixin.java new file mode 100644 index 000000000000..ef8aaf0e07d4 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Mixin.java @@ -0,0 +1,790 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Mixin} + * + *
+ * Declares an API to be included in this API. The including API must
+ * redeclare all the methods from the included API, but documentation
+ * and options are inherited as follows:
+ * - If after comment and whitespace stripping, the documentation
+ *   string of the redeclared method is empty, it will be inherited
+ *   from the original method.
+ * - Each annotation belonging to the service config (http,
+ *   visibility) which is not set in the redeclared method will be
+ *   inherited.
+ * - If an http annotation is inherited, the path pattern will be
+ *   modified as follows. Any version prefix will be replaced by the
+ *   version of the including API plus the [root][] path if specified.
+ * Example of a simple mixin:
+ *     package google.acl.v1;
+ *     service AccessControl {
+ *       // Get the underlying ACL object.
+ *       rpc GetAcl(GetAclRequest) returns (Acl) {
+ *         option (google.api.http).get = "/v1/{resource=**}:getAcl";
+ *       }
+ *     }
+ *     package google.storage.v2;
+ *     service Storage {
+ *       // (-- see AccessControl.GetAcl --)
+ *       rpc GetAcl(GetAclRequest) returns (Acl);
+ *       // Get a data record.
+ *       rpc GetData(GetDataRequest) returns (Data) {
+ *         option (google.api.http).get = "/v2/{resource=**}";
+ *       }
+ *     }
+ * Example of a mixin configuration:
+ *     apis:
+ *     - name: google.storage.v2.Storage
+ *       mixins:
+ *       - name: google.acl.v1.AccessControl
+ * The mixin construct implies that all methods in `AccessControl` are
+ * also declared with same name and request/response types in
+ * `Storage`. A documentation generator or annotation processor will
+ * see the effective `Storage.GetAcl` method after inherting
+ * documentation and annotations as follows:
+ *     service Storage {
+ *       // Get the underlying ACL object.
+ *       rpc GetAcl(GetAclRequest) returns (Acl) {
+ *         option (google.api.http).get = "/v2/{resource=**}:getAcl";
+ *       }
+ *       ...
+ *     }
+ * Note how the version in the path pattern changed from `v1` to `v2`.
+ * If the `root` field in the mixin is specified, it should be a
+ * relative path under which inherited HTTP paths are placed. Example:
+ *     apis:
+ *     - name: google.storage.v2.Storage
+ *       mixins:
+ *       - name: google.acl.v1.AccessControl
+ *         root: acls
+ * This implies the following inherited HTTP annotation:
+ *     service Storage {
+ *       // Get the underlying ACL object.
+ *       rpc GetAcl(GetAclRequest) returns (Acl) {
+ *         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
+ *       }
+ *       ...
+ *     }
+ * 
+ */ +public final class Mixin extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Mixin) + MixinOrBuilder { + // Use Mixin.newBuilder() to construct. + private Mixin(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Mixin() { + name_ = ""; + root_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Mixin( + 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(); + + name_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + root_ = s; + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Mixin.class, com.google.protobuf.Mixin.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The fully qualified name of the API which is included.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * The fully qualified name of the API which is included.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROOT_FIELD_NUMBER = 2; + private volatile java.lang.Object root_; + /** + * optional string root = 2; + * + *
+   * If non-empty specifies a path under which inherited HTTP paths
+   * are rooted.
+   * 
+ */ + public java.lang.String getRoot() { + java.lang.Object ref = root_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + root_ = s; + return s; + } + } + /** + * optional string root = 2; + * + *
+   * If non-empty specifies a path under which inherited HTTP paths
+   * are rooted.
+   * 
+ */ + public com.google.protobuf.ByteString + getRootBytes() { + java.lang.Object ref = root_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + root_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!getRootBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, root_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!getRootBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, root_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Mixin)) { + return super.equals(obj); + } + com.google.protobuf.Mixin other = (com.google.protobuf.Mixin) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && getRoot() + .equals(other.getRoot()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ROOT_FIELD_NUMBER; + hash = (53 * hash) + getRoot().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Mixin parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Mixin 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.protobuf.Mixin parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Mixin parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Mixin parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Mixin parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Mixin parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Mixin parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Mixin parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Mixin 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.protobuf.Mixin 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.protobuf.Mixin} + * + *
+   * Declares an API to be included in this API. The including API must
+   * redeclare all the methods from the included API, but documentation
+   * and options are inherited as follows:
+   * - If after comment and whitespace stripping, the documentation
+   *   string of the redeclared method is empty, it will be inherited
+   *   from the original method.
+   * - Each annotation belonging to the service config (http,
+   *   visibility) which is not set in the redeclared method will be
+   *   inherited.
+   * - If an http annotation is inherited, the path pattern will be
+   *   modified as follows. Any version prefix will be replaced by the
+   *   version of the including API plus the [root][] path if specified.
+   * Example of a simple mixin:
+   *     package google.acl.v1;
+   *     service AccessControl {
+   *       // Get the underlying ACL object.
+   *       rpc GetAcl(GetAclRequest) returns (Acl) {
+   *         option (google.api.http).get = "/v1/{resource=**}:getAcl";
+   *       }
+   *     }
+   *     package google.storage.v2;
+   *     service Storage {
+   *       // (-- see AccessControl.GetAcl --)
+   *       rpc GetAcl(GetAclRequest) returns (Acl);
+   *       // Get a data record.
+   *       rpc GetData(GetDataRequest) returns (Data) {
+   *         option (google.api.http).get = "/v2/{resource=**}";
+   *       }
+   *     }
+   * Example of a mixin configuration:
+   *     apis:
+   *     - name: google.storage.v2.Storage
+   *       mixins:
+   *       - name: google.acl.v1.AccessControl
+   * The mixin construct implies that all methods in `AccessControl` are
+   * also declared with same name and request/response types in
+   * `Storage`. A documentation generator or annotation processor will
+   * see the effective `Storage.GetAcl` method after inherting
+   * documentation and annotations as follows:
+   *     service Storage {
+   *       // Get the underlying ACL object.
+   *       rpc GetAcl(GetAclRequest) returns (Acl) {
+   *         option (google.api.http).get = "/v2/{resource=**}:getAcl";
+   *       }
+   *       ...
+   *     }
+   * Note how the version in the path pattern changed from `v1` to `v2`.
+   * If the `root` field in the mixin is specified, it should be a
+   * relative path under which inherited HTTP paths are placed. Example:
+   *     apis:
+   *     - name: google.storage.v2.Storage
+   *       mixins:
+   *       - name: google.acl.v1.AccessControl
+   *         root: acls
+   * This implies the following inherited HTTP annotation:
+   *     service Storage {
+   *       // Get the underlying ACL object.
+   *       rpc GetAcl(GetAclRequest) returns (Acl) {
+   *         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
+   *       }
+   *       ...
+   *     }
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Mixin) + com.google.protobuf.MixinOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Mixin.class, com.google.protobuf.Mixin.Builder.class); + } + + // Construct using com.google.protobuf.Mixin.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + root_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_descriptor; + } + + public com.google.protobuf.Mixin getDefaultInstanceForType() { + return com.google.protobuf.Mixin.getDefaultInstance(); + } + + public com.google.protobuf.Mixin build() { + com.google.protobuf.Mixin result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Mixin buildPartial() { + com.google.protobuf.Mixin result = new com.google.protobuf.Mixin(this); + result.name_ = name_; + result.root_ = root_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Mixin) { + return mergeFrom((com.google.protobuf.Mixin)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Mixin other) { + if (other == com.google.protobuf.Mixin.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRoot().isEmpty()) { + root_ = other.root_; + onChanged(); + } + 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.protobuf.Mixin parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Mixin) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The fully qualified name of the API which is included.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of the API which is included.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of the API which is included.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of the API which is included.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of the API which is included.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object root_ = ""; + /** + * optional string root = 2; + * + *
+     * If non-empty specifies a path under which inherited HTTP paths
+     * are rooted.
+     * 
+ */ + public java.lang.String getRoot() { + java.lang.Object ref = root_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + root_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string root = 2; + * + *
+     * If non-empty specifies a path under which inherited HTTP paths
+     * are rooted.
+     * 
+ */ + public com.google.protobuf.ByteString + getRootBytes() { + java.lang.Object ref = root_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + root_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string root = 2; + * + *
+     * If non-empty specifies a path under which inherited HTTP paths
+     * are rooted.
+     * 
+ */ + public Builder setRoot( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + root_ = value; + onChanged(); + return this; + } + /** + * optional string root = 2; + * + *
+     * If non-empty specifies a path under which inherited HTTP paths
+     * are rooted.
+     * 
+ */ + public Builder clearRoot() { + + root_ = getDefaultInstance().getRoot(); + onChanged(); + return this; + } + /** + * optional string root = 2; + * + *
+     * If non-empty specifies a path under which inherited HTTP paths
+     * are rooted.
+     * 
+ */ + public Builder setRootBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + root_ = value; + onChanged(); + return this; + } + 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.protobuf.Mixin) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Mixin) + private static final com.google.protobuf.Mixin DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Mixin(); + } + + public static com.google.protobuf.Mixin getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Mixin parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Mixin(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.protobuf.Mixin getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/MixinOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/MixinOrBuilder.java new file mode 100644 index 000000000000..1ffcb50e4e00 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/MixinOrBuilder.java @@ -0,0 +1,47 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +public interface MixinOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Mixin) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The fully qualified name of the API which is included.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The fully qualified name of the API which is included.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional string root = 2; + * + *
+   * If non-empty specifies a path under which inherited HTTP paths
+   * are rooted.
+   * 
+ */ + java.lang.String getRoot(); + /** + * optional string root = 2; + * + *
+   * If non-empty specifies a path under which inherited HTTP paths
+   * are rooted.
+   * 
+ */ + com.google.protobuf.ByteString + getRootBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/NullValue.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/NullValue.java new file mode 100644 index 000000000000..5fcf0cc0d0da --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/NullValue.java @@ -0,0 +1,103 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/struct.proto + +package com.google.protobuf; + +/** + * Protobuf enum {@code google.protobuf.NullValue} + * + *
+ * `NullValue` is a singleton enumeration to represent the null value for the
+ * `Value` type union.
+ *  The JSON representation for `NullValue` is JSON `null`.
+ * 
+ */ +public enum NullValue + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NULL_VALUE = 0; + * + *
+   * Null value.
+   * 
+ */ + NULL_VALUE(0, 0), + UNRECOGNIZED(-1, -1), + ; + + /** + * NULL_VALUE = 0; + * + *
+   * Null value.
+   * 
+ */ + public static final int NULL_VALUE_VALUE = 0; + + + 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 NullValue valueOf(int value) { + switch (value) { + case 0: return NULL_VALUE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + NullValue> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NullValue findValueByNumber(int number) { + return NullValue.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.protobuf.StructProto.getDescriptor() + .getEnumTypes().get(0); + } + + private static final NullValue[] VALUES = values(); + + public static NullValue 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 NullValue(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.protobuf.NullValue) +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Option.java b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Option.java new file mode 100644 index 000000000000..b0504cc19557 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/protobuf/Option.java @@ -0,0 +1,737 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Option} + * + *
+ * A protocol buffer option, which can be attached to a message, field,
+ * enumeration, etc.
+ * 
+ */ +public final class Option extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Option) + OptionOrBuilder { + // Use Option.newBuilder() to construct. + private Option(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Option() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Option( + 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(); + + name_ = s; + break; + } + case 18: { + com.google.protobuf.Any.Builder subBuilder = null; + if (value_ != null) { + subBuilder = value_.toBuilder(); + } + value_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(value_); + value_ = subBuilder.buildPartial(); + } + + 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Option.class, com.google.protobuf.Option.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The option's name. For example, `"java_package"`.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * The option's name. For example, `"java_package"`.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.Any value_; + /** + * optional .google.protobuf.Any value = 2; + * + *
+   * The option's value. For example, `"com.google.protobuf"`.
+   * 
+ */ + public boolean hasValue() { + return value_ != null; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+   * The option's value. For example, `"com.google.protobuf"`.
+   * 
+ */ + public com.google.protobuf.Any getValue() { + return value_ == null ? com.google.protobuf.Any.getDefaultInstance() : value_; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+   * The option's value. For example, `"com.google.protobuf"`.
+   * 
+ */ + public com.google.protobuf.AnyOrBuilder getValueOrBuilder() { + return getValue(); + } + + 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 { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (value_ != null) { + output.writeMessage(2, getValue()); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getValue()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Option)) { + return super.equals(obj); + } + com.google.protobuf.Option other = (com.google.protobuf.Option) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && (hasValue() == other.hasValue()); + if (hasValue()) { + result = result && getValue() + .equals(other.getValue()); + } + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Option parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Option 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.protobuf.Option parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Option parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Option parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Option parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Option parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Option parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Option parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Option 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.protobuf.Option 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.protobuf.Option} + * + *
+   * A protocol buffer option, which can be attached to a message, field,
+   * enumeration, etc.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Option) + com.google.protobuf.OptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Option.class, com.google.protobuf.Option.Builder.class); + } + + // Construct using com.google.protobuf.Option.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (valueBuilder_ == null) { + value_ = null; + } else { + value_ = null; + valueBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_descriptor; + } + + public com.google.protobuf.Option getDefaultInstanceForType() { + return com.google.protobuf.Option.getDefaultInstance(); + } + + public com.google.protobuf.Option build() { + com.google.protobuf.Option result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Option buildPartial() { + com.google.protobuf.Option result = new com.google.protobuf.Option(this); + result.name_ = name_; + if (valueBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = valueBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Option) { + return mergeFrom((com.google.protobuf.Option)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Option other) { + if (other == com.google.protobuf.Option.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasValue()) { + mergeValue(other.getValue()); + } + 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.protobuf.Option parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Option) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The option's name. For example, `"java_package"`.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The option's name. For example, `"java_package"`.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The option's name. For example, `"java_package"`.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The option's name. For example, `"java_package"`.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The option's name. For example, `"java_package"`.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Any value_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> valueBuilder_; + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public boolean hasValue() { + return valueBuilder_ != null || value_ != null; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public com.google.protobuf.Any getValue() { + if (valueBuilder_ == null) { + return value_ == null ? com.google.protobuf.Any.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public Builder setValue(com.google.protobuf.Any value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public Builder setValue( + com.google.protobuf.Any.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public Builder mergeValue(com.google.protobuf.Any value) { + if (valueBuilder_ == null) { + if (value_ != null) { + value_ = + com.google.protobuf.Any.newBuilder(value_).mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + valueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = null; + onChanged(); + } else { + value_ = null; + valueBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public com.google.protobuf.Any.Builder getValueBuilder() { + + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public com.google.protobuf.AnyOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? + com.google.protobuf.Any.getDefaultInstance() : value_; + } + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getValue(), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + 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.protobuf.Option) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Option) + private static final com.google.protobuf.Option DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Option(); + } + + public static com.google.protobuf.Option getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser