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
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
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
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
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
repeated .google.api.AuthenticationRule rules = 3;
+ *
+ * + * Individual rules for authentication. + *+ */ + public java.util.List
repeated .google.api.AuthenticationRule rules = 3;
+ *
+ * + * Individual rules for authentication. + *+ */ + public java.util.List extends com.google.api.AuthenticationRuleOrBuilder> + 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
repeated .google.api.AuthProvider providers = 4;
+ *
+ * + * Defines a set of authentication providers that a service supports. + *+ */ + public java.util.List
repeated .google.api.AuthProvider providers = 4;
+ *
+ * + * Defines a set of authentication providers that a service supports. + *+ */ + public java.util.List extends com.google.api.AuthProviderOrBuilder> + 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
repeated .google.api.AuthenticationRule rules = 3;
+ *
+ * + * Individual rules for authentication. + *+ */ + public java.util.List
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 extends com.google.api.AuthenticationRule> 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 extends com.google.api.AuthenticationRuleOrBuilder> + 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
repeated .google.api.AuthProvider providers = 4;
+ *
+ * + * Defines a set of authentication providers that a service supports. + *+ */ + public java.util.List
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 extends com.google.api.AuthProvider> 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 extends com.google.api.AuthProviderOrBuilder> + 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
repeated .google.api.AuthenticationRule rules = 3;
+ *
+ * + * Individual rules for authentication. + *+ */ + java.util.List
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 extends com.google.api.AuthenticationRuleOrBuilder> + 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
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 extends com.google.api.AuthProviderOrBuilder> + 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
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
repeated .google.api.AuthRequirement requirements = 7;
+ *
+ * + * Requirements for additional authentication providers. + *+ */ + public java.util.List
repeated .google.api.AuthRequirement requirements = 7;
+ *
+ * + * Requirements for additional authentication providers. + *+ */ + public java.util.List extends com.google.api.AuthRequirementOrBuilder> + 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
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
repeated .google.api.AuthRequirement requirements = 7;
+ *
+ * + * Requirements for additional authentication providers. + *+ */ + public java.util.List
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 extends com.google.api.AuthRequirement> 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 extends com.google.api.AuthRequirementOrBuilder> + 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
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
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 extends com.google.api.AuthRequirementOrBuilder> + 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
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
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
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
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
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
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
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
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 extends com.google.api.LabelDescriptorOrBuilder> + 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
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
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
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 extends com.google.api.LabelDescriptor> 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 extends com.google.api.LabelDescriptorOrBuilder> + 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
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
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
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 extends com.google.api.LabelDescriptorOrBuilder> + 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
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
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
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
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
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 extends com.google.api.Logging.LoggingDestinationOrBuilder> + 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
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
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 extends com.google.api.Logging.LoggingDestinationOrBuilder> + 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
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
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 extends com.google.api.Logging.LoggingDestination> 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 extends com.google.api.Logging.LoggingDestinationOrBuilder> + 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
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
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 extends com.google.api.Logging.LoggingDestination> 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 extends com.google.api.Logging.LoggingDestinationOrBuilder> + 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
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
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 extends com.google.api.Logging.LoggingDestinationOrBuilder> + 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
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 extends com.google.api.Logging.LoggingDestinationOrBuilder> + 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
+ * 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
+ * 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
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
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
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 extends com.google.api.LabelDescriptorOrBuilder> + 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
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
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
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 extends com.google.api.LabelDescriptor> 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 extends com.google.api.LabelDescriptorOrBuilder> + 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
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
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
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 extends com.google.api.LabelDescriptorOrBuilder> + 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
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 + .
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
+ * A specific monitored resource or a group of monitored resources. + *+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder
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
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
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
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
+ * 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
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
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
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 extends com.google.api.LabelDescriptorOrBuilder> + 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
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
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
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 extends com.google.api.LabelDescriptor> 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 extends com.google.api.LabelDescriptorOrBuilder> + 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
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
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 extends com.google.api.LabelDescriptorOrBuilder> + 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
+ * 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
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
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
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
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
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 extends com.google.api.Monitoring.MonitoringDestinationOrBuilder> + 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
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
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 extends com.google.api.Monitoring.MonitoringDestinationOrBuilder> + 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
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
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 extends com.google.api.Monitoring.MonitoringDestination> 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 extends com.google.api.Monitoring.MonitoringDestinationOrBuilder> + 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
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
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 extends com.google.api.Monitoring.MonitoringDestination> 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 extends com.google.api.Monitoring.MonitoringDestinationOrBuilder> + 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
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
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 extends com.google.api.Monitoring.MonitoringDestinationOrBuilder> + 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
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 extends com.google.api.Monitoring.MonitoringDestinationOrBuilder> + 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
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
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
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
repeated .google.api.LogDescriptor logs = 23;
+ *
+ * + * Defines the logs used by this service. + *+ */ + public java.util.List
repeated .google.api.LogDescriptor logs = 23;
+ *
+ * + * Defines the logs used by this service. + *+ */ + public java.util.List extends com.google.api.LogDescriptorOrBuilder> + 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
repeated .google.api.MetricDescriptor metrics = 24;
+ *
+ * + * Defines the metrics used by this service. + *+ */ + public java.util.List
repeated .google.api.MetricDescriptor metrics = 24;
+ *
+ * + * Defines the metrics used by this service. + *+ */ + public java.util.List extends com.google.api.MetricDescriptorOrBuilder> + 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
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
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 extends com.google.api.MonitoredResourceDescriptorOrBuilder> + 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
repeated .google.api.LogDescriptor logs = 23;
+ *
+ * + * Defines the logs used by this service. + *+ */ + public java.util.List
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 extends com.google.api.LogDescriptor> 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 extends com.google.api.LogDescriptorOrBuilder> + 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
repeated .google.api.MetricDescriptor metrics = 24;
+ *
+ * + * Defines the metrics used by this service. + *+ */ + public java.util.List
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 extends com.google.api.MetricDescriptor> 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 extends com.google.api.MetricDescriptorOrBuilder> + 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
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
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 extends com.google.api.MonitoredResourceDescriptor> 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 extends com.google.api.MonitoredResourceDescriptorOrBuilder> + 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
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
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
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 extends com.google.api.LogDescriptorOrBuilder> + 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
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 extends com.google.api.MetricDescriptorOrBuilder> + 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
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 extends com.google.api.MonitoredResourceDescriptorOrBuilder> + 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
+ * 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
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
repeated .google.api.UsageRule rules = 6;
+ *
+ * + * Individual rules for configuring usage on selected methods. + *+ */ + public java.util.List
repeated .google.api.UsageRule rules = 6;
+ *
+ * + * Individual rules for configuring usage on selected methods. + *+ */ + public java.util.List extends com.google.api.UsageRuleOrBuilder> + 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
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
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
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
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
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
repeated .google.api.UsageRule rules = 6;
+ *
+ * + * Individual rules for configuring usage on selected methods. + *+ */ + public java.util.List
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 extends com.google.api.UsageRule> 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 extends com.google.api.UsageRuleOrBuilder> + 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
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
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 extends com.google.api.UsageRuleOrBuilder> + 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
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
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
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
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
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
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
repeated .google.protobuf.Method methods = 2;
+ *
+ * + * The methods of this api, in unspecified order. + *+ */ + public java.util.List
repeated .google.protobuf.Method methods = 2;
+ *
+ * + * The methods of this api, in unspecified order. + *+ */ + public java.util.List extends com.google.protobuf.MethodOrBuilder> + 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
repeated .google.protobuf.Option options = 3;
+ *
+ * + * Any metadata attached to the API. + *+ */ + public java.util.List
repeated .google.protobuf.Option options = 3;
+ *
+ * + * Any metadata attached to the API. + *+ */ + public java.util.List extends com.google.protobuf.OptionOrBuilder> + 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
repeated .google.protobuf.Mixin mixins = 6;
+ *
+ * + * Included APIs. See [Mixin][]. + *+ */ + public java.util.List
repeated .google.protobuf.Mixin mixins = 6;
+ *
+ * + * Included APIs. See [Mixin][]. + *+ */ + public java.util.List extends com.google.protobuf.MixinOrBuilder> + 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
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
repeated .google.protobuf.Method methods = 2;
+ *
+ * + * The methods of this api, in unspecified order. + *+ */ + public java.util.List
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 extends com.google.protobuf.Method> 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 extends com.google.protobuf.MethodOrBuilder> + 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
repeated .google.protobuf.Option options = 3;
+ *
+ * + * Any metadata attached to the API. + *+ */ + public java.util.List