diff --git a/gcloud-java-gax/README.md b/gcloud-java-gax/README.md new file mode 100644 index 000000000000..fe478991b1e7 --- /dev/null +++ b/gcloud-java-gax/README.md @@ -0,0 +1,55 @@ +Google Cloud Java Client +========================== + +Java idiomatic client for [Google Cloud Platform][cloud-platform] services. + +[![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java) +[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master) + +- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/) +- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs) +- [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html) + +This module provides common functionality and is required by the other service specific modules. + +Quickstart +---------- +Add this to your pom.xml file +```xml + + com.google.gcloud + gcloud-java-gax + 0.0.6 + +``` + +Contributing +------------ + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING] for more information on how to get started. + +Java Versions +------------- + +Java 7 or above is required for using this client. + +Versioning +---------- + +This library follows [Semantic Versioning] (http://semver.org/). + +It is currently in major version zero (``0.y.z``), which means that anything +may change at any time and the public API should not be considered +stable. + +License +------- + +Apache 2.0 - See [LICENSE] for more information. + + +[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/CONTRIBUTING.md +[LICENSE]: https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/LICENSE +[cloud-platform]: https://cloud.google.com/ diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AnnotationsProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AnnotationsProto.java new file mode 100644 index 000000000000..0281d9ddd73b --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/AnnotationsProto.java @@ -0,0 +1,222 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/annotations.proto + +package com.google.api; + +public final class AnnotationsProto { + private AnnotationsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registry.add(com.google.api.AnnotationsProto.fileVisibility); + registry.add(com.google.api.AnnotationsProto.apiVisibility); + registry.add(com.google.api.AnnotationsProto.methodVisibility); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.AnnotationsProto.messageVisibility); + registry.add(com.google.api.AnnotationsProto.customError); + registry.add(com.google.api.AnnotationsProto.fieldVisibility); + registry.add(com.google.api.AnnotationsProto.enumVisibility); + registry.add(com.google.api.AnnotationsProto.valueVisibility); + } + public static final int FILE_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.FileOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + com.google.api.VisibilityRule> fileVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + public static final int API_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.ServiceOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.ServiceOptions, + com.google.api.VisibilityRule> apiVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + public static final int METHOD_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.MethodOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MethodOptions, + com.google.api.VisibilityRule> methodVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + public static final int HTTP_FIELD_NUMBER = 72295728; + /** + * extend .google.protobuf.MethodOptions { ... } + * + *
+   * See `HttpRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MethodOptions, + com.google.api.HttpRule> http = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.HttpRule.class, + com.google.api.HttpRule.getDefaultInstance()); + public static final int MESSAGE_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.MessageOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + com.google.api.VisibilityRule> messageVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + public static final int CUSTOM_ERROR_FIELD_NUMBER = 79365461; + /** + * extend .google.protobuf.MessageOptions { ... } + * + *
+   * See `CustomErrorRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + com.google.api.CustomErrorRule> customError = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.CustomErrorRule.class, + com.google.api.CustomErrorRule.getDefaultInstance()); + public static final int FIELD_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.FieldOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + com.google.api.VisibilityRule> fieldVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + public static final int ENUM_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.EnumOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.EnumOptions, + com.google.api.VisibilityRule> enumVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + public static final int VALUE_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.EnumValueOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.EnumValueOptions, + com.google.api.VisibilityRule> valueVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034google/api/annotations.proto\022\ngoogle.a" + + "pi\032 google/protobuf/descriptor.proto\032\026go" + + "ogle/api/error.proto\032\025google/api/http.pr" + + "oto\032\033google/api/visibility.proto:T\n\017file" + + "_visibility\022\034.google.protobuf.FileOption" + + "s\030\257\312\274\" \001(\0132\032.google.api.VisibilityRule:V" + + "\n\016api_visibility\022\037.google.protobuf.Servi" + + "ceOptions\030\257\312\274\" \001(\0132\032.google.api.Visibili" + + "tyRule:X\n\021method_visibility\022\036.google.pro" + + "tobuf.MethodOptions\030\257\312\274\" \001(\0132\032.google.ap", + "i.VisibilityRule:E\n\004http\022\036.google.protob" + + "uf.MethodOptions\030\260\312\274\" \001(\0132\024.google.api.H" + + "ttpRule:Z\n\022message_visibility\022\037.google.p" + + "rotobuf.MessageOptions\030\257\312\274\" \001(\0132\032.google" + + ".api.VisibilityRule:U\n\014custom_error\022\037.go" + + "ogle.protobuf.MessageOptions\030\325\212\354% \001(\0132\033." + + "google.api.CustomErrorRule:V\n\020field_visi" + + "bility\022\035.google.protobuf.FieldOptions\030\257\312" + + "\274\" \001(\0132\032.google.api.VisibilityRule:T\n\017en" + + "um_visibility\022\034.google.protobuf.EnumOpti", + "ons\030\257\312\274\" \001(\0132\032.google.api.VisibilityRule" + + ":Z\n\020value_visibility\022!.google.protobuf.E" + + "numValueOptions\030\257\312\274\" \001(\0132\032.google.api.Vi" + + "sibilityRuleB$\n\016com.google.apiB\020Annotati" + + "onsProtoP\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.protobuf.DescriptorProtos.getDescriptor(), + com.google.api.ErrorFormatProto.getDescriptor(), + com.google.api.HttpProto.getDescriptor(), + com.google.api.VisibilityProto.getDescriptor(), + }, assigner); + fileVisibility.internalInit(descriptor.getExtensions().get(0)); + apiVisibility.internalInit(descriptor.getExtensions().get(1)); + methodVisibility.internalInit(descriptor.getExtensions().get(2)); + http.internalInit(descriptor.getExtensions().get(3)); + messageVisibility.internalInit(descriptor.getExtensions().get(4)); + customError.internalInit(descriptor.getExtensions().get(5)); + fieldVisibility.internalInit(descriptor.getExtensions().get(6)); + enumVisibility.internalInit(descriptor.getExtensions().get(7)); + valueVisibility.internalInit(descriptor.getExtensions().get(8)); + com.google.protobuf.DescriptorProtos.getDescriptor(); + com.google.api.ErrorFormatProto.getDescriptor(); + com.google.api.HttpProto.getDescriptor(); + com.google.api.VisibilityProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Context.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Context.java new file mode 100644 index 000000000000..1385a7b9ea50 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/Context.java @@ -0,0 +1,779 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Context} + * + *
+ * `Context` defines which contexts an API requests.
+ * Example:
+ *     context:
+ *       rules:
+ *       - selector: "*"
+ *         requested:
+ *         - google.rpc.context.ProjectContext
+ *         - google.rpc.context.OriginContext
+ * The above specifies that all methods in the API request
+ * `google.rpc.context.ProjectContext` and
+ * `google.rpc.context.OriginContext`.
+ * Available context types are defined in package
+ * `google.rpc.context`.
+ * 
+ */ +public final class Context extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Context) + ContextOrBuilder { + // Use Context.newBuilder() to construct. + private Context(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Context() { + rules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Context( + 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)) { + rules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + rules_.add(input.readMessage(com.google.api.ContextRule.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ContextProto.internal_static_google_api_Context_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ContextProto.internal_static_google_api_Context_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Context.class, com.google.api.Context.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + private java.util.List rules_; + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + public java.util.List getRulesList() { + return rules_; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + public int getRulesCount() { + return rules_.size(); + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + public com.google.api.ContextRule getRules(int index) { + return rules_.get(index); + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + public com.google.api.ContextRuleOrBuilder 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 < rules_.size(); i++) { + output.writeMessage(1, rules_.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(1, rules_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Context parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Context 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.Context parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Context parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Context parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Context parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Context parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Context parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Context parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Context 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.Context 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.Context} + * + *
+   * `Context` defines which contexts an API requests.
+   * Example:
+   *     context:
+   *       rules:
+   *       - selector: "*"
+   *         requested:
+   *         - google.rpc.context.ProjectContext
+   *         - google.rpc.context.OriginContext
+   * The above specifies that all methods in the API request
+   * `google.rpc.context.ProjectContext` and
+   * `google.rpc.context.OriginContext`.
+   * Available context types are defined in package
+   * `google.rpc.context`.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Context) + com.google.api.ContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ContextProto.internal_static_google_api_Context_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ContextProto.internal_static_google_api_Context_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Context.class, com.google.api.Context.Builder.class); + } + + // Construct using com.google.api.Context.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRulesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rulesBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.ContextProto.internal_static_google_api_Context_descriptor; + } + + public com.google.api.Context getDefaultInstanceForType() { + return com.google.api.Context.getDefaultInstance(); + } + + public com.google.api.Context build() { + com.google.api.Context result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Context buildPartial() { + com.google.api.Context result = new com.google.api.Context(this); + int from_bitField0_ = bitField0_; + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Context) { + return mergeFrom((com.google.api.Context)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Context other) { + if (other == com.google.api.Context.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.Context parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Context) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.ContextRule, com.google.api.ContextRule.Builder, com.google.api.ContextRuleOrBuilder> rulesBuilder_; + + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public com.google.api.ContextRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.ContextRule 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.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.ContextRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder addRules(com.google.api.ContextRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.ContextRule 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.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder addRules( + com.google.api.ContextRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.ContextRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public com.google.api.ContextRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public com.google.api.ContextRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public com.google.api.ContextRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.api.ContextRule.getDefaultInstance()); + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public com.google.api.ContextRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.api.ContextRule.getDefaultInstance()); + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.ContextRule, com.google.api.ContextRule.Builder, com.google.api.ContextRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.ContextRule, com.google.api.ContextRule.Builder, com.google.api.ContextRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.api.Context) + } + + // @@protoc_insertion_point(class_scope:google.api.Context) + private static final com.google.api.Context DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Context(); + } + + public static com.google.api.Context getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Context parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Context(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.Context getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ContextOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ContextOrBuilder.java new file mode 100644 index 000000000000..97be9b0b3dd9 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/ContextOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +public interface ContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Context) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + java.util.List + getRulesList(); + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + com.google.api.ContextRule getRules(int index); + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + int getRulesCount(); + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + java.util.List + getRulesOrBuilderList(); + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + com.google.api.ContextRuleOrBuilder getRulesOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ContextProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ContextProto.java new file mode 100644 index 000000000000..755c670fa8af --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/ContextProto.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +public final class ContextProto { + private ContextProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Context_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Context_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_ContextRule_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_ContextRule_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/context.proto\022\ngoogle.api\"1" + + "\n\007Context\022&\n\005rules\030\001 \003(\0132\027.google.api.Co" + + "ntextRule\"D\n\013ContextRule\022\020\n\010selector\030\001 \001" + + "(\t\022\021\n\trequested\030\002 \003(\t\022\020\n\010provided\030\003 \003(\tB" + + " \n\016com.google.apiB\014ContextProtoP\001b\006proto" + + "3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_api_Context_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Context_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Context_descriptor, + new java.lang.String[] { "Rules", }); + internal_static_google_api_ContextRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_ContextRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_ContextRule_descriptor, + new java.lang.String[] { "Selector", "Requested", "Provided", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ContextRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ContextRule.java new file mode 100644 index 000000000000..9857e3bfdd24 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/ContextRule.java @@ -0,0 +1,922 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.ContextRule} + * + *
+ * A context rule provides information about the context for an individual API
+ * element.
+ * 
+ */ +public final class ContextRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.ContextRule) + ContextRuleOrBuilder { + // Use ContextRule.newBuilder() to construct. + private ContextRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ContextRule() { + selector_ = ""; + requested_ = com.google.protobuf.LazyStringArrayList.EMPTY; + provided_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private ContextRule( + 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: { + String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + requested_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + requested_.add(s); + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + provided_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + provided_.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)) { + requested_ = requested_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + provided_ = provided_.getUnmodifiableView(); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ContextRule.class, com.google.api.ContextRule.Builder.class); + } + + private int bitField0_; + public static final int SELECTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object selector_; + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + public com.google.protobuf.ByteString + getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList requested_; + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + public com.google.protobuf.ProtocolStringList + getRequestedList() { + return requested_; + } + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + public int getRequestedCount() { + return requested_.size(); + } + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + public java.lang.String getRequested(int index) { + return requested_.get(index); + } + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + public com.google.protobuf.ByteString + getRequestedBytes(int index) { + return requested_.getByteString(index); + } + + public static final int PROVIDED_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList provided_; + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + public com.google.protobuf.ProtocolStringList + getProvidedList() { + return provided_; + } + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + public int getProvidedCount() { + return provided_.size(); + } + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + public java.lang.String getProvided(int index) { + return provided_.get(index); + } + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + public com.google.protobuf.ByteString + getProvidedBytes(int index) { + return provided_.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 (!getSelectorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_); + } + for (int i = 0; i < requested_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requested_.getRaw(i)); + } + for (int i = 0; i < provided_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, provided_.getRaw(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_); + } + { + int dataSize = 0; + for (int i = 0; i < requested_.size(); i++) { + dataSize += computeStringSizeNoTag(requested_.getRaw(i)); + } + size += dataSize; + size += 1 * getRequestedList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < provided_.size(); i++) { + dataSize += computeStringSizeNoTag(provided_.getRaw(i)); + } + size += dataSize; + size += 1 * getProvidedList().size(); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.ContextRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.ContextRule 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.ContextRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.ContextRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.ContextRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.ContextRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.ContextRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.ContextRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.ContextRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.ContextRule 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.ContextRule 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.ContextRule} + * + *
+   * A context rule provides information about the context for an individual API
+   * element.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.ContextRule) + com.google.api.ContextRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ContextRule.class, com.google.api.ContextRule.Builder.class); + } + + // Construct using com.google.api.ContextRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + selector_ = ""; + + requested_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + provided_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_descriptor; + } + + public com.google.api.ContextRule getDefaultInstanceForType() { + return com.google.api.ContextRule.getDefaultInstance(); + } + + public com.google.api.ContextRule build() { + com.google.api.ContextRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.ContextRule buildPartial() { + com.google.api.ContextRule result = new com.google.api.ContextRule(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.selector_ = selector_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + requested_ = requested_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.requested_ = requested_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + provided_ = provided_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.provided_ = provided_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.ContextRule) { + return mergeFrom((com.google.api.ContextRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.ContextRule other) { + if (other == com.google.api.ContextRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + onChanged(); + } + if (!other.requested_.isEmpty()) { + if (requested_.isEmpty()) { + requested_ = other.requested_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRequestedIsMutable(); + requested_.addAll(other.requested_); + } + onChanged(); + } + if (!other.provided_.isEmpty()) { + if (provided_.isEmpty()) { + provided_ = other.provided_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureProvidedIsMutable(); + provided_.addAll(other.provided_); + } + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.ContextRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.ContextRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public com.google.protobuf.ByteString + getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public Builder setSelector( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + selector_ = value; + onChanged(); + return this; + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public Builder clearSelector() { + + selector_ = getDefaultInstance().getSelector(); + onChanged(); + return this; + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public Builder setSelectorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + selector_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList requested_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRequestedIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + requested_ = new com.google.protobuf.LazyStringArrayList(requested_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getRequestedList() { + return requested_.getUnmodifiableView(); + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public int getRequestedCount() { + return requested_.size(); + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public java.lang.String getRequested(int index) { + return requested_.get(index); + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public com.google.protobuf.ByteString + getRequestedBytes(int index) { + return requested_.getByteString(index); + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public Builder setRequested( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestedIsMutable(); + requested_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public Builder addRequested( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestedIsMutable(); + requested_.add(value); + onChanged(); + return this; + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public Builder addAllRequested( + java.lang.Iterable values) { + ensureRequestedIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requested_); + onChanged(); + return this; + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public Builder clearRequested() { + requested_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public Builder addRequestedBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRequestedIsMutable(); + requested_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList provided_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureProvidedIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + provided_ = new com.google.protobuf.LazyStringArrayList(provided_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getProvidedList() { + return provided_.getUnmodifiableView(); + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public int getProvidedCount() { + return provided_.size(); + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public java.lang.String getProvided(int index) { + return provided_.get(index); + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public com.google.protobuf.ByteString + getProvidedBytes(int index) { + return provided_.getByteString(index); + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public Builder setProvided( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidedIsMutable(); + provided_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public Builder addProvided( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidedIsMutable(); + provided_.add(value); + onChanged(); + return this; + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public Builder addAllProvided( + java.lang.Iterable values) { + ensureProvidedIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, provided_); + onChanged(); + return this; + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public Builder clearProvided() { + provided_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public Builder addProvidedBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProvidedIsMutable(); + provided_.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.ContextRule) + } + + // @@protoc_insertion_point(class_scope:google.api.ContextRule) + private static final com.google.api.ContextRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.ContextRule(); + } + + public static com.google.api.ContextRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ContextRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ContextRule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.ContextRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ContextRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ContextRuleOrBuilder.java new file mode 100644 index 000000000000..3174e0295a35 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/ContextRuleOrBuilder.java @@ -0,0 +1,99 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +public interface ContextRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.ContextRule) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + java.lang.String getSelector(); + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getRequestedList(); + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + int getRequestedCount(); + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + java.lang.String getRequested(int index); + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + com.google.protobuf.ByteString + getRequestedBytes(int index); + + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getProvidedList(); + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + int getProvidedCount(); + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + java.lang.String getProvided(int index); + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + com.google.protobuf.ByteString + getProvidedBytes(int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomError.java b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomError.java new file mode 100644 index 000000000000..9b9b004161b3 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomError.java @@ -0,0 +1,1016 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/error.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.CustomError} + * + *
+ * Customize service error responses.  For example, list any service
+ * specific protobuf types that can appear in error detail lists of
+ * error responses.
+ * Example:
+ *     custom_error:
+ *       types:
+ *       - google.foo.v1.CustomError
+ *       - google.foo.v1.AnotherError
+ * (-- For internal Google service producers, instead of listing such
+ * custom error detail types in the YAML configuration file; Stubby
+ * annotation can be used.  Please, see //google/api/annotations.proto
+ * for more details. --)
+ * 
+ */ +public final class CustomError extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.CustomError) + CustomErrorOrBuilder { + // Use CustomError.newBuilder() to construct. + private CustomError(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CustomError() { + rules_ = java.util.Collections.emptyList(); + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private CustomError( + 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)) { + rules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + rules_.add(input.readMessage(com.google.api.CustomErrorRule.parser(), extensionRegistry)); + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + types_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + types_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + types_ = types_.getUnmodifiableView(); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomError.class, com.google.api.CustomError.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + private java.util.List rules_; + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + public java.util.List getRulesList() { + return rules_; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + public int getRulesCount() { + return rules_.size(); + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + public com.google.api.CustomErrorRule getRules(int index) { + return rules_.get(index); + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + public com.google.api.CustomErrorRuleOrBuilder getRulesOrBuilder( + int index) { + return rules_.get(index); + } + + public static final int TYPES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList types_; + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + public com.google.protobuf.ProtocolStringList + getTypesList() { + return types_; + } + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + public int getTypesCount() { + return types_.size(); + } + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + public com.google.protobuf.ByteString + getTypesBytes(int index) { + return types_.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 < rules_.size(); i++) { + output.writeMessage(1, rules_.get(i)); + } + for (int i = 0; i < types_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, types_.getRaw(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(1, rules_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < types_.size(); i++) { + dataSize += computeStringSizeNoTag(types_.getRaw(i)); + } + size += dataSize; + size += 1 * getTypesList().size(); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.CustomError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomError 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.CustomError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomError parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.CustomError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.CustomError parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.CustomError parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.CustomError parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.CustomError parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.CustomError 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.CustomError 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.CustomError} + * + *
+   * Customize service error responses.  For example, list any service
+   * specific protobuf types that can appear in error detail lists of
+   * error responses.
+   * Example:
+   *     custom_error:
+   *       types:
+   *       - google.foo.v1.CustomError
+   *       - google.foo.v1.AnotherError
+   * (-- For internal Google service producers, instead of listing such
+   * custom error detail types in the YAML configuration file; Stubby
+   * annotation can be used.  Please, see //google/api/annotations.proto
+   * for more details. --)
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.CustomError) + com.google.api.CustomErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomError.class, com.google.api.CustomError.Builder.class); + } + + // Construct using com.google.api.CustomError.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRulesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rulesBuilder_.clear(); + } + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_descriptor; + } + + public com.google.api.CustomError getDefaultInstanceForType() { + return com.google.api.CustomError.getDefaultInstance(); + } + + public com.google.api.CustomError build() { + com.google.api.CustomError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.CustomError buildPartial() { + com.google.api.CustomError result = new com.google.api.CustomError(this); + int from_bitField0_ = bitField0_; + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + types_ = types_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.types_ = types_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.CustomError) { + return mergeFrom((com.google.api.CustomError)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.CustomError other) { + if (other == com.google.api.CustomError.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); + } + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.CustomError parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.CustomError) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.CustomErrorRule, com.google.api.CustomErrorRule.Builder, com.google.api.CustomErrorRuleOrBuilder> rulesBuilder_; + + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public com.google.api.CustomErrorRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.CustomErrorRule 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.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.CustomErrorRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder addRules(com.google.api.CustomErrorRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.CustomErrorRule 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.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder addRules( + com.google.api.CustomErrorRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.CustomErrorRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public com.google.api.CustomErrorRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public com.google.api.CustomErrorRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public com.google.api.CustomErrorRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.api.CustomErrorRule.getDefaultInstance()); + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public com.google.api.CustomErrorRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.api.CustomErrorRule.getDefaultInstance()); + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.CustomErrorRule, com.google.api.CustomErrorRule.Builder, com.google.api.CustomErrorRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.CustomErrorRule, com.google.api.CustomErrorRule.Builder, com.google.api.CustomErrorRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private com.google.protobuf.LazyStringList types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTypesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + types_ = new com.google.protobuf.LazyStringArrayList(types_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getTypesList() { + return types_.getUnmodifiableView(); + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public int getTypesCount() { + return types_.size(); + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public com.google.protobuf.ByteString + getTypesBytes(int index) { + return types_.getByteString(index); + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public Builder setTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public Builder addTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(value); + onChanged(); + return this; + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public Builder addAllTypes( + java.lang.Iterable values) { + ensureTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, types_); + onChanged(); + return this; + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public Builder clearTypes() { + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public Builder addTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTypesIsMutable(); + types_.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.CustomError) + } + + // @@protoc_insertion_point(class_scope:google.api.CustomError) + private static final com.google.api.CustomError DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.CustomError(); + } + + public static com.google.api.CustomError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CustomError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CustomError(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.CustomError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorOrBuilder.java new file mode 100644 index 000000000000..9e7fc1d0b94d --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorOrBuilder.java @@ -0,0 +1,93 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/error.proto + +package com.google.api; + +public interface CustomErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.CustomError) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + java.util.List + getRulesList(); + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + com.google.api.CustomErrorRule getRules(int index); + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + int getRulesCount(); + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + java.util.List + getRulesOrBuilderList(); + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + com.google.api.CustomErrorRuleOrBuilder getRulesOrBuilder( + int index); + + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getTypesList(); + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + int getTypesCount(); + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + java.lang.String getTypes(int index); + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + com.google.protobuf.ByteString + getTypesBytes(int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRule.java new file mode 100644 index 000000000000..6f1333cb2e13 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRule.java @@ -0,0 +1,627 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/error.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.CustomErrorRule} + * + *
+ * A custom error rule.
+ * 
+ */ +public final class CustomErrorRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.CustomErrorRule) + CustomErrorRuleOrBuilder { + // Use CustomErrorRule.newBuilder() to construct. + private CustomErrorRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CustomErrorRule() { + selector_ = ""; + stubbyBridge_ = 0; + isErrorType_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private CustomErrorRule( + 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: { + + stubbyBridge_ = input.readInt32(); + break; + } + case 24: { + + isErrorType_ = 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.ErrorFormatProto.internal_static_google_api_CustomErrorRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomErrorRule.class, com.google.api.CustomErrorRule.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object selector_; + /** + * optional string selector = 1; + * + *
+   * Selects messages 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 messages 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 STUBBY_BRIDGE_FIELD_NUMBER = 2; + private int stubbyBridge_; + /** + * optional int32 stubby_bridge = 2 [deprecated = true]; + * + *
+   * (--The Stubby bridge of the message.--)
+   * 
+ */ + @java.lang.Deprecated public int getStubbyBridge() { + return stubbyBridge_; + } + + public static final int IS_ERROR_TYPE_FIELD_NUMBER = 3; + private boolean isErrorType_; + /** + * optional bool is_error_type = 3; + * + *
+   * Mark this message as possible payload in error response.  Otherwise,
+   * objects of this type will be filtered when they appear in error payload.
+   * 
+ */ + public boolean getIsErrorType() { + return isErrorType_; + } + + 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 (stubbyBridge_ != 0) { + output.writeInt32(2, stubbyBridge_); + } + if (isErrorType_ != false) { + output.writeBool(3, isErrorType_); + } + } + + 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 (stubbyBridge_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, stubbyBridge_); + } + if (isErrorType_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, isErrorType_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.CustomErrorRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomErrorRule 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.CustomErrorRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomErrorRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.CustomErrorRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.CustomErrorRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.CustomErrorRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.CustomErrorRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.CustomErrorRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.CustomErrorRule 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.CustomErrorRule 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.CustomErrorRule} + * + *
+   * A custom error rule.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.CustomErrorRule) + com.google.api.CustomErrorRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomErrorRule.class, com.google.api.CustomErrorRule.Builder.class); + } + + // Construct using com.google.api.CustomErrorRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + selector_ = ""; + + stubbyBridge_ = 0; + + isErrorType_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_descriptor; + } + + public com.google.api.CustomErrorRule getDefaultInstanceForType() { + return com.google.api.CustomErrorRule.getDefaultInstance(); + } + + public com.google.api.CustomErrorRule build() { + com.google.api.CustomErrorRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.CustomErrorRule buildPartial() { + com.google.api.CustomErrorRule result = new com.google.api.CustomErrorRule(this); + result.selector_ = selector_; + result.stubbyBridge_ = stubbyBridge_; + result.isErrorType_ = isErrorType_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.CustomErrorRule) { + return mergeFrom((com.google.api.CustomErrorRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.CustomErrorRule other) { + if (other == com.google.api.CustomErrorRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + onChanged(); + } + if (other.getStubbyBridge() != 0) { + setStubbyBridge(other.getStubbyBridge()); + } + if (other.getIsErrorType() != false) { + setIsErrorType(other.getIsErrorType()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.CustomErrorRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.CustomErrorRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object selector_ = ""; + /** + * optional string selector = 1; + * + *
+     * Selects messages 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 messages 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 messages 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 messages 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 messages 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 int stubbyBridge_ ; + /** + * optional int32 stubby_bridge = 2 [deprecated = true]; + * + *
+     * (--The Stubby bridge of the message.--)
+     * 
+ */ + @java.lang.Deprecated public int getStubbyBridge() { + return stubbyBridge_; + } + /** + * optional int32 stubby_bridge = 2 [deprecated = true]; + * + *
+     * (--The Stubby bridge of the message.--)
+     * 
+ */ + @java.lang.Deprecated public Builder setStubbyBridge(int value) { + + stubbyBridge_ = value; + onChanged(); + return this; + } + /** + * optional int32 stubby_bridge = 2 [deprecated = true]; + * + *
+     * (--The Stubby bridge of the message.--)
+     * 
+ */ + @java.lang.Deprecated public Builder clearStubbyBridge() { + + stubbyBridge_ = 0; + onChanged(); + return this; + } + + private boolean isErrorType_ ; + /** + * optional bool is_error_type = 3; + * + *
+     * Mark this message as possible payload in error response.  Otherwise,
+     * objects of this type will be filtered when they appear in error payload.
+     * 
+ */ + public boolean getIsErrorType() { + return isErrorType_; + } + /** + * optional bool is_error_type = 3; + * + *
+     * Mark this message as possible payload in error response.  Otherwise,
+     * objects of this type will be filtered when they appear in error payload.
+     * 
+ */ + public Builder setIsErrorType(boolean value) { + + isErrorType_ = value; + onChanged(); + return this; + } + /** + * optional bool is_error_type = 3; + * + *
+     * Mark this message as possible payload in error response.  Otherwise,
+     * objects of this type will be filtered when they appear in error payload.
+     * 
+ */ + public Builder clearIsErrorType() { + + isErrorType_ = 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.CustomErrorRule) + } + + // @@protoc_insertion_point(class_scope:google.api.CustomErrorRule) + private static final com.google.api.CustomErrorRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.CustomErrorRule(); + } + + public static com.google.api.CustomErrorRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CustomErrorRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CustomErrorRule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.CustomErrorRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRuleOrBuilder.java new file mode 100644 index 000000000000..a4746577b373 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRuleOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/error.proto + +package com.google.api; + +public interface CustomErrorRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.CustomErrorRule) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string selector = 1; + * + *
+   * Selects messages to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + java.lang.String getSelector(); + /** + * optional string selector = 1; + * + *
+   * Selects messages to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + * optional int32 stubby_bridge = 2 [deprecated = true]; + * + *
+   * (--The Stubby bridge of the message.--)
+   * 
+ */ + @java.lang.Deprecated int getStubbyBridge(); + + /** + * optional bool is_error_type = 3; + * + *
+   * Mark this message as possible payload in error response.  Otherwise,
+   * objects of this type will be filtered when they appear in error payload.
+   * 
+ */ + boolean getIsErrorType(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPattern.java b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPattern.java new file mode 100644 index 000000000000..e3a51cd280c7 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPattern.java @@ -0,0 +1,627 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.CustomHttpPattern} + * + *
+ * A custom pattern is used for defining custom HTTP verb.
+ * 
+ */ +public final class CustomHttpPattern extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.CustomHttpPattern) + CustomHttpPatternOrBuilder { + // Use CustomHttpPattern.newBuilder() to construct. + private CustomHttpPattern(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CustomHttpPattern() { + kind_ = ""; + path_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private CustomHttpPattern( + 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(); + + kind_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + path_ = 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.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomHttpPattern.class, com.google.api.CustomHttpPattern.Builder.class); + } + + public static final int KIND_FIELD_NUMBER = 1; + private volatile java.lang.Object kind_; + /** + * optional string kind = 1; + * + *
+   * The name of this custom HTTP verb.
+   * 
+ */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + 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(); + kind_ = s; + return s; + } + } + /** + * optional string kind = 1; + * + *
+   * The name of this custom HTTP verb.
+   * 
+ */ + public com.google.protobuf.ByteString + getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 2; + private volatile java.lang.Object path_; + /** + * optional string path = 2; + * + *
+   * The path matched by this custom verb.
+   * 
+ */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + 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(); + path_ = s; + return s; + } + } + /** + * optional string path = 2; + * + *
+   * The path matched by this custom verb.
+   * 
+ */ + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = 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 (!getKindBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, kind_); + } + if (!getPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, path_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKindBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, kind_); + } + if (!getPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, path_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.CustomHttpPattern parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomHttpPattern 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.CustomHttpPattern parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomHttpPattern parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.CustomHttpPattern parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.CustomHttpPattern parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.CustomHttpPattern parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.CustomHttpPattern parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.CustomHttpPattern parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.CustomHttpPattern 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.CustomHttpPattern 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.CustomHttpPattern} + * + *
+   * A custom pattern is used for defining custom HTTP verb.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.CustomHttpPattern) + com.google.api.CustomHttpPatternOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomHttpPattern.class, com.google.api.CustomHttpPattern.Builder.class); + } + + // Construct using com.google.api.CustomHttpPattern.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + kind_ = ""; + + path_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; + } + + public com.google.api.CustomHttpPattern getDefaultInstanceForType() { + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + + public com.google.api.CustomHttpPattern build() { + com.google.api.CustomHttpPattern result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.CustomHttpPattern buildPartial() { + com.google.api.CustomHttpPattern result = new com.google.api.CustomHttpPattern(this); + result.kind_ = kind_; + result.path_ = path_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.CustomHttpPattern) { + return mergeFrom((com.google.api.CustomHttpPattern)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.CustomHttpPattern other) { + if (other == com.google.api.CustomHttpPattern.getDefaultInstance()) return this; + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + onChanged(); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.CustomHttpPattern parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.CustomHttpPattern) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object kind_ = ""; + /** + * optional string kind = 1; + * + *
+     * The name of this custom HTTP verb.
+     * 
+ */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string kind = 1; + * + *
+     * The name of this custom HTTP verb.
+     * 
+ */ + public com.google.protobuf.ByteString + getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string kind = 1; + * + *
+     * The name of this custom HTTP verb.
+     * 
+ */ + public Builder setKind( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kind_ = value; + onChanged(); + return this; + } + /** + * optional string kind = 1; + * + *
+     * The name of this custom HTTP verb.
+     * 
+ */ + public Builder clearKind() { + + kind_ = getDefaultInstance().getKind(); + onChanged(); + return this; + } + /** + * optional string kind = 1; + * + *
+     * The name of this custom HTTP verb.
+     * 
+ */ + public Builder setKindBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kind_ = value; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + /** + * optional string path = 2; + * + *
+     * The path matched by this custom verb.
+     * 
+ */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string path = 2; + * + *
+     * The path matched by this custom verb.
+     * 
+ */ + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string path = 2; + * + *
+     * The path matched by this custom verb.
+     * 
+ */ + public Builder setPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** + * optional string path = 2; + * + *
+     * The path matched by this custom verb.
+     * 
+ */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * optional string path = 2; + * + *
+     * The path matched by this custom verb.
+     * 
+ */ + public Builder setPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = 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.CustomHttpPattern) + } + + // @@protoc_insertion_point(class_scope:google.api.CustomHttpPattern) + private static final com.google.api.CustomHttpPattern DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.CustomHttpPattern(); + } + + public static com.google.api.CustomHttpPattern getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CustomHttpPattern parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CustomHttpPattern(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.CustomHttpPattern getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java new file mode 100644 index 000000000000..e45514be7749 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java @@ -0,0 +1,45 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface CustomHttpPatternOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.CustomHttpPattern) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string kind = 1; + * + *
+   * The name of this custom HTTP verb.
+   * 
+ */ + java.lang.String getKind(); + /** + * optional string kind = 1; + * + *
+   * The name of this custom HTTP verb.
+   * 
+ */ + com.google.protobuf.ByteString + getKindBytes(); + + /** + * optional string path = 2; + * + *
+   * The path matched by this custom verb.
+   * 
+ */ + java.lang.String getPath(); + /** + * optional string path = 2; + * + *
+   * The path matched by this custom verb.
+   * 
+ */ + com.google.protobuf.ByteString + getPathBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Documentation.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Documentation.java new file mode 100644 index 000000000000..544435e99564 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/Documentation.java @@ -0,0 +1,1816 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Documentation} + * + *
+ * `Documentation` provides the information for describing a service.
+ * Example:
+ *     documentation:
+ *       summary: >
+ *         The Google Calendar API gives access
+ *         to most calendar features.
+ *       pages:
+ *       - name: Overview
+ *         content: (== include google/foo/overview.md ==)
+ *       - name: Tutorial
+ *         content: (== include google/foo/tutorial.md ==)
+ *         subpages;
+ *         - name: Java
+ *           content: (== include google/foo/tutorial_java.md ==)
+ *       rules:
+ *       - selector: google.calendar.Calendar.Get
+ *         description: >
+ *           ...
+ *       - selector: google.calendar.Calendar.Put
+ *         description: >
+ *           ...
+ * Documentation is provided in markdown syntax. In addition to
+ * standard markdown features, definition lists, tables and fenced
+ * code blocks are supported. Section headers can be provided and are
+ * interpreted relative to the section nesting of the context where
+ * a documentation fragment is embedded.
+ * Documentation from the IDL is merged with documentation defined
+ * via the config at normalization time, where documentation provided
+ * by config rules overrides IDL provided.
+ * A number of constructs specific to the API platform are supported
+ * in documentation text.
+ * In order to reference a proto element, the following
+ * notation can be used:
+ * <pre><code>&#91;display text]&#91;fully.qualified.proto.name]
+ * &#91;fully.qualified.proto.name]&#91;]</code></pre>
+ * Text can be excluded from doc using the following notation:
+ * <pre><code>&#40;-- internal comment --&#41;</code></pre>
+ * Comments can be made conditional using a visibility label. The below
+ * text will be only rendered if the `BETA` label is available:
+ * <pre><code>&#40;--BETA: comment for BETA users --&#41;</code></pre>
+ * A few directives are available in documentation. Note that
+ * directives must appear on a single line to be properly
+ * identified. The `include` directive includes a markdown file from
+ * an external source:
+ *     (== include path/to/file> ==)
+ * The `resource_for` directive marks a message to be the resource of
+ * a collection in REST view. If it is not specified, tools attempt
+ * to infer the resource from the operations in a collection:
+ *     (== resource_for v1.shelves.books ==)
+ * The directive `suppress_warning` is not directly effecting documentation
+ * and is documented together with service config validation.
+ * 
+ */ +public final class Documentation extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Documentation) + DocumentationOrBuilder { + // Use Documentation.newBuilder() to construct. + private Documentation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Documentation() { + summary_ = ""; + pages_ = java.util.Collections.emptyList(); + rules_ = java.util.Collections.emptyList(); + documentationRootUrl_ = ""; + overview_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Documentation( + 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(); + + summary_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + overview_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + rules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + rules_.add(input.readMessage(com.google.api.DocumentationRule.parser(), extensionRegistry)); + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + documentationRootUrl_ = s; + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + pages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + pages_.add(input.readMessage(com.google.api.Page.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Documentation.class, com.google.api.Documentation.Builder.class); + } + + private int bitField0_; + public static final int SUMMARY_FIELD_NUMBER = 1; + private volatile java.lang.Object summary_; + /** + * optional string summary = 1; + * + *
+   * A short summary of what the service does. Can only be provided by
+   * plain text.
+   * 
+ */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + 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(); + summary_ = s; + return s; + } + } + /** + * optional string summary = 1; + * + *
+   * A short summary of what the service does. Can only be provided by
+   * plain text.
+   * 
+ */ + public com.google.protobuf.ByteString + getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGES_FIELD_NUMBER = 5; + private java.util.List pages_; + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + public java.util.List getPagesList() { + return pages_; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + public java.util.List + getPagesOrBuilderList() { + return pages_; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + public int getPagesCount() { + return pages_.size(); + } + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + public com.google.api.Page getPages(int index) { + return pages_.get(index); + } + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + public com.google.api.PageOrBuilder getPagesOrBuilder( + int index) { + return pages_.get(index); + } + + public static final int RULES_FIELD_NUMBER = 3; + private java.util.List rules_; + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + public java.util.List getRulesList() { + return rules_; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + public int getRulesCount() { + return rules_.size(); + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + public com.google.api.DocumentationRule getRules(int index) { + return rules_.get(index); + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + public com.google.api.DocumentationRuleOrBuilder getRulesOrBuilder( + int index) { + return rules_.get(index); + } + + public static final int DOCUMENTATION_ROOT_URL_FIELD_NUMBER = 4; + private volatile java.lang.Object documentationRootUrl_; + /** + * optional string documentation_root_url = 4; + * + *
+   * The URL to the root of documentation.
+   * 
+ */ + public java.lang.String getDocumentationRootUrl() { + java.lang.Object ref = documentationRootUrl_; + 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(); + documentationRootUrl_ = s; + return s; + } + } + /** + * optional string documentation_root_url = 4; + * + *
+   * The URL to the root of documentation.
+   * 
+ */ + public com.google.protobuf.ByteString + getDocumentationRootUrlBytes() { + java.lang.Object ref = documentationRootUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + documentationRootUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OVERVIEW_FIELD_NUMBER = 2; + private volatile java.lang.Object overview_; + /** + * optional string overview = 2; + * + *
+   * Declares a single overview page. For example:
+   *     documentation:
+   *       summary: ...
+   *       overview: (== include overview.md ==)
+   * This is a shortcut for the following declaration (using pages style):
+   *     documentation:
+   *       summary: ...
+   *       pages:
+   *       - name: Overview
+   *         content: (== include overview.md ==)
+   * Note: you cannot specify both `overview` field and `pages` field.
+   * 
+ */ + public java.lang.String getOverview() { + java.lang.Object ref = overview_; + 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(); + overview_ = s; + return s; + } + } + /** + * optional string overview = 2; + * + *
+   * Declares a single overview page. For example:
+   *     documentation:
+   *       summary: ...
+   *       overview: (== include overview.md ==)
+   * This is a shortcut for the following declaration (using pages style):
+   *     documentation:
+   *       summary: ...
+   *       pages:
+   *       - name: Overview
+   *         content: (== include overview.md ==)
+   * Note: you cannot specify both `overview` field and `pages` field.
+   * 
+ */ + public com.google.protobuf.ByteString + getOverviewBytes() { + java.lang.Object ref = overview_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + overview_ = 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 (!getSummaryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, summary_); + } + if (!getOverviewBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, overview_); + } + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(3, rules_.get(i)); + } + if (!getDocumentationRootUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, documentationRootUrl_); + } + for (int i = 0; i < pages_.size(); i++) { + output.writeMessage(5, pages_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSummaryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, summary_); + } + if (!getOverviewBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, overview_); + } + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, rules_.get(i)); + } + if (!getDocumentationRootUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, documentationRootUrl_); + } + for (int i = 0; i < pages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, pages_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Documentation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Documentation 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.Documentation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Documentation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Documentation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Documentation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Documentation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Documentation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Documentation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Documentation 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.Documentation 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.Documentation} + * + *
+   * `Documentation` provides the information for describing a service.
+   * Example:
+   *     documentation:
+   *       summary: >
+   *         The Google Calendar API gives access
+   *         to most calendar features.
+   *       pages:
+   *       - name: Overview
+   *         content: (== include google/foo/overview.md ==)
+   *       - name: Tutorial
+   *         content: (== include google/foo/tutorial.md ==)
+   *         subpages;
+   *         - name: Java
+   *           content: (== include google/foo/tutorial_java.md ==)
+   *       rules:
+   *       - selector: google.calendar.Calendar.Get
+   *         description: >
+   *           ...
+   *       - selector: google.calendar.Calendar.Put
+   *         description: >
+   *           ...
+   * Documentation is provided in markdown syntax. In addition to
+   * standard markdown features, definition lists, tables and fenced
+   * code blocks are supported. Section headers can be provided and are
+   * interpreted relative to the section nesting of the context where
+   * a documentation fragment is embedded.
+   * Documentation from the IDL is merged with documentation defined
+   * via the config at normalization time, where documentation provided
+   * by config rules overrides IDL provided.
+   * A number of constructs specific to the API platform are supported
+   * in documentation text.
+   * In order to reference a proto element, the following
+   * notation can be used:
+   * <pre><code>&#91;display text]&#91;fully.qualified.proto.name]
+   * &#91;fully.qualified.proto.name]&#91;]</code></pre>
+   * Text can be excluded from doc using the following notation:
+   * <pre><code>&#40;-- internal comment --&#41;</code></pre>
+   * Comments can be made conditional using a visibility label. The below
+   * text will be only rendered if the `BETA` label is available:
+   * <pre><code>&#40;--BETA: comment for BETA users --&#41;</code></pre>
+   * A few directives are available in documentation. Note that
+   * directives must appear on a single line to be properly
+   * identified. The `include` directive includes a markdown file from
+   * an external source:
+   *     (== include path/to/file> ==)
+   * The `resource_for` directive marks a message to be the resource of
+   * a collection in REST view. If it is not specified, tools attempt
+   * to infer the resource from the operations in a collection:
+   *     (== resource_for v1.shelves.books ==)
+   * The directive `suppress_warning` is not directly effecting documentation
+   * and is documented together with service config validation.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Documentation) + com.google.api.DocumentationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Documentation.class, com.google.api.Documentation.Builder.class); + } + + // Construct using com.google.api.Documentation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getPagesFieldBuilder(); + getRulesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + summary_ = ""; + + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + pagesBuilder_.clear(); + } + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + rulesBuilder_.clear(); + } + documentationRootUrl_ = ""; + + overview_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_descriptor; + } + + public com.google.api.Documentation getDefaultInstanceForType() { + return com.google.api.Documentation.getDefaultInstance(); + } + + public com.google.api.Documentation build() { + com.google.api.Documentation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Documentation buildPartial() { + com.google.api.Documentation result = new com.google.api.Documentation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.summary_ = summary_; + if (pagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.pages_ = pages_; + } else { + result.pages_ = pagesBuilder_.build(); + } + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + result.documentationRootUrl_ = documentationRootUrl_; + result.overview_ = overview_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Documentation) { + return mergeFrom((com.google.api.Documentation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Documentation other) { + if (other == com.google.api.Documentation.getDefaultInstance()) return this; + if (!other.getSummary().isEmpty()) { + summary_ = other.summary_; + onChanged(); + } + if (pagesBuilder_ == null) { + if (!other.pages_.isEmpty()) { + if (pages_.isEmpty()) { + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePagesIsMutable(); + pages_.addAll(other.pages_); + } + onChanged(); + } + } else { + if (!other.pages_.isEmpty()) { + if (pagesBuilder_.isEmpty()) { + pagesBuilder_.dispose(); + pagesBuilder_ = null; + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000002); + pagesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPagesFieldBuilder() : null; + } else { + pagesBuilder_.addAllMessages(other.pages_); + } + } + } + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000004); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (!other.getDocumentationRootUrl().isEmpty()) { + documentationRootUrl_ = other.documentationRootUrl_; + onChanged(); + } + if (!other.getOverview().isEmpty()) { + overview_ = other.overview_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.Documentation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Documentation) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object summary_ = ""; + /** + * optional string summary = 1; + * + *
+     * A short summary of what the service does. Can only be provided by
+     * plain text.
+     * 
+ */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string summary = 1; + * + *
+     * A short summary of what the service does. Can only be provided by
+     * plain text.
+     * 
+ */ + public com.google.protobuf.ByteString + getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string summary = 1; + * + *
+     * A short summary of what the service does. Can only be provided by
+     * plain text.
+     * 
+ */ + public Builder setSummary( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + summary_ = value; + onChanged(); + return this; + } + /** + * optional string summary = 1; + * + *
+     * A short summary of what the service does. Can only be provided by
+     * plain text.
+     * 
+ */ + public Builder clearSummary() { + + summary_ = getDefaultInstance().getSummary(); + onChanged(); + return this; + } + /** + * optional string summary = 1; + * + *
+     * A short summary of what the service does. Can only be provided by
+     * plain text.
+     * 
+ */ + public Builder setSummaryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + summary_ = value; + onChanged(); + return this; + } + + private java.util.List pages_ = + java.util.Collections.emptyList(); + private void ensurePagesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + pages_ = new java.util.ArrayList(pages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> pagesBuilder_; + + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public java.util.List getPagesList() { + if (pagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pages_); + } else { + return pagesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public int getPagesCount() { + if (pagesBuilder_ == null) { + return pages_.size(); + } else { + return pagesBuilder_.getCount(); + } + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public com.google.api.Page getPages(int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); + } else { + return pagesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder setPages( + int index, com.google.api.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.set(index, value); + onChanged(); + } else { + pagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder setPages( + int index, com.google.api.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder addPages(com.google.api.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(value); + onChanged(); + } else { + pagesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder addPages( + int index, com.google.api.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(index, value); + onChanged(); + } else { + pagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder addPages( + com.google.api.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder addPages( + int index, com.google.api.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder addAllPages( + java.lang.Iterable values) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pages_); + onChanged(); + } else { + pagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder clearPages() { + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + pagesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder removePages(int index) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.remove(index); + onChanged(); + } else { + pagesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public com.google.api.Page.Builder getPagesBuilder( + int index) { + return getPagesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public com.google.api.PageOrBuilder getPagesOrBuilder( + int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); } else { + return pagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public java.util.List + getPagesOrBuilderList() { + if (pagesBuilder_ != null) { + return pagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pages_); + } + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public com.google.api.Page.Builder addPagesBuilder() { + return getPagesFieldBuilder().addBuilder( + com.google.api.Page.getDefaultInstance()); + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public com.google.api.Page.Builder addPagesBuilder( + int index) { + return getPagesFieldBuilder().addBuilder( + index, com.google.api.Page.getDefaultInstance()); + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public java.util.List + getPagesBuilderList() { + return getPagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> + getPagesFieldBuilder() { + if (pagesBuilder_ == null) { + pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder>( + pages_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + pages_ = null; + } + return pagesBuilder_; + } + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.DocumentationRule, com.google.api.DocumentationRule.Builder, com.google.api.DocumentationRuleOrBuilder> rulesBuilder_; + + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public com.google.api.DocumentationRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.DocumentationRule 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.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.DocumentationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder addRules(com.google.api.DocumentationRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.DocumentationRule 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.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder addRules( + com.google.api.DocumentationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.DocumentationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public com.google.api.DocumentationRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public com.google.api.DocumentationRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public com.google.api.DocumentationRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.api.DocumentationRule.getDefaultInstance()); + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public com.google.api.DocumentationRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.api.DocumentationRule.getDefaultInstance()); + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.DocumentationRule, com.google.api.DocumentationRule.Builder, com.google.api.DocumentationRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.DocumentationRule, com.google.api.DocumentationRule.Builder, com.google.api.DocumentationRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private java.lang.Object documentationRootUrl_ = ""; + /** + * optional string documentation_root_url = 4; + * + *
+     * The URL to the root of documentation.
+     * 
+ */ + public java.lang.String getDocumentationRootUrl() { + java.lang.Object ref = documentationRootUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + documentationRootUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string documentation_root_url = 4; + * + *
+     * The URL to the root of documentation.
+     * 
+ */ + public com.google.protobuf.ByteString + getDocumentationRootUrlBytes() { + java.lang.Object ref = documentationRootUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + documentationRootUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string documentation_root_url = 4; + * + *
+     * The URL to the root of documentation.
+     * 
+ */ + public Builder setDocumentationRootUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + documentationRootUrl_ = value; + onChanged(); + return this; + } + /** + * optional string documentation_root_url = 4; + * + *
+     * The URL to the root of documentation.
+     * 
+ */ + public Builder clearDocumentationRootUrl() { + + documentationRootUrl_ = getDefaultInstance().getDocumentationRootUrl(); + onChanged(); + return this; + } + /** + * optional string documentation_root_url = 4; + * + *
+     * The URL to the root of documentation.
+     * 
+ */ + public Builder setDocumentationRootUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + documentationRootUrl_ = value; + onChanged(); + return this; + } + + private java.lang.Object overview_ = ""; + /** + * optional string overview = 2; + * + *
+     * Declares a single overview page. For example:
+     *     documentation:
+     *       summary: ...
+     *       overview: (== include overview.md ==)
+     * This is a shortcut for the following declaration (using pages style):
+     *     documentation:
+     *       summary: ...
+     *       pages:
+     *       - name: Overview
+     *         content: (== include overview.md ==)
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ */ + public java.lang.String getOverview() { + java.lang.Object ref = overview_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + overview_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string overview = 2; + * + *
+     * Declares a single overview page. For example:
+     *     documentation:
+     *       summary: ...
+     *       overview: (== include overview.md ==)
+     * This is a shortcut for the following declaration (using pages style):
+     *     documentation:
+     *       summary: ...
+     *       pages:
+     *       - name: Overview
+     *         content: (== include overview.md ==)
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ */ + public com.google.protobuf.ByteString + getOverviewBytes() { + java.lang.Object ref = overview_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + overview_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string overview = 2; + * + *
+     * Declares a single overview page. For example:
+     *     documentation:
+     *       summary: ...
+     *       overview: (== include overview.md ==)
+     * This is a shortcut for the following declaration (using pages style):
+     *     documentation:
+     *       summary: ...
+     *       pages:
+     *       - name: Overview
+     *         content: (== include overview.md ==)
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ */ + public Builder setOverview( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + overview_ = value; + onChanged(); + return this; + } + /** + * optional string overview = 2; + * + *
+     * Declares a single overview page. For example:
+     *     documentation:
+     *       summary: ...
+     *       overview: (== include overview.md ==)
+     * This is a shortcut for the following declaration (using pages style):
+     *     documentation:
+     *       summary: ...
+     *       pages:
+     *       - name: Overview
+     *         content: (== include overview.md ==)
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ */ + public Builder clearOverview() { + + overview_ = getDefaultInstance().getOverview(); + onChanged(); + return this; + } + /** + * optional string overview = 2; + * + *
+     * Declares a single overview page. For example:
+     *     documentation:
+     *       summary: ...
+     *       overview: (== include overview.md ==)
+     * This is a shortcut for the following declaration (using pages style):
+     *     documentation:
+     *       summary: ...
+     *       pages:
+     *       - name: Overview
+     *         content: (== include overview.md ==)
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ */ + public Builder setOverviewBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + overview_ = 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.Documentation) + } + + // @@protoc_insertion_point(class_scope:google.api.Documentation) + private static final com.google.api.Documentation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Documentation(); + } + + public static com.google.api.Documentation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Documentation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Documentation(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.Documentation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationOrBuilder.java new file mode 100644 index 000000000000..96368c4a792b --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationOrBuilder.java @@ -0,0 +1,173 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +public interface DocumentationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Documentation) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string summary = 1; + * + *
+   * A short summary of what the service does. Can only be provided by
+   * plain text.
+   * 
+ */ + java.lang.String getSummary(); + /** + * optional string summary = 1; + * + *
+   * A short summary of what the service does. Can only be provided by
+   * plain text.
+   * 
+ */ + com.google.protobuf.ByteString + getSummaryBytes(); + + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + java.util.List + getPagesList(); + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + com.google.api.Page getPages(int index); + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + int getPagesCount(); + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + java.util.List + getPagesOrBuilderList(); + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + com.google.api.PageOrBuilder getPagesOrBuilder( + int index); + + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + java.util.List + getRulesList(); + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + com.google.api.DocumentationRule getRules(int index); + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + int getRulesCount(); + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + java.util.List + getRulesOrBuilderList(); + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + com.google.api.DocumentationRuleOrBuilder getRulesOrBuilder( + int index); + + /** + * optional string documentation_root_url = 4; + * + *
+   * The URL to the root of documentation.
+   * 
+ */ + java.lang.String getDocumentationRootUrl(); + /** + * optional string documentation_root_url = 4; + * + *
+   * The URL to the root of documentation.
+   * 
+ */ + com.google.protobuf.ByteString + getDocumentationRootUrlBytes(); + + /** + * optional string overview = 2; + * + *
+   * Declares a single overview page. For example:
+   *     documentation:
+   *       summary: ...
+   *       overview: (== include overview.md ==)
+   * This is a shortcut for the following declaration (using pages style):
+   *     documentation:
+   *       summary: ...
+   *       pages:
+   *       - name: Overview
+   *         content: (== include overview.md ==)
+   * Note: you cannot specify both `overview` field and `pages` field.
+   * 
+ */ + java.lang.String getOverview(); + /** + * optional string overview = 2; + * + *
+   * Declares a single overview page. For example:
+   *     documentation:
+   *       summary: ...
+   *       overview: (== include overview.md ==)
+   * This is a shortcut for the following declaration (using pages style):
+   *     documentation:
+   *       summary: ...
+   *       pages:
+   *       - name: Overview
+   *         content: (== include overview.md ==)
+   * Note: you cannot specify both `overview` field and `pages` field.
+   * 
+ */ + com.google.protobuf.ByteString + getOverviewBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationProto.java new file mode 100644 index 000000000000..f31f29d4752c --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationProto.java @@ -0,0 +1,79 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +public final class DocumentationProto { + private DocumentationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Documentation_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Documentation_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_DocumentationRule_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_DocumentationRule_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Page_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Page_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036google/api/documentation.proto\022\ngoogle" + + ".api\"\241\001\n\rDocumentation\022\017\n\007summary\030\001 \001(\t\022" + + "\037\n\005pages\030\005 \003(\0132\020.google.api.Page\022,\n\005rule" + + "s\030\003 \003(\0132\035.google.api.DocumentationRule\022\036" + + "\n\026documentation_root_url\030\004 \001(\t\022\020\n\010overvi" + + "ew\030\002 \001(\t\":\n\021DocumentationRule\022\020\n\010selecto" + + "r\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\"I\n\004Page\022\014\n\004" + + "name\030\001 \001(\t\022\017\n\007content\030\002 \001(\t\022\"\n\010subpages\030" + + "\003 \003(\0132\020.google.api.PageB&\n\016com.google.ap" + + "iB\022DocumentationProtoP\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_Documentation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Documentation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Documentation_descriptor, + new java.lang.String[] { "Summary", "Pages", "Rules", "DocumentationRootUrl", "Overview", }); + internal_static_google_api_DocumentationRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_DocumentationRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_DocumentationRule_descriptor, + new java.lang.String[] { "Selector", "Description", }); + internal_static_google_api_Page_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_api_Page_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Page_descriptor, + new java.lang.String[] { "Name", "Content", "Subpages", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRule.java new file mode 100644 index 000000000000..5f9b9853026b --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRule.java @@ -0,0 +1,662 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.DocumentationRule} + * + *
+ * A documentation rule provides information about individual API elements.
+ * 
+ */ +public final class DocumentationRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.DocumentationRule) + DocumentationRuleOrBuilder { + // Use DocumentationRule.newBuilder() to construct. + private DocumentationRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DocumentationRule() { + selector_ = ""; + description_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private DocumentationRule( + 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: { + 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.DocumentationProto.internal_static_google_api_DocumentationRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.DocumentationRule.class, com.google.api.DocumentationRule.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object selector_; + /** + * optional string selector = 1; + * + *
+   * The selector is a comma-separated list of pattern. Each parttern is a
+   * qualified name of the element which may end in "*", indicating a wildcard.
+   * Wildcards are only allowed at the end and for a whole component of the
+   * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+   * specify a default for all applicable elements, the whole pattern "*"
+   * is used.
+   * 
+ */ + 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; + * + *
+   * The selector is a comma-separated list of pattern. Each parttern is a
+   * qualified name of the element which may end in "*", indicating a wildcard.
+   * Wildcards are only allowed at the end and for a whole component of the
+   * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+   * specify a default for all applicable elements, the whole pattern "*"
+   * is used.
+   * 
+ */ + 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 DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * optional string description = 2; + * + *
+   * Description of the selected API(s).
+   * 
+ */ + 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 = 2; + * + *
+   * Description of the selected API(s).
+   * 
+ */ + 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 (!getSelectorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + } + + 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 (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.DocumentationRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.DocumentationRule 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.DocumentationRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.DocumentationRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.DocumentationRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.DocumentationRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.DocumentationRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.DocumentationRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.DocumentationRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.DocumentationRule 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.DocumentationRule 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.DocumentationRule} + * + *
+   * A documentation rule provides information about individual API elements.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.DocumentationRule) + com.google.api.DocumentationRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.DocumentationRule.class, com.google.api.DocumentationRule.Builder.class); + } + + // Construct using com.google.api.DocumentationRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + selector_ = ""; + + description_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_descriptor; + } + + public com.google.api.DocumentationRule getDefaultInstanceForType() { + return com.google.api.DocumentationRule.getDefaultInstance(); + } + + public com.google.api.DocumentationRule build() { + com.google.api.DocumentationRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.DocumentationRule buildPartial() { + com.google.api.DocumentationRule result = new com.google.api.DocumentationRule(this); + result.selector_ = selector_; + result.description_ = description_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.DocumentationRule) { + return mergeFrom((com.google.api.DocumentationRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.DocumentationRule other) { + if (other == com.google.api.DocumentationRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.DocumentationRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.DocumentationRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object selector_ = ""; + /** + * optional string selector = 1; + * + *
+     * The selector is a comma-separated list of pattern. Each parttern is a
+     * qualified name of the element which may end in "*", indicating a wildcard.
+     * Wildcards are only allowed at the end and for a whole component of the
+     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+     * specify a default for all applicable elements, the whole pattern "*"
+     * is used.
+     * 
+ */ + 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; + * + *
+     * The selector is a comma-separated list of pattern. Each parttern is a
+     * qualified name of the element which may end in "*", indicating a wildcard.
+     * Wildcards are only allowed at the end and for a whole component of the
+     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+     * specify a default for all applicable elements, the whole pattern "*"
+     * is used.
+     * 
+ */ + 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; + * + *
+     * The selector is a comma-separated list of pattern. Each parttern is a
+     * qualified name of the element which may end in "*", indicating a wildcard.
+     * Wildcards are only allowed at the end and for a whole component of the
+     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+     * specify a default for all applicable elements, the whole pattern "*"
+     * is used.
+     * 
+ */ + public Builder setSelector( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + selector_ = value; + onChanged(); + return this; + } + /** + * optional string selector = 1; + * + *
+     * The selector is a comma-separated list of pattern. Each parttern is a
+     * qualified name of the element which may end in "*", indicating a wildcard.
+     * Wildcards are only allowed at the end and for a whole component of the
+     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+     * specify a default for all applicable elements, the whole pattern "*"
+     * is used.
+     * 
+ */ + public Builder clearSelector() { + + selector_ = getDefaultInstance().getSelector(); + onChanged(); + return this; + } + /** + * optional string selector = 1; + * + *
+     * The selector is a comma-separated list of pattern. Each parttern is a
+     * qualified name of the element which may end in "*", indicating a wildcard.
+     * Wildcards are only allowed at the end and for a whole component of the
+     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+     * specify a default for all applicable elements, the whole pattern "*"
+     * is used.
+     * 
+ */ + public Builder setSelectorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + selector_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * optional string description = 2; + * + *
+     * Description of the selected API(s).
+     * 
+ */ + 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 = 2; + * + *
+     * Description of the selected API(s).
+     * 
+ */ + 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 = 2; + * + *
+     * Description of the selected API(s).
+     * 
+ */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * optional string description = 2; + * + *
+     * Description of the selected API(s).
+     * 
+ */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * optional string description = 2; + * + *
+     * Description of the selected API(s).
+     * 
+ */ + 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.DocumentationRule) + } + + // @@protoc_insertion_point(class_scope:google.api.DocumentationRule) + private static final com.google.api.DocumentationRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.DocumentationRule(); + } + + public static com.google.api.DocumentationRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DocumentationRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new DocumentationRule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.DocumentationRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRuleOrBuilder.java new file mode 100644 index 000000000000..859e1afd25af --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRuleOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +public interface DocumentationRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.DocumentationRule) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string selector = 1; + * + *
+   * The selector is a comma-separated list of pattern. Each parttern is a
+   * qualified name of the element which may end in "*", indicating a wildcard.
+   * Wildcards are only allowed at the end and for a whole component of the
+   * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+   * specify a default for all applicable elements, the whole pattern "*"
+   * is used.
+   * 
+ */ + java.lang.String getSelector(); + /** + * optional string selector = 1; + * + *
+   * The selector is a comma-separated list of pattern. Each parttern is a
+   * qualified name of the element which may end in "*", indicating a wildcard.
+   * Wildcards are only allowed at the end and for a whole component of the
+   * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+   * specify a default for all applicable elements, the whole pattern "*"
+   * is used.
+   * 
+ */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + * optional string description = 2; + * + *
+   * Description of the selected API(s).
+   * 
+ */ + java.lang.String getDescription(); + /** + * optional string description = 2; + * + *
+   * Description of the selected API(s).
+   * 
+ */ + com.google.protobuf.ByteString + getDescriptionBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ErrorFormatProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ErrorFormatProto.java new file mode 100644 index 000000000000..c1cbe4a2c182 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/ErrorFormatProto.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/error.proto + +package com.google.api; + +public final class ErrorFormatProto { + private ErrorFormatProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_CustomError_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_CustomError_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_CustomErrorRule_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_CustomErrorRule_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/error.proto\022\ngoogle.api\"H\n\013" + + "CustomError\022*\n\005rules\030\001 \003(\0132\033.google.api." + + "CustomErrorRule\022\r\n\005types\030\002 \003(\t\"U\n\017Custom" + + "ErrorRule\022\020\n\010selector\030\001 \001(\t\022\031\n\rstubby_br" + + "idge\030\002 \001(\005B\002\030\001\022\025\n\ris_error_type\030\003 \001(\010B\'\n" + + "\016com.google.apiB\020ErrorFormatProtoP\001\370\001\001b\006" + + "proto3" + }; + 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_CustomError_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_CustomError_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_CustomError_descriptor, + new java.lang.String[] { "Rules", "Types", }); + internal_static_google_api_CustomErrorRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_CustomErrorRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_CustomErrorRule_descriptor, + new java.lang.String[] { "Selector", "StubbyBridge", "IsErrorType", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Http.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Http.java new file mode 100644 index 000000000000..b382bc022260 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/Http.java @@ -0,0 +1,759 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Http} + * + *
+ * Defines the HTTP configuration for a service. It contains a list of
+ * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
+ * to one or more HTTP REST API methods.
+ * 
+ */ +public final class Http extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Http) + HttpOrBuilder { + // Use Http.newBuilder() to construct. + private Http(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Http() { + rules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Http( + 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)) { + rules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + rules_.add(input.readMessage(com.google.api.HttpRule.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Http.class, com.google.api.Http.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + private java.util.List rules_; + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + public java.util.List getRulesList() { + return rules_; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + public int getRulesCount() { + return rules_.size(); + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + public com.google.api.HttpRule getRules(int index) { + return rules_.get(index); + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + public com.google.api.HttpRuleOrBuilder 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 < rules_.size(); i++) { + output.writeMessage(1, rules_.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(1, rules_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Http parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Http 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.Http parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Http parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Http parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Http parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Http parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Http parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Http parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Http 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.Http 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.Http} + * + *
+   * Defines the HTTP configuration for a service. It contains a list of
+   * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
+   * to one or more HTTP REST API methods.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Http) + com.google.api.HttpOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Http.class, com.google.api.Http.Builder.class); + } + + // Construct using com.google.api.Http.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRulesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rulesBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; + } + + public com.google.api.Http getDefaultInstanceForType() { + return com.google.api.Http.getDefaultInstance(); + } + + public com.google.api.Http build() { + com.google.api.Http result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Http buildPartial() { + com.google.api.Http result = new com.google.api.Http(this); + int from_bitField0_ = bitField0_; + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Http) { + return mergeFrom((com.google.api.Http)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Http other) { + if (other == com.google.api.Http.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.Http parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Http) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> rulesBuilder_; + + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public com.google.api.HttpRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.HttpRule 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.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder addRules(com.google.api.HttpRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.HttpRule 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.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder addRules( + com.google.api.HttpRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public com.google.api.HttpRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public com.google.api.HttpRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public com.google.api.HttpRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.api.HttpRule.getDefaultInstance()); + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public com.google.api.HttpRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.api.HttpRule.getDefaultInstance()); + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.api.Http) + } + + // @@protoc_insertion_point(class_scope:google.api.Http) + private static final com.google.api.Http DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Http(); + } + + public static com.google.api.Http getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Http parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Http(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.Http getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/HttpOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/HttpOrBuilder.java new file mode 100644 index 000000000000..22192448d7ee --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/HttpOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface HttpOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Http) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + java.util.List + getRulesList(); + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + com.google.api.HttpRule getRules(int index); + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + int getRulesCount(); + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + java.util.List + getRulesOrBuilderList(); + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + com.google.api.HttpRuleOrBuilder getRulesOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/HttpProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/HttpProto.java new file mode 100644 index 000000000000..7ef3d1fdaa97 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/HttpProto.java @@ -0,0 +1,106 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public final class HttpProto { + private HttpProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Http_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Http_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_HttpRule_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_HttpRule_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_CustomHttpPattern_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_CustomHttpPattern_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MediaUpload_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_MediaUpload_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MediaDownload_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_MediaDownload_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/http.proto\022\ngoogle.api\"+\n\004H" + + "ttp\022#\n\005rules\030\001 \003(\0132\024.google.api.HttpRule" + + "\"\314\002\n\010HttpRule\022\020\n\010selector\030\001 \001(\t\022\r\n\003get\030\002" + + " \001(\tH\000\022\r\n\003put\030\003 \001(\tH\000\022\016\n\004post\030\004 \001(\tH\000\022\020\n" + + "\006delete\030\005 \001(\tH\000\022\017\n\005patch\030\006 \001(\tH\000\022/\n\006cust" + + "om\030\010 \001(\0132\035.google.api.CustomHttpPatternH" + + "\000\022\014\n\004body\030\007 \001(\t\022-\n\014media_upload\030\t \001(\0132\027." + + "google.api.MediaUpload\0221\n\016media_download" + + "\030\n \001(\0132\031.google.api.MediaDownload\0221\n\023add" + + "itional_bindings\030\013 \003(\0132\024.google.api.Http", + "RuleB\t\n\007pattern\"/\n\021CustomHttpPattern\022\014\n\004" + + "kind\030\001 \001(\t\022\014\n\004path\030\002 \001(\t\"\036\n\013MediaUpload\022" + + "\017\n\007enabled\030\003 \001(\010\" \n\rMediaDownload\022\017\n\007ena" + + "bled\030\001 \001(\010B \n\016com.google.apiB\tHttpProtoP" + + "\001\370\001\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_Http_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Http_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Http_descriptor, + new java.lang.String[] { "Rules", }); + internal_static_google_api_HttpRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_HttpRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_HttpRule_descriptor, + new java.lang.String[] { "Selector", "Get", "Put", "Post", "Delete", "Patch", "Custom", "Body", "MediaUpload", "MediaDownload", "AdditionalBindings", "Pattern", }); + internal_static_google_api_CustomHttpPattern_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_api_CustomHttpPattern_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_CustomHttpPattern_descriptor, + new java.lang.String[] { "Kind", "Path", }); + internal_static_google_api_MediaUpload_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_api_MediaUpload_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_MediaUpload_descriptor, + new java.lang.String[] { "Enabled", }); + internal_static_google_api_MediaDownload_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_api_MediaDownload_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_MediaDownload_descriptor, + new java.lang.String[] { "Enabled", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/HttpRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/HttpRule.java new file mode 100644 index 000000000000..e37c48096fdd --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/HttpRule.java @@ -0,0 +1,3069 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.HttpRule} + * + *
+ * `HttpRule` defines the mapping of an RPC method to one or more HTTP
+ * REST APIs.  The mapping determines what portions of the request
+ * message are populated from the path, query parameters, or body of
+ * the HTTP request.  The mapping is typically specified as an
+ * `google.api.http` annotation, see "google/api/annotations.proto"
+ * for details.
+ * The mapping consists of a field specifying the path template and
+ * method kind.  The path template can refer to fields in the request
+ * message, as in the example below which describes a REST GET
+ * operation on a resource collection of messages:
+ * ```proto
+ * service Messaging {
+ *   rpc GetMessage(GetMessageRequest) returns (Message) {
+ *     option (google.api.http).get = "/v1/messages/{message_id}";
+ *   }
+ * }
+ * message GetMessageRequest {
+ *   string message_id = 1; // mapped to the URL
+ * }
+ * message Message {
+ *   string text = 1; // content of the resource
+ * }
+ * ```
+ * This definition enables an automatic, bidrectional mapping of HTTP
+ * JSON to RPC. Example:
+ * HTTP | RPC
+ * -----|-----
+ * `GET /v1/messages/123456`  | `GetMessage(message_id: "123456")`
+ * In general, not only fields but also field paths can be referenced
+ * from a path pattern. Fields mapped to the path pattern cannot be
+ * repeated and must have a primitive (non-message) type.
+ * Any fields in the request message which are not bound by the path
+ * pattern automatically become (optional) HTTP query
+ * parameters. Assume the following definition of the request message:
+ * ```proto
+ * message GetMessageRequest {
+ *   string message_id = 1; // mapped to the URL
+ *   int64 revision = 2;    // becomes a parameter
+ * }
+ * ```
+ * This enables a HTTP JSON to RPC mapping as below:
+ * HTTP | RPC
+ * -----|-----
+ * `GET /v1/messages/123456?revision=2` | `GetMessage(message_id: "123456" revision: 2)`
+ * Note that fields which are mapped to HTTP parameters must have a
+ * primitive type or a repeated primitive type. Message types are not
+ * allowed. In the case of a repeated type, the parameter can be
+ * repeated in the URL, as in `...?param=A&param=B`.
+ * For HTTP method kinds which allow a request body, the `body` field
+ * specifies the mapping. Consider a REST update method on the
+ * message resource collection:
+ * ```proto
+ * service Messaging {
+ *   rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
+ *     option (google.api.http) = {
+ *       put: "/v1/messages/{message_id}"
+ *       body: "message"
+ *   }
+ * }
+ * message UpdateMessageRequest {
+ *   string message_id = 1; // mapped to the URL
+ *   Message message = 2;   // mapped to the body
+ * }
+ * ```
+ * The following HTTP JSON to RPC mapping is enabled, where the
+ * representation of the JSON in the request body is determined by
+ * protos JSON encoding:
+ * HTTP | RPC
+ * -----|-----
+ * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
+ * The special name `*` can be used in the body mapping to define that
+ * every field not bound by the path template should be mapped to the
+ * request body.  This enables the following alternative definition of
+ * the update method:
+ * ```proto
+ * service Messaging {
+ *   rpc UpdateMessage(Message) returns (Message) {
+ *     option (google.api.http) = {
+ *       put: "/v1/messages/{message_id}"
+ *       body: "*"
+ *   }
+ * }
+ * message Message {
+ *   string message_id = 2;
+ *   string text = 2;
+ * }
+ * ```
+ * The following HTTP JSON to RPC mapping is enabled:
+ * HTTP | RPC
+ * -----|-----
+ * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
+ * Note that when using `*` in the body mapping, it is not possible to
+ * have HTTP parameters, as all fields not bound by the path end in
+ * the body. This makes this option more rarely used in practice of
+ * defining REST APIs. The common usage of `*` is in custom methods
+ * which don't use the URL at all for transferring data.
+ * It is possible to define multiple HTTP methods for one RPC by using
+ * the `additional_bindings` option. Example:
+ * ```proto
+ * service Messaging {
+ *   rpc GetMessage(GetMessageRequest) returns (Message) {
+ *     option (google.api.http) = {
+ *       get: "/v1/messages/{message_id}"
+ *       additional_bindings {
+ *         get: "/v1/users/{user_id}/messages/{message_id}"
+ *       }
+ *   }
+ * }
+ * message GetMessageRequest {
+ *   string message_id = 1;
+ *   string user_id = 2;
+ * }
+ * ```
+ * This enables the following two alternative HTTP JSON to RPC
+ * mappings:
+ * HTTP | RPC
+ * -----|-----
+ * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
+ * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
+ * # Rules for HTTP mapping
+ * The rules for mapping HTTP path, query parameters, and body fields
+ * to the request message are as follows:
+ * 1. The `body` field specifies either `*` or a field path, or is
+ *    omitted. If omitted, it assumes there is no HTTP body.
+ * 2. Leaf fields (recursive expansion of nested messages in the
+ *    request) can be classified into three types:
+ *     (a) Matched in the URL template.
+ *     (b) Covered by body (if body is `*`, everything except (a) fields;
+ *         else everything under the body field)
+ *     (c) All other fields.
+ * 3. URL query parameters found in the HTTP request are mapped to (c) fields.
+ * 4. Any body sent with an HTTP request can contain only (b) fields.
+ * The syntax of the path template is as follows:
+ *     Template = "/" Segments [ Verb ] ;
+ *     Segments = Segment { "/" Segment } ;
+ *     Segment  = "*" | "**" | LITERAL | Variable ;
+ *     Variable = "{" FieldPath [ "=" Segments ] "}" ;
+ *     FieldPath = IDENT { "." IDENT } ;
+ *     Verb     = ":" LITERAL ;
+ * The syntax `*` matches a single path segment. It follows the semantics of
+ * [RFC 6570](https://tools.ietf.org/html.rfc6570) Section 3.2.2 Simple String
+ * Expansion.
+ * The syntax `**` matches zero or more path segments. It follows the semantics
+ * of [RFC 6570](https://tools.ietf.org/html.rfc6570) Section 3.2.3 Reserved
+ * Expansion.
+ * The syntax `LITERAL` matches literal text in the URL path.
+ * The syntax `Variable` matches the entire path as specified by its template;
+ * this nested template must not contain further variables. If a variable
+ * matches a single path segment, its template may be omitted, e.g. `{var}`
+ * is equivalent to `{var=*}`.
+ * NOTE: the field paths in variables and in the `body` must not refer to
+ * repeated fields or map fields.
+ * Use CustomHttpPattern to specify any HTTP method that is not included in the
+ * `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for
+ * a given URL path rule. The wild-card rule is useful for services that provide
+ * content to Web (HTML) clients.
+ * 
+ */ +public final class HttpRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.HttpRule) + HttpRuleOrBuilder { + // Use HttpRule.newBuilder() to construct. + private HttpRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HttpRule() { + selector_ = ""; + body_ = ""; + additionalBindings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private HttpRule( + 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: { + String s = input.readStringRequireUtf8(); + patternCase_ = 2; + pattern_ = s; + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + patternCase_ = 3; + pattern_ = s; + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + patternCase_ = 4; + pattern_ = s; + break; + } + case 42: { + String s = input.readStringRequireUtf8(); + patternCase_ = 5; + pattern_ = s; + break; + } + case 50: { + String s = input.readStringRequireUtf8(); + patternCase_ = 6; + pattern_ = s; + break; + } + case 58: { + String s = input.readStringRequireUtf8(); + + body_ = s; + break; + } + case 66: { + com.google.api.CustomHttpPattern.Builder subBuilder = null; + if (patternCase_ == 8) { + subBuilder = ((com.google.api.CustomHttpPattern) pattern_).toBuilder(); + } + pattern_ = + input.readMessage(com.google.api.CustomHttpPattern.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.api.CustomHttpPattern) pattern_); + pattern_ = subBuilder.buildPartial(); + } + patternCase_ = 8; + break; + } + case 74: { + com.google.api.MediaUpload.Builder subBuilder = null; + if (mediaUpload_ != null) { + subBuilder = mediaUpload_.toBuilder(); + } + mediaUpload_ = input.readMessage(com.google.api.MediaUpload.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(mediaUpload_); + mediaUpload_ = subBuilder.buildPartial(); + } + + break; + } + case 82: { + com.google.api.MediaDownload.Builder subBuilder = null; + if (mediaDownload_ != null) { + subBuilder = mediaDownload_.toBuilder(); + } + mediaDownload_ = input.readMessage(com.google.api.MediaDownload.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(mediaDownload_); + mediaDownload_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { + additionalBindings_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000400; + } + additionalBindings_.add(input.readMessage(com.google.api.HttpRule.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { + additionalBindings_ = java.util.Collections.unmodifiableList(additionalBindings_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.HttpRule.class, com.google.api.HttpRule.Builder.class); + } + + private int bitField0_; + private int patternCase_ = 0; + private java.lang.Object pattern_; + public enum PatternCase + implements com.google.protobuf.Internal.EnumLite { + GET(2), + PUT(3), + POST(4), + DELETE(5), + PATCH(6), + CUSTOM(8), + PATTERN_NOT_SET(0); + private int value = 0; + private PatternCase(int value) { + this.value = value; + } + public static PatternCase valueOf(int value) { + switch (value) { + case 2: return GET; + case 3: return PUT; + case 4: return POST; + case 5: return DELETE; + case 6: return PATCH; + case 8: return CUSTOM; + case 0: return PATTERN_NOT_SET; + default: throw new java.lang.IllegalArgumentException( + "Value is undefined for this oneof enum."); + } + } + public int getNumber() { + return this.value; + } + }; + + public PatternCase + getPatternCase() { + return PatternCase.valueOf( + patternCase_); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object selector_; + /** + * optional string selector = 1; + * + *
+   * Selects 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 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 GET_FIELD_NUMBER = 2; + /** + * optional string get = 2; + * + *
+   * Used for listing and getting information about resources.
+   * 
+ */ + public java.lang.String getGet() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + 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(); + if (patternCase_ == 2) { + pattern_ = s; + } + return s; + } + } + /** + * optional string get = 2; + * + *
+   * Used for listing and getting information about resources.
+   * 
+ */ + public com.google.protobuf.ByteString + getGetBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 2) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUT_FIELD_NUMBER = 3; + /** + * optional string put = 3; + * + *
+   * Used for updating a resource.
+   * 
+ */ + public java.lang.String getPut() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + 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(); + if (patternCase_ == 3) { + pattern_ = s; + } + return s; + } + } + /** + * optional string put = 3; + * + *
+   * Used for updating a resource.
+   * 
+ */ + public com.google.protobuf.ByteString + getPutBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 3) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POST_FIELD_NUMBER = 4; + /** + * optional string post = 4; + * + *
+   * Used for creating a resource.
+   * 
+ */ + public java.lang.String getPost() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + 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(); + if (patternCase_ == 4) { + pattern_ = s; + } + return s; + } + } + /** + * optional string post = 4; + * + *
+   * Used for creating a resource.
+   * 
+ */ + public com.google.protobuf.ByteString + getPostBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 4) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELETE_FIELD_NUMBER = 5; + /** + * optional string delete = 5; + * + *
+   * Used for deleting a resource.
+   * 
+ */ + public java.lang.String getDelete() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + 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(); + if (patternCase_ == 5) { + pattern_ = s; + } + return s; + } + } + /** + * optional string delete = 5; + * + *
+   * Used for deleting a resource.
+   * 
+ */ + public com.google.protobuf.ByteString + getDeleteBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 5) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATCH_FIELD_NUMBER = 6; + /** + * optional string patch = 6; + * + *
+   * Used for updating a resource.
+   * 
+ */ + public java.lang.String getPatch() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + 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(); + if (patternCase_ == 6) { + pattern_ = s; + } + return s; + } + } + /** + * optional string patch = 6; + * + *
+   * Used for updating a resource.
+   * 
+ */ + public com.google.protobuf.ByteString + getPatchBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 6) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOM_FIELD_NUMBER = 8; + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+   * Custom pattern is used for defining custom verbs.
+   * 
+ */ + public com.google.api.CustomHttpPattern getCustom() { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+   * Custom pattern is used for defining custom verbs.
+   * 
+ */ + public com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder() { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + + public static final int BODY_FIELD_NUMBER = 7; + private volatile java.lang.Object body_; + /** + * optional string body = 7; + * + *
+   * The name of the request field whose value is mapped to the HTTP body, or
+   * `*` for mapping all fields not captured by the path pattern to the HTTP
+   * body. NOTE: the referred field must not be a repeated field.
+   * 
+ */ + public java.lang.String getBody() { + java.lang.Object ref = body_; + 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(); + body_ = s; + return s; + } + } + /** + * optional string body = 7; + * + *
+   * The name of the request field whose value is mapped to the HTTP body, or
+   * `*` for mapping all fields not captured by the path pattern to the HTTP
+   * body. NOTE: the referred field must not be a repeated field.
+   * 
+ */ + public com.google.protobuf.ByteString + getBodyBytes() { + java.lang.Object ref = body_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + body_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEDIA_UPLOAD_FIELD_NUMBER = 9; + private com.google.api.MediaUpload mediaUpload_; + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public boolean hasMediaUpload() { + return mediaUpload_ != null; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public com.google.api.MediaUpload getMediaUpload() { + return mediaUpload_ == null ? com.google.api.MediaUpload.getDefaultInstance() : mediaUpload_; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public com.google.api.MediaUploadOrBuilder getMediaUploadOrBuilder() { + return getMediaUpload(); + } + + public static final int MEDIA_DOWNLOAD_FIELD_NUMBER = 10; + private com.google.api.MediaDownload mediaDownload_; + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public boolean hasMediaDownload() { + return mediaDownload_ != null; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public com.google.api.MediaDownload getMediaDownload() { + return mediaDownload_ == null ? com.google.api.MediaDownload.getDefaultInstance() : mediaDownload_; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public com.google.api.MediaDownloadOrBuilder getMediaDownloadOrBuilder() { + return getMediaDownload(); + } + + public static final int ADDITIONAL_BINDINGS_FIELD_NUMBER = 11; + private java.util.List additionalBindings_; + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + public java.util.List getAdditionalBindingsList() { + return additionalBindings_; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + public java.util.List + getAdditionalBindingsOrBuilderList() { + return additionalBindings_; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + public int getAdditionalBindingsCount() { + return additionalBindings_.size(); + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + public com.google.api.HttpRule getAdditionalBindings(int index) { + return additionalBindings_.get(index); + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + public com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( + int index) { + return additionalBindings_.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 (patternCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, pattern_); + } + if (patternCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pattern_); + } + if (patternCase_ == 4) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pattern_); + } + if (patternCase_ == 5) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, pattern_); + } + if (patternCase_ == 6) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, pattern_); + } + if (!getBodyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, body_); + } + if (patternCase_ == 8) { + output.writeMessage(8, (com.google.api.CustomHttpPattern) pattern_); + } + if (mediaUpload_ != null) { + output.writeMessage(9, getMediaUpload()); + } + if (mediaDownload_ != null) { + output.writeMessage(10, getMediaDownload()); + } + for (int i = 0; i < additionalBindings_.size(); i++) { + output.writeMessage(11, additionalBindings_.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 (patternCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, pattern_); + } + if (patternCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pattern_); + } + if (patternCase_ == 4) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pattern_); + } + if (patternCase_ == 5) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pattern_); + } + if (patternCase_ == 6) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, pattern_); + } + if (!getBodyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, body_); + } + if (patternCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.api.CustomHttpPattern) pattern_); + } + if (mediaUpload_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getMediaUpload()); + } + if (mediaDownload_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getMediaDownload()); + } + for (int i = 0; i < additionalBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, additionalBindings_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.HttpRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.HttpRule 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.HttpRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.HttpRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.HttpRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.HttpRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.HttpRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.HttpRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.HttpRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.HttpRule 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.HttpRule 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.HttpRule} + * + *
+   * `HttpRule` defines the mapping of an RPC method to one or more HTTP
+   * REST APIs.  The mapping determines what portions of the request
+   * message are populated from the path, query parameters, or body of
+   * the HTTP request.  The mapping is typically specified as an
+   * `google.api.http` annotation, see "google/api/annotations.proto"
+   * for details.
+   * The mapping consists of a field specifying the path template and
+   * method kind.  The path template can refer to fields in the request
+   * message, as in the example below which describes a REST GET
+   * operation on a resource collection of messages:
+   * ```proto
+   * service Messaging {
+   *   rpc GetMessage(GetMessageRequest) returns (Message) {
+   *     option (google.api.http).get = "/v1/messages/{message_id}";
+   *   }
+   * }
+   * message GetMessageRequest {
+   *   string message_id = 1; // mapped to the URL
+   * }
+   * message Message {
+   *   string text = 1; // content of the resource
+   * }
+   * ```
+   * This definition enables an automatic, bidrectional mapping of HTTP
+   * JSON to RPC. Example:
+   * HTTP | RPC
+   * -----|-----
+   * `GET /v1/messages/123456`  | `GetMessage(message_id: "123456")`
+   * In general, not only fields but also field paths can be referenced
+   * from a path pattern. Fields mapped to the path pattern cannot be
+   * repeated and must have a primitive (non-message) type.
+   * Any fields in the request message which are not bound by the path
+   * pattern automatically become (optional) HTTP query
+   * parameters. Assume the following definition of the request message:
+   * ```proto
+   * message GetMessageRequest {
+   *   string message_id = 1; // mapped to the URL
+   *   int64 revision = 2;    // becomes a parameter
+   * }
+   * ```
+   * This enables a HTTP JSON to RPC mapping as below:
+   * HTTP | RPC
+   * -----|-----
+   * `GET /v1/messages/123456?revision=2` | `GetMessage(message_id: "123456" revision: 2)`
+   * Note that fields which are mapped to HTTP parameters must have a
+   * primitive type or a repeated primitive type. Message types are not
+   * allowed. In the case of a repeated type, the parameter can be
+   * repeated in the URL, as in `...?param=A&param=B`.
+   * For HTTP method kinds which allow a request body, the `body` field
+   * specifies the mapping. Consider a REST update method on the
+   * message resource collection:
+   * ```proto
+   * service Messaging {
+   *   rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
+   *     option (google.api.http) = {
+   *       put: "/v1/messages/{message_id}"
+   *       body: "message"
+   *   }
+   * }
+   * message UpdateMessageRequest {
+   *   string message_id = 1; // mapped to the URL
+   *   Message message = 2;   // mapped to the body
+   * }
+   * ```
+   * The following HTTP JSON to RPC mapping is enabled, where the
+   * representation of the JSON in the request body is determined by
+   * protos JSON encoding:
+   * HTTP | RPC
+   * -----|-----
+   * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
+   * The special name `*` can be used in the body mapping to define that
+   * every field not bound by the path template should be mapped to the
+   * request body.  This enables the following alternative definition of
+   * the update method:
+   * ```proto
+   * service Messaging {
+   *   rpc UpdateMessage(Message) returns (Message) {
+   *     option (google.api.http) = {
+   *       put: "/v1/messages/{message_id}"
+   *       body: "*"
+   *   }
+   * }
+   * message Message {
+   *   string message_id = 2;
+   *   string text = 2;
+   * }
+   * ```
+   * The following HTTP JSON to RPC mapping is enabled:
+   * HTTP | RPC
+   * -----|-----
+   * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
+   * Note that when using `*` in the body mapping, it is not possible to
+   * have HTTP parameters, as all fields not bound by the path end in
+   * the body. This makes this option more rarely used in practice of
+   * defining REST APIs. The common usage of `*` is in custom methods
+   * which don't use the URL at all for transferring data.
+   * It is possible to define multiple HTTP methods for one RPC by using
+   * the `additional_bindings` option. Example:
+   * ```proto
+   * service Messaging {
+   *   rpc GetMessage(GetMessageRequest) returns (Message) {
+   *     option (google.api.http) = {
+   *       get: "/v1/messages/{message_id}"
+   *       additional_bindings {
+   *         get: "/v1/users/{user_id}/messages/{message_id}"
+   *       }
+   *   }
+   * }
+   * message GetMessageRequest {
+   *   string message_id = 1;
+   *   string user_id = 2;
+   * }
+   * ```
+   * This enables the following two alternative HTTP JSON to RPC
+   * mappings:
+   * HTTP | RPC
+   * -----|-----
+   * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
+   * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
+   * # Rules for HTTP mapping
+   * The rules for mapping HTTP path, query parameters, and body fields
+   * to the request message are as follows:
+   * 1. The `body` field specifies either `*` or a field path, or is
+   *    omitted. If omitted, it assumes there is no HTTP body.
+   * 2. Leaf fields (recursive expansion of nested messages in the
+   *    request) can be classified into three types:
+   *     (a) Matched in the URL template.
+   *     (b) Covered by body (if body is `*`, everything except (a) fields;
+   *         else everything under the body field)
+   *     (c) All other fields.
+   * 3. URL query parameters found in the HTTP request are mapped to (c) fields.
+   * 4. Any body sent with an HTTP request can contain only (b) fields.
+   * The syntax of the path template is as follows:
+   *     Template = "/" Segments [ Verb ] ;
+   *     Segments = Segment { "/" Segment } ;
+   *     Segment  = "*" | "**" | LITERAL | Variable ;
+   *     Variable = "{" FieldPath [ "=" Segments ] "}" ;
+   *     FieldPath = IDENT { "." IDENT } ;
+   *     Verb     = ":" LITERAL ;
+   * The syntax `*` matches a single path segment. It follows the semantics of
+   * [RFC 6570](https://tools.ietf.org/html.rfc6570) Section 3.2.2 Simple String
+   * Expansion.
+   * The syntax `**` matches zero or more path segments. It follows the semantics
+   * of [RFC 6570](https://tools.ietf.org/html.rfc6570) Section 3.2.3 Reserved
+   * Expansion.
+   * The syntax `LITERAL` matches literal text in the URL path.
+   * The syntax `Variable` matches the entire path as specified by its template;
+   * this nested template must not contain further variables. If a variable
+   * matches a single path segment, its template may be omitted, e.g. `{var}`
+   * is equivalent to `{var=*}`.
+   * NOTE: the field paths in variables and in the `body` must not refer to
+   * repeated fields or map fields.
+   * Use CustomHttpPattern to specify any HTTP method that is not included in the
+   * `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for
+   * a given URL path rule. The wild-card rule is useful for services that provide
+   * content to Web (HTML) clients.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.HttpRule) + com.google.api.HttpRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.HttpRule.class, com.google.api.HttpRule.Builder.class); + } + + // Construct using com.google.api.HttpRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getAdditionalBindingsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + selector_ = ""; + + body_ = ""; + + if (mediaUploadBuilder_ == null) { + mediaUpload_ = null; + } else { + mediaUpload_ = null; + mediaUploadBuilder_ = null; + } + if (mediaDownloadBuilder_ == null) { + mediaDownload_ = null; + } else { + mediaDownload_ = null; + mediaDownloadBuilder_ = null; + } + if (additionalBindingsBuilder_ == null) { + additionalBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + } else { + additionalBindingsBuilder_.clear(); + } + patternCase_ = 0; + pattern_ = null; + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; + } + + public com.google.api.HttpRule getDefaultInstanceForType() { + return com.google.api.HttpRule.getDefaultInstance(); + } + + public com.google.api.HttpRule build() { + com.google.api.HttpRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.HttpRule buildPartial() { + com.google.api.HttpRule result = new com.google.api.HttpRule(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.selector_ = selector_; + if (patternCase_ == 2) { + result.pattern_ = pattern_; + } + if (patternCase_ == 3) { + result.pattern_ = pattern_; + } + if (patternCase_ == 4) { + result.pattern_ = pattern_; + } + if (patternCase_ == 5) { + result.pattern_ = pattern_; + } + if (patternCase_ == 6) { + result.pattern_ = pattern_; + } + if (patternCase_ == 8) { + if (customBuilder_ == null) { + result.pattern_ = pattern_; + } else { + result.pattern_ = customBuilder_.build(); + } + } + result.body_ = body_; + if (mediaUploadBuilder_ == null) { + result.mediaUpload_ = mediaUpload_; + } else { + result.mediaUpload_ = mediaUploadBuilder_.build(); + } + if (mediaDownloadBuilder_ == null) { + result.mediaDownload_ = mediaDownload_; + } else { + result.mediaDownload_ = mediaDownloadBuilder_.build(); + } + if (additionalBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000400) == 0x00000400)) { + additionalBindings_ = java.util.Collections.unmodifiableList(additionalBindings_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.additionalBindings_ = additionalBindings_; + } else { + result.additionalBindings_ = additionalBindingsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + result.patternCase_ = patternCase_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.HttpRule) { + return mergeFrom((com.google.api.HttpRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.HttpRule other) { + if (other == com.google.api.HttpRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + onChanged(); + } + if (!other.getBody().isEmpty()) { + body_ = other.body_; + onChanged(); + } + if (other.hasMediaUpload()) { + mergeMediaUpload(other.getMediaUpload()); + } + if (other.hasMediaDownload()) { + mergeMediaDownload(other.getMediaDownload()); + } + if (additionalBindingsBuilder_ == null) { + if (!other.additionalBindings_.isEmpty()) { + if (additionalBindings_.isEmpty()) { + additionalBindings_ = other.additionalBindings_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.addAll(other.additionalBindings_); + } + onChanged(); + } + } else { + if (!other.additionalBindings_.isEmpty()) { + if (additionalBindingsBuilder_.isEmpty()) { + additionalBindingsBuilder_.dispose(); + additionalBindingsBuilder_ = null; + additionalBindings_ = other.additionalBindings_; + bitField0_ = (bitField0_ & ~0x00000400); + additionalBindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getAdditionalBindingsFieldBuilder() : null; + } else { + additionalBindingsBuilder_.addAllMessages(other.additionalBindings_); + } + } + } + switch (other.getPatternCase()) { + case GET: { + patternCase_ = 2; + pattern_ = other.pattern_; + onChanged(); + break; + } + case PUT: { + patternCase_ = 3; + pattern_ = other.pattern_; + onChanged(); + break; + } + case POST: { + patternCase_ = 4; + pattern_ = other.pattern_; + onChanged(); + break; + } + case DELETE: { + patternCase_ = 5; + pattern_ = other.pattern_; + onChanged(); + break; + } + case PATCH: { + patternCase_ = 6; + pattern_ = other.pattern_; + onChanged(); + break; + } + case CUSTOM: { + mergeCustom(other.getCustom()); + break; + } + case PATTERN_NOT_SET: { + break; + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.HttpRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.HttpRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int patternCase_ = 0; + private java.lang.Object pattern_; + public PatternCase + getPatternCase() { + return PatternCase.valueOf( + patternCase_); + } + + public Builder clearPattern() { + patternCase_ = 0; + pattern_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * optional string selector = 1; + * + *
+     * Selects 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 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 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 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 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; + } + + /** + * optional string get = 2; + * + *
+     * Used for listing and getting information about resources.
+     * 
+ */ + public java.lang.String getGet() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 2) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string get = 2; + * + *
+     * Used for listing and getting information about resources.
+     * 
+ */ + public com.google.protobuf.ByteString + getGetBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 2) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string get = 2; + * + *
+     * Used for listing and getting information about resources.
+     * 
+ */ + public Builder setGet( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 2; + pattern_ = value; + onChanged(); + return this; + } + /** + * optional string get = 2; + * + *
+     * Used for listing and getting information about resources.
+     * 
+ */ + public Builder clearGet() { + if (patternCase_ == 2) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * optional string get = 2; + * + *
+     * Used for listing and getting information about resources.
+     * 
+ */ + public Builder setGetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 2; + pattern_ = value; + onChanged(); + return this; + } + + /** + * optional string put = 3; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public java.lang.String getPut() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 3) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string put = 3; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public com.google.protobuf.ByteString + getPutBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 3) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string put = 3; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public Builder setPut( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 3; + pattern_ = value; + onChanged(); + return this; + } + /** + * optional string put = 3; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public Builder clearPut() { + if (patternCase_ == 3) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * optional string put = 3; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public Builder setPutBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 3; + pattern_ = value; + onChanged(); + return this; + } + + /** + * optional string post = 4; + * + *
+     * Used for creating a resource.
+     * 
+ */ + public java.lang.String getPost() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 4) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string post = 4; + * + *
+     * Used for creating a resource.
+     * 
+ */ + public com.google.protobuf.ByteString + getPostBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 4) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string post = 4; + * + *
+     * Used for creating a resource.
+     * 
+ */ + public Builder setPost( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 4; + pattern_ = value; + onChanged(); + return this; + } + /** + * optional string post = 4; + * + *
+     * Used for creating a resource.
+     * 
+ */ + public Builder clearPost() { + if (patternCase_ == 4) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * optional string post = 4; + * + *
+     * Used for creating a resource.
+     * 
+ */ + public Builder setPostBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 4; + pattern_ = value; + onChanged(); + return this; + } + + /** + * optional string delete = 5; + * + *
+     * Used for deleting a resource.
+     * 
+ */ + public java.lang.String getDelete() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 5) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string delete = 5; + * + *
+     * Used for deleting a resource.
+     * 
+ */ + public com.google.protobuf.ByteString + getDeleteBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 5) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string delete = 5; + * + *
+     * Used for deleting a resource.
+     * 
+ */ + public Builder setDelete( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 5; + pattern_ = value; + onChanged(); + return this; + } + /** + * optional string delete = 5; + * + *
+     * Used for deleting a resource.
+     * 
+ */ + public Builder clearDelete() { + if (patternCase_ == 5) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * optional string delete = 5; + * + *
+     * Used for deleting a resource.
+     * 
+ */ + public Builder setDeleteBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 5; + pattern_ = value; + onChanged(); + return this; + } + + /** + * optional string patch = 6; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public java.lang.String getPatch() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 6) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string patch = 6; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public com.google.protobuf.ByteString + getPatchBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 6) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string patch = 6; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public Builder setPatch( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 6; + pattern_ = value; + onChanged(); + return this; + } + /** + * optional string patch = 6; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public Builder clearPatch() { + if (patternCase_ == 6) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * optional string patch = 6; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public Builder setPatchBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 6; + pattern_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder> customBuilder_; + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public com.google.api.CustomHttpPattern getCustom() { + if (customBuilder_ == null) { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } else { + if (patternCase_ == 8) { + return customBuilder_.getMessage(); + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public Builder setCustom(com.google.api.CustomHttpPattern value) { + if (customBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pattern_ = value; + onChanged(); + } else { + customBuilder_.setMessage(value); + } + patternCase_ = 8; + return this; + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public Builder setCustom( + com.google.api.CustomHttpPattern.Builder builderForValue) { + if (customBuilder_ == null) { + pattern_ = builderForValue.build(); + onChanged(); + } else { + customBuilder_.setMessage(builderForValue.build()); + } + patternCase_ = 8; + return this; + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public Builder mergeCustom(com.google.api.CustomHttpPattern value) { + if (customBuilder_ == null) { + if (patternCase_ == 8 && + pattern_ != com.google.api.CustomHttpPattern.getDefaultInstance()) { + pattern_ = com.google.api.CustomHttpPattern.newBuilder((com.google.api.CustomHttpPattern) pattern_) + .mergeFrom(value).buildPartial(); + } else { + pattern_ = value; + } + onChanged(); + } else { + if (patternCase_ == 8) { + customBuilder_.mergeFrom(value); + } + customBuilder_.setMessage(value); + } + patternCase_ = 8; + return this; + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public Builder clearCustom() { + if (customBuilder_ == null) { + if (patternCase_ == 8) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + } else { + if (patternCase_ == 8) { + patternCase_ = 0; + pattern_ = null; + } + customBuilder_.clear(); + } + return this; + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public com.google.api.CustomHttpPattern.Builder getCustomBuilder() { + return getCustomFieldBuilder().getBuilder(); + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder() { + if ((patternCase_ == 8) && (customBuilder_ != null)) { + return customBuilder_.getMessageOrBuilder(); + } else { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder> + getCustomFieldBuilder() { + if (customBuilder_ == null) { + if (!(patternCase_ == 8)) { + pattern_ = com.google.api.CustomHttpPattern.getDefaultInstance(); + } + customBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder>( + (com.google.api.CustomHttpPattern) pattern_, + getParentForChildren(), + isClean()); + pattern_ = null; + } + patternCase_ = 8; + onChanged();; + return customBuilder_; + } + + private java.lang.Object body_ = ""; + /** + * optional string body = 7; + * + *
+     * The name of the request field whose value is mapped to the HTTP body, or
+     * `*` for mapping all fields not captured by the path pattern to the HTTP
+     * body. NOTE: the referred field must not be a repeated field.
+     * 
+ */ + public java.lang.String getBody() { + java.lang.Object ref = body_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + body_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string body = 7; + * + *
+     * The name of the request field whose value is mapped to the HTTP body, or
+     * `*` for mapping all fields not captured by the path pattern to the HTTP
+     * body. NOTE: the referred field must not be a repeated field.
+     * 
+ */ + public com.google.protobuf.ByteString + getBodyBytes() { + java.lang.Object ref = body_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + body_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string body = 7; + * + *
+     * The name of the request field whose value is mapped to the HTTP body, or
+     * `*` for mapping all fields not captured by the path pattern to the HTTP
+     * body. NOTE: the referred field must not be a repeated field.
+     * 
+ */ + public Builder setBody( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + body_ = value; + onChanged(); + return this; + } + /** + * optional string body = 7; + * + *
+     * The name of the request field whose value is mapped to the HTTP body, or
+     * `*` for mapping all fields not captured by the path pattern to the HTTP
+     * body. NOTE: the referred field must not be a repeated field.
+     * 
+ */ + public Builder clearBody() { + + body_ = getDefaultInstance().getBody(); + onChanged(); + return this; + } + /** + * optional string body = 7; + * + *
+     * The name of the request field whose value is mapped to the HTTP body, or
+     * `*` for mapping all fields not captured by the path pattern to the HTTP
+     * body. NOTE: the referred field must not be a repeated field.
+     * 
+ */ + public Builder setBodyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + body_ = value; + onChanged(); + return this; + } + + private com.google.api.MediaUpload mediaUpload_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.MediaUpload, com.google.api.MediaUpload.Builder, com.google.api.MediaUploadOrBuilder> mediaUploadBuilder_; + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public boolean hasMediaUpload() { + return mediaUploadBuilder_ != null || mediaUpload_ != null; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public com.google.api.MediaUpload getMediaUpload() { + if (mediaUploadBuilder_ == null) { + return mediaUpload_ == null ? com.google.api.MediaUpload.getDefaultInstance() : mediaUpload_; + } else { + return mediaUploadBuilder_.getMessage(); + } + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder setMediaUpload(com.google.api.MediaUpload value) { + if (mediaUploadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mediaUpload_ = value; + onChanged(); + } else { + mediaUploadBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder setMediaUpload( + com.google.api.MediaUpload.Builder builderForValue) { + if (mediaUploadBuilder_ == null) { + mediaUpload_ = builderForValue.build(); + onChanged(); + } else { + mediaUploadBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder mergeMediaUpload(com.google.api.MediaUpload value) { + if (mediaUploadBuilder_ == null) { + if (mediaUpload_ != null) { + mediaUpload_ = + com.google.api.MediaUpload.newBuilder(mediaUpload_).mergeFrom(value).buildPartial(); + } else { + mediaUpload_ = value; + } + onChanged(); + } else { + mediaUploadBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder clearMediaUpload() { + if (mediaUploadBuilder_ == null) { + mediaUpload_ = null; + onChanged(); + } else { + mediaUpload_ = null; + mediaUploadBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public com.google.api.MediaUpload.Builder getMediaUploadBuilder() { + + onChanged(); + return getMediaUploadFieldBuilder().getBuilder(); + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public com.google.api.MediaUploadOrBuilder getMediaUploadOrBuilder() { + if (mediaUploadBuilder_ != null) { + return mediaUploadBuilder_.getMessageOrBuilder(); + } else { + return mediaUpload_ == null ? + com.google.api.MediaUpload.getDefaultInstance() : mediaUpload_; + } + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.MediaUpload, com.google.api.MediaUpload.Builder, com.google.api.MediaUploadOrBuilder> + getMediaUploadFieldBuilder() { + if (mediaUploadBuilder_ == null) { + mediaUploadBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.MediaUpload, com.google.api.MediaUpload.Builder, com.google.api.MediaUploadOrBuilder>( + getMediaUpload(), + getParentForChildren(), + isClean()); + mediaUpload_ = null; + } + return mediaUploadBuilder_; + } + + private com.google.api.MediaDownload mediaDownload_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.MediaDownload, com.google.api.MediaDownload.Builder, com.google.api.MediaDownloadOrBuilder> mediaDownloadBuilder_; + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public boolean hasMediaDownload() { + return mediaDownloadBuilder_ != null || mediaDownload_ != null; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public com.google.api.MediaDownload getMediaDownload() { + if (mediaDownloadBuilder_ == null) { + return mediaDownload_ == null ? com.google.api.MediaDownload.getDefaultInstance() : mediaDownload_; + } else { + return mediaDownloadBuilder_.getMessage(); + } + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder setMediaDownload(com.google.api.MediaDownload value) { + if (mediaDownloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mediaDownload_ = value; + onChanged(); + } else { + mediaDownloadBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder setMediaDownload( + com.google.api.MediaDownload.Builder builderForValue) { + if (mediaDownloadBuilder_ == null) { + mediaDownload_ = builderForValue.build(); + onChanged(); + } else { + mediaDownloadBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder mergeMediaDownload(com.google.api.MediaDownload value) { + if (mediaDownloadBuilder_ == null) { + if (mediaDownload_ != null) { + mediaDownload_ = + com.google.api.MediaDownload.newBuilder(mediaDownload_).mergeFrom(value).buildPartial(); + } else { + mediaDownload_ = value; + } + onChanged(); + } else { + mediaDownloadBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder clearMediaDownload() { + if (mediaDownloadBuilder_ == null) { + mediaDownload_ = null; + onChanged(); + } else { + mediaDownload_ = null; + mediaDownloadBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public com.google.api.MediaDownload.Builder getMediaDownloadBuilder() { + + onChanged(); + return getMediaDownloadFieldBuilder().getBuilder(); + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public com.google.api.MediaDownloadOrBuilder getMediaDownloadOrBuilder() { + if (mediaDownloadBuilder_ != null) { + return mediaDownloadBuilder_.getMessageOrBuilder(); + } else { + return mediaDownload_ == null ? + com.google.api.MediaDownload.getDefaultInstance() : mediaDownload_; + } + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.MediaDownload, com.google.api.MediaDownload.Builder, com.google.api.MediaDownloadOrBuilder> + getMediaDownloadFieldBuilder() { + if (mediaDownloadBuilder_ == null) { + mediaDownloadBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.MediaDownload, com.google.api.MediaDownload.Builder, com.google.api.MediaDownloadOrBuilder>( + getMediaDownload(), + getParentForChildren(), + isClean()); + mediaDownload_ = null; + } + return mediaDownloadBuilder_; + } + + private java.util.List additionalBindings_ = + java.util.Collections.emptyList(); + private void ensureAdditionalBindingsIsMutable() { + if (!((bitField0_ & 0x00000400) == 0x00000400)) { + additionalBindings_ = new java.util.ArrayList(additionalBindings_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> additionalBindingsBuilder_; + + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public java.util.List getAdditionalBindingsList() { + if (additionalBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(additionalBindings_); + } else { + return additionalBindingsBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public int getAdditionalBindingsCount() { + if (additionalBindingsBuilder_ == null) { + return additionalBindings_.size(); + } else { + return additionalBindingsBuilder_.getCount(); + } + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public com.google.api.HttpRule getAdditionalBindings(int index) { + if (additionalBindingsBuilder_ == null) { + return additionalBindings_.get(index); + } else { + return additionalBindingsBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder setAdditionalBindings( + int index, com.google.api.HttpRule value) { + if (additionalBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalBindingsIsMutable(); + additionalBindings_.set(index, value); + onChanged(); + } else { + additionalBindingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder setAdditionalBindings( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + additionalBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder addAdditionalBindings(com.google.api.HttpRule value) { + if (additionalBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(value); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder addAdditionalBindings( + int index, com.google.api.HttpRule value) { + if (additionalBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(index, value); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder addAdditionalBindings( + com.google.api.HttpRule.Builder builderForValue) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(builderForValue.build()); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder addAdditionalBindings( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder addAllAdditionalBindings( + java.lang.Iterable values) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, additionalBindings_); + onChanged(); + } else { + additionalBindingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder clearAdditionalBindings() { + if (additionalBindingsBuilder_ == null) { + additionalBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + additionalBindingsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder removeAdditionalBindings(int index) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.remove(index); + onChanged(); + } else { + additionalBindingsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public com.google.api.HttpRule.Builder getAdditionalBindingsBuilder( + int index) { + return getAdditionalBindingsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( + int index) { + if (additionalBindingsBuilder_ == null) { + return additionalBindings_.get(index); } else { + return additionalBindingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public java.util.List + getAdditionalBindingsOrBuilderList() { + if (additionalBindingsBuilder_ != null) { + return additionalBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(additionalBindings_); + } + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public com.google.api.HttpRule.Builder addAdditionalBindingsBuilder() { + return getAdditionalBindingsFieldBuilder().addBuilder( + com.google.api.HttpRule.getDefaultInstance()); + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public com.google.api.HttpRule.Builder addAdditionalBindingsBuilder( + int index) { + return getAdditionalBindingsFieldBuilder().addBuilder( + index, com.google.api.HttpRule.getDefaultInstance()); + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public java.util.List + getAdditionalBindingsBuilderList() { + return getAdditionalBindingsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> + getAdditionalBindingsFieldBuilder() { + if (additionalBindingsBuilder_ == null) { + additionalBindingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder>( + additionalBindings_, + ((bitField0_ & 0x00000400) == 0x00000400), + getParentForChildren(), + isClean()); + additionalBindings_ = null; + } + return additionalBindingsBuilder_; + } + 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.HttpRule) + } + + // @@protoc_insertion_point(class_scope:google.api.HttpRule) + private static final com.google.api.HttpRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.HttpRule(); + } + + public static com.google.api.HttpRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HttpRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new HttpRule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.HttpRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/HttpRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/HttpRuleOrBuilder.java new file mode 100644 index 000000000000..9a29370416a8 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/HttpRuleOrBuilder.java @@ -0,0 +1,276 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface HttpRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.HttpRule) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string selector = 1; + * + *
+   * Selects methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + java.lang.String getSelector(); + /** + * optional string selector = 1; + * + *
+   * Selects methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + * optional string get = 2; + * + *
+   * Used for listing and getting information about resources.
+   * 
+ */ + java.lang.String getGet(); + /** + * optional string get = 2; + * + *
+   * Used for listing and getting information about resources.
+   * 
+ */ + com.google.protobuf.ByteString + getGetBytes(); + + /** + * optional string put = 3; + * + *
+   * Used for updating a resource.
+   * 
+ */ + java.lang.String getPut(); + /** + * optional string put = 3; + * + *
+   * Used for updating a resource.
+   * 
+ */ + com.google.protobuf.ByteString + getPutBytes(); + + /** + * optional string post = 4; + * + *
+   * Used for creating a resource.
+   * 
+ */ + java.lang.String getPost(); + /** + * optional string post = 4; + * + *
+   * Used for creating a resource.
+   * 
+ */ + com.google.protobuf.ByteString + getPostBytes(); + + /** + * optional string delete = 5; + * + *
+   * Used for deleting a resource.
+   * 
+ */ + java.lang.String getDelete(); + /** + * optional string delete = 5; + * + *
+   * Used for deleting a resource.
+   * 
+ */ + com.google.protobuf.ByteString + getDeleteBytes(); + + /** + * optional string patch = 6; + * + *
+   * Used for updating a resource.
+   * 
+ */ + java.lang.String getPatch(); + /** + * optional string patch = 6; + * + *
+   * Used for updating a resource.
+   * 
+ */ + com.google.protobuf.ByteString + getPatchBytes(); + + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+   * Custom pattern is used for defining custom verbs.
+   * 
+ */ + com.google.api.CustomHttpPattern getCustom(); + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+   * Custom pattern is used for defining custom verbs.
+   * 
+ */ + com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder(); + + /** + * optional string body = 7; + * + *
+   * The name of the request field whose value is mapped to the HTTP body, or
+   * `*` for mapping all fields not captured by the path pattern to the HTTP
+   * body. NOTE: the referred field must not be a repeated field.
+   * 
+ */ + java.lang.String getBody(); + /** + * optional string body = 7; + * + *
+   * The name of the request field whose value is mapped to the HTTP body, or
+   * `*` for mapping all fields not captured by the path pattern to the HTTP
+   * body. NOTE: the referred field must not be a repeated field.
+   * 
+ */ + com.google.protobuf.ByteString + getBodyBytes(); + + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + boolean hasMediaUpload(); + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + com.google.api.MediaUpload getMediaUpload(); + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + com.google.api.MediaUploadOrBuilder getMediaUploadOrBuilder(); + + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + boolean hasMediaDownload(); + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + com.google.api.MediaDownload getMediaDownload(); + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + com.google.api.MediaDownloadOrBuilder getMediaDownloadOrBuilder(); + + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + java.util.List + getAdditionalBindingsList(); + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + com.google.api.HttpRule getAdditionalBindings(int index); + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + int getAdditionalBindingsCount(); + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + java.util.List + getAdditionalBindingsOrBuilderList(); + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( + int index); + + public com.google.api.HttpRule.PatternCase getPatternCase(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownload.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownload.java new file mode 100644 index 000000000000..7134429cae8e --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownload.java @@ -0,0 +1,399 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.MediaDownload} + * + *
+ * Do not use this. For media support, add instead
+ * [][google.bytestream.RestByteStream] as an API to your
+ * configuration.
+ * 
+ */ +public final class MediaDownload extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.MediaDownload) + MediaDownloadOrBuilder { + // Use MediaDownload.newBuilder() to construct. + private MediaDownload(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MediaDownload() { + enabled_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private MediaDownload( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + enabled_ = 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.HttpProto.internal_static_google_api_MediaDownload_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_MediaDownload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MediaDownload.class, com.google.api.MediaDownload.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_; + /** + * optional bool enabled = 1; + * + *
+   * Whether download is enabled.
+   * 
+ */ + public boolean getEnabled() { + return enabled_; + } + + 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 (enabled_ != false) { + output.writeBool(1, enabled_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enabled_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.MediaDownload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MediaDownload 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.MediaDownload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MediaDownload parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.MediaDownload parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MediaDownload parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.MediaDownload parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.MediaDownload parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.MediaDownload parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MediaDownload 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.MediaDownload 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.MediaDownload} + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.MediaDownload) + com.google.api.MediaDownloadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_MediaDownload_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_MediaDownload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MediaDownload.class, com.google.api.MediaDownload.Builder.class); + } + + // Construct using com.google.api.MediaDownload.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + enabled_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_MediaDownload_descriptor; + } + + public com.google.api.MediaDownload getDefaultInstanceForType() { + return com.google.api.MediaDownload.getDefaultInstance(); + } + + public com.google.api.MediaDownload build() { + com.google.api.MediaDownload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.MediaDownload buildPartial() { + com.google.api.MediaDownload result = new com.google.api.MediaDownload(this); + result.enabled_ = enabled_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MediaDownload) { + return mergeFrom((com.google.api.MediaDownload)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MediaDownload other) { + if (other == com.google.api.MediaDownload.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.MediaDownload parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.MediaDownload) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enabled_ ; + /** + * optional bool enabled = 1; + * + *
+     * Whether download is enabled.
+     * 
+ */ + public boolean getEnabled() { + return enabled_; + } + /** + * optional bool enabled = 1; + * + *
+     * Whether download is enabled.
+     * 
+ */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + onChanged(); + return this; + } + /** + * optional bool enabled = 1; + * + *
+     * Whether download is enabled.
+     * 
+ */ + public Builder clearEnabled() { + + enabled_ = 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.MediaDownload) + } + + // @@protoc_insertion_point(class_scope:google.api.MediaDownload) + private static final com.google.api.MediaDownload DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.MediaDownload(); + } + + public static com.google.api.MediaDownload getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MediaDownload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new MediaDownload(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.MediaDownload getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownloadOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownloadOrBuilder.java new file mode 100644 index 000000000000..e07a3988c7fe --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownloadOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface MediaDownloadOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.MediaDownload) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bool enabled = 1; + * + *
+   * Whether download is enabled.
+   * 
+ */ + boolean getEnabled(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MediaUpload.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MediaUpload.java new file mode 100644 index 000000000000..856b2954dcea --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MediaUpload.java @@ -0,0 +1,399 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.MediaUpload} + * + *
+ * Do not use this. For media support, add instead
+ * [][google.bytestream.RestByteStream] as an API to your
+ * configuration.
+ * 
+ */ +public final class MediaUpload extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.MediaUpload) + MediaUploadOrBuilder { + // Use MediaUpload.newBuilder() to construct. + private MediaUpload(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MediaUpload() { + enabled_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private MediaUpload( + 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 24: { + + enabled_ = 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.HttpProto.internal_static_google_api_MediaUpload_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_MediaUpload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MediaUpload.class, com.google.api.MediaUpload.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 3; + private boolean enabled_; + /** + * optional bool enabled = 3; + * + *
+   * Whether upload is enabled.
+   * 
+ */ + public boolean getEnabled() { + return enabled_; + } + + 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 (enabled_ != false) { + output.writeBool(3, enabled_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, enabled_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.MediaUpload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MediaUpload 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.MediaUpload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MediaUpload parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.MediaUpload parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MediaUpload parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.MediaUpload parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.MediaUpload parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.MediaUpload parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MediaUpload 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.MediaUpload 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.MediaUpload} + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.MediaUpload) + com.google.api.MediaUploadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_MediaUpload_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_MediaUpload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MediaUpload.class, com.google.api.MediaUpload.Builder.class); + } + + // Construct using com.google.api.MediaUpload.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + enabled_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_MediaUpload_descriptor; + } + + public com.google.api.MediaUpload getDefaultInstanceForType() { + return com.google.api.MediaUpload.getDefaultInstance(); + } + + public com.google.api.MediaUpload build() { + com.google.api.MediaUpload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.MediaUpload buildPartial() { + com.google.api.MediaUpload result = new com.google.api.MediaUpload(this); + result.enabled_ = enabled_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MediaUpload) { + return mergeFrom((com.google.api.MediaUpload)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MediaUpload other) { + if (other == com.google.api.MediaUpload.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.MediaUpload parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.MediaUpload) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enabled_ ; + /** + * optional bool enabled = 3; + * + *
+     * Whether upload is enabled.
+     * 
+ */ + public boolean getEnabled() { + return enabled_; + } + /** + * optional bool enabled = 3; + * + *
+     * Whether upload is enabled.
+     * 
+ */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + onChanged(); + return this; + } + /** + * optional bool enabled = 3; + * + *
+     * Whether upload is enabled.
+     * 
+ */ + public Builder clearEnabled() { + + enabled_ = 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.MediaUpload) + } + + // @@protoc_insertion_point(class_scope:google.api.MediaUpload) + private static final com.google.api.MediaUpload DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.MediaUpload(); + } + + public static com.google.api.MediaUpload getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MediaUpload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new MediaUpload(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.MediaUpload getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MediaUploadOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MediaUploadOrBuilder.java new file mode 100644 index 000000000000..a3c55034ce00 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/MediaUploadOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface MediaUploadOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.MediaUpload) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bool enabled = 3; + * + *
+   * Whether upload is enabled.
+   * 
+ */ + boolean getEnabled(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Page.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Page.java new file mode 100644 index 000000000000..0ed13fb48cf4 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/Page.java @@ -0,0 +1,1176 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Page} + * + *
+ * Represents a documentation page. A page can contain subpages to represent
+ * nested documentation set structure.
+ * 
+ */ +public final class Page extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Page) + PageOrBuilder { + // Use Page.newBuilder() to construct. + private Page(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Page() { + name_ = ""; + content_ = ""; + subpages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Page( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + subpages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + subpages_.add(input.readMessage(com.google.api.Page.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + subpages_ = java.util.Collections.unmodifiableList(subpages_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Page.class, com.google.api.Page.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the page. It will be used as an identity of the page to
+   * generate URI of the page, text of the link to this page in navigation,
+   * etc. The full page name (start from the root page name to this page
+   * concatenated with `.`) can be used as reference to the page in your
+   * documentation. For example:
+   *     pages:
+   *     - name: Tutorial
+   *       content: (== include tutorial.md ==)
+   *       subpages:
+   *       - name: Java
+   *         content: (== include tutorial_java.md ==)
+   * You can reference `Java` page using Markdown reference link syntax:
+   * `[Java][Tutorial.Java]`.
+   * 
+ */ + 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 page. It will be used as an identity of the page to
+   * generate URI of the page, text of the link to this page in navigation,
+   * etc. The full page name (start from the root page name to this page
+   * concatenated with `.`) can be used as reference to the page in your
+   * documentation. For example:
+   *     pages:
+   *     - name: Tutorial
+   *       content: (== include tutorial.md ==)
+   *       subpages:
+   *       - name: Java
+   *         content: (== include tutorial_java.md ==)
+   * You can reference `Java` page using Markdown reference link syntax:
+   * `[Java][Tutorial.Java]`.
+   * 
+ */ + 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 CONTENT_FIELD_NUMBER = 2; + private volatile java.lang.Object content_; + /** + * optional string content = 2; + * + *
+   * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+   * to include content from a Markdown file.
+   * 
+ */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } + } + /** + * optional string content = 2; + * + *
+   * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+   * to include content from a Markdown file.
+   * 
+ */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBPAGES_FIELD_NUMBER = 3; + private java.util.List subpages_; + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + public java.util.List getSubpagesList() { + return subpages_; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + public java.util.List + getSubpagesOrBuilderList() { + return subpages_; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + public int getSubpagesCount() { + return subpages_.size(); + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + public com.google.api.Page getSubpages(int index) { + return subpages_.get(index); + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + public com.google.api.PageOrBuilder getSubpagesOrBuilder( + int index) { + return subpages_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!getContentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); + } + for (int i = 0; i < subpages_.size(); i++) { + output.writeMessage(3, subpages_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!getContentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); + } + for (int i = 0; i < subpages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, subpages_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Page parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Page 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.Page parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Page parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Page parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Page parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Page parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Page parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Page parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Page 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.Page 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.Page} + * + *
+   * Represents a documentation page. A page can contain subpages to represent
+   * nested documentation set structure.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Page) + com.google.api.PageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Page.class, com.google.api.Page.Builder.class); + } + + // Construct using com.google.api.Page.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSubpagesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + content_ = ""; + + if (subpagesBuilder_ == null) { + subpages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + subpagesBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_descriptor; + } + + public com.google.api.Page getDefaultInstanceForType() { + return com.google.api.Page.getDefaultInstance(); + } + + public com.google.api.Page build() { + com.google.api.Page result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Page buildPartial() { + com.google.api.Page result = new com.google.api.Page(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + result.content_ = content_; + if (subpagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subpages_ = java.util.Collections.unmodifiableList(subpages_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.subpages_ = subpages_; + } else { + result.subpages_ = subpagesBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Page) { + return mergeFrom((com.google.api.Page)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Page other) { + if (other == com.google.api.Page.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (subpagesBuilder_ == null) { + if (!other.subpages_.isEmpty()) { + if (subpages_.isEmpty()) { + subpages_ = other.subpages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSubpagesIsMutable(); + subpages_.addAll(other.subpages_); + } + onChanged(); + } + } else { + if (!other.subpages_.isEmpty()) { + if (subpagesBuilder_.isEmpty()) { + subpagesBuilder_.dispose(); + subpagesBuilder_ = null; + subpages_ = other.subpages_; + bitField0_ = (bitField0_ & ~0x00000004); + subpagesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getSubpagesFieldBuilder() : null; + } else { + subpagesBuilder_.addAllMessages(other.subpages_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.Page parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Page) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     *     pages:
+     *     - name: Tutorial
+     *       content: (== include tutorial.md ==)
+     *       subpages:
+     *       - name: Java
+     *         content: (== include tutorial_java.md ==)
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ */ + 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 page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     *     pages:
+     *     - name: Tutorial
+     *       content: (== include tutorial.md ==)
+     *       subpages:
+     *       - name: Java
+     *         content: (== include tutorial_java.md ==)
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ */ + 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 page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     *     pages:
+     *     - name: Tutorial
+     *       content: (== include tutorial.md ==)
+     *       subpages:
+     *       - name: Java
+     *         content: (== include tutorial_java.md ==)
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ */ + 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 page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     *     pages:
+     *     - name: Tutorial
+     *       content: (== include tutorial.md ==)
+     *       subpages:
+     *       - name: Java
+     *         content: (== include tutorial_java.md ==)
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     *     pages:
+     *     - name: Tutorial
+     *       content: (== include tutorial.md ==)
+     *       subpages:
+     *       - name: Java
+     *         content: (== include tutorial_java.md ==)
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + * optional string content = 2; + * + *
+     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+     * to include content from a Markdown file.
+     * 
+ */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string content = 2; + * + *
+     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+     * to include content from a Markdown file.
+     * 
+ */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string content = 2; + * + *
+     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+     * to include content from a Markdown file.
+     * 
+ */ + public Builder setContent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * optional string content = 2; + * + *
+     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+     * to include content from a Markdown file.
+     * 
+ */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * optional string content = 2; + * + *
+     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+     * to include content from a Markdown file.
+     * 
+ */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + content_ = value; + onChanged(); + return this; + } + + private java.util.List subpages_ = + java.util.Collections.emptyList(); + private void ensureSubpagesIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + subpages_ = new java.util.ArrayList(subpages_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> subpagesBuilder_; + + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public java.util.List getSubpagesList() { + if (subpagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(subpages_); + } else { + return subpagesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public int getSubpagesCount() { + if (subpagesBuilder_ == null) { + return subpages_.size(); + } else { + return subpagesBuilder_.getCount(); + } + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public com.google.api.Page getSubpages(int index) { + if (subpagesBuilder_ == null) { + return subpages_.get(index); + } else { + return subpagesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder setSubpages( + int index, com.google.api.Page value) { + if (subpagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubpagesIsMutable(); + subpages_.set(index, value); + onChanged(); + } else { + subpagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder setSubpages( + int index, com.google.api.Page.Builder builderForValue) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.set(index, builderForValue.build()); + onChanged(); + } else { + subpagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder addSubpages(com.google.api.Page value) { + if (subpagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubpagesIsMutable(); + subpages_.add(value); + onChanged(); + } else { + subpagesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder addSubpages( + int index, com.google.api.Page value) { + if (subpagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubpagesIsMutable(); + subpages_.add(index, value); + onChanged(); + } else { + subpagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder addSubpages( + com.google.api.Page.Builder builderForValue) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.add(builderForValue.build()); + onChanged(); + } else { + subpagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder addSubpages( + int index, com.google.api.Page.Builder builderForValue) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.add(index, builderForValue.build()); + onChanged(); + } else { + subpagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder addAllSubpages( + java.lang.Iterable values) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subpages_); + onChanged(); + } else { + subpagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder clearSubpages() { + if (subpagesBuilder_ == null) { + subpages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + subpagesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder removeSubpages(int index) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.remove(index); + onChanged(); + } else { + subpagesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public com.google.api.Page.Builder getSubpagesBuilder( + int index) { + return getSubpagesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public com.google.api.PageOrBuilder getSubpagesOrBuilder( + int index) { + if (subpagesBuilder_ == null) { + return subpages_.get(index); } else { + return subpagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public java.util.List + getSubpagesOrBuilderList() { + if (subpagesBuilder_ != null) { + return subpagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subpages_); + } + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public com.google.api.Page.Builder addSubpagesBuilder() { + return getSubpagesFieldBuilder().addBuilder( + com.google.api.Page.getDefaultInstance()); + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public com.google.api.Page.Builder addSubpagesBuilder( + int index) { + return getSubpagesFieldBuilder().addBuilder( + index, com.google.api.Page.getDefaultInstance()); + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public java.util.List + getSubpagesBuilderList() { + return getSubpagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> + getSubpagesFieldBuilder() { + if (subpagesBuilder_ == null) { + subpagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder>( + subpages_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + subpages_ = null; + } + return subpagesBuilder_; + } + 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.Page) + } + + // @@protoc_insertion_point(class_scope:google.api.Page) + private static final com.google.api.Page DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Page(); + } + + public static com.google.api.Page getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Page parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Page(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.Page getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/PageOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/PageOrBuilder.java new file mode 100644 index 000000000000..5a566c4ad030 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/PageOrBuilder.java @@ -0,0 +1,120 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +public interface PageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Page) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the page. It will be used as an identity of the page to
+   * generate URI of the page, text of the link to this page in navigation,
+   * etc. The full page name (start from the root page name to this page
+   * concatenated with `.`) can be used as reference to the page in your
+   * documentation. For example:
+   *     pages:
+   *     - name: Tutorial
+   *       content: (== include tutorial.md ==)
+   *       subpages:
+   *       - name: Java
+   *         content: (== include tutorial_java.md ==)
+   * You can reference `Java` page using Markdown reference link syntax:
+   * `[Java][Tutorial.Java]`.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the page. It will be used as an identity of the page to
+   * generate URI of the page, text of the link to this page in navigation,
+   * etc. The full page name (start from the root page name to this page
+   * concatenated with `.`) can be used as reference to the page in your
+   * documentation. For example:
+   *     pages:
+   *     - name: Tutorial
+   *       content: (== include tutorial.md ==)
+   *       subpages:
+   *       - name: Java
+   *         content: (== include tutorial_java.md ==)
+   * You can reference `Java` page using Markdown reference link syntax:
+   * `[Java][Tutorial.Java]`.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional string content = 2; + * + *
+   * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+   * to include content from a Markdown file.
+   * 
+ */ + java.lang.String getContent(); + /** + * optional string content = 2; + * + *
+   * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+   * to include content from a Markdown file.
+   * 
+ */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + java.util.List + getSubpagesList(); + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + com.google.api.Page getSubpages(int index); + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + int getSubpagesCount(); + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + java.util.List + getSubpagesOrBuilderList(); + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + com.google.api.PageOrBuilder getSubpagesOrBuilder( + int index); +} 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 new file mode 100644 index 000000000000..1ba6c8e37d79 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/Service.java @@ -0,0 +1,4591 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/service.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Service} + * + *
+ * (== page basics ==)
+ * `Service` is the root object of the configuration schema. It
+ * describes basic information like the name of the service and the
+ * exposed API interfaces, and delegates other aspects to configuration
+ * sub-sections.
+ * Example:
+ *     type: google.api.Service
+ *     config_version: 1
+ *     name: calendar.googleapis.com
+ *     title: Google Calendar API
+ *     apis:
+ *     - name: google.calendar.Calendar
+ *     visibility:
+ *       rules:
+ *       - selector: "*"
+ *         restriction: TRUSTED_TESTER
+ *     backend:
+ *       rules:
+ *       - selector: "*"
+ *         address: calendar-prod-backend.gslb.googleapis.com
+ * 
+ */ +public final class Service extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Service) + ServiceOrBuilder { + // Use Service.newBuilder() to construct. + private Service(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Service() { + name_ = ""; + title_ = ""; + producerProjectId_ = ""; + apis_ = java.util.Collections.emptyList(); + types_ = java.util.Collections.emptyList(); + enums_ = java.util.Collections.emptyList(); + systemTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Service( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + title_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + apis_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + apis_.add(input.readMessage(com.google.protobuf.Api.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + types_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + types_.add(input.readMessage(com.google.protobuf.Type.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + enums_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000040; + } + enums_.add(input.readMessage(com.google.protobuf.Enum.parser(), extensionRegistry)); + break; + } + case 50: { + com.google.api.Documentation.Builder subBuilder = null; + if (documentation_ != null) { + subBuilder = documentation_.toBuilder(); + } + documentation_ = input.readMessage(com.google.api.Documentation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(documentation_); + documentation_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.google.api.Visibility.Builder subBuilder = null; + if (visibility_ != null) { + subBuilder = visibility_.toBuilder(); + } + visibility_ = input.readMessage(com.google.api.Visibility.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(visibility_); + visibility_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.google.api.Http.Builder subBuilder = null; + if (http_ != null) { + subBuilder = http_.toBuilder(); + } + http_ = input.readMessage(com.google.api.Http.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(http_); + http_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.api.Context.Builder subBuilder = null; + if (context_ != null) { + subBuilder = context_.toBuilder(); + } + context_ = input.readMessage(com.google.api.Context.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(context_); + context_ = subBuilder.buildPartial(); + } + + break; + } + case 130: { + com.google.api.CustomError.Builder subBuilder = null; + if (customError_ != null) { + subBuilder = customError_.toBuilder(); + } + customError_ = input.readMessage(com.google.api.CustomError.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customError_); + customError_ = subBuilder.buildPartial(); + } + + break; + } + case 162: { + com.google.protobuf.UInt32Value.Builder subBuilder = null; + if (configVersion_ != null) { + subBuilder = configVersion_.toBuilder(); + } + configVersion_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(configVersion_); + configVersion_ = subBuilder.buildPartial(); + } + + break; + } + case 178: { + String s = input.readStringRequireUtf8(); + + producerProjectId_ = s; + break; + } + case 802: { + com.google.protobuf.Any.Builder subBuilder = null; + if (derivedData_ != null) { + subBuilder = derivedData_.toBuilder(); + } + derivedData_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(derivedData_); + derivedData_ = subBuilder.buildPartial(); + } + + break; + } + case 818: { + if (!((mutable_bitField0_ & 0x00002000) == 0x00002000)) { + systemTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00002000; + } + systemTypes_.add(input.readMessage(com.google.protobuf.Type.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + apis_ = java.util.Collections.unmodifiableList(apis_); + } + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + types_ = java.util.Collections.unmodifiableList(types_); + } + if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + enums_ = java.util.Collections.unmodifiableList(enums_); + } + if (((mutable_bitField0_ & 0x00002000) == 0x00002000)) { + systemTypes_ = java.util.Collections.unmodifiableList(systemTypes_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ServiceProto.internal_static_google_api_Service_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ServiceProto.internal_static_google_api_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Service.class, com.google.api.Service.Builder.class); + } + + private int bitField0_; + public static final int CONFIG_VERSION_FIELD_NUMBER = 20; + private com.google.protobuf.UInt32Value configVersion_; + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+   * The version of the service configuration. The config version may
+   * influence interpretation of the configuration, for example
+   * determine defaults. This is documented together with applicable
+   * options. The current default for the config version itself is `1`.
+   * 
+ */ + public boolean hasConfigVersion() { + return configVersion_ != null; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+   * The version of the service configuration. The config version may
+   * influence interpretation of the configuration, for example
+   * determine defaults. This is documented together with applicable
+   * options. The current default for the config version itself is `1`.
+   * 
+ */ + public com.google.protobuf.UInt32Value getConfigVersion() { + return configVersion_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : configVersion_; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+   * The version of the service configuration. The config version may
+   * influence interpretation of the configuration, for example
+   * determine defaults. This is documented together with applicable
+   * options. The current default for the config version itself is `1`.
+   * 
+ */ + public com.google.protobuf.UInt32ValueOrBuilder getConfigVersionOrBuilder() { + return getConfigVersion(); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The DNS address at which this service is available,
+   * e.g. `calendar.googleapis.com`.
+   * 
+ */ + 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 DNS address at which this service is available,
+   * e.g. `calendar.googleapis.com`.
+   * 
+ */ + 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 TITLE_FIELD_NUMBER = 2; + private volatile java.lang.Object title_; + /** + * optional string title = 2; + * + *
+   * The product title associated with this service.
+   * 
+ */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + /** + * optional string title = 2; + * + *
+   * The product title associated with this service.
+   * 
+ */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCER_PROJECT_ID_FIELD_NUMBER = 22; + private volatile java.lang.Object producerProjectId_; + /** + * optional string producer_project_id = 22; + * + *
+   * The id of the Google developer project that owns the service.
+   * Members of this project can manage the service configuration,
+   * manage consumption of the service, etc.
+   * 
+ */ + public java.lang.String getProducerProjectId() { + java.lang.Object ref = producerProjectId_; + 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(); + producerProjectId_ = s; + return s; + } + } + /** + * optional string producer_project_id = 22; + * + *
+   * The id of the Google developer project that owns the service.
+   * Members of this project can manage the service configuration,
+   * manage consumption of the service, etc.
+   * 
+ */ + public com.google.protobuf.ByteString + getProducerProjectIdBytes() { + java.lang.Object ref = producerProjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + producerProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APIS_FIELD_NUMBER = 3; + private java.util.List apis_; + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + public java.util.List getApisList() { + return apis_; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + public java.util.List + getApisOrBuilderList() { + return apis_; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + public int getApisCount() { + return apis_.size(); + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + public com.google.protobuf.Api getApis(int index) { + return apis_.get(index); + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + public com.google.protobuf.ApiOrBuilder getApisOrBuilder( + int index) { + return apis_.get(index); + } + + public static final int TYPES_FIELD_NUMBER = 4; + private java.util.List types_; + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + public java.util.List getTypesList() { + return types_; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + public java.util.List + getTypesOrBuilderList() { + return types_; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + public int getTypesCount() { + return types_.size(); + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + public com.google.protobuf.Type getTypes(int index) { + return types_.get(index); + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + public com.google.protobuf.TypeOrBuilder getTypesOrBuilder( + int index) { + return types_.get(index); + } + + public static final int ENUMS_FIELD_NUMBER = 5; + private java.util.List enums_; + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + public java.util.List getEnumsList() { + return enums_; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + public java.util.List + getEnumsOrBuilderList() { + return enums_; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + public int getEnumsCount() { + return enums_.size(); + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + public com.google.protobuf.Enum getEnums(int index) { + return enums_.get(index); + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + public com.google.protobuf.EnumOrBuilder getEnumsOrBuilder( + int index) { + return enums_.get(index); + } + + public static final int DOCUMENTATION_FIELD_NUMBER = 6; + private com.google.api.Documentation documentation_; + /** + * optional .google.api.Documentation documentation = 6; + * + *
+   * Additional API documentation.
+   * 
+ */ + public boolean hasDocumentation() { + return documentation_ != null; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+   * Additional API documentation.
+   * 
+ */ + public com.google.api.Documentation getDocumentation() { + return documentation_ == null ? com.google.api.Documentation.getDefaultInstance() : documentation_; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+   * Additional API documentation.
+   * 
+ */ + public com.google.api.DocumentationOrBuilder getDocumentationOrBuilder() { + return getDocumentation(); + } + + public static final int VISIBILITY_FIELD_NUMBER = 7; + private com.google.api.Visibility visibility_; + /** + * optional .google.api.Visibility visibility = 7; + * + *
+   * API visibility configuration.
+   * 
+ */ + public boolean hasVisibility() { + return visibility_ != null; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+   * API visibility configuration.
+   * 
+ */ + public com.google.api.Visibility getVisibility() { + return visibility_ == null ? com.google.api.Visibility.getDefaultInstance() : visibility_; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+   * API visibility configuration.
+   * 
+ */ + public com.google.api.VisibilityOrBuilder getVisibilityOrBuilder() { + return getVisibility(); + } + + public static final int HTTP_FIELD_NUMBER = 9; + private com.google.api.Http http_; + /** + * optional .google.api.Http http = 9; + * + *
+   * HTTP configuration.
+   * 
+ */ + public boolean hasHttp() { + return http_ != null; + } + /** + * optional .google.api.Http http = 9; + * + *
+   * HTTP configuration.
+   * 
+ */ + public com.google.api.Http getHttp() { + return http_ == null ? com.google.api.Http.getDefaultInstance() : http_; + } + /** + * optional .google.api.Http http = 9; + * + *
+   * HTTP configuration.
+   * 
+ */ + public com.google.api.HttpOrBuilder getHttpOrBuilder() { + return getHttp(); + } + + public static final int CONTEXT_FIELD_NUMBER = 12; + private com.google.api.Context context_; + /** + * optional .google.api.Context context = 12; + * + *
+   * Context configuration.
+   * 
+ */ + public boolean hasContext() { + return context_ != null; + } + /** + * optional .google.api.Context context = 12; + * + *
+   * Context configuration.
+   * 
+ */ + public com.google.api.Context getContext() { + return context_ == null ? com.google.api.Context.getDefaultInstance() : context_; + } + /** + * optional .google.api.Context context = 12; + * + *
+   * Context configuration.
+   * 
+ */ + public com.google.api.ContextOrBuilder getContextOrBuilder() { + return getContext(); + } + + public static final int CUSTOM_ERROR_FIELD_NUMBER = 16; + private com.google.api.CustomError customError_; + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+   * Custom error configuration.
+   * 
+ */ + public boolean hasCustomError() { + return customError_ != null; + } + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+   * Custom error configuration.
+   * 
+ */ + public com.google.api.CustomError getCustomError() { + return customError_ == null ? com.google.api.CustomError.getDefaultInstance() : customError_; + } + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+   * Custom error configuration.
+   * 
+ */ + public com.google.api.CustomErrorOrBuilder getCustomErrorOrBuilder() { + return getCustomError(); + } + + public static final int DERIVED_DATA_FIELD_NUMBER = 100; + private com.google.protobuf.Any derivedData_; + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+   * Service attributes derived by the configuration toolchain, for
+   * use at runtime.  Type is defined in
+   * `//google/internal/api/derived_service.proto`.
+   * 
+ */ + public boolean hasDerivedData() { + return derivedData_ != null; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+   * Service attributes derived by the configuration toolchain, for
+   * use at runtime.  Type is defined in
+   * `//google/internal/api/derived_service.proto`.
+   * 
+ */ + public com.google.protobuf.Any getDerivedData() { + return derivedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : derivedData_; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+   * Service attributes derived by the configuration toolchain, for
+   * use at runtime.  Type is defined in
+   * `//google/internal/api/derived_service.proto`.
+   * 
+ */ + public com.google.protobuf.AnyOrBuilder getDerivedDataOrBuilder() { + return getDerivedData(); + } + + public static final int SYSTEM_TYPES_FIELD_NUMBER = 102; + private java.util.List systemTypes_; + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + public java.util.List getSystemTypesList() { + return systemTypes_; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + public java.util.List + getSystemTypesOrBuilderList() { + return systemTypes_; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + public int getSystemTypesCount() { + return systemTypes_.size(); + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + public com.google.protobuf.Type getSystemTypes(int index) { + return systemTypes_.get(index); + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + public com.google.protobuf.TypeOrBuilder getSystemTypesOrBuilder( + int index) { + return systemTypes_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!getTitleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); + } + for (int i = 0; i < apis_.size(); i++) { + output.writeMessage(3, apis_.get(i)); + } + for (int i = 0; i < types_.size(); i++) { + output.writeMessage(4, types_.get(i)); + } + for (int i = 0; i < enums_.size(); i++) { + output.writeMessage(5, enums_.get(i)); + } + if (documentation_ != null) { + output.writeMessage(6, getDocumentation()); + } + if (visibility_ != null) { + output.writeMessage(7, getVisibility()); + } + if (http_ != null) { + output.writeMessage(9, getHttp()); + } + if (context_ != null) { + output.writeMessage(12, getContext()); + } + if (customError_ != null) { + output.writeMessage(16, getCustomError()); + } + if (configVersion_ != null) { + output.writeMessage(20, getConfigVersion()); + } + if (!getProducerProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 22, producerProjectId_); + } + if (derivedData_ != null) { + output.writeMessage(100, getDerivedData()); + } + for (int i = 0; i < systemTypes_.size(); i++) { + output.writeMessage(102, systemTypes_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!getTitleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); + } + for (int i = 0; i < apis_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, apis_.get(i)); + } + for (int i = 0; i < types_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, types_.get(i)); + } + for (int i = 0; i < enums_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, enums_.get(i)); + } + if (documentation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getDocumentation()); + } + if (visibility_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getVisibility()); + } + if (http_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getHttp()); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getContext()); + } + if (customError_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getCustomError()); + } + if (configVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getConfigVersion()); + } + if (!getProducerProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(22, producerProjectId_); + } + 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 { + return PARSER.parseFrom(data); + } + public static com.google.api.Service 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.Service parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Service parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Service parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Service parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Service parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Service parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Service parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Service 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.Service 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.Service} + * + *
+   * (== page basics ==)
+   * `Service` is the root object of the configuration schema. It
+   * describes basic information like the name of the service and the
+   * exposed API interfaces, and delegates other aspects to configuration
+   * sub-sections.
+   * Example:
+   *     type: google.api.Service
+   *     config_version: 1
+   *     name: calendar.googleapis.com
+   *     title: Google Calendar API
+   *     apis:
+   *     - name: google.calendar.Calendar
+   *     visibility:
+   *       rules:
+   *       - selector: "*"
+   *         restriction: TRUSTED_TESTER
+   *     backend:
+   *       rules:
+   *       - selector: "*"
+   *         address: calendar-prod-backend.gslb.googleapis.com
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Service) + com.google.api.ServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ServiceProto.internal_static_google_api_Service_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ServiceProto.internal_static_google_api_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Service.class, com.google.api.Service.Builder.class); + } + + // Construct using com.google.api.Service.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getApisFieldBuilder(); + getTypesFieldBuilder(); + getEnumsFieldBuilder(); + getSystemTypesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (configVersionBuilder_ == null) { + configVersion_ = null; + } else { + configVersion_ = null; + configVersionBuilder_ = null; + } + name_ = ""; + + title_ = ""; + + producerProjectId_ = ""; + + if (apisBuilder_ == null) { + apis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + apisBuilder_.clear(); + } + if (typesBuilder_ == null) { + types_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + typesBuilder_.clear(); + } + if (enumsBuilder_ == null) { + enums_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + } else { + enumsBuilder_.clear(); + } + if (documentationBuilder_ == null) { + documentation_ = null; + } else { + documentation_ = null; + documentationBuilder_ = null; + } + if (visibilityBuilder_ == null) { + visibility_ = null; + } else { + visibility_ = null; + visibilityBuilder_ = null; + } + if (httpBuilder_ == null) { + http_ = null; + } else { + http_ = null; + httpBuilder_ = null; + } + if (contextBuilder_ == null) { + context_ = null; + } else { + context_ = null; + contextBuilder_ = null; + } + if (customErrorBuilder_ == null) { + customError_ = null; + } else { + customError_ = null; + customErrorBuilder_ = null; + } + if (derivedDataBuilder_ == null) { + derivedData_ = null; + } else { + derivedData_ = null; + derivedDataBuilder_ = null; + } + if (systemTypesBuilder_ == null) { + systemTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + } else { + systemTypesBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.ServiceProto.internal_static_google_api_Service_descriptor; + } + + public com.google.api.Service getDefaultInstanceForType() { + return com.google.api.Service.getDefaultInstance(); + } + + public com.google.api.Service build() { + com.google.api.Service result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Service buildPartial() { + com.google.api.Service result = new com.google.api.Service(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (configVersionBuilder_ == null) { + result.configVersion_ = configVersion_; + } else { + result.configVersion_ = configVersionBuilder_.build(); + } + result.name_ = name_; + result.title_ = title_; + result.producerProjectId_ = producerProjectId_; + if (apisBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { + apis_ = java.util.Collections.unmodifiableList(apis_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.apis_ = apis_; + } else { + result.apis_ = apisBuilder_.build(); + } + if (typesBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { + types_ = java.util.Collections.unmodifiableList(types_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.types_ = types_; + } else { + result.types_ = typesBuilder_.build(); + } + if (enumsBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { + enums_ = java.util.Collections.unmodifiableList(enums_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.enums_ = enums_; + } else { + result.enums_ = enumsBuilder_.build(); + } + if (documentationBuilder_ == null) { + result.documentation_ = documentation_; + } else { + result.documentation_ = documentationBuilder_.build(); + } + if (visibilityBuilder_ == null) { + result.visibility_ = visibility_; + } else { + result.visibility_ = visibilityBuilder_.build(); + } + if (httpBuilder_ == null) { + result.http_ = http_; + } else { + result.http_ = httpBuilder_.build(); + } + if (contextBuilder_ == null) { + result.context_ = context_; + } else { + result.context_ = contextBuilder_.build(); + } + if (customErrorBuilder_ == null) { + result.customError_ = customError_; + } else { + result.customError_ = customErrorBuilder_.build(); + } + if (derivedDataBuilder_ == null) { + result.derivedData_ = derivedData_; + } else { + result.derivedData_ = derivedDataBuilder_.build(); + } + if (systemTypesBuilder_ == null) { + if (((bitField0_ & 0x00002000) == 0x00002000)) { + systemTypes_ = java.util.Collections.unmodifiableList(systemTypes_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.systemTypes_ = systemTypes_; + } else { + result.systemTypes_ = systemTypesBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Service) { + return mergeFrom((com.google.api.Service)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Service other) { + if (other == com.google.api.Service.getDefaultInstance()) return this; + if (other.hasConfigVersion()) { + mergeConfigVersion(other.getConfigVersion()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + onChanged(); + } + if (!other.getProducerProjectId().isEmpty()) { + producerProjectId_ = other.producerProjectId_; + onChanged(); + } + if (apisBuilder_ == null) { + if (!other.apis_.isEmpty()) { + if (apis_.isEmpty()) { + apis_ = other.apis_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureApisIsMutable(); + apis_.addAll(other.apis_); + } + onChanged(); + } + } else { + if (!other.apis_.isEmpty()) { + if (apisBuilder_.isEmpty()) { + apisBuilder_.dispose(); + apisBuilder_ = null; + apis_ = other.apis_; + bitField0_ = (bitField0_ & ~0x00000010); + apisBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getApisFieldBuilder() : null; + } else { + apisBuilder_.addAllMessages(other.apis_); + } + } + } + if (typesBuilder_ == null) { + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); + } + onChanged(); + } + } else { + if (!other.types_.isEmpty()) { + if (typesBuilder_.isEmpty()) { + typesBuilder_.dispose(); + typesBuilder_ = null; + types_ = other.types_; + bitField0_ = (bitField0_ & ~0x00000020); + typesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTypesFieldBuilder() : null; + } else { + typesBuilder_.addAllMessages(other.types_); + } + } + } + if (enumsBuilder_ == null) { + if (!other.enums_.isEmpty()) { + if (enums_.isEmpty()) { + enums_ = other.enums_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureEnumsIsMutable(); + enums_.addAll(other.enums_); + } + onChanged(); + } + } else { + if (!other.enums_.isEmpty()) { + if (enumsBuilder_.isEmpty()) { + enumsBuilder_.dispose(); + enumsBuilder_ = null; + enums_ = other.enums_; + bitField0_ = (bitField0_ & ~0x00000040); + enumsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getEnumsFieldBuilder() : null; + } else { + enumsBuilder_.addAllMessages(other.enums_); + } + } + } + if (other.hasDocumentation()) { + mergeDocumentation(other.getDocumentation()); + } + if (other.hasVisibility()) { + mergeVisibility(other.getVisibility()); + } + if (other.hasHttp()) { + mergeHttp(other.getHttp()); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + if (other.hasCustomError()) { + mergeCustomError(other.getCustomError()); + } + if (other.hasDerivedData()) { + mergeDerivedData(other.getDerivedData()); + } + if (systemTypesBuilder_ == null) { + if (!other.systemTypes_.isEmpty()) { + if (systemTypes_.isEmpty()) { + systemTypes_ = other.systemTypes_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureSystemTypesIsMutable(); + systemTypes_.addAll(other.systemTypes_); + } + onChanged(); + } + } else { + if (!other.systemTypes_.isEmpty()) { + if (systemTypesBuilder_.isEmpty()) { + systemTypesBuilder_.dispose(); + systemTypesBuilder_ = null; + systemTypes_ = other.systemTypes_; + bitField0_ = (bitField0_ & ~0x00002000); + systemTypesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getSystemTypesFieldBuilder() : null; + } else { + systemTypesBuilder_.addAllMessages(other.systemTypes_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.Service parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Service) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.UInt32Value configVersion_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> configVersionBuilder_; + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public boolean hasConfigVersion() { + return configVersionBuilder_ != null || configVersion_ != null; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public com.google.protobuf.UInt32Value getConfigVersion() { + if (configVersionBuilder_ == null) { + return configVersion_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : configVersion_; + } else { + return configVersionBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public Builder setConfigVersion(com.google.protobuf.UInt32Value value) { + if (configVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configVersion_ = value; + onChanged(); + } else { + configVersionBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public Builder setConfigVersion( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (configVersionBuilder_ == null) { + configVersion_ = builderForValue.build(); + onChanged(); + } else { + configVersionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public Builder mergeConfigVersion(com.google.protobuf.UInt32Value value) { + if (configVersionBuilder_ == null) { + if (configVersion_ != null) { + configVersion_ = + com.google.protobuf.UInt32Value.newBuilder(configVersion_).mergeFrom(value).buildPartial(); + } else { + configVersion_ = value; + } + onChanged(); + } else { + configVersionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public Builder clearConfigVersion() { + if (configVersionBuilder_ == null) { + configVersion_ = null; + onChanged(); + } else { + configVersion_ = null; + configVersionBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public com.google.protobuf.UInt32Value.Builder getConfigVersionBuilder() { + + onChanged(); + return getConfigVersionFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public com.google.protobuf.UInt32ValueOrBuilder getConfigVersionOrBuilder() { + if (configVersionBuilder_ != null) { + return configVersionBuilder_.getMessageOrBuilder(); + } else { + return configVersion_ == null ? + com.google.protobuf.UInt32Value.getDefaultInstance() : configVersion_; + } + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getConfigVersionFieldBuilder() { + if (configVersionBuilder_ == null) { + configVersionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + getConfigVersion(), + getParentForChildren(), + isClean()); + configVersion_ = null; + } + return configVersionBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The DNS address at which this service is available,
+     * e.g. `calendar.googleapis.com`.
+     * 
+ */ + 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 DNS address at which this service is available,
+     * e.g. `calendar.googleapis.com`.
+     * 
+ */ + 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 DNS address at which this service is available,
+     * e.g. `calendar.googleapis.com`.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The DNS address at which this service is available,
+     * e.g. `calendar.googleapis.com`.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The DNS address at which this service is available,
+     * e.g. `calendar.googleapis.com`.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + /** + * optional string title = 2; + * + *
+     * The product title associated with this service.
+     * 
+ */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string title = 2; + * + *
+     * The product title associated with this service.
+     * 
+ */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string title = 2; + * + *
+     * The product title associated with this service.
+     * 
+ */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + title_ = value; + onChanged(); + return this; + } + /** + * optional string title = 2; + * + *
+     * The product title associated with this service.
+     * 
+ */ + public Builder clearTitle() { + + title_ = getDefaultInstance().getTitle(); + onChanged(); + return this; + } + /** + * optional string title = 2; + * + *
+     * The product title associated with this service.
+     * 
+ */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + title_ = value; + onChanged(); + return this; + } + + private java.lang.Object producerProjectId_ = ""; + /** + * optional string producer_project_id = 22; + * + *
+     * The id of the Google developer project that owns the service.
+     * Members of this project can manage the service configuration,
+     * manage consumption of the service, etc.
+     * 
+ */ + public java.lang.String getProducerProjectId() { + java.lang.Object ref = producerProjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + producerProjectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string producer_project_id = 22; + * + *
+     * The id of the Google developer project that owns the service.
+     * Members of this project can manage the service configuration,
+     * manage consumption of the service, etc.
+     * 
+ */ + public com.google.protobuf.ByteString + getProducerProjectIdBytes() { + java.lang.Object ref = producerProjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + producerProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string producer_project_id = 22; + * + *
+     * The id of the Google developer project that owns the service.
+     * Members of this project can manage the service configuration,
+     * manage consumption of the service, etc.
+     * 
+ */ + public Builder setProducerProjectId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + producerProjectId_ = value; + onChanged(); + return this; + } + /** + * optional string producer_project_id = 22; + * + *
+     * The id of the Google developer project that owns the service.
+     * Members of this project can manage the service configuration,
+     * manage consumption of the service, etc.
+     * 
+ */ + public Builder clearProducerProjectId() { + + producerProjectId_ = getDefaultInstance().getProducerProjectId(); + onChanged(); + return this; + } + /** + * optional string producer_project_id = 22; + * + *
+     * The id of the Google developer project that owns the service.
+     * Members of this project can manage the service configuration,
+     * manage consumption of the service, etc.
+     * 
+ */ + public Builder setProducerProjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + producerProjectId_ = value; + onChanged(); + return this; + } + + private java.util.List apis_ = + java.util.Collections.emptyList(); + private void ensureApisIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + apis_ = new java.util.ArrayList(apis_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Api, com.google.protobuf.Api.Builder, com.google.protobuf.ApiOrBuilder> apisBuilder_; + + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public java.util.List getApisList() { + if (apisBuilder_ == null) { + return java.util.Collections.unmodifiableList(apis_); + } else { + return apisBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public int getApisCount() { + if (apisBuilder_ == null) { + return apis_.size(); + } else { + return apisBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public com.google.protobuf.Api getApis(int index) { + if (apisBuilder_ == null) { + return apis_.get(index); + } else { + return apisBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder setApis( + int index, com.google.protobuf.Api value) { + if (apisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApisIsMutable(); + apis_.set(index, value); + onChanged(); + } else { + apisBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder setApis( + int index, com.google.protobuf.Api.Builder builderForValue) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + apis_.set(index, builderForValue.build()); + onChanged(); + } else { + apisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder addApis(com.google.protobuf.Api value) { + if (apisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApisIsMutable(); + apis_.add(value); + onChanged(); + } else { + apisBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder addApis( + int index, com.google.protobuf.Api value) { + if (apisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApisIsMutable(); + apis_.add(index, value); + onChanged(); + } else { + apisBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder addApis( + com.google.protobuf.Api.Builder builderForValue) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + apis_.add(builderForValue.build()); + onChanged(); + } else { + apisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder addApis( + int index, com.google.protobuf.Api.Builder builderForValue) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + apis_.add(index, builderForValue.build()); + onChanged(); + } else { + apisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder addAllApis( + java.lang.Iterable values) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, apis_); + onChanged(); + } else { + apisBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder clearApis() { + if (apisBuilder_ == null) { + apis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + apisBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder removeApis(int index) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + apis_.remove(index); + onChanged(); + } else { + apisBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public com.google.protobuf.Api.Builder getApisBuilder( + int index) { + return getApisFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public com.google.protobuf.ApiOrBuilder getApisOrBuilder( + int index) { + if (apisBuilder_ == null) { + return apis_.get(index); } else { + return apisBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public java.util.List + getApisOrBuilderList() { + if (apisBuilder_ != null) { + return apisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(apis_); + } + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public com.google.protobuf.Api.Builder addApisBuilder() { + return getApisFieldBuilder().addBuilder( + com.google.protobuf.Api.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public com.google.protobuf.Api.Builder addApisBuilder( + int index) { + return getApisFieldBuilder().addBuilder( + index, com.google.protobuf.Api.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public java.util.List + getApisBuilderList() { + return getApisFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Api, com.google.protobuf.Api.Builder, com.google.protobuf.ApiOrBuilder> + getApisFieldBuilder() { + if (apisBuilder_ == null) { + apisBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Api, com.google.protobuf.Api.Builder, com.google.protobuf.ApiOrBuilder>( + apis_, + ((bitField0_ & 0x00000010) == 0x00000010), + getParentForChildren(), + isClean()); + apis_ = null; + } + return apisBuilder_; + } + + private java.util.List types_ = + java.util.Collections.emptyList(); + private void ensureTypesIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + types_ = new java.util.ArrayList(types_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder> typesBuilder_; + + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public java.util.List getTypesList() { + if (typesBuilder_ == null) { + return java.util.Collections.unmodifiableList(types_); + } else { + return typesBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public int getTypesCount() { + if (typesBuilder_ == null) { + return types_.size(); + } else { + return typesBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public com.google.protobuf.Type getTypes(int index) { + if (typesBuilder_ == null) { + return types_.get(index); + } else { + return typesBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder setTypes( + int index, com.google.protobuf.Type value) { + if (typesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.set(index, value); + onChanged(); + } else { + typesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder setTypes( + int index, com.google.protobuf.Type.Builder builderForValue) { + if (typesBuilder_ == null) { + ensureTypesIsMutable(); + types_.set(index, builderForValue.build()); + onChanged(); + } else { + typesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder addTypes(com.google.protobuf.Type value) { + if (typesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(value); + onChanged(); + } else { + typesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder addTypes( + int index, com.google.protobuf.Type value) { + if (typesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(index, value); + onChanged(); + } else { + typesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder addTypes( + com.google.protobuf.Type.Builder builderForValue) { + if (typesBuilder_ == null) { + ensureTypesIsMutable(); + types_.add(builderForValue.build()); + onChanged(); + } else { + typesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder addTypes( + int index, com.google.protobuf.Type.Builder builderForValue) { + if (typesBuilder_ == null) { + ensureTypesIsMutable(); + types_.add(index, builderForValue.build()); + onChanged(); + } else { + typesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder addAllTypes( + java.lang.Iterable values) { + if (typesBuilder_ == null) { + ensureTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, types_); + onChanged(); + } else { + typesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder clearTypes() { + if (typesBuilder_ == null) { + types_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + typesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder removeTypes(int index) { + if (typesBuilder_ == null) { + ensureTypesIsMutable(); + types_.remove(index); + onChanged(); + } else { + typesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public com.google.protobuf.Type.Builder getTypesBuilder( + int index) { + return getTypesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public com.google.protobuf.TypeOrBuilder getTypesOrBuilder( + int index) { + if (typesBuilder_ == null) { + return types_.get(index); } else { + return typesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public java.util.List + getTypesOrBuilderList() { + if (typesBuilder_ != null) { + return typesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(types_); + } + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public com.google.protobuf.Type.Builder addTypesBuilder() { + return getTypesFieldBuilder().addBuilder( + com.google.protobuf.Type.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public com.google.protobuf.Type.Builder addTypesBuilder( + int index) { + return getTypesFieldBuilder().addBuilder( + index, com.google.protobuf.Type.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public java.util.List + getTypesBuilderList() { + return getTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder> + getTypesFieldBuilder() { + if (typesBuilder_ == null) { + typesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder>( + types_, + ((bitField0_ & 0x00000020) == 0x00000020), + getParentForChildren(), + isClean()); + types_ = null; + } + return typesBuilder_; + } + + private java.util.List enums_ = + java.util.Collections.emptyList(); + private void ensureEnumsIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + enums_ = new java.util.ArrayList(enums_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Enum, com.google.protobuf.Enum.Builder, com.google.protobuf.EnumOrBuilder> enumsBuilder_; + + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public java.util.List getEnumsList() { + if (enumsBuilder_ == null) { + return java.util.Collections.unmodifiableList(enums_); + } else { + return enumsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public int getEnumsCount() { + if (enumsBuilder_ == null) { + return enums_.size(); + } else { + return enumsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public com.google.protobuf.Enum getEnums(int index) { + if (enumsBuilder_ == null) { + return enums_.get(index); + } else { + return enumsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder setEnums( + int index, com.google.protobuf.Enum value) { + if (enumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumsIsMutable(); + enums_.set(index, value); + onChanged(); + } else { + enumsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder setEnums( + int index, com.google.protobuf.Enum.Builder builderForValue) { + if (enumsBuilder_ == null) { + ensureEnumsIsMutable(); + enums_.set(index, builderForValue.build()); + onChanged(); + } else { + enumsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder addEnums(com.google.protobuf.Enum value) { + if (enumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumsIsMutable(); + enums_.add(value); + onChanged(); + } else { + enumsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder addEnums( + int index, com.google.protobuf.Enum value) { + if (enumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumsIsMutable(); + enums_.add(index, value); + onChanged(); + } else { + enumsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder addEnums( + com.google.protobuf.Enum.Builder builderForValue) { + if (enumsBuilder_ == null) { + ensureEnumsIsMutable(); + enums_.add(builderForValue.build()); + onChanged(); + } else { + enumsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder addEnums( + int index, com.google.protobuf.Enum.Builder builderForValue) { + if (enumsBuilder_ == null) { + ensureEnumsIsMutable(); + enums_.add(index, builderForValue.build()); + onChanged(); + } else { + enumsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder addAllEnums( + java.lang.Iterable values) { + if (enumsBuilder_ == null) { + ensureEnumsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, enums_); + onChanged(); + } else { + enumsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder clearEnums() { + if (enumsBuilder_ == null) { + enums_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + enumsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder removeEnums(int index) { + if (enumsBuilder_ == null) { + ensureEnumsIsMutable(); + enums_.remove(index); + onChanged(); + } else { + enumsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public com.google.protobuf.Enum.Builder getEnumsBuilder( + int index) { + return getEnumsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public com.google.protobuf.EnumOrBuilder getEnumsOrBuilder( + int index) { + if (enumsBuilder_ == null) { + return enums_.get(index); } else { + return enumsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public java.util.List + getEnumsOrBuilderList() { + if (enumsBuilder_ != null) { + return enumsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(enums_); + } + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public com.google.protobuf.Enum.Builder addEnumsBuilder() { + return getEnumsFieldBuilder().addBuilder( + com.google.protobuf.Enum.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public com.google.protobuf.Enum.Builder addEnumsBuilder( + int index) { + return getEnumsFieldBuilder().addBuilder( + index, com.google.protobuf.Enum.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public java.util.List + getEnumsBuilderList() { + return getEnumsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Enum, com.google.protobuf.Enum.Builder, com.google.protobuf.EnumOrBuilder> + getEnumsFieldBuilder() { + if (enumsBuilder_ == null) { + enumsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Enum, com.google.protobuf.Enum.Builder, com.google.protobuf.EnumOrBuilder>( + enums_, + ((bitField0_ & 0x00000040) == 0x00000040), + getParentForChildren(), + isClean()); + enums_ = null; + } + return enumsBuilder_; + } + + private com.google.api.Documentation documentation_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Documentation, com.google.api.Documentation.Builder, com.google.api.DocumentationOrBuilder> documentationBuilder_; + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public boolean hasDocumentation() { + return documentationBuilder_ != null || documentation_ != null; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public com.google.api.Documentation getDocumentation() { + if (documentationBuilder_ == null) { + return documentation_ == null ? com.google.api.Documentation.getDefaultInstance() : documentation_; + } else { + return documentationBuilder_.getMessage(); + } + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public Builder setDocumentation(com.google.api.Documentation value) { + if (documentationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + documentation_ = value; + onChanged(); + } else { + documentationBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public Builder setDocumentation( + com.google.api.Documentation.Builder builderForValue) { + if (documentationBuilder_ == null) { + documentation_ = builderForValue.build(); + onChanged(); + } else { + documentationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public Builder mergeDocumentation(com.google.api.Documentation value) { + if (documentationBuilder_ == null) { + if (documentation_ != null) { + documentation_ = + com.google.api.Documentation.newBuilder(documentation_).mergeFrom(value).buildPartial(); + } else { + documentation_ = value; + } + onChanged(); + } else { + documentationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public Builder clearDocumentation() { + if (documentationBuilder_ == null) { + documentation_ = null; + onChanged(); + } else { + documentation_ = null; + documentationBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public com.google.api.Documentation.Builder getDocumentationBuilder() { + + onChanged(); + return getDocumentationFieldBuilder().getBuilder(); + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public com.google.api.DocumentationOrBuilder getDocumentationOrBuilder() { + if (documentationBuilder_ != null) { + return documentationBuilder_.getMessageOrBuilder(); + } else { + return documentation_ == null ? + com.google.api.Documentation.getDefaultInstance() : documentation_; + } + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Documentation, com.google.api.Documentation.Builder, com.google.api.DocumentationOrBuilder> + getDocumentationFieldBuilder() { + if (documentationBuilder_ == null) { + documentationBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Documentation, com.google.api.Documentation.Builder, com.google.api.DocumentationOrBuilder>( + getDocumentation(), + getParentForChildren(), + isClean()); + documentation_ = null; + } + return documentationBuilder_; + } + + private com.google.api.Visibility visibility_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Visibility, com.google.api.Visibility.Builder, com.google.api.VisibilityOrBuilder> visibilityBuilder_; + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public boolean hasVisibility() { + return visibilityBuilder_ != null || visibility_ != null; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public com.google.api.Visibility getVisibility() { + if (visibilityBuilder_ == null) { + return visibility_ == null ? com.google.api.Visibility.getDefaultInstance() : visibility_; + } else { + return visibilityBuilder_.getMessage(); + } + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public Builder setVisibility(com.google.api.Visibility value) { + if (visibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + visibility_ = value; + onChanged(); + } else { + visibilityBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public Builder setVisibility( + com.google.api.Visibility.Builder builderForValue) { + if (visibilityBuilder_ == null) { + visibility_ = builderForValue.build(); + onChanged(); + } else { + visibilityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public Builder mergeVisibility(com.google.api.Visibility value) { + if (visibilityBuilder_ == null) { + if (visibility_ != null) { + visibility_ = + com.google.api.Visibility.newBuilder(visibility_).mergeFrom(value).buildPartial(); + } else { + visibility_ = value; + } + onChanged(); + } else { + visibilityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public Builder clearVisibility() { + if (visibilityBuilder_ == null) { + visibility_ = null; + onChanged(); + } else { + visibility_ = null; + visibilityBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public com.google.api.Visibility.Builder getVisibilityBuilder() { + + onChanged(); + return getVisibilityFieldBuilder().getBuilder(); + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public com.google.api.VisibilityOrBuilder getVisibilityOrBuilder() { + if (visibilityBuilder_ != null) { + return visibilityBuilder_.getMessageOrBuilder(); + } else { + return visibility_ == null ? + com.google.api.Visibility.getDefaultInstance() : visibility_; + } + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Visibility, com.google.api.Visibility.Builder, com.google.api.VisibilityOrBuilder> + getVisibilityFieldBuilder() { + if (visibilityBuilder_ == null) { + visibilityBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Visibility, com.google.api.Visibility.Builder, com.google.api.VisibilityOrBuilder>( + getVisibility(), + getParentForChildren(), + isClean()); + visibility_ = null; + } + return visibilityBuilder_; + } + + private com.google.api.Http http_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Http, com.google.api.Http.Builder, com.google.api.HttpOrBuilder> httpBuilder_; + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public boolean hasHttp() { + return httpBuilder_ != null || http_ != null; + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public com.google.api.Http getHttp() { + if (httpBuilder_ == null) { + return http_ == null ? com.google.api.Http.getDefaultInstance() : http_; + } else { + return httpBuilder_.getMessage(); + } + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public Builder setHttp(com.google.api.Http value) { + if (httpBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + http_ = value; + onChanged(); + } else { + httpBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public Builder setHttp( + com.google.api.Http.Builder builderForValue) { + if (httpBuilder_ == null) { + http_ = builderForValue.build(); + onChanged(); + } else { + httpBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public Builder mergeHttp(com.google.api.Http value) { + if (httpBuilder_ == null) { + if (http_ != null) { + http_ = + com.google.api.Http.newBuilder(http_).mergeFrom(value).buildPartial(); + } else { + http_ = value; + } + onChanged(); + } else { + httpBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public Builder clearHttp() { + if (httpBuilder_ == null) { + http_ = null; + onChanged(); + } else { + http_ = null; + httpBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public com.google.api.Http.Builder getHttpBuilder() { + + onChanged(); + return getHttpFieldBuilder().getBuilder(); + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public com.google.api.HttpOrBuilder getHttpOrBuilder() { + if (httpBuilder_ != null) { + return httpBuilder_.getMessageOrBuilder(); + } else { + return http_ == null ? + com.google.api.Http.getDefaultInstance() : http_; + } + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Http, com.google.api.Http.Builder, com.google.api.HttpOrBuilder> + getHttpFieldBuilder() { + if (httpBuilder_ == null) { + httpBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Http, com.google.api.Http.Builder, com.google.api.HttpOrBuilder>( + getHttp(), + getParentForChildren(), + isClean()); + http_ = null; + } + return httpBuilder_; + } + + 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_; + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public boolean hasContext() { + return contextBuilder_ != null || context_ != null; + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public com.google.api.Context getContext() { + if (contextBuilder_ == null) { + return context_ == null ? com.google.api.Context.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public Builder setContext(com.google.api.Context value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + contextBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public Builder setContext( + com.google.api.Context.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public Builder mergeContext(com.google.api.Context value) { + if (contextBuilder_ == null) { + if (context_ != null) { + context_ = + com.google.api.Context.newBuilder(context_).mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + contextBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public Builder clearContext() { + if (contextBuilder_ == null) { + context_ = null; + onChanged(); + } else { + context_ = null; + contextBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public com.google.api.Context.Builder getContextBuilder() { + + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public com.google.api.ContextOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.google.api.Context.getDefaultInstance() : context_; + } + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Context, com.google.api.Context.Builder, com.google.api.ContextOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Context, com.google.api.Context.Builder, com.google.api.ContextOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + + 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.protobuf.Any derivedData_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> derivedDataBuilder_; + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public boolean hasDerivedData() { + return derivedDataBuilder_ != null || derivedData_ != null; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public com.google.protobuf.Any getDerivedData() { + if (derivedDataBuilder_ == null) { + return derivedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : derivedData_; + } else { + return derivedDataBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public Builder setDerivedData(com.google.protobuf.Any value) { + if (derivedDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + derivedData_ = value; + onChanged(); + } else { + derivedDataBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public Builder setDerivedData( + com.google.protobuf.Any.Builder builderForValue) { + if (derivedDataBuilder_ == null) { + derivedData_ = builderForValue.build(); + onChanged(); + } else { + derivedDataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public Builder mergeDerivedData(com.google.protobuf.Any value) { + if (derivedDataBuilder_ == null) { + if (derivedData_ != null) { + derivedData_ = + com.google.protobuf.Any.newBuilder(derivedData_).mergeFrom(value).buildPartial(); + } else { + derivedData_ = value; + } + onChanged(); + } else { + derivedDataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public Builder clearDerivedData() { + if (derivedDataBuilder_ == null) { + derivedData_ = null; + onChanged(); + } else { + derivedData_ = null; + derivedDataBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public com.google.protobuf.Any.Builder getDerivedDataBuilder() { + + onChanged(); + return getDerivedDataFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public com.google.protobuf.AnyOrBuilder getDerivedDataOrBuilder() { + if (derivedDataBuilder_ != null) { + return derivedDataBuilder_.getMessageOrBuilder(); + } else { + return derivedData_ == null ? + com.google.protobuf.Any.getDefaultInstance() : derivedData_; + } + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getDerivedDataFieldBuilder() { + if (derivedDataBuilder_ == null) { + derivedDataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getDerivedData(), + getParentForChildren(), + isClean()); + derivedData_ = null; + } + return derivedDataBuilder_; + } + + private java.util.List systemTypes_ = + java.util.Collections.emptyList(); + private void ensureSystemTypesIsMutable() { + if (!((bitField0_ & 0x00002000) == 0x00002000)) { + systemTypes_ = new java.util.ArrayList(systemTypes_); + bitField0_ |= 0x00002000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder> systemTypesBuilder_; + + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public java.util.List getSystemTypesList() { + if (systemTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(systemTypes_); + } else { + return systemTypesBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public int getSystemTypesCount() { + if (systemTypesBuilder_ == null) { + return systemTypes_.size(); + } else { + return systemTypesBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public com.google.protobuf.Type getSystemTypes(int index) { + if (systemTypesBuilder_ == null) { + return systemTypes_.get(index); + } else { + return systemTypesBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder setSystemTypes( + int index, com.google.protobuf.Type value) { + if (systemTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemTypesIsMutable(); + systemTypes_.set(index, value); + onChanged(); + } else { + systemTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder setSystemTypes( + int index, com.google.protobuf.Type.Builder builderForValue) { + if (systemTypesBuilder_ == null) { + ensureSystemTypesIsMutable(); + systemTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + systemTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder addSystemTypes(com.google.protobuf.Type value) { + if (systemTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemTypesIsMutable(); + systemTypes_.add(value); + onChanged(); + } else { + systemTypesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder addSystemTypes( + int index, com.google.protobuf.Type value) { + if (systemTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemTypesIsMutable(); + systemTypes_.add(index, value); + onChanged(); + } else { + systemTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder addSystemTypes( + com.google.protobuf.Type.Builder builderForValue) { + if (systemTypesBuilder_ == null) { + ensureSystemTypesIsMutable(); + systemTypes_.add(builderForValue.build()); + onChanged(); + } else { + systemTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder addSystemTypes( + int index, com.google.protobuf.Type.Builder builderForValue) { + if (systemTypesBuilder_ == null) { + ensureSystemTypesIsMutable(); + systemTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + systemTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder addAllSystemTypes( + java.lang.Iterable values) { + if (systemTypesBuilder_ == null) { + ensureSystemTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, systemTypes_); + onChanged(); + } else { + systemTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder clearSystemTypes() { + if (systemTypesBuilder_ == null) { + systemTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + } else { + systemTypesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder removeSystemTypes(int index) { + if (systemTypesBuilder_ == null) { + ensureSystemTypesIsMutable(); + systemTypes_.remove(index); + onChanged(); + } else { + systemTypesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public com.google.protobuf.Type.Builder getSystemTypesBuilder( + int index) { + return getSystemTypesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public com.google.protobuf.TypeOrBuilder getSystemTypesOrBuilder( + int index) { + if (systemTypesBuilder_ == null) { + return systemTypes_.get(index); } else { + return systemTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public java.util.List + getSystemTypesOrBuilderList() { + if (systemTypesBuilder_ != null) { + return systemTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(systemTypes_); + } + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public com.google.protobuf.Type.Builder addSystemTypesBuilder() { + return getSystemTypesFieldBuilder().addBuilder( + com.google.protobuf.Type.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public com.google.protobuf.Type.Builder addSystemTypesBuilder( + int index) { + return getSystemTypesFieldBuilder().addBuilder( + index, com.google.protobuf.Type.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public java.util.List + getSystemTypesBuilderList() { + return getSystemTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder> + getSystemTypesFieldBuilder() { + if (systemTypesBuilder_ == null) { + systemTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder>( + systemTypes_, + ((bitField0_ & 0x00002000) == 0x00002000), + getParentForChildren(), + isClean()); + systemTypes_ = null; + } + return systemTypesBuilder_; + } + 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.Service) + } + + // @@protoc_insertion_point(class_scope:google.api.Service) + private static final com.google.api.Service DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Service(); + } + + public static com.google.api.Service getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Service parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Service(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.Service getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceOrBuilder.java new file mode 100644 index 000000000000..f3a729e886a7 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceOrBuilder.java @@ -0,0 +1,530 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/service.proto + +package com.google.api; + +public interface ServiceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Service) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+   * The version of the service configuration. The config version may
+   * influence interpretation of the configuration, for example
+   * determine defaults. This is documented together with applicable
+   * options. The current default for the config version itself is `1`.
+   * 
+ */ + boolean hasConfigVersion(); + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+   * The version of the service configuration. The config version may
+   * influence interpretation of the configuration, for example
+   * determine defaults. This is documented together with applicable
+   * options. The current default for the config version itself is `1`.
+   * 
+ */ + com.google.protobuf.UInt32Value getConfigVersion(); + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+   * The version of the service configuration. The config version may
+   * influence interpretation of the configuration, for example
+   * determine defaults. This is documented together with applicable
+   * options. The current default for the config version itself is `1`.
+   * 
+ */ + com.google.protobuf.UInt32ValueOrBuilder getConfigVersionOrBuilder(); + + /** + * optional string name = 1; + * + *
+   * The DNS address at which this service is available,
+   * e.g. `calendar.googleapis.com`.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The DNS address at which this service is available,
+   * e.g. `calendar.googleapis.com`.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional string title = 2; + * + *
+   * The product title associated with this service.
+   * 
+ */ + java.lang.String getTitle(); + /** + * optional string title = 2; + * + *
+   * The product title associated with this service.
+   * 
+ */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + * optional string producer_project_id = 22; + * + *
+   * The id of the Google developer project that owns the service.
+   * Members of this project can manage the service configuration,
+   * manage consumption of the service, etc.
+   * 
+ */ + java.lang.String getProducerProjectId(); + /** + * optional string producer_project_id = 22; + * + *
+   * The id of the Google developer project that owns the service.
+   * Members of this project can manage the service configuration,
+   * manage consumption of the service, etc.
+   * 
+ */ + com.google.protobuf.ByteString + getProducerProjectIdBytes(); + + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + java.util.List + getApisList(); + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + com.google.protobuf.Api getApis(int index); + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + int getApisCount(); + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + java.util.List + getApisOrBuilderList(); + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + com.google.protobuf.ApiOrBuilder getApisOrBuilder( + int index); + + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + java.util.List + getTypesList(); + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + com.google.protobuf.Type getTypes(int index); + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + int getTypesCount(); + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + java.util.List + getTypesOrBuilderList(); + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + com.google.protobuf.TypeOrBuilder getTypesOrBuilder( + int index); + + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + java.util.List + getEnumsList(); + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + com.google.protobuf.Enum getEnums(int index); + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + int getEnumsCount(); + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + java.util.List + getEnumsOrBuilderList(); + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + com.google.protobuf.EnumOrBuilder getEnumsOrBuilder( + int index); + + /** + * optional .google.api.Documentation documentation = 6; + * + *
+   * Additional API documentation.
+   * 
+ */ + boolean hasDocumentation(); + /** + * optional .google.api.Documentation documentation = 6; + * + *
+   * Additional API documentation.
+   * 
+ */ + com.google.api.Documentation getDocumentation(); + /** + * optional .google.api.Documentation documentation = 6; + * + *
+   * Additional API documentation.
+   * 
+ */ + com.google.api.DocumentationOrBuilder getDocumentationOrBuilder(); + + /** + * optional .google.api.Visibility visibility = 7; + * + *
+   * API visibility configuration.
+   * 
+ */ + boolean hasVisibility(); + /** + * optional .google.api.Visibility visibility = 7; + * + *
+   * API visibility configuration.
+   * 
+ */ + com.google.api.Visibility getVisibility(); + /** + * optional .google.api.Visibility visibility = 7; + * + *
+   * API visibility configuration.
+   * 
+ */ + com.google.api.VisibilityOrBuilder getVisibilityOrBuilder(); + + /** + * optional .google.api.Http http = 9; + * + *
+   * HTTP configuration.
+   * 
+ */ + boolean hasHttp(); + /** + * optional .google.api.Http http = 9; + * + *
+   * HTTP configuration.
+   * 
+ */ + com.google.api.Http getHttp(); + /** + * optional .google.api.Http http = 9; + * + *
+   * HTTP configuration.
+   * 
+ */ + com.google.api.HttpOrBuilder getHttpOrBuilder(); + + /** + * optional .google.api.Context context = 12; + * + *
+   * Context configuration.
+   * 
+ */ + boolean hasContext(); + /** + * optional .google.api.Context context = 12; + * + *
+   * Context configuration.
+   * 
+ */ + com.google.api.Context getContext(); + /** + * optional .google.api.Context context = 12; + * + *
+   * Context configuration.
+   * 
+ */ + com.google.api.ContextOrBuilder getContextOrBuilder(); + + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+   * Custom error configuration.
+   * 
+ */ + boolean hasCustomError(); + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+   * Custom error configuration.
+   * 
+ */ + com.google.api.CustomError getCustomError(); + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+   * Custom error configuration.
+   * 
+ */ + com.google.api.CustomErrorOrBuilder getCustomErrorOrBuilder(); + + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+   * Service attributes derived by the configuration toolchain, for
+   * use at runtime.  Type is defined in
+   * `//google/internal/api/derived_service.proto`.
+   * 
+ */ + boolean hasDerivedData(); + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+   * Service attributes derived by the configuration toolchain, for
+   * use at runtime.  Type is defined in
+   * `//google/internal/api/derived_service.proto`.
+   * 
+ */ + com.google.protobuf.Any getDerivedData(); + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+   * Service attributes derived by the configuration toolchain, for
+   * use at runtime.  Type is defined in
+   * `//google/internal/api/derived_service.proto`.
+   * 
+ */ + com.google.protobuf.AnyOrBuilder getDerivedDataOrBuilder(); + + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + java.util.List + getSystemTypesList(); + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + com.google.protobuf.Type getSystemTypes(int index); + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + int getSystemTypesCount(); + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + java.util.List + getSystemTypesOrBuilderList(); + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + com.google.protobuf.TypeOrBuilder getSystemTypesOrBuilder( + int index); +} 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 new file mode 100644 index 000000000000..fa6c564c7644 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceProto.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/service.proto + +package com.google.api; + +public final class ServiceProto { + private ServiceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Service_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Service_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/service.proto\022\ngoogle.api\032\031" + + "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" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.ApiProto.getDescriptor(), + com.google.protobuf.TypeProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ContextProto.getDescriptor(), + com.google.api.DocumentationProto.getDescriptor(), + com.google.api.ErrorFormatProto.getDescriptor(), + com.google.api.HttpProto.getDescriptor(), + com.google.api.VisibilityProto.getDescriptor(), + }, assigner); + internal_static_google_api_Service_descriptor = + getDescriptor().getMessageTypes().get(0); + 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", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.fieldVisibility); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.ApiProto.getDescriptor(); + com.google.protobuf.TypeProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ContextProto.getDescriptor(); + com.google.api.DocumentationProto.getDescriptor(); + com.google.api.ErrorFormatProto.getDescriptor(); + com.google.api.HttpProto.getDescriptor(); + com.google.api.VisibilityProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Visibility.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Visibility.java new file mode 100644 index 000000000000..2ef3f2b0442d --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/Visibility.java @@ -0,0 +1,1370 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/visibility.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Visibility} + * + *
+ * `Visibility` defines restrictions for the visibility of service
+ * elements.  Restrictions are specified using visibility labels
+ * (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.
+ * User and projects can have access to more than one visibility label. The
+ * effective visibility for multiple labels is the union of each label's
+ * elements, plus any unrestricted elements. You must list any supported label
+ * combinations in `label_combinations`.
+ * If an element and its parents have no restrictions, visibility is
+ * unconditionally granted.
+ * Example:
+ *     visibility:
+ *       label_combinations:
+ *       - GOOGLE_INTERNAL, TRUSTED_TESTER
+ *       rules:
+ *       - selector: google.calendar.Calendar.EnhancedSearch
+ *         restriction: TRUSTED_TESTER
+ *       - selector: google.calendar.Calendar.Delegate
+ *         restriction: GOOGLE_INTERNAL
+ * Here, all methods are publicly visible except for the restricted methods
+ * EnhancedSearch and Delegate. In addition, since `label_combinations`
+ * lists both GOOGLE_INTERNAL and TRUSTED_TESTER, users and projects can be
+ * given access to a combined visibility with both EnhancedSearch and Delegate.
+ * 
+ */ +public final class Visibility extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Visibility) + VisibilityOrBuilder { + // Use Visibility.newBuilder() to construct. + private Visibility(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Visibility() { + rules_ = java.util.Collections.emptyList(); + labelCombinations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Visibility( + 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)) { + rules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + rules_.add(input.readMessage(com.google.api.VisibilityRule.parser(), extensionRegistry)); + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + labelCombinations_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + labelCombinations_.add(s); + break; + } + case 26: { + com.google.protobuf.BoolValue.Builder subBuilder = null; + if (enforceRuntimeVisibility_ != null) { + subBuilder = enforceRuntimeVisibility_.toBuilder(); + } + enforceRuntimeVisibility_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(enforceRuntimeVisibility_); + enforceRuntimeVisibility_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + labelCombinations_ = labelCombinations_.getUnmodifiableView(); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.VisibilityProto.internal_static_google_api_Visibility_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.VisibilityProto.internal_static_google_api_Visibility_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Visibility.class, com.google.api.Visibility.Builder.class); + } + + private int bitField0_; + public static final int RULES_FIELD_NUMBER = 1; + private java.util.List rules_; + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + public java.util.List getRulesList() { + return rules_; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + public int getRulesCount() { + return rules_.size(); + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + public com.google.api.VisibilityRule getRules(int index) { + return rules_.get(index); + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + public com.google.api.VisibilityRuleOrBuilder getRulesOrBuilder( + int index) { + return rules_.get(index); + } + + public static final int LABEL_COMBINATIONS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList labelCombinations_; + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + public com.google.protobuf.ProtocolStringList + getLabelCombinationsList() { + return labelCombinations_; + } + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + public int getLabelCombinationsCount() { + return labelCombinations_.size(); + } + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + public java.lang.String getLabelCombinations(int index) { + return labelCombinations_.get(index); + } + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + public com.google.protobuf.ByteString + getLabelCombinationsBytes(int index) { + return labelCombinations_.getByteString(index); + } + + public static final int ENFORCE_RUNTIME_VISIBILITY_FIELD_NUMBER = 3; + private com.google.protobuf.BoolValue enforceRuntimeVisibility_; + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility rules are enforced at runtime for requests to
+   * all APIs and methods.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is false.
+   * Note, the `enforce_runtime_visibility` specified in a visibility rule
+   * overrides this setting for the APIs or methods asscoiated with the rule.
+   * 
+ */ + public boolean hasEnforceRuntimeVisibility() { + return enforceRuntimeVisibility_ != null; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility rules are enforced at runtime for requests to
+   * all APIs and methods.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is false.
+   * Note, the `enforce_runtime_visibility` specified in a visibility rule
+   * overrides this setting for the APIs or methods asscoiated with the rule.
+   * 
+ */ + public com.google.protobuf.BoolValue getEnforceRuntimeVisibility() { + return enforceRuntimeVisibility_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility rules are enforced at runtime for requests to
+   * all APIs and methods.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is false.
+   * Note, the `enforce_runtime_visibility` specified in a visibility rule
+   * overrides this setting for the APIs or methods asscoiated with the rule.
+   * 
+ */ + public com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder() { + return getEnforceRuntimeVisibility(); + } + + 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(1, rules_.get(i)); + } + for (int i = 0; i < labelCombinations_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, labelCombinations_.getRaw(i)); + } + if (enforceRuntimeVisibility_ != null) { + output.writeMessage(3, getEnforceRuntimeVisibility()); + } + } + + 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(1, rules_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < labelCombinations_.size(); i++) { + dataSize += computeStringSizeNoTag(labelCombinations_.getRaw(i)); + } + size += dataSize; + size += 1 * getLabelCombinationsList().size(); + } + if (enforceRuntimeVisibility_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getEnforceRuntimeVisibility()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Visibility parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Visibility 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.Visibility parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Visibility parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Visibility parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Visibility parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Visibility parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Visibility parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Visibility parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Visibility 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.Visibility 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.Visibility} + * + *
+   * `Visibility` defines restrictions for the visibility of service
+   * elements.  Restrictions are specified using visibility labels
+   * (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.
+   * User and projects can have access to more than one visibility label. The
+   * effective visibility for multiple labels is the union of each label's
+   * elements, plus any unrestricted elements. You must list any supported label
+   * combinations in `label_combinations`.
+   * If an element and its parents have no restrictions, visibility is
+   * unconditionally granted.
+   * Example:
+   *     visibility:
+   *       label_combinations:
+   *       - GOOGLE_INTERNAL, TRUSTED_TESTER
+   *       rules:
+   *       - selector: google.calendar.Calendar.EnhancedSearch
+   *         restriction: TRUSTED_TESTER
+   *       - selector: google.calendar.Calendar.Delegate
+   *         restriction: GOOGLE_INTERNAL
+   * Here, all methods are publicly visible except for the restricted methods
+   * EnhancedSearch and Delegate. In addition, since `label_combinations`
+   * lists both GOOGLE_INTERNAL and TRUSTED_TESTER, users and projects can be
+   * given access to a combined visibility with both EnhancedSearch and Delegate.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Visibility) + com.google.api.VisibilityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.VisibilityProto.internal_static_google_api_Visibility_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.VisibilityProto.internal_static_google_api_Visibility_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Visibility.class, com.google.api.Visibility.Builder.class); + } + + // Construct using com.google.api.Visibility.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRulesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rulesBuilder_.clear(); + } + labelCombinations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibility_ = null; + } else { + enforceRuntimeVisibility_ = null; + enforceRuntimeVisibilityBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.VisibilityProto.internal_static_google_api_Visibility_descriptor; + } + + public com.google.api.Visibility getDefaultInstanceForType() { + return com.google.api.Visibility.getDefaultInstance(); + } + + public com.google.api.Visibility build() { + com.google.api.Visibility result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Visibility buildPartial() { + com.google.api.Visibility result = new com.google.api.Visibility(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + labelCombinations_ = labelCombinations_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.labelCombinations_ = labelCombinations_; + if (enforceRuntimeVisibilityBuilder_ == null) { + result.enforceRuntimeVisibility_ = enforceRuntimeVisibility_; + } else { + result.enforceRuntimeVisibility_ = enforceRuntimeVisibilityBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Visibility) { + return mergeFrom((com.google.api.Visibility)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Visibility other) { + if (other == com.google.api.Visibility.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (!other.labelCombinations_.isEmpty()) { + if (labelCombinations_.isEmpty()) { + labelCombinations_ = other.labelCombinations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLabelCombinationsIsMutable(); + labelCombinations_.addAll(other.labelCombinations_); + } + onChanged(); + } + if (other.hasEnforceRuntimeVisibility()) { + mergeEnforceRuntimeVisibility(other.getEnforceRuntimeVisibility()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.Visibility parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Visibility) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.VisibilityRule, com.google.api.VisibilityRule.Builder, com.google.api.VisibilityRuleOrBuilder> rulesBuilder_; + + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public com.google.api.VisibilityRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.VisibilityRule 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.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.VisibilityRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder addRules(com.google.api.VisibilityRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.VisibilityRule 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.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder addRules( + com.google.api.VisibilityRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.VisibilityRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public com.google.api.VisibilityRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public com.google.api.VisibilityRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public com.google.api.VisibilityRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.api.VisibilityRule.getDefaultInstance()); + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public com.google.api.VisibilityRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.api.VisibilityRule.getDefaultInstance()); + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.VisibilityRule, com.google.api.VisibilityRule.Builder, com.google.api.VisibilityRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.VisibilityRule, com.google.api.VisibilityRule.Builder, com.google.api.VisibilityRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private com.google.protobuf.LazyStringList labelCombinations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureLabelCombinationsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + labelCombinations_ = new com.google.protobuf.LazyStringArrayList(labelCombinations_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getLabelCombinationsList() { + return labelCombinations_.getUnmodifiableView(); + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public int getLabelCombinationsCount() { + return labelCombinations_.size(); + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public java.lang.String getLabelCombinations(int index) { + return labelCombinations_.get(index); + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public com.google.protobuf.ByteString + getLabelCombinationsBytes(int index) { + return labelCombinations_.getByteString(index); + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public Builder setLabelCombinations( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelCombinationsIsMutable(); + labelCombinations_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public Builder addLabelCombinations( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelCombinationsIsMutable(); + labelCombinations_.add(value); + onChanged(); + return this; + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public Builder addAllLabelCombinations( + java.lang.Iterable values) { + ensureLabelCombinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, labelCombinations_); + onChanged(); + return this; + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public Builder clearLabelCombinations() { + labelCombinations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public Builder addLabelCombinationsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLabelCombinationsIsMutable(); + labelCombinations_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue enforceRuntimeVisibility_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> enforceRuntimeVisibilityBuilder_; + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public boolean hasEnforceRuntimeVisibility() { + return enforceRuntimeVisibilityBuilder_ != null || enforceRuntimeVisibility_ != null; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public com.google.protobuf.BoolValue getEnforceRuntimeVisibility() { + if (enforceRuntimeVisibilityBuilder_ == null) { + return enforceRuntimeVisibility_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; + } else { + return enforceRuntimeVisibilityBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public Builder setEnforceRuntimeVisibility(com.google.protobuf.BoolValue value) { + if (enforceRuntimeVisibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + enforceRuntimeVisibility_ = value; + onChanged(); + } else { + enforceRuntimeVisibilityBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public Builder setEnforceRuntimeVisibility( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibility_ = builderForValue.build(); + onChanged(); + } else { + enforceRuntimeVisibilityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public Builder mergeEnforceRuntimeVisibility(com.google.protobuf.BoolValue value) { + if (enforceRuntimeVisibilityBuilder_ == null) { + if (enforceRuntimeVisibility_ != null) { + enforceRuntimeVisibility_ = + com.google.protobuf.BoolValue.newBuilder(enforceRuntimeVisibility_).mergeFrom(value).buildPartial(); + } else { + enforceRuntimeVisibility_ = value; + } + onChanged(); + } else { + enforceRuntimeVisibilityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public Builder clearEnforceRuntimeVisibility() { + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibility_ = null; + onChanged(); + } else { + enforceRuntimeVisibility_ = null; + enforceRuntimeVisibilityBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public com.google.protobuf.BoolValue.Builder getEnforceRuntimeVisibilityBuilder() { + + onChanged(); + return getEnforceRuntimeVisibilityFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder() { + if (enforceRuntimeVisibilityBuilder_ != null) { + return enforceRuntimeVisibilityBuilder_.getMessageOrBuilder(); + } else { + return enforceRuntimeVisibility_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; + } + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getEnforceRuntimeVisibilityFieldBuilder() { + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibilityBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getEnforceRuntimeVisibility(), + getParentForChildren(), + isClean()); + enforceRuntimeVisibility_ = null; + } + return enforceRuntimeVisibilityBuilder_; + } + 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.Visibility) + } + + // @@protoc_insertion_point(class_scope:google.api.Visibility) + private static final com.google.api.Visibility DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Visibility(); + } + + public static com.google.api.Visibility getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Visibility parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Visibility(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.Visibility getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityOrBuilder.java new file mode 100644 index 000000000000..1c8cb2bca4b8 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityOrBuilder.java @@ -0,0 +1,148 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/visibility.proto + +package com.google.api; + +public interface VisibilityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Visibility) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + java.util.List + getRulesList(); + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + com.google.api.VisibilityRule getRules(int index); + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + int getRulesCount(); + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + java.util.List + getRulesOrBuilderList(); + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + com.google.api.VisibilityRuleOrBuilder getRulesOrBuilder( + int index); + + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getLabelCombinationsList(); + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + int getLabelCombinationsCount(); + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + java.lang.String getLabelCombinations(int index); + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + com.google.protobuf.ByteString + getLabelCombinationsBytes(int index); + + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility rules are enforced at runtime for requests to
+   * all APIs and methods.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is false.
+   * Note, the `enforce_runtime_visibility` specified in a visibility rule
+   * overrides this setting for the APIs or methods asscoiated with the rule.
+   * 
+ */ + boolean hasEnforceRuntimeVisibility(); + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility rules are enforced at runtime for requests to
+   * all APIs and methods.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is false.
+   * Note, the `enforce_runtime_visibility` specified in a visibility rule
+   * overrides this setting for the APIs or methods asscoiated with the rule.
+   * 
+ */ + com.google.protobuf.BoolValue getEnforceRuntimeVisibility(); + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility rules are enforced at runtime for requests to
+   * all APIs and methods.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is false.
+   * Note, the `enforce_runtime_visibility` specified in a visibility rule
+   * overrides this setting for the APIs or methods asscoiated with the rule.
+   * 
+ */ + com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityProto.java new file mode 100644 index 000000000000..75f797d990e2 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityProto.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/visibility.proto + +package com.google.api; + +public final class VisibilityProto { + private VisibilityProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Visibility_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Visibility_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_VisibilityRule_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_VisibilityRule_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/visibility.proto\022\ngoogle.ap" + + "i\032\036google/protobuf/wrappers.proto\"\223\001\n\nVi" + + "sibility\022)\n\005rules\030\001 \003(\0132\032.google.api.Vis" + + "ibilityRule\022\032\n\022label_combinations\030\002 \003(\t\022" + + ">\n\032enforce_runtime_visibility\030\003 \001(\0132\032.go" + + "ogle.protobuf.BoolValue\"w\n\016VisibilityRul" + + "e\022\020\n\010selector\030\001 \001(\t\022\023\n\013restriction\030\002 \001(\t" + + "\022>\n\032enforce_runtime_visibility\030\003 \001(\0132\032.g" + + "oogle.protobuf.BoolValueB&\n\016com.google.a" + + "piB\017VisibilityProtoP\001\370\001\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.protobuf.WrappersProto.getDescriptor(), + }, assigner); + internal_static_google_api_Visibility_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Visibility_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Visibility_descriptor, + new java.lang.String[] { "Rules", "LabelCombinations", "EnforceRuntimeVisibility", }); + internal_static_google_api_VisibilityRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_VisibilityRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_VisibilityRule_descriptor, + new java.lang.String[] { "Selector", "Restriction", "EnforceRuntimeVisibility", }); + com.google.protobuf.WrappersProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRule.java new file mode 100644 index 000000000000..1fcc76384b70 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRule.java @@ -0,0 +1,998 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/visibility.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.VisibilityRule} + * + *
+ * A visibility rule provides visibility configuration for an individual API
+ * element.
+ * 
+ */ +public final class VisibilityRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.VisibilityRule) + VisibilityRuleOrBuilder { + // Use VisibilityRule.newBuilder() to construct. + private VisibilityRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private VisibilityRule() { + selector_ = ""; + restriction_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private VisibilityRule( + 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: { + String s = input.readStringRequireUtf8(); + + restriction_ = s; + break; + } + case 26: { + com.google.protobuf.BoolValue.Builder subBuilder = null; + if (enforceRuntimeVisibility_ != null) { + subBuilder = enforceRuntimeVisibility_.toBuilder(); + } + enforceRuntimeVisibility_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(enforceRuntimeVisibility_); + enforceRuntimeVisibility_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.VisibilityRule.class, com.google.api.VisibilityRule.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object selector_; + /** + * optional string selector = 1; + * + *
+   * Selects methods, messages, fields, enums, etc. 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 methods, messages, fields, enums, etc. 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 RESTRICTION_FIELD_NUMBER = 2; + private volatile java.lang.Object restriction_; + /** + * optional string restriction = 2; + * + *
+   * Lists the visibility labels for this rule. Any of the listed labels grants
+   * visibility to the element.
+   * If a rule has multiple labels, removing one of the labels but not all of
+   * them can break clients.
+   * Example:
+   *     visibility:
+   *       rules:
+   *       - selector: google.calendar.Calendar.EnhancedSearch
+   *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+   * Removing GOOGLE_INTERNAL from this restriction will break clients that
+   * rely on this method and only had access to it through GOOGLE_INTERNAL.
+   * 
+ */ + public java.lang.String getRestriction() { + java.lang.Object ref = restriction_; + 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(); + restriction_ = s; + return s; + } + } + /** + * optional string restriction = 2; + * + *
+   * Lists the visibility labels for this rule. Any of the listed labels grants
+   * visibility to the element.
+   * If a rule has multiple labels, removing one of the labels but not all of
+   * them can break clients.
+   * Example:
+   *     visibility:
+   *       rules:
+   *       - selector: google.calendar.Calendar.EnhancedSearch
+   *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+   * Removing GOOGLE_INTERNAL from this restriction will break clients that
+   * rely on this method and only had access to it through GOOGLE_INTERNAL.
+   * 
+ */ + public com.google.protobuf.ByteString + getRestrictionBytes() { + java.lang.Object ref = restriction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + restriction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENFORCE_RUNTIME_VISIBILITY_FIELD_NUMBER = 3; + private com.google.protobuf.BoolValue enforceRuntimeVisibility_; + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility is enforced at runtime for requests to an API
+   * method. This setting has meaning only when the selector applies to a method
+   * or an API.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is determined by the value of
+   * [google.api.Visibility.enforce_runtime_visibility][].
+   * 
+ */ + public boolean hasEnforceRuntimeVisibility() { + return enforceRuntimeVisibility_ != null; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility is enforced at runtime for requests to an API
+   * method. This setting has meaning only when the selector applies to a method
+   * or an API.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is determined by the value of
+   * [google.api.Visibility.enforce_runtime_visibility][].
+   * 
+ */ + public com.google.protobuf.BoolValue getEnforceRuntimeVisibility() { + return enforceRuntimeVisibility_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility is enforced at runtime for requests to an API
+   * method. This setting has meaning only when the selector applies to a method
+   * or an API.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is determined by the value of
+   * [google.api.Visibility.enforce_runtime_visibility][].
+   * 
+ */ + public com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder() { + return getEnforceRuntimeVisibility(); + } + + 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 (!getRestrictionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, restriction_); + } + if (enforceRuntimeVisibility_ != null) { + output.writeMessage(3, getEnforceRuntimeVisibility()); + } + } + + 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 (!getRestrictionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, restriction_); + } + if (enforceRuntimeVisibility_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getEnforceRuntimeVisibility()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.VisibilityRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.VisibilityRule 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.VisibilityRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.VisibilityRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.VisibilityRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.VisibilityRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.VisibilityRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.VisibilityRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.VisibilityRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.VisibilityRule 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.VisibilityRule 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.VisibilityRule} + * + *
+   * A visibility rule provides visibility configuration for an individual API
+   * element.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.VisibilityRule) + com.google.api.VisibilityRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.VisibilityRule.class, com.google.api.VisibilityRule.Builder.class); + } + + // Construct using com.google.api.VisibilityRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + selector_ = ""; + + restriction_ = ""; + + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibility_ = null; + } else { + enforceRuntimeVisibility_ = null; + enforceRuntimeVisibilityBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_descriptor; + } + + public com.google.api.VisibilityRule getDefaultInstanceForType() { + return com.google.api.VisibilityRule.getDefaultInstance(); + } + + public com.google.api.VisibilityRule build() { + com.google.api.VisibilityRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.VisibilityRule buildPartial() { + com.google.api.VisibilityRule result = new com.google.api.VisibilityRule(this); + result.selector_ = selector_; + result.restriction_ = restriction_; + if (enforceRuntimeVisibilityBuilder_ == null) { + result.enforceRuntimeVisibility_ = enforceRuntimeVisibility_; + } else { + result.enforceRuntimeVisibility_ = enforceRuntimeVisibilityBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.VisibilityRule) { + return mergeFrom((com.google.api.VisibilityRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.VisibilityRule other) { + if (other == com.google.api.VisibilityRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + onChanged(); + } + if (!other.getRestriction().isEmpty()) { + restriction_ = other.restriction_; + onChanged(); + } + if (other.hasEnforceRuntimeVisibility()) { + mergeEnforceRuntimeVisibility(other.getEnforceRuntimeVisibility()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.VisibilityRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.VisibilityRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object selector_ = ""; + /** + * optional string selector = 1; + * + *
+     * Selects methods, messages, fields, enums, etc. 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 methods, messages, fields, enums, etc. 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 methods, messages, fields, enums, etc. 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 methods, messages, fields, enums, etc. 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 methods, messages, fields, enums, etc. 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 java.lang.Object restriction_ = ""; + /** + * optional string restriction = 2; + * + *
+     * Lists the visibility labels for this rule. Any of the listed labels grants
+     * visibility to the element.
+     * If a rule has multiple labels, removing one of the labels but not all of
+     * them can break clients.
+     * Example:
+     *     visibility:
+     *       rules:
+     *       - selector: google.calendar.Calendar.EnhancedSearch
+     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+     * Removing GOOGLE_INTERNAL from this restriction will break clients that
+     * rely on this method and only had access to it through GOOGLE_INTERNAL.
+     * 
+ */ + public java.lang.String getRestriction() { + java.lang.Object ref = restriction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + restriction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string restriction = 2; + * + *
+     * Lists the visibility labels for this rule. Any of the listed labels grants
+     * visibility to the element.
+     * If a rule has multiple labels, removing one of the labels but not all of
+     * them can break clients.
+     * Example:
+     *     visibility:
+     *       rules:
+     *       - selector: google.calendar.Calendar.EnhancedSearch
+     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+     * Removing GOOGLE_INTERNAL from this restriction will break clients that
+     * rely on this method and only had access to it through GOOGLE_INTERNAL.
+     * 
+ */ + public com.google.protobuf.ByteString + getRestrictionBytes() { + java.lang.Object ref = restriction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + restriction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string restriction = 2; + * + *
+     * Lists the visibility labels for this rule. Any of the listed labels grants
+     * visibility to the element.
+     * If a rule has multiple labels, removing one of the labels but not all of
+     * them can break clients.
+     * Example:
+     *     visibility:
+     *       rules:
+     *       - selector: google.calendar.Calendar.EnhancedSearch
+     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+     * Removing GOOGLE_INTERNAL from this restriction will break clients that
+     * rely on this method and only had access to it through GOOGLE_INTERNAL.
+     * 
+ */ + public Builder setRestriction( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + restriction_ = value; + onChanged(); + return this; + } + /** + * optional string restriction = 2; + * + *
+     * Lists the visibility labels for this rule. Any of the listed labels grants
+     * visibility to the element.
+     * If a rule has multiple labels, removing one of the labels but not all of
+     * them can break clients.
+     * Example:
+     *     visibility:
+     *       rules:
+     *       - selector: google.calendar.Calendar.EnhancedSearch
+     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+     * Removing GOOGLE_INTERNAL from this restriction will break clients that
+     * rely on this method and only had access to it through GOOGLE_INTERNAL.
+     * 
+ */ + public Builder clearRestriction() { + + restriction_ = getDefaultInstance().getRestriction(); + onChanged(); + return this; + } + /** + * optional string restriction = 2; + * + *
+     * Lists the visibility labels for this rule. Any of the listed labels grants
+     * visibility to the element.
+     * If a rule has multiple labels, removing one of the labels but not all of
+     * them can break clients.
+     * Example:
+     *     visibility:
+     *       rules:
+     *       - selector: google.calendar.Calendar.EnhancedSearch
+     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+     * Removing GOOGLE_INTERNAL from this restriction will break clients that
+     * rely on this method and only had access to it through GOOGLE_INTERNAL.
+     * 
+ */ + public Builder setRestrictionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + restriction_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue enforceRuntimeVisibility_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> enforceRuntimeVisibilityBuilder_; + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public boolean hasEnforceRuntimeVisibility() { + return enforceRuntimeVisibilityBuilder_ != null || enforceRuntimeVisibility_ != null; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public com.google.protobuf.BoolValue getEnforceRuntimeVisibility() { + if (enforceRuntimeVisibilityBuilder_ == null) { + return enforceRuntimeVisibility_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; + } else { + return enforceRuntimeVisibilityBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public Builder setEnforceRuntimeVisibility(com.google.protobuf.BoolValue value) { + if (enforceRuntimeVisibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + enforceRuntimeVisibility_ = value; + onChanged(); + } else { + enforceRuntimeVisibilityBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public Builder setEnforceRuntimeVisibility( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibility_ = builderForValue.build(); + onChanged(); + } else { + enforceRuntimeVisibilityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public Builder mergeEnforceRuntimeVisibility(com.google.protobuf.BoolValue value) { + if (enforceRuntimeVisibilityBuilder_ == null) { + if (enforceRuntimeVisibility_ != null) { + enforceRuntimeVisibility_ = + com.google.protobuf.BoolValue.newBuilder(enforceRuntimeVisibility_).mergeFrom(value).buildPartial(); + } else { + enforceRuntimeVisibility_ = value; + } + onChanged(); + } else { + enforceRuntimeVisibilityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public Builder clearEnforceRuntimeVisibility() { + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibility_ = null; + onChanged(); + } else { + enforceRuntimeVisibility_ = null; + enforceRuntimeVisibilityBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public com.google.protobuf.BoolValue.Builder getEnforceRuntimeVisibilityBuilder() { + + onChanged(); + return getEnforceRuntimeVisibilityFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder() { + if (enforceRuntimeVisibilityBuilder_ != null) { + return enforceRuntimeVisibilityBuilder_.getMessageOrBuilder(); + } else { + return enforceRuntimeVisibility_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; + } + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getEnforceRuntimeVisibilityFieldBuilder() { + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibilityBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getEnforceRuntimeVisibility(), + getParentForChildren(), + isClean()); + enforceRuntimeVisibility_ = null; + } + return enforceRuntimeVisibilityBuilder_; + } + 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.VisibilityRule) + } + + // @@protoc_insertion_point(class_scope:google.api.VisibilityRule) + private static final com.google.api.VisibilityRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.VisibilityRule(); + } + + public static com.google.api.VisibilityRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public VisibilityRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new VisibilityRule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.VisibilityRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRuleOrBuilder.java new file mode 100644 index 000000000000..130f46c58ada --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRuleOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/visibility.proto + +package com.google.api; + +public interface VisibilityRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.VisibilityRule) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string selector = 1; + * + *
+   * Selects methods, messages, fields, enums, etc. to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + java.lang.String getSelector(); + /** + * optional string selector = 1; + * + *
+   * Selects methods, messages, fields, enums, etc. to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + * optional string restriction = 2; + * + *
+   * Lists the visibility labels for this rule. Any of the listed labels grants
+   * visibility to the element.
+   * If a rule has multiple labels, removing one of the labels but not all of
+   * them can break clients.
+   * Example:
+   *     visibility:
+   *       rules:
+   *       - selector: google.calendar.Calendar.EnhancedSearch
+   *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+   * Removing GOOGLE_INTERNAL from this restriction will break clients that
+   * rely on this method and only had access to it through GOOGLE_INTERNAL.
+   * 
+ */ + java.lang.String getRestriction(); + /** + * optional string restriction = 2; + * + *
+   * Lists the visibility labels for this rule. Any of the listed labels grants
+   * visibility to the element.
+   * If a rule has multiple labels, removing one of the labels but not all of
+   * them can break clients.
+   * Example:
+   *     visibility:
+   *       rules:
+   *       - selector: google.calendar.Calendar.EnhancedSearch
+   *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+   * Removing GOOGLE_INTERNAL from this restriction will break clients that
+   * rely on this method and only had access to it through GOOGLE_INTERNAL.
+   * 
+ */ + com.google.protobuf.ByteString + getRestrictionBytes(); + + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility is enforced at runtime for requests to an API
+   * method. This setting has meaning only when the selector applies to a method
+   * or an API.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is determined by the value of
+   * [google.api.Visibility.enforce_runtime_visibility][].
+   * 
+ */ + boolean hasEnforceRuntimeVisibility(); + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility is enforced at runtime for requests to an API
+   * method. This setting has meaning only when the selector applies to a method
+   * or an API.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is determined by the value of
+   * [google.api.Visibility.enforce_runtime_visibility][].
+   * 
+ */ + com.google.protobuf.BoolValue getEnforceRuntimeVisibility(); + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility is enforced at runtime for requests to an API
+   * method. This setting has meaning only when the selector applies to a method
+   * or an API.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is determined by the value of
+   * [google.api.Visibility.enforce_runtime_visibility][].
+   * 
+ */ + com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequest.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequest.java new file mode 100644 index 000000000000..fe7f54b5b58f --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequest.java @@ -0,0 +1,476 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +/** + * Protobuf type {@code google.longrunning.CancelOperationRequest} + * + *
+ * The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
+ * 
+ */ +public final class CancelOperationRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.longrunning.CancelOperationRequest) + CancelOperationRequestOrBuilder { + // Use CancelOperationRequest.newBuilder() to construct. + private CancelOperationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CancelOperationRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private CancelOperationRequest( + 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; + } + } + } + } 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.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.CancelOperationRequest.class, com.google.longrunning.CancelOperationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the operation resource to be cancelled.
+   * 
+ */ + 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 operation resource to be cancelled.
+   * 
+ */ + 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; + } + } + + 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_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.longrunning.CancelOperationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.CancelOperationRequest 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.longrunning.CancelOperationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.CancelOperationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.longrunning.CancelOperationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.CancelOperationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.longrunning.CancelOperationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.longrunning.CancelOperationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.longrunning.CancelOperationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.CancelOperationRequest 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.longrunning.CancelOperationRequest 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.longrunning.CancelOperationRequest} + * + *
+   * The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.longrunning.CancelOperationRequest) + com.google.longrunning.CancelOperationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.CancelOperationRequest.class, com.google.longrunning.CancelOperationRequest.Builder.class); + } + + // Construct using com.google.longrunning.CancelOperationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_descriptor; + } + + public com.google.longrunning.CancelOperationRequest getDefaultInstanceForType() { + return com.google.longrunning.CancelOperationRequest.getDefaultInstance(); + } + + public com.google.longrunning.CancelOperationRequest build() { + com.google.longrunning.CancelOperationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.longrunning.CancelOperationRequest buildPartial() { + com.google.longrunning.CancelOperationRequest result = new com.google.longrunning.CancelOperationRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.longrunning.CancelOperationRequest) { + return mergeFrom((com.google.longrunning.CancelOperationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.longrunning.CancelOperationRequest other) { + if (other == com.google.longrunning.CancelOperationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.longrunning.CancelOperationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.longrunning.CancelOperationRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the operation resource to be cancelled.
+     * 
+ */ + 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 operation resource to be cancelled.
+     * 
+ */ + 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 operation resource to be cancelled.
+     * 
+ */ + 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 operation resource to be cancelled.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the operation resource to be cancelled.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = 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.longrunning.CancelOperationRequest) + } + + // @@protoc_insertion_point(class_scope:google.longrunning.CancelOperationRequest) + private static final com.google.longrunning.CancelOperationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.longrunning.CancelOperationRequest(); + } + + public static com.google.longrunning.CancelOperationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CancelOperationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CancelOperationRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.longrunning.CancelOperationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequestOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequestOrBuilder.java new file mode 100644 index 000000000000..86004606c35d --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequestOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public interface CancelOperationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.longrunning.CancelOperationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the operation resource to be cancelled.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the operation resource to be cancelled.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequest.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequest.java new file mode 100644 index 000000000000..d10d1e3300aa --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequest.java @@ -0,0 +1,476 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +/** + * Protobuf type {@code google.longrunning.DeleteOperationRequest} + * + *
+ * The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
+ * 
+ */ +public final class DeleteOperationRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.longrunning.DeleteOperationRequest) + DeleteOperationRequestOrBuilder { + // Use DeleteOperationRequest.newBuilder() to construct. + private DeleteOperationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeleteOperationRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private DeleteOperationRequest( + 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; + } + } + } + } 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.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.DeleteOperationRequest.class, com.google.longrunning.DeleteOperationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the operation resource to be deleted.
+   * 
+ */ + 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 operation resource to be deleted.
+   * 
+ */ + 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; + } + } + + 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_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.longrunning.DeleteOperationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.DeleteOperationRequest 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.longrunning.DeleteOperationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.DeleteOperationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.longrunning.DeleteOperationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.DeleteOperationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.longrunning.DeleteOperationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.longrunning.DeleteOperationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.longrunning.DeleteOperationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.DeleteOperationRequest 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.longrunning.DeleteOperationRequest 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.longrunning.DeleteOperationRequest} + * + *
+   * The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.longrunning.DeleteOperationRequest) + com.google.longrunning.DeleteOperationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.DeleteOperationRequest.class, com.google.longrunning.DeleteOperationRequest.Builder.class); + } + + // Construct using com.google.longrunning.DeleteOperationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_descriptor; + } + + public com.google.longrunning.DeleteOperationRequest getDefaultInstanceForType() { + return com.google.longrunning.DeleteOperationRequest.getDefaultInstance(); + } + + public com.google.longrunning.DeleteOperationRequest build() { + com.google.longrunning.DeleteOperationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.longrunning.DeleteOperationRequest buildPartial() { + com.google.longrunning.DeleteOperationRequest result = new com.google.longrunning.DeleteOperationRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.longrunning.DeleteOperationRequest) { + return mergeFrom((com.google.longrunning.DeleteOperationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.longrunning.DeleteOperationRequest other) { + if (other == com.google.longrunning.DeleteOperationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.longrunning.DeleteOperationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.longrunning.DeleteOperationRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the operation resource to be deleted.
+     * 
+ */ + 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 operation resource to be deleted.
+     * 
+ */ + 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 operation resource to be deleted.
+     * 
+ */ + 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 operation resource to be deleted.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the operation resource to be deleted.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = 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.longrunning.DeleteOperationRequest) + } + + // @@protoc_insertion_point(class_scope:google.longrunning.DeleteOperationRequest) + private static final com.google.longrunning.DeleteOperationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.longrunning.DeleteOperationRequest(); + } + + public static com.google.longrunning.DeleteOperationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DeleteOperationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new DeleteOperationRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.longrunning.DeleteOperationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequestOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequestOrBuilder.java new file mode 100644 index 000000000000..16f7c82c171a --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequestOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public interface DeleteOperationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.longrunning.DeleteOperationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the operation resource to be deleted.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the operation resource to be deleted.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequest.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequest.java new file mode 100644 index 000000000000..111563850c1a --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequest.java @@ -0,0 +1,476 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +/** + * Protobuf type {@code google.longrunning.GetOperationRequest} + * + *
+ * The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation].
+ * 
+ */ +public final class GetOperationRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.longrunning.GetOperationRequest) + GetOperationRequestOrBuilder { + // Use GetOperationRequest.newBuilder() to construct. + private GetOperationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GetOperationRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private GetOperationRequest( + 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; + } + } + } + } 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.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.GetOperationRequest.class, com.google.longrunning.GetOperationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the operation resource.
+   * 
+ */ + 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 operation resource.
+   * 
+ */ + 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; + } + } + + 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_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.longrunning.GetOperationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.GetOperationRequest 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.longrunning.GetOperationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.GetOperationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.longrunning.GetOperationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.GetOperationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.longrunning.GetOperationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.longrunning.GetOperationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.longrunning.GetOperationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.GetOperationRequest 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.longrunning.GetOperationRequest 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.longrunning.GetOperationRequest} + * + *
+   * The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation].
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.longrunning.GetOperationRequest) + com.google.longrunning.GetOperationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.GetOperationRequest.class, com.google.longrunning.GetOperationRequest.Builder.class); + } + + // Construct using com.google.longrunning.GetOperationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_descriptor; + } + + public com.google.longrunning.GetOperationRequest getDefaultInstanceForType() { + return com.google.longrunning.GetOperationRequest.getDefaultInstance(); + } + + public com.google.longrunning.GetOperationRequest build() { + com.google.longrunning.GetOperationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.longrunning.GetOperationRequest buildPartial() { + com.google.longrunning.GetOperationRequest result = new com.google.longrunning.GetOperationRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.longrunning.GetOperationRequest) { + return mergeFrom((com.google.longrunning.GetOperationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.longrunning.GetOperationRequest other) { + if (other == com.google.longrunning.GetOperationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.longrunning.GetOperationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.longrunning.GetOperationRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the operation resource.
+     * 
+ */ + 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 operation resource.
+     * 
+ */ + 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 operation resource.
+     * 
+ */ + 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 operation resource.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the operation resource.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = 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.longrunning.GetOperationRequest) + } + + // @@protoc_insertion_point(class_scope:google.longrunning.GetOperationRequest) + private static final com.google.longrunning.GetOperationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.longrunning.GetOperationRequest(); + } + + public static com.google.longrunning.GetOperationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GetOperationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new GetOperationRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.longrunning.GetOperationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequestOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequestOrBuilder.java new file mode 100644 index 000000000000..099a7072cd23 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequestOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public interface GetOperationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.longrunning.GetOperationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the operation resource.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the operation resource.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequest.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequest.java new file mode 100644 index 000000000000..12a996ead622 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequest.java @@ -0,0 +1,848 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +/** + * Protobuf type {@code google.longrunning.ListOperationsRequest} + * + *
+ * The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
+ * 
+ */ +public final class ListOperationsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.longrunning.ListOperationsRequest) + ListOperationsRequestOrBuilder { + // Use ListOperationsRequest.newBuilder() to construct. + private ListOperationsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListOperationsRequest() { + name_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private ListOperationsRequest( + 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(); + + filter_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + name_ = 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.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.ListOperationsRequest.class, com.google.longrunning.ListOperationsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object name_; + /** + * optional string name = 4; + * + *
+   * The name of the operation collection.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 4; + * + *
+   * The name of the operation collection.
+   * 
+ */ + 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 FILTER_FIELD_NUMBER = 1; + private volatile java.lang.Object filter_; + /** + * optional string filter = 1; + * + *
+   * The standard List filter.
+   * 
+ */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * optional string filter = 1; + * + *
+   * The standard List filter.
+   * 
+ */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * optional int32 page_size = 2; + * + *
+   * The standard List page size.
+   * 
+ */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * optional string page_token = 3; + * + *
+   * The standard List page token.
+   * 
+ */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * optional string page_token = 3; + * + *
+   * The standard List page token.
+   * 
+ */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = 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 (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, name_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, name_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.longrunning.ListOperationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.ListOperationsRequest 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.longrunning.ListOperationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.ListOperationsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.longrunning.ListOperationsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.ListOperationsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.longrunning.ListOperationsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.longrunning.ListOperationsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.longrunning.ListOperationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.ListOperationsRequest 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.longrunning.ListOperationsRequest 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.longrunning.ListOperationsRequest} + * + *
+   * The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.longrunning.ListOperationsRequest) + com.google.longrunning.ListOperationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.ListOperationsRequest.class, com.google.longrunning.ListOperationsRequest.Builder.class); + } + + // Construct using com.google.longrunning.ListOperationsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_descriptor; + } + + public com.google.longrunning.ListOperationsRequest getDefaultInstanceForType() { + return com.google.longrunning.ListOperationsRequest.getDefaultInstance(); + } + + public com.google.longrunning.ListOperationsRequest build() { + com.google.longrunning.ListOperationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.longrunning.ListOperationsRequest buildPartial() { + com.google.longrunning.ListOperationsRequest result = new com.google.longrunning.ListOperationsRequest(this); + result.name_ = name_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.longrunning.ListOperationsRequest) { + return mergeFrom((com.google.longrunning.ListOperationsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.longrunning.ListOperationsRequest other) { + if (other == com.google.longrunning.ListOperationsRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.longrunning.ListOperationsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.longrunning.ListOperationsRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 4; + * + *
+     * The name of the operation collection.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 4; + * + *
+     * The name of the operation collection.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 4; + * + *
+     * The name of the operation collection.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 4; + * + *
+     * The name of the operation collection.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 4; + * + *
+     * The name of the operation collection.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * optional string filter = 1; + * + *
+     * The standard List filter.
+     * 
+ */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string filter = 1; + * + *
+     * The standard List filter.
+     * 
+ */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string filter = 1; + * + *
+     * The standard List filter.
+     * 
+ */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * optional string filter = 1; + * + *
+     * The standard List filter.
+     * 
+ */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * optional string filter = 1; + * + *
+     * The standard List filter.
+     * 
+ */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + * optional int32 page_size = 2; + * + *
+     * The standard List page size.
+     * 
+ */ + public int getPageSize() { + return pageSize_; + } + /** + * optional int32 page_size = 2; + * + *
+     * The standard List page size.
+     * 
+ */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * optional int32 page_size = 2; + * + *
+     * The standard List page size.
+     * 
+ */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * optional string page_token = 3; + * + *
+     * The standard List page token.
+     * 
+ */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string page_token = 3; + * + *
+     * The standard List page token.
+     * 
+ */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string page_token = 3; + * + *
+     * The standard List page token.
+     * 
+ */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * optional string page_token = 3; + * + *
+     * The standard List page token.
+     * 
+ */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * optional string page_token = 3; + * + *
+     * The standard List page token.
+     * 
+ */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = 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.longrunning.ListOperationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.longrunning.ListOperationsRequest) + private static final com.google.longrunning.ListOperationsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.longrunning.ListOperationsRequest(); + } + + public static com.google.longrunning.ListOperationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ListOperationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ListOperationsRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.longrunning.ListOperationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequestOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequestOrBuilder.java new file mode 100644 index 000000000000..4d16f4b037d3 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequestOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public interface ListOperationsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.longrunning.ListOperationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 4; + * + *
+   * The name of the operation collection.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 4; + * + *
+   * The name of the operation collection.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional string filter = 1; + * + *
+   * The standard List filter.
+   * 
+ */ + java.lang.String getFilter(); + /** + * optional string filter = 1; + * + *
+   * The standard List filter.
+   * 
+ */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + * optional int32 page_size = 2; + * + *
+   * The standard List page size.
+   * 
+ */ + int getPageSize(); + + /** + * optional string page_token = 3; + * + *
+   * The standard List page token.
+   * 
+ */ + java.lang.String getPageToken(); + /** + * optional string page_token = 3; + * + *
+   * The standard List page token.
+   * 
+ */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponse.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponse.java new file mode 100644 index 000000000000..7d329933d9e6 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponse.java @@ -0,0 +1,909 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +/** + * Protobuf type {@code google.longrunning.ListOperationsResponse} + * + *
+ * The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
+ * 
+ */ +public final class ListOperationsResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.longrunning.ListOperationsResponse) + ListOperationsResponseOrBuilder { + // Use ListOperationsResponse.newBuilder() to construct. + private ListOperationsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListOperationsResponse() { + operations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private ListOperationsResponse( + 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)) { + operations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + operations_.add(input.readMessage(com.google.longrunning.Operation.parser(), extensionRegistry)); + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + operations_ = java.util.Collections.unmodifiableList(operations_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.ListOperationsResponse.class, com.google.longrunning.ListOperationsResponse.Builder.class); + } + + private int bitField0_; + public static final int OPERATIONS_FIELD_NUMBER = 1; + private java.util.List operations_; + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + public java.util.List getOperationsList() { + return operations_; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + public java.util.List + getOperationsOrBuilderList() { + return operations_; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + public int getOperationsCount() { + return operations_.size(); + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + public com.google.longrunning.Operation getOperations(int index) { + return operations_.get(index); + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder( + int index) { + return operations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * optional string next_page_token = 2; + * + *
+   * The standard List next-page token.
+   * 
+ */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * optional string next_page_token = 2; + * + *
+   * The standard List next-page token.
+   * 
+ */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < operations_.size(); i++) { + output.writeMessage(1, operations_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < operations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, operations_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.longrunning.ListOperationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.ListOperationsResponse 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.longrunning.ListOperationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.ListOperationsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.longrunning.ListOperationsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.ListOperationsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.longrunning.ListOperationsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.longrunning.ListOperationsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.longrunning.ListOperationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.ListOperationsResponse 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.longrunning.ListOperationsResponse 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.longrunning.ListOperationsResponse} + * + *
+   * The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.longrunning.ListOperationsResponse) + com.google.longrunning.ListOperationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.ListOperationsResponse.class, com.google.longrunning.ListOperationsResponse.Builder.class); + } + + // Construct using com.google.longrunning.ListOperationsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getOperationsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (operationsBuilder_ == null) { + operations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + operationsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_descriptor; + } + + public com.google.longrunning.ListOperationsResponse getDefaultInstanceForType() { + return com.google.longrunning.ListOperationsResponse.getDefaultInstance(); + } + + public com.google.longrunning.ListOperationsResponse build() { + com.google.longrunning.ListOperationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.longrunning.ListOperationsResponse buildPartial() { + com.google.longrunning.ListOperationsResponse result = new com.google.longrunning.ListOperationsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (operationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + operations_ = java.util.Collections.unmodifiableList(operations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.operations_ = operations_; + } else { + result.operations_ = operationsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.longrunning.ListOperationsResponse) { + return mergeFrom((com.google.longrunning.ListOperationsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.longrunning.ListOperationsResponse other) { + if (other == com.google.longrunning.ListOperationsResponse.getDefaultInstance()) return this; + if (operationsBuilder_ == null) { + if (!other.operations_.isEmpty()) { + if (operations_.isEmpty()) { + operations_ = other.operations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOperationsIsMutable(); + operations_.addAll(other.operations_); + } + onChanged(); + } + } else { + if (!other.operations_.isEmpty()) { + if (operationsBuilder_.isEmpty()) { + operationsBuilder_.dispose(); + operationsBuilder_ = null; + operations_ = other.operations_; + bitField0_ = (bitField0_ & ~0x00000001); + operationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOperationsFieldBuilder() : null; + } else { + operationsBuilder_.addAllMessages(other.operations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.longrunning.ListOperationsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.longrunning.ListOperationsResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List operations_ = + java.util.Collections.emptyList(); + private void ensureOperationsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + operations_ = new java.util.ArrayList(operations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> operationsBuilder_; + + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public java.util.List getOperationsList() { + if (operationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(operations_); + } else { + return operationsBuilder_.getMessageList(); + } + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public int getOperationsCount() { + if (operationsBuilder_ == null) { + return operations_.size(); + } else { + return operationsBuilder_.getCount(); + } + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public com.google.longrunning.Operation getOperations(int index) { + if (operationsBuilder_ == null) { + return operations_.get(index); + } else { + return operationsBuilder_.getMessage(index); + } + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder setOperations( + int index, com.google.longrunning.Operation value) { + if (operationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperationsIsMutable(); + operations_.set(index, value); + onChanged(); + } else { + operationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder setOperations( + int index, com.google.longrunning.Operation.Builder builderForValue) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.set(index, builderForValue.build()); + onChanged(); + } else { + operationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder addOperations(com.google.longrunning.Operation value) { + if (operationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperationsIsMutable(); + operations_.add(value); + onChanged(); + } else { + operationsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder addOperations( + int index, com.google.longrunning.Operation value) { + if (operationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperationsIsMutable(); + operations_.add(index, value); + onChanged(); + } else { + operationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder addOperations( + com.google.longrunning.Operation.Builder builderForValue) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.add(builderForValue.build()); + onChanged(); + } else { + operationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder addOperations( + int index, com.google.longrunning.Operation.Builder builderForValue) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.add(index, builderForValue.build()); + onChanged(); + } else { + operationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder addAllOperations( + java.lang.Iterable values) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, operations_); + onChanged(); + } else { + operationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder clearOperations() { + if (operationsBuilder_ == null) { + operations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + operationsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder removeOperations(int index) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.remove(index); + onChanged(); + } else { + operationsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public com.google.longrunning.Operation.Builder getOperationsBuilder( + int index) { + return getOperationsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder( + int index) { + if (operationsBuilder_ == null) { + return operations_.get(index); } else { + return operationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public java.util.List + getOperationsOrBuilderList() { + if (operationsBuilder_ != null) { + return operationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(operations_); + } + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public com.google.longrunning.Operation.Builder addOperationsBuilder() { + return getOperationsFieldBuilder().addBuilder( + com.google.longrunning.Operation.getDefaultInstance()); + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public com.google.longrunning.Operation.Builder addOperationsBuilder( + int index) { + return getOperationsFieldBuilder().addBuilder( + index, com.google.longrunning.Operation.getDefaultInstance()); + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public java.util.List + getOperationsBuilderList() { + return getOperationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> + getOperationsFieldBuilder() { + if (operationsBuilder_ == null) { + operationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder>( + operations_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + operations_ = null; + } + return operationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * optional string next_page_token = 2; + * + *
+     * The standard List next-page token.
+     * 
+ */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string next_page_token = 2; + * + *
+     * The standard List next-page token.
+     * 
+ */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string next_page_token = 2; + * + *
+     * The standard List next-page token.
+     * 
+ */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * optional string next_page_token = 2; + * + *
+     * The standard List next-page token.
+     * 
+ */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * optional string next_page_token = 2; + * + *
+     * The standard List next-page token.
+     * 
+ */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = 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.longrunning.ListOperationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.longrunning.ListOperationsResponse) + private static final com.google.longrunning.ListOperationsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.longrunning.ListOperationsResponse(); + } + + public static com.google.longrunning.ListOperationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ListOperationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ListOperationsResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.longrunning.ListOperationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponseOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponseOrBuilder.java new file mode 100644 index 000000000000..8e2c047294a5 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponseOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public interface ListOperationsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.longrunning.ListOperationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + java.util.List + getOperationsList(); + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + com.google.longrunning.Operation getOperations(int index); + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + int getOperationsCount(); + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + java.util.List + getOperationsOrBuilderList(); + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + com.google.longrunning.OperationOrBuilder getOperationsOrBuilder( + int index); + + /** + * optional string next_page_token = 2; + * + *
+   * The standard List next-page token.
+   * 
+ */ + java.lang.String getNextPageToken(); + /** + * optional string next_page_token = 2; + * + *
+   * The standard List next-page token.
+   * 
+ */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/Operation.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/Operation.java new file mode 100644 index 000000000000..750f3a657b25 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/Operation.java @@ -0,0 +1,1383 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +/** + * Protobuf type {@code google.longrunning.Operation} + * + *
+ * This resource represents a long-running operation that is the result of a
+ * network API call.
+ * 
+ */ +public final class Operation extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.longrunning.Operation) + OperationOrBuilder { + // Use Operation.newBuilder() to construct. + private Operation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Operation() { + name_ = ""; + done_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Operation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.protobuf.Any.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + + done_ = input.readBool(); + break; + } + case 34: { + com.google.rpc.Status.Builder subBuilder = null; + if (resultCase_ == 4) { + subBuilder = ((com.google.rpc.Status) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.rpc.Status) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 4; + break; + } + case 42: { + com.google.protobuf.Any.Builder subBuilder = null; + if (resultCase_ == 5) { + subBuilder = ((com.google.protobuf.Any) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Any) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 5; + 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.longrunning.OperationsProto.internal_static_google_longrunning_Operation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.Operation.class, com.google.longrunning.Operation.Builder.class); + } + + private int resultCase_ = 0; + private java.lang.Object result_; + public enum ResultCase + implements com.google.protobuf.Internal.EnumLite { + ERROR(4), + RESPONSE(5), + RESULT_NOT_SET(0); + private int value = 0; + private ResultCase(int value) { + this.value = value; + } + public static ResultCase valueOf(int value) { + switch (value) { + case 4: return ERROR; + case 5: return RESPONSE; + case 0: return RESULT_NOT_SET; + default: throw new java.lang.IllegalArgumentException( + "Value is undefined for this oneof enum."); + } + } + public int getNumber() { + return this.value; + } + }; + + public ResultCase + getResultCase() { + return ResultCase.valueOf( + resultCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the operation resource, which is only unique within the same
+   * service that originally returns it.
+   * 
+ */ + 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 operation resource, which is only unique within the same
+   * service that originally returns it.
+   * 
+ */ + 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 METADATA_FIELD_NUMBER = 2; + private com.google.protobuf.Any metadata_; + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+   * Some service-specific metadata associated with the operation.  It typically
+   * contains progress information and common metadata such as create time.
+   * Some services may not provide such metadata.  Any method that returns a
+   * long-running operation should document the metadata type, if any.
+   * 
+ */ + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+   * Some service-specific metadata associated with the operation.  It typically
+   * contains progress information and common metadata such as create time.
+   * Some services may not provide such metadata.  Any method that returns a
+   * long-running operation should document the metadata type, if any.
+   * 
+ */ + public com.google.protobuf.Any getMetadata() { + return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+   * Some service-specific metadata associated with the operation.  It typically
+   * contains progress information and common metadata such as create time.
+   * Some services may not provide such metadata.  Any method that returns a
+   * long-running operation should document the metadata type, if any.
+   * 
+ */ + public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + public static final int DONE_FIELD_NUMBER = 3; + private boolean done_; + /** + * optional bool done = 3; + * + *
+   * If the value is false, it means the operation is still in progress.
+   * If true, the operation is completed and the `result` is available.
+   * 
+ */ + public boolean getDone() { + return done_; + } + + public static final int ERROR_FIELD_NUMBER = 4; + /** + * optional .google.rpc.Status error = 4; + * + *
+   * The error result of the operation in case of failure.
+   * 
+ */ + public com.google.rpc.Status getError() { + if (resultCase_ == 4) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + /** + * optional .google.rpc.Status error = 4; + * + *
+   * The error result of the operation in case of failure.
+   * 
+ */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (resultCase_ == 4) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + + public static final int RESPONSE_FIELD_NUMBER = 5; + /** + * optional .google.protobuf.Any response = 5; + * + *
+   * The normal response of the operation in case of success.  If the original
+   * method returns no data on success, such as `Delete`, the response will be
+   * `google.protobuf.Empty`.  If the original method is standard
+   * `Get`/`Create`/`Update`, the response should be the resource.  For other
+   * methods, the response should have the type `XxxResponse`, where `Xxx`
+   * is the original method name.  For example, if the original method name
+   * is `TakeSnapshot()`, the inferred response type will be
+   * `TakeSnapshotResponse`.
+   * 
+ */ + public com.google.protobuf.Any getResponse() { + if (resultCase_ == 5) { + return (com.google.protobuf.Any) result_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+   * The normal response of the operation in case of success.  If the original
+   * method returns no data on success, such as `Delete`, the response will be
+   * `google.protobuf.Empty`.  If the original method is standard
+   * `Get`/`Create`/`Update`, the response should be the resource.  For other
+   * methods, the response should have the type `XxxResponse`, where `Xxx`
+   * is the original method name.  For example, if the original method name
+   * is `TakeSnapshot()`, the inferred response type will be
+   * `TakeSnapshotResponse`.
+   * 
+ */ + public com.google.protobuf.AnyOrBuilder getResponseOrBuilder() { + if (resultCase_ == 5) { + return (com.google.protobuf.Any) result_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (metadata_ != null) { + output.writeMessage(2, getMetadata()); + } + if (done_ != false) { + output.writeBool(3, done_); + } + if (resultCase_ == 4) { + output.writeMessage(4, (com.google.rpc.Status) result_); + } + if (resultCase_ == 5) { + output.writeMessage(5, (com.google.protobuf.Any) result_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMetadata()); + } + if (done_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, done_); + } + if (resultCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.rpc.Status) result_); + } + if (resultCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.protobuf.Any) result_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.longrunning.Operation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.Operation 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.longrunning.Operation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.Operation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.longrunning.Operation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.Operation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.longrunning.Operation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.longrunning.Operation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.longrunning.Operation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.Operation 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.longrunning.Operation 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.longrunning.Operation} + * + *
+   * This resource represents a long-running operation that is the result of a
+   * network API call.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.longrunning.Operation) + com.google.longrunning.OperationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.Operation.class, com.google.longrunning.Operation.Builder.class); + } + + // Construct using com.google.longrunning.Operation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + done_ = false; + + resultCase_ = 0; + result_ = null; + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_descriptor; + } + + public com.google.longrunning.Operation getDefaultInstanceForType() { + return com.google.longrunning.Operation.getDefaultInstance(); + } + + public com.google.longrunning.Operation build() { + com.google.longrunning.Operation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.longrunning.Operation buildPartial() { + com.google.longrunning.Operation result = new com.google.longrunning.Operation(this); + result.name_ = name_; + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + result.done_ = done_; + if (resultCase_ == 4) { + if (errorBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = errorBuilder_.build(); + } + } + if (resultCase_ == 5) { + if (responseBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = responseBuilder_.build(); + } + } + result.resultCase_ = resultCase_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.longrunning.Operation) { + return mergeFrom((com.google.longrunning.Operation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.longrunning.Operation other) { + if (other == com.google.longrunning.Operation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.getDone() != false) { + setDone(other.getDone()); + } + switch (other.getResultCase()) { + case ERROR: { + mergeError(other.getError()); + break; + } + case RESPONSE: { + mergeResponse(other.getResponse()); + break; + } + case RESULT_NOT_SET: { + break; + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.longrunning.Operation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.longrunning.Operation) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int resultCase_ = 0; + private java.lang.Object result_; + public ResultCase + getResultCase() { + return ResultCase.valueOf( + resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the operation resource, which is only unique within the same
+     * service that originally returns it.
+     * 
+ */ + 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 operation resource, which is only unique within the same
+     * service that originally returns it.
+     * 
+ */ + 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 operation resource, which is only unique within the same
+     * service that originally returns it.
+     * 
+ */ + 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 operation resource, which is only unique within the same
+     * service that originally returns it.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the operation resource, which is only unique within the same
+     * service that originally returns it.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Any metadata_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> metadataBuilder_; + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public com.google.protobuf.Any getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public Builder setMetadata(com.google.protobuf.Any value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public Builder setMetadata( + com.google.protobuf.Any.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public Builder mergeMetadata(com.google.protobuf.Any value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.protobuf.Any.newBuilder(metadata_).mergeFrom(value).buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public com.google.protobuf.Any.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + com.google.protobuf.Any.getDefaultInstance() : metadata_; + } + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private boolean done_ ; + /** + * optional bool done = 3; + * + *
+     * If the value is false, it means the operation is still in progress.
+     * If true, the operation is completed and the `result` is available.
+     * 
+ */ + public boolean getDone() { + return done_; + } + /** + * optional bool done = 3; + * + *
+     * If the value is false, it means the operation is still in progress.
+     * If true, the operation is completed and the `result` is available.
+     * 
+ */ + public Builder setDone(boolean value) { + + done_ = value; + onChanged(); + return this; + } + /** + * optional bool done = 3; + * + *
+     * If the value is false, it means the operation is still in progress.
+     * If true, the operation is completed and the `result` is available.
+     * 
+ */ + public Builder clearDone() { + + done_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + if (resultCase_ == 4) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } else { + if (resultCase_ == 4) { + return errorBuilder_.getMessage(); + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + resultCase_ = 4; + return this; + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 4; + return this; + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (resultCase_ == 4 && + result_ != com.google.rpc.Status.getDefaultInstance()) { + result_ = com.google.rpc.Status.newBuilder((com.google.rpc.Status) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 4) { + errorBuilder_.mergeFrom(value); + } + errorBuilder_.setMessage(value); + } + resultCase_ = 4; + return this; + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + } + errorBuilder_.clear(); + } + return this; + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public com.google.rpc.Status.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if ((resultCase_ == 4) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 4) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(resultCase_ == 4)) { + result_ = com.google.rpc.Status.getDefaultInstance(); + } + errorBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + (com.google.rpc.Status) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 4; + onChanged();; + return errorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> responseBuilder_; + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public com.google.protobuf.Any getResponse() { + if (responseBuilder_ == null) { + if (resultCase_ == 5) { + return (com.google.protobuf.Any) result_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } else { + if (resultCase_ == 5) { + return responseBuilder_.getMessage(); + } + return com.google.protobuf.Any.getDefaultInstance(); + } + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public Builder setResponse(com.google.protobuf.Any value) { + if (responseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + responseBuilder_.setMessage(value); + } + resultCase_ = 5; + return this; + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public Builder setResponse( + com.google.protobuf.Any.Builder builderForValue) { + if (responseBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + responseBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 5; + return this; + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public Builder mergeResponse(com.google.protobuf.Any value) { + if (responseBuilder_ == null) { + if (resultCase_ == 5 && + result_ != com.google.protobuf.Any.getDefaultInstance()) { + result_ = com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 5) { + responseBuilder_.mergeFrom(value); + } + responseBuilder_.setMessage(value); + } + resultCase_ = 5; + return this; + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public Builder clearResponse() { + if (responseBuilder_ == null) { + if (resultCase_ == 5) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 5) { + resultCase_ = 0; + result_ = null; + } + responseBuilder_.clear(); + } + return this; + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public com.google.protobuf.Any.Builder getResponseBuilder() { + return getResponseFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public com.google.protobuf.AnyOrBuilder getResponseOrBuilder() { + if ((resultCase_ == 5) && (responseBuilder_ != null)) { + return responseBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 5) { + return (com.google.protobuf.Any) result_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getResponseFieldBuilder() { + if (responseBuilder_ == null) { + if (!(resultCase_ == 5)) { + result_ = com.google.protobuf.Any.getDefaultInstance(); + } + responseBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + (com.google.protobuf.Any) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 5; + onChanged();; + return responseBuilder_; + } + 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.longrunning.Operation) + } + + // @@protoc_insertion_point(class_scope:google.longrunning.Operation) + private static final com.google.longrunning.Operation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.longrunning.Operation(); + } + + public static com.google.longrunning.Operation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Operation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Operation(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.longrunning.Operation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationOrBuilder.java new file mode 100644 index 000000000000..8366f5d21f3e --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationOrBuilder.java @@ -0,0 +1,123 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public interface OperationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.longrunning.Operation) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the operation resource, which is only unique within the same
+   * service that originally returns it.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the operation resource, which is only unique within the same
+   * service that originally returns it.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+   * Some service-specific metadata associated with the operation.  It typically
+   * contains progress information and common metadata such as create time.
+   * Some services may not provide such metadata.  Any method that returns a
+   * long-running operation should document the metadata type, if any.
+   * 
+ */ + boolean hasMetadata(); + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+   * Some service-specific metadata associated with the operation.  It typically
+   * contains progress information and common metadata such as create time.
+   * Some services may not provide such metadata.  Any method that returns a
+   * long-running operation should document the metadata type, if any.
+   * 
+ */ + com.google.protobuf.Any getMetadata(); + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+   * Some service-specific metadata associated with the operation.  It typically
+   * contains progress information and common metadata such as create time.
+   * Some services may not provide such metadata.  Any method that returns a
+   * long-running operation should document the metadata type, if any.
+   * 
+ */ + com.google.protobuf.AnyOrBuilder getMetadataOrBuilder(); + + /** + * optional bool done = 3; + * + *
+   * If the value is false, it means the operation is still in progress.
+   * If true, the operation is completed and the `result` is available.
+   * 
+ */ + boolean getDone(); + + /** + * optional .google.rpc.Status error = 4; + * + *
+   * The error result of the operation in case of failure.
+   * 
+ */ + com.google.rpc.Status getError(); + /** + * optional .google.rpc.Status error = 4; + * + *
+   * The error result of the operation in case of failure.
+   * 
+ */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * optional .google.protobuf.Any response = 5; + * + *
+   * The normal response of the operation in case of success.  If the original
+   * method returns no data on success, such as `Delete`, the response will be
+   * `google.protobuf.Empty`.  If the original method is standard
+   * `Get`/`Create`/`Update`, the response should be the resource.  For other
+   * methods, the response should have the type `XxxResponse`, where `Xxx`
+   * is the original method name.  For example, if the original method name
+   * is `TakeSnapshot()`, the inferred response type will be
+   * `TakeSnapshotResponse`.
+   * 
+ */ + com.google.protobuf.Any getResponse(); + /** + * optional .google.protobuf.Any response = 5; + * + *
+   * The normal response of the operation in case of success.  If the original
+   * method returns no data on success, such as `Delete`, the response will be
+   * `google.protobuf.Empty`.  If the original method is standard
+   * `Get`/`Create`/`Update`, the response should be the resource.  For other
+   * methods, the response should have the type `XxxResponse`, where `Xxx`
+   * is the original method name.  For example, if the original method name
+   * is `TakeSnapshot()`, the inferred response type will be
+   * `TakeSnapshotResponse`.
+   * 
+ */ + com.google.protobuf.AnyOrBuilder getResponseOrBuilder(); + + public com.google.longrunning.Operation.ResultCase getResultCase(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsGrpc.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsGrpc.java new file mode 100644 index 000000000000..0c1c82a52874 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsGrpc.java @@ -0,0 +1,306 @@ +package com.google.longrunning; + +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; + +@javax.annotation.Generated("by gRPC proto compiler") +public class OperationsGrpc { + + private OperationsGrpc() {} + + public static final String SERVICE_NAME = "google.longrunning.Operations"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi + public static final io.grpc.MethodDescriptor METHOD_GET_OPERATION = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.UNARY, + generateFullMethodName( + "google.longrunning.Operations", "GetOperation"), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.GetOperationRequest.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.Operation.getDefaultInstance())); + @io.grpc.ExperimentalApi + public static final io.grpc.MethodDescriptor METHOD_LIST_OPERATIONS = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.UNARY, + generateFullMethodName( + "google.longrunning.Operations", "ListOperations"), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.ListOperationsRequest.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.ListOperationsResponse.getDefaultInstance())); + @io.grpc.ExperimentalApi + public static final io.grpc.MethodDescriptor METHOD_CANCEL_OPERATION = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.UNARY, + generateFullMethodName( + "google.longrunning.Operations", "CancelOperation"), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.CancelOperationRequest.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance())); + @io.grpc.ExperimentalApi + public static final io.grpc.MethodDescriptor METHOD_DELETE_OPERATION = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.UNARY, + generateFullMethodName( + "google.longrunning.Operations", "DeleteOperation"), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.DeleteOperationRequest.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance())); + + public static OperationsStub newStub(io.grpc.Channel channel) { + return new OperationsStub(channel); + } + + public static OperationsBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new OperationsBlockingStub(channel); + } + + public static OperationsFutureStub newFutureStub( + io.grpc.Channel channel) { + return new OperationsFutureStub(channel); + } + + public static interface Operations { + + public void getOperation(com.google.longrunning.GetOperationRequest request, + io.grpc.stub.StreamObserver responseObserver); + + public void listOperations(com.google.longrunning.ListOperationsRequest request, + io.grpc.stub.StreamObserver responseObserver); + + public void cancelOperation(com.google.longrunning.CancelOperationRequest request, + io.grpc.stub.StreamObserver responseObserver); + + public void deleteOperation(com.google.longrunning.DeleteOperationRequest request, + io.grpc.stub.StreamObserver responseObserver); + } + + public static interface OperationsBlockingClient { + + public com.google.longrunning.Operation getOperation(com.google.longrunning.GetOperationRequest request); + + public com.google.longrunning.ListOperationsResponse listOperations(com.google.longrunning.ListOperationsRequest request); + + public com.google.protobuf.Empty cancelOperation(com.google.longrunning.CancelOperationRequest request); + + public com.google.protobuf.Empty deleteOperation(com.google.longrunning.DeleteOperationRequest request); + } + + public static interface OperationsFutureClient { + + public com.google.common.util.concurrent.ListenableFuture getOperation( + com.google.longrunning.GetOperationRequest request); + + public com.google.common.util.concurrent.ListenableFuture listOperations( + com.google.longrunning.ListOperationsRequest request); + + public com.google.common.util.concurrent.ListenableFuture cancelOperation( + com.google.longrunning.CancelOperationRequest request); + + public com.google.common.util.concurrent.ListenableFuture deleteOperation( + com.google.longrunning.DeleteOperationRequest request); + } + + public static class OperationsStub extends io.grpc.stub.AbstractStub + implements Operations { + private OperationsStub(io.grpc.Channel channel) { + super(channel); + } + + private OperationsStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected OperationsStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new OperationsStub(channel, callOptions); + } + + @java.lang.Override + public void getOperation(com.google.longrunning.GetOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(METHOD_GET_OPERATION, getCallOptions()), request, responseObserver); + } + + @java.lang.Override + public void listOperations(com.google.longrunning.ListOperationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(METHOD_LIST_OPERATIONS, getCallOptions()), request, responseObserver); + } + + @java.lang.Override + public void cancelOperation(com.google.longrunning.CancelOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(METHOD_CANCEL_OPERATION, getCallOptions()), request, responseObserver); + } + + @java.lang.Override + public void deleteOperation(com.google.longrunning.DeleteOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(METHOD_DELETE_OPERATION, getCallOptions()), request, responseObserver); + } + } + + public static class OperationsBlockingStub extends io.grpc.stub.AbstractStub + implements OperationsBlockingClient { + private OperationsBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private OperationsBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected OperationsBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new OperationsBlockingStub(channel, callOptions); + } + + @java.lang.Override + public com.google.longrunning.Operation getOperation(com.google.longrunning.GetOperationRequest request) { + return blockingUnaryCall( + getChannel().newCall(METHOD_GET_OPERATION, getCallOptions()), request); + } + + @java.lang.Override + public com.google.longrunning.ListOperationsResponse listOperations(com.google.longrunning.ListOperationsRequest request) { + return blockingUnaryCall( + getChannel().newCall(METHOD_LIST_OPERATIONS, getCallOptions()), request); + } + + @java.lang.Override + public com.google.protobuf.Empty cancelOperation(com.google.longrunning.CancelOperationRequest request) { + return blockingUnaryCall( + getChannel().newCall(METHOD_CANCEL_OPERATION, getCallOptions()), request); + } + + @java.lang.Override + public com.google.protobuf.Empty deleteOperation(com.google.longrunning.DeleteOperationRequest request) { + return blockingUnaryCall( + getChannel().newCall(METHOD_DELETE_OPERATION, getCallOptions()), request); + } + } + + public static class OperationsFutureStub extends io.grpc.stub.AbstractStub + implements OperationsFutureClient { + private OperationsFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private OperationsFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected OperationsFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new OperationsFutureStub(channel, callOptions); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture getOperation( + com.google.longrunning.GetOperationRequest request) { + return futureUnaryCall( + getChannel().newCall(METHOD_GET_OPERATION, getCallOptions()), request); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture listOperations( + com.google.longrunning.ListOperationsRequest request) { + return futureUnaryCall( + getChannel().newCall(METHOD_LIST_OPERATIONS, getCallOptions()), request); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture cancelOperation( + com.google.longrunning.CancelOperationRequest request) { + return futureUnaryCall( + getChannel().newCall(METHOD_CANCEL_OPERATION, getCallOptions()), request); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture deleteOperation( + com.google.longrunning.DeleteOperationRequest request) { + return futureUnaryCall( + getChannel().newCall(METHOD_DELETE_OPERATION, getCallOptions()), request); + } + } + + public static io.grpc.ServerServiceDefinition bindService( + final Operations serviceImpl) { + return io.grpc.ServerServiceDefinition.builder(SERVICE_NAME) + .addMethod( + METHOD_GET_OPERATION, + asyncUnaryCall( + new io.grpc.stub.ServerCalls.UnaryMethod< + com.google.longrunning.GetOperationRequest, + com.google.longrunning.Operation>() { + @java.lang.Override + public void invoke( + com.google.longrunning.GetOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.getOperation(request, responseObserver); + } + })) + .addMethod( + METHOD_LIST_OPERATIONS, + asyncUnaryCall( + new io.grpc.stub.ServerCalls.UnaryMethod< + com.google.longrunning.ListOperationsRequest, + com.google.longrunning.ListOperationsResponse>() { + @java.lang.Override + public void invoke( + com.google.longrunning.ListOperationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.listOperations(request, responseObserver); + } + })) + .addMethod( + METHOD_CANCEL_OPERATION, + asyncUnaryCall( + new io.grpc.stub.ServerCalls.UnaryMethod< + com.google.longrunning.CancelOperationRequest, + com.google.protobuf.Empty>() { + @java.lang.Override + public void invoke( + com.google.longrunning.CancelOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.cancelOperation(request, responseObserver); + } + })) + .addMethod( + METHOD_DELETE_OPERATION, + asyncUnaryCall( + new io.grpc.stub.ServerCalls.UnaryMethod< + com.google.longrunning.DeleteOperationRequest, + com.google.protobuf.Empty>() { + @java.lang.Override + public void invoke( + com.google.longrunning.DeleteOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.deleteOperation(request, responseObserver); + } + })).build(); + } +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsProto.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsProto.java new file mode 100644 index 000000000000..462e611fba19 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsProto.java @@ -0,0 +1,146 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public final class OperationsProto { + private OperationsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_longrunning_Operation_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_longrunning_Operation_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_longrunning_GetOperationRequest_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_longrunning_GetOperationRequest_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_longrunning_ListOperationsRequest_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_longrunning_ListOperationsRequest_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_longrunning_ListOperationsResponse_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_longrunning_ListOperationsResponse_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_longrunning_CancelOperationRequest_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_longrunning_CancelOperationRequest_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_longrunning_DeleteOperationRequest_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_longrunning_DeleteOperationRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n#google/longrunning/operations.proto\022\022g" + + "oogle.longrunning\032\034google/api/annotation" + + "s.proto\032\031google/protobuf/any.proto\032\033goog" + + "le/protobuf/empty.proto\032\027google/rpc/stat" + + "us.proto\"\250\001\n\tOperation\022\014\n\004name\030\001 \001(\t\022&\n\010" + + "metadata\030\002 \001(\0132\024.google.protobuf.Any\022\014\n\004" + + "done\030\003 \001(\010\022#\n\005error\030\004 \001(\0132\022.google.rpc.S" + + "tatusH\000\022(\n\010response\030\005 \001(\0132\024.google.proto" + + "buf.AnyH\000B\010\n\006result\"#\n\023GetOperationReque" + + "st\022\014\n\004name\030\001 \001(\t\"\\\n\025ListOperationsReques", + "t\022\014\n\004name\030\004 \001(\t\022\016\n\006filter\030\001 \001(\t\022\021\n\tpage_" + + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"d\n\026ListOp" + + "erationsResponse\0221\n\noperations\030\001 \003(\0132\035.g" + + "oogle.longrunning.Operation\022\027\n\017next_page" + + "_token\030\002 \001(\t\"&\n\026CancelOperationRequest\022\014" + + "\n\004name\030\001 \001(\t\"&\n\026DeleteOperationRequest\022\014" + + "\n\004name\030\001 \001(\t2\214\004\n\nOperations\022x\n\014GetOperat" + + "ion\022\'.google.longrunning.GetOperationReq" + + "uest\032\035.google.longrunning.Operation\" \202\323\344" + + "\223\002\032\022\030/v1/{name=operations/**}\022\206\001\n\016ListOp", + "erations\022).google.longrunning.ListOperat" + + "ionsRequest\032*.google.longrunning.ListOpe" + + "rationsResponse\"\035\202\323\344\223\002\027\022\025/v1/{name=opera" + + "tions}\022\201\001\n\017CancelOperation\022*.google.long" + + "running.CancelOperationRequest\032\026.google." + + "protobuf.Empty\"*\202\323\344\223\002$\"\037/v1/{name=operat" + + "ions/**}:cancel:\001*\022w\n\017DeleteOperation\022*." + + "google.longrunning.DeleteOperationReques" + + "t\032\026.google.protobuf.Empty\" \202\323\344\223\002\032*\030/v1/{" + + "name=operations/**}B+\n\026com.google.longru", + "nningB\017OperationsProtoP\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.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }, assigner); + internal_static_google_longrunning_Operation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_longrunning_Operation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_longrunning_Operation_descriptor, + new java.lang.String[] { "Name", "Metadata", "Done", "Error", "Response", "Result", }); + internal_static_google_longrunning_GetOperationRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_longrunning_GetOperationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_longrunning_GetOperationRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_longrunning_ListOperationsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_longrunning_ListOperationsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_longrunning_ListOperationsRequest_descriptor, + new java.lang.String[] { "Name", "Filter", "PageSize", "PageToken", }); + internal_static_google_longrunning_ListOperationsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_longrunning_ListOperationsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_longrunning_ListOperationsResponse_descriptor, + new java.lang.String[] { "Operations", "NextPageToken", }); + internal_static_google_longrunning_CancelOperationRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_longrunning_CancelOperationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_longrunning_CancelOperationRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_longrunning_DeleteOperationRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_longrunning_DeleteOperationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_longrunning_DeleteOperationRequest_descriptor, + new java.lang.String[] { "Name", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequest.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequest.java new file mode 100644 index 000000000000..acb0dc65019d --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequest.java @@ -0,0 +1,1437 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +/** + * Protobuf type {@code google.rpc.BadRequest} + * + *
+ * Describes violations in a client request. This error type focuses on the
+ * syntactic aspects of the request.
+ * 
+ */ +public final class BadRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.rpc.BadRequest) + BadRequestOrBuilder { + // Use BadRequest.newBuilder() to construct. + private BadRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BadRequest() { + fieldViolations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private BadRequest( + 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)) { + fieldViolations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fieldViolations_.add(input.readMessage(com.google.rpc.BadRequest.FieldViolation.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.BadRequest.class, com.google.rpc.BadRequest.Builder.class); + } + + public interface FieldViolationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.rpc.BadRequest.FieldViolation) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string field = 1; + * + *
+     * A path leading to a field in the request body. The value will be a
+     * sequence of dot-separated identifiers that identify a protocol buffer
+     * field. E.g., "violations.field" would identify this field.
+     * 
+ */ + java.lang.String getField(); + /** + * optional string field = 1; + * + *
+     * A path leading to a field in the request body. The value will be a
+     * sequence of dot-separated identifiers that identify a protocol buffer
+     * field. E.g., "violations.field" would identify this field.
+     * 
+ */ + com.google.protobuf.ByteString + getFieldBytes(); + + /** + * optional string description = 2; + * + *
+     * A description of why the request element is bad.
+     * 
+ */ + java.lang.String getDescription(); + /** + * optional string description = 2; + * + *
+     * A description of why the request element is bad.
+     * 
+ */ + com.google.protobuf.ByteString + getDescriptionBytes(); + } + /** + * Protobuf type {@code google.rpc.BadRequest.FieldViolation} + * + *
+   * A message type used to describe a single bad request field.
+   * 
+ */ + public static final class FieldViolation extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.rpc.BadRequest.FieldViolation) + FieldViolationOrBuilder { + // Use FieldViolation.newBuilder() to construct. + private FieldViolation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FieldViolation() { + field_ = ""; + description_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private FieldViolation( + 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(); + + field_ = s; + break; + } + case 18: { + 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.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_FieldViolation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_FieldViolation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.BadRequest.FieldViolation.class, com.google.rpc.BadRequest.FieldViolation.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private volatile java.lang.Object field_; + /** + * optional string field = 1; + * + *
+     * A path leading to a field in the request body. The value will be a
+     * sequence of dot-separated identifiers that identify a protocol buffer
+     * field. E.g., "violations.field" would identify this field.
+     * 
+ */ + public java.lang.String getField() { + java.lang.Object ref = field_; + 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(); + field_ = s; + return s; + } + } + /** + * optional string field = 1; + * + *
+     * A path leading to a field in the request body. The value will be a
+     * sequence of dot-separated identifiers that identify a protocol buffer
+     * field. E.g., "violations.field" would identify this field.
+     * 
+ */ + public com.google.protobuf.ByteString + getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * optional string description = 2; + * + *
+     * A description of why the request element is bad.
+     * 
+ */ + 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 = 2; + * + *
+     * A description of why the request element is bad.
+     * 
+ */ + 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 (!getFieldBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, field_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFieldBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, field_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.rpc.BadRequest.FieldViolation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.BadRequest.FieldViolation 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.rpc.BadRequest.FieldViolation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.BadRequest.FieldViolation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.rpc.BadRequest.FieldViolation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.BadRequest.FieldViolation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.rpc.BadRequest.FieldViolation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.rpc.BadRequest.FieldViolation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.rpc.BadRequest.FieldViolation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.BadRequest.FieldViolation 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.rpc.BadRequest.FieldViolation 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.rpc.BadRequest.FieldViolation} + * + *
+     * A message type used to describe a single bad request field.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.rpc.BadRequest.FieldViolation) + com.google.rpc.BadRequest.FieldViolationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_FieldViolation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_FieldViolation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.BadRequest.FieldViolation.class, com.google.rpc.BadRequest.FieldViolation.Builder.class); + } + + // Construct using com.google.rpc.BadRequest.FieldViolation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + field_ = ""; + + description_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_FieldViolation_descriptor; + } + + public com.google.rpc.BadRequest.FieldViolation getDefaultInstanceForType() { + return com.google.rpc.BadRequest.FieldViolation.getDefaultInstance(); + } + + public com.google.rpc.BadRequest.FieldViolation build() { + com.google.rpc.BadRequest.FieldViolation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.rpc.BadRequest.FieldViolation buildPartial() { + com.google.rpc.BadRequest.FieldViolation result = new com.google.rpc.BadRequest.FieldViolation(this); + result.field_ = field_; + result.description_ = description_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.BadRequest.FieldViolation) { + return mergeFrom((com.google.rpc.BadRequest.FieldViolation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.BadRequest.FieldViolation other) { + if (other == com.google.rpc.BadRequest.FieldViolation.getDefaultInstance()) return this; + if (!other.getField().isEmpty()) { + field_ = other.field_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.rpc.BadRequest.FieldViolation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.rpc.BadRequest.FieldViolation) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object field_ = ""; + /** + * optional string field = 1; + * + *
+       * A path leading to a field in the request body. The value will be a
+       * sequence of dot-separated identifiers that identify a protocol buffer
+       * field. E.g., "violations.field" would identify this field.
+       * 
+ */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string field = 1; + * + *
+       * A path leading to a field in the request body. The value will be a
+       * sequence of dot-separated identifiers that identify a protocol buffer
+       * field. E.g., "violations.field" would identify this field.
+       * 
+ */ + public com.google.protobuf.ByteString + getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string field = 1; + * + *
+       * A path leading to a field in the request body. The value will be a
+       * sequence of dot-separated identifiers that identify a protocol buffer
+       * field. E.g., "violations.field" would identify this field.
+       * 
+ */ + public Builder setField( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + field_ = value; + onChanged(); + return this; + } + /** + * optional string field = 1; + * + *
+       * A path leading to a field in the request body. The value will be a
+       * sequence of dot-separated identifiers that identify a protocol buffer
+       * field. E.g., "violations.field" would identify this field.
+       * 
+ */ + public Builder clearField() { + + field_ = getDefaultInstance().getField(); + onChanged(); + return this; + } + /** + * optional string field = 1; + * + *
+       * A path leading to a field in the request body. The value will be a
+       * sequence of dot-separated identifiers that identify a protocol buffer
+       * field. E.g., "violations.field" would identify this field.
+       * 
+ */ + public Builder setFieldBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + field_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * optional string description = 2; + * + *
+       * A description of why the request element is bad.
+       * 
+ */ + 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 = 2; + * + *
+       * A description of why the request element is bad.
+       * 
+ */ + 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 = 2; + * + *
+       * A description of why the request element is bad.
+       * 
+ */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * optional string description = 2; + * + *
+       * A description of why the request element is bad.
+       * 
+ */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * optional string description = 2; + * + *
+       * A description of why the request element is bad.
+       * 
+ */ + 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.rpc.BadRequest.FieldViolation) + } + + // @@protoc_insertion_point(class_scope:google.rpc.BadRequest.FieldViolation) + private static final com.google.rpc.BadRequest.FieldViolation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.rpc.BadRequest.FieldViolation(); + } + + public static com.google.rpc.BadRequest.FieldViolation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public FieldViolation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new FieldViolation(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.rpc.BadRequest.FieldViolation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FIELD_VIOLATIONS_FIELD_NUMBER = 1; + private java.util.List fieldViolations_; + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+   * Describes all violations in a client request.
+   * 
+ */ + public java.util.List getFieldViolationsList() { + return fieldViolations_; + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+   * Describes all violations in a client request.
+   * 
+ */ + public java.util.List + getFieldViolationsOrBuilderList() { + return fieldViolations_; + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+   * Describes all violations in a client request.
+   * 
+ */ + public int getFieldViolationsCount() { + return fieldViolations_.size(); + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+   * Describes all violations in a client request.
+   * 
+ */ + public com.google.rpc.BadRequest.FieldViolation getFieldViolations(int index) { + return fieldViolations_.get(index); + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+   * Describes all violations in a client request.
+   * 
+ */ + public com.google.rpc.BadRequest.FieldViolationOrBuilder getFieldViolationsOrBuilder( + int index) { + return fieldViolations_.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 < fieldViolations_.size(); i++) { + output.writeMessage(1, fieldViolations_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fieldViolations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fieldViolations_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.rpc.BadRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.BadRequest 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.rpc.BadRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.BadRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.rpc.BadRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.BadRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.rpc.BadRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.rpc.BadRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.rpc.BadRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.BadRequest 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.rpc.BadRequest 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.rpc.BadRequest} + * + *
+   * Describes violations in a client request. This error type focuses on the
+   * syntactic aspects of the request.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.rpc.BadRequest) + com.google.rpc.BadRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.BadRequest.class, com.google.rpc.BadRequest.Builder.class); + } + + // Construct using com.google.rpc.BadRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFieldViolationsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (fieldViolationsBuilder_ == null) { + fieldViolations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fieldViolationsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_descriptor; + } + + public com.google.rpc.BadRequest getDefaultInstanceForType() { + return com.google.rpc.BadRequest.getDefaultInstance(); + } + + public com.google.rpc.BadRequest build() { + com.google.rpc.BadRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.rpc.BadRequest buildPartial() { + com.google.rpc.BadRequest result = new com.google.rpc.BadRequest(this); + int from_bitField0_ = bitField0_; + if (fieldViolationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fieldViolations_ = fieldViolations_; + } else { + result.fieldViolations_ = fieldViolationsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.BadRequest) { + return mergeFrom((com.google.rpc.BadRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.BadRequest other) { + if (other == com.google.rpc.BadRequest.getDefaultInstance()) return this; + if (fieldViolationsBuilder_ == null) { + if (!other.fieldViolations_.isEmpty()) { + if (fieldViolations_.isEmpty()) { + fieldViolations_ = other.fieldViolations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldViolationsIsMutable(); + fieldViolations_.addAll(other.fieldViolations_); + } + onChanged(); + } + } else { + if (!other.fieldViolations_.isEmpty()) { + if (fieldViolationsBuilder_.isEmpty()) { + fieldViolationsBuilder_.dispose(); + fieldViolationsBuilder_ = null; + fieldViolations_ = other.fieldViolations_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldViolationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFieldViolationsFieldBuilder() : null; + } else { + fieldViolationsBuilder_.addAllMessages(other.fieldViolations_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.rpc.BadRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.rpc.BadRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List fieldViolations_ = + java.util.Collections.emptyList(); + private void ensureFieldViolationsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + fieldViolations_ = new java.util.ArrayList(fieldViolations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.BadRequest.FieldViolation, com.google.rpc.BadRequest.FieldViolation.Builder, com.google.rpc.BadRequest.FieldViolationOrBuilder> fieldViolationsBuilder_; + + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public java.util.List getFieldViolationsList() { + if (fieldViolationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fieldViolations_); + } else { + return fieldViolationsBuilder_.getMessageList(); + } + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public int getFieldViolationsCount() { + if (fieldViolationsBuilder_ == null) { + return fieldViolations_.size(); + } else { + return fieldViolationsBuilder_.getCount(); + } + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public com.google.rpc.BadRequest.FieldViolation getFieldViolations(int index) { + if (fieldViolationsBuilder_ == null) { + return fieldViolations_.get(index); + } else { + return fieldViolationsBuilder_.getMessage(index); + } + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public Builder setFieldViolations( + int index, com.google.rpc.BadRequest.FieldViolation value) { + if (fieldViolationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldViolationsIsMutable(); + fieldViolations_.set(index, value); + onChanged(); + } else { + fieldViolationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public Builder setFieldViolations( + int index, com.google.rpc.BadRequest.FieldViolation.Builder builderForValue) { + if (fieldViolationsBuilder_ == null) { + ensureFieldViolationsIsMutable(); + fieldViolations_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldViolationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public Builder addFieldViolations(com.google.rpc.BadRequest.FieldViolation value) { + if (fieldViolationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldViolationsIsMutable(); + fieldViolations_.add(value); + onChanged(); + } else { + fieldViolationsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public Builder addFieldViolations( + int index, com.google.rpc.BadRequest.FieldViolation value) { + if (fieldViolationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldViolationsIsMutable(); + fieldViolations_.add(index, value); + onChanged(); + } else { + fieldViolationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public Builder addFieldViolations( + com.google.rpc.BadRequest.FieldViolation.Builder builderForValue) { + if (fieldViolationsBuilder_ == null) { + ensureFieldViolationsIsMutable(); + fieldViolations_.add(builderForValue.build()); + onChanged(); + } else { + fieldViolationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public Builder addFieldViolations( + int index, com.google.rpc.BadRequest.FieldViolation.Builder builderForValue) { + if (fieldViolationsBuilder_ == null) { + ensureFieldViolationsIsMutable(); + fieldViolations_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldViolationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public Builder addAllFieldViolations( + java.lang.Iterable values) { + if (fieldViolationsBuilder_ == null) { + ensureFieldViolationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fieldViolations_); + onChanged(); + } else { + fieldViolationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public Builder clearFieldViolations() { + if (fieldViolationsBuilder_ == null) { + fieldViolations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldViolationsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public Builder removeFieldViolations(int index) { + if (fieldViolationsBuilder_ == null) { + ensureFieldViolationsIsMutable(); + fieldViolations_.remove(index); + onChanged(); + } else { + fieldViolationsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public com.google.rpc.BadRequest.FieldViolation.Builder getFieldViolationsBuilder( + int index) { + return getFieldViolationsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public com.google.rpc.BadRequest.FieldViolationOrBuilder getFieldViolationsOrBuilder( + int index) { + if (fieldViolationsBuilder_ == null) { + return fieldViolations_.get(index); } else { + return fieldViolationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public java.util.List + getFieldViolationsOrBuilderList() { + if (fieldViolationsBuilder_ != null) { + return fieldViolationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fieldViolations_); + } + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public com.google.rpc.BadRequest.FieldViolation.Builder addFieldViolationsBuilder() { + return getFieldViolationsFieldBuilder().addBuilder( + com.google.rpc.BadRequest.FieldViolation.getDefaultInstance()); + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public com.google.rpc.BadRequest.FieldViolation.Builder addFieldViolationsBuilder( + int index) { + return getFieldViolationsFieldBuilder().addBuilder( + index, com.google.rpc.BadRequest.FieldViolation.getDefaultInstance()); + } + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+     * Describes all violations in a client request.
+     * 
+ */ + public java.util.List + getFieldViolationsBuilderList() { + return getFieldViolationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.BadRequest.FieldViolation, com.google.rpc.BadRequest.FieldViolation.Builder, com.google.rpc.BadRequest.FieldViolationOrBuilder> + getFieldViolationsFieldBuilder() { + if (fieldViolationsBuilder_ == null) { + fieldViolationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.BadRequest.FieldViolation, com.google.rpc.BadRequest.FieldViolation.Builder, com.google.rpc.BadRequest.FieldViolationOrBuilder>( + fieldViolations_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + fieldViolations_ = null; + } + return fieldViolationsBuilder_; + } + 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.rpc.BadRequest) + } + + // @@protoc_insertion_point(class_scope:google.rpc.BadRequest) + private static final com.google.rpc.BadRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.rpc.BadRequest(); + } + + public static com.google.rpc.BadRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public BadRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new BadRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.rpc.BadRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequestOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequestOrBuilder.java new file mode 100644 index 000000000000..6363fe8b9a0e --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequestOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +public interface BadRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.rpc.BadRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+   * Describes all violations in a client request.
+   * 
+ */ + java.util.List + getFieldViolationsList(); + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+   * Describes all violations in a client request.
+   * 
+ */ + com.google.rpc.BadRequest.FieldViolation getFieldViolations(int index); + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+   * Describes all violations in a client request.
+   * 
+ */ + int getFieldViolationsCount(); + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+   * Describes all violations in a client request.
+   * 
+ */ + java.util.List + getFieldViolationsOrBuilderList(); + /** + * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; + * + *
+   * Describes all violations in a client request.
+   * 
+ */ + com.google.rpc.BadRequest.FieldViolationOrBuilder getFieldViolationsOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/Code.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/Code.java new file mode 100644 index 000000000000..3fcbad557708 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/Code.java @@ -0,0 +1,543 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/code.proto + +package com.google.rpc; + +/** + * Protobuf enum {@code google.rpc.Code} + * + *
+ * The canonical error codes for Google APIs.
+ * Warnings:
+ * -   Do not change any numeric assignments.
+ * -   Changes to this list should be made only if there is a compelling
+ *     need that can't be satisfied in another way.
+ * Sometimes multiple error codes may apply.  Services should return
+ * the most specific error code that applies.  For example, prefer
+ * `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
+ * Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
+ * 
+ */ +public enum Code + implements com.google.protobuf.ProtocolMessageEnum { + /** + * OK = 0; + * + *
+   * Not an error; returned on success
+   * HTTP Mapping: 200 OK
+   * 
+ */ + OK(0, 0), + /** + * CANCELLED = 1; + * + *
+   * The operation was cancelled, typically by the caller.
+   * HTTP Mapping: 499 Client Closed Request
+   * 
+ */ + CANCELLED(1, 1), + /** + * UNKNOWN = 2; + * + *
+   * Unknown error.  For example, this error may be returned when
+   * a `Status` value received from another address space belongs to
+   * an error space that is not known in this address space.  Also
+   * errors raised by APIs that do not return enough error information
+   * may be converted to this error.
+   * HTTP Mapping: 500 Internal Server Error
+   * 
+ */ + UNKNOWN(2, 2), + /** + * INVALID_ARGUMENT = 3; + * + *
+   * The client specified an invalid argument.  Note that this differs
+   * from `FAILED_PRECONDITION`.  `INVALID_ARGUMENT` indicates arguments
+   * that are problematic regardless of the state of the system
+   * (e.g., a malformed file name).
+   * HTTP Mapping: 400 Bad Request
+   * 
+ */ + INVALID_ARGUMENT(3, 3), + /** + * DEADLINE_EXCEEDED = 4; + * + *
+   * The deadline expired before the operation could complete. For operations
+   * that change the state of the system, this error may be returned
+   * even if the operation has completed successfully.  For example, a
+   * successful response from a server could have been delayed long
+   * enough for the deadline to expire.
+   * HTTP Mapping: 504 Gateway Timeout
+   * 
+ */ + DEADLINE_EXCEEDED(4, 4), + /** + * NOT_FOUND = 5; + * + *
+   * Some requested entity (e.g., file or directory) was not found.
+   * For privacy reasons, this code *might* be returned when the client
+   * does not have the access rights to the entity.
+   * HTTP Mapping: 404 Not Found
+   * 
+ */ + NOT_FOUND(5, 5), + /** + * ALREADY_EXISTS = 6; + * + *
+   * The entity that a client attempted to create (e.g., file or directory)
+   * already exists.
+   * HTTP Mapping: 409 Conflict
+   * 
+ */ + ALREADY_EXISTS(6, 6), + /** + * PERMISSION_DENIED = 7; + * + *
+   * The caller does not have permission to execute the specified
+   * operation. `PERMISSION_DENIED` must not be used for rejections
+   * caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
+   * instead for those errors). `PERMISSION_DENIED` must not be
+   * used if the caller can not be identified (use `UNAUTHENTICATED`
+   * instead for those errors).
+   * HTTP Mapping: 403 Forbidden
+   * 
+ */ + PERMISSION_DENIED(7, 7), + /** + * UNAUTHENTICATED = 16; + * + *
+   * The request does not have valid authentication credentials for the
+   * operation.
+   * HTTP Mapping: 401 Unauthorized
+   * 
+ */ + UNAUTHENTICATED(8, 16), + /** + * RESOURCE_EXHAUSTED = 8; + * + *
+   * Some resource has been exhausted, perhaps a per-user quota, or
+   * perhaps the entire file system is out of space.
+   * HTTP Mapping: 429 Too Many Requests
+   * 
+ */ + RESOURCE_EXHAUSTED(9, 8), + /** + * FAILED_PRECONDITION = 9; + * + *
+   * The operation was rejected because the system is not in a state
+   * required for the operation's execution.  For example, the directory
+   * to be deleted is non-empty, an rmdir operation is applied to
+   * a non-directory, etc.
+   * Service implementors can use the following guidelines to decide
+   * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
+   *  (a) Use `UNAVAILABLE` if the client can retry just the failing call.
+   *  (b) Use `ABORTED` if the client should retry at a higher level
+   *      (e.g., restarting a read-modify-write sequence).
+   *  (c) Use `FAILED_PRECONDITION` if the client should not retry until
+   *      the system state has been explicitly fixed.  E.g., if an "rmdir"
+   *      fails because the directory is non-empty, `FAILED_PRECONDITION`
+   *      should be returned since the client should not retry unless
+   *      the files are deleted from the directory.
+   *  (d) Use `FAILED_PRECONDITION` if the client performs conditional
+   *      REST Get/Update/Delete on a resource and the resource on the
+   *      server does not match the condition. E.g., conflicting
+   *      read-modify-write on the same resource.
+   * HTTP Mapping: 400 Bad Request
+   * NOTE: HTTP spec says `412 Precondition Failed` should be used only if
+   * the request contains Etag-related headers. So if the server does see
+   * Etag-related headers in the request, it may choose to return 412
+   * instead of 400 for this error code.
+   * 
+ */ + FAILED_PRECONDITION(10, 9), + /** + * ABORTED = 10; + * + *
+   * The operation was aborted, typically due to a concurrency issue such as
+   * a sequencer check failure or transaction abort.
+   * See the guidelines above for deciding between `FAILED_PRECONDITION`,
+   * `ABORTED`, and `UNAVAILABLE`.
+   * HTTP Mapping: 409 Conflict
+   * 
+ */ + ABORTED(11, 10), + /** + * OUT_OF_RANGE = 11; + * + *
+   * The operation was attempted past the valid range.  E.g., seeking or
+   * reading past end-of-file.
+   * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
+   * be fixed if the system state changes. For example, a 32-bit file
+   * system will generate `INVALID_ARGUMENT` if asked to read at an
+   * offset that is not in the range [0,2^32-1], but it will generate
+   * `OUT_OF_RANGE` if asked to read from an offset past the current
+   * file size.
+   * There is a fair bit of overlap between `FAILED_PRECONDITION` and
+   * `OUT_OF_RANGE`.  We recommend using `OUT_OF_RANGE` (the more specific
+   * error) when it applies so that callers who are iterating through
+   * a space can easily look for an `OUT_OF_RANGE` error to detect when
+   * they are done.
+   * HTTP Mapping: 400 Bad Request
+   * 
+ */ + OUT_OF_RANGE(12, 11), + /** + * UNIMPLEMENTED = 12; + * + *
+   * The operation is not implemented or is not supported/enabled in this
+   * service.
+   * HTTP Mapping: 501 Not Implemented
+   * 
+ */ + UNIMPLEMENTED(13, 12), + /** + * INTERNAL = 13; + * + *
+   * Internal errors.  This means that some invariants expected by the
+   * underlying system have been broken.  This error code is reserved
+   * for serious errors.
+   * HTTP Mapping: 500 Internal Server Error
+   * 
+ */ + INTERNAL(14, 13), + /** + * UNAVAILABLE = 14; + * + *
+   * The service is currently unavailable.  This is most likely a
+   * transient condition, which can be corrected by retrying with
+   * a backoff.
+   * See the guidelines above for deciding between `FAILED_PRECONDITION`,
+   * `ABORTED`, and `UNAVAILABLE`.
+   * HTTP Mapping: 503 Service Unavailable
+   * 
+ */ + UNAVAILABLE(15, 14), + /** + * DATA_LOSS = 15; + * + *
+   * Unrecoverable data loss or corruption.
+   * HTTP Mapping: 500 Internal Server Error
+   * 
+ */ + DATA_LOSS(16, 15), + UNRECOGNIZED(-1, -1), + ; + + /** + * OK = 0; + * + *
+   * Not an error; returned on success
+   * HTTP Mapping: 200 OK
+   * 
+ */ + public static final int OK_VALUE = 0; + /** + * CANCELLED = 1; + * + *
+   * The operation was cancelled, typically by the caller.
+   * HTTP Mapping: 499 Client Closed Request
+   * 
+ */ + public static final int CANCELLED_VALUE = 1; + /** + * UNKNOWN = 2; + * + *
+   * Unknown error.  For example, this error may be returned when
+   * a `Status` value received from another address space belongs to
+   * an error space that is not known in this address space.  Also
+   * errors raised by APIs that do not return enough error information
+   * may be converted to this error.
+   * HTTP Mapping: 500 Internal Server Error
+   * 
+ */ + public static final int UNKNOWN_VALUE = 2; + /** + * INVALID_ARGUMENT = 3; + * + *
+   * The client specified an invalid argument.  Note that this differs
+   * from `FAILED_PRECONDITION`.  `INVALID_ARGUMENT` indicates arguments
+   * that are problematic regardless of the state of the system
+   * (e.g., a malformed file name).
+   * HTTP Mapping: 400 Bad Request
+   * 
+ */ + public static final int INVALID_ARGUMENT_VALUE = 3; + /** + * DEADLINE_EXCEEDED = 4; + * + *
+   * The deadline expired before the operation could complete. For operations
+   * that change the state of the system, this error may be returned
+   * even if the operation has completed successfully.  For example, a
+   * successful response from a server could have been delayed long
+   * enough for the deadline to expire.
+   * HTTP Mapping: 504 Gateway Timeout
+   * 
+ */ + public static final int DEADLINE_EXCEEDED_VALUE = 4; + /** + * NOT_FOUND = 5; + * + *
+   * Some requested entity (e.g., file or directory) was not found.
+   * For privacy reasons, this code *might* be returned when the client
+   * does not have the access rights to the entity.
+   * HTTP Mapping: 404 Not Found
+   * 
+ */ + public static final int NOT_FOUND_VALUE = 5; + /** + * ALREADY_EXISTS = 6; + * + *
+   * The entity that a client attempted to create (e.g., file or directory)
+   * already exists.
+   * HTTP Mapping: 409 Conflict
+   * 
+ */ + public static final int ALREADY_EXISTS_VALUE = 6; + /** + * PERMISSION_DENIED = 7; + * + *
+   * The caller does not have permission to execute the specified
+   * operation. `PERMISSION_DENIED` must not be used for rejections
+   * caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
+   * instead for those errors). `PERMISSION_DENIED` must not be
+   * used if the caller can not be identified (use `UNAUTHENTICATED`
+   * instead for those errors).
+   * HTTP Mapping: 403 Forbidden
+   * 
+ */ + public static final int PERMISSION_DENIED_VALUE = 7; + /** + * UNAUTHENTICATED = 16; + * + *
+   * The request does not have valid authentication credentials for the
+   * operation.
+   * HTTP Mapping: 401 Unauthorized
+   * 
+ */ + public static final int UNAUTHENTICATED_VALUE = 16; + /** + * RESOURCE_EXHAUSTED = 8; + * + *
+   * Some resource has been exhausted, perhaps a per-user quota, or
+   * perhaps the entire file system is out of space.
+   * HTTP Mapping: 429 Too Many Requests
+   * 
+ */ + public static final int RESOURCE_EXHAUSTED_VALUE = 8; + /** + * FAILED_PRECONDITION = 9; + * + *
+   * The operation was rejected because the system is not in a state
+   * required for the operation's execution.  For example, the directory
+   * to be deleted is non-empty, an rmdir operation is applied to
+   * a non-directory, etc.
+   * Service implementors can use the following guidelines to decide
+   * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
+   *  (a) Use `UNAVAILABLE` if the client can retry just the failing call.
+   *  (b) Use `ABORTED` if the client should retry at a higher level
+   *      (e.g., restarting a read-modify-write sequence).
+   *  (c) Use `FAILED_PRECONDITION` if the client should not retry until
+   *      the system state has been explicitly fixed.  E.g., if an "rmdir"
+   *      fails because the directory is non-empty, `FAILED_PRECONDITION`
+   *      should be returned since the client should not retry unless
+   *      the files are deleted from the directory.
+   *  (d) Use `FAILED_PRECONDITION` if the client performs conditional
+   *      REST Get/Update/Delete on a resource and the resource on the
+   *      server does not match the condition. E.g., conflicting
+   *      read-modify-write on the same resource.
+   * HTTP Mapping: 400 Bad Request
+   * NOTE: HTTP spec says `412 Precondition Failed` should be used only if
+   * the request contains Etag-related headers. So if the server does see
+   * Etag-related headers in the request, it may choose to return 412
+   * instead of 400 for this error code.
+   * 
+ */ + public static final int FAILED_PRECONDITION_VALUE = 9; + /** + * ABORTED = 10; + * + *
+   * The operation was aborted, typically due to a concurrency issue such as
+   * a sequencer check failure or transaction abort.
+   * See the guidelines above for deciding between `FAILED_PRECONDITION`,
+   * `ABORTED`, and `UNAVAILABLE`.
+   * HTTP Mapping: 409 Conflict
+   * 
+ */ + public static final int ABORTED_VALUE = 10; + /** + * OUT_OF_RANGE = 11; + * + *
+   * The operation was attempted past the valid range.  E.g., seeking or
+   * reading past end-of-file.
+   * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
+   * be fixed if the system state changes. For example, a 32-bit file
+   * system will generate `INVALID_ARGUMENT` if asked to read at an
+   * offset that is not in the range [0,2^32-1], but it will generate
+   * `OUT_OF_RANGE` if asked to read from an offset past the current
+   * file size.
+   * There is a fair bit of overlap between `FAILED_PRECONDITION` and
+   * `OUT_OF_RANGE`.  We recommend using `OUT_OF_RANGE` (the more specific
+   * error) when it applies so that callers who are iterating through
+   * a space can easily look for an `OUT_OF_RANGE` error to detect when
+   * they are done.
+   * HTTP Mapping: 400 Bad Request
+   * 
+ */ + public static final int OUT_OF_RANGE_VALUE = 11; + /** + * UNIMPLEMENTED = 12; + * + *
+   * The operation is not implemented or is not supported/enabled in this
+   * service.
+   * HTTP Mapping: 501 Not Implemented
+   * 
+ */ + public static final int UNIMPLEMENTED_VALUE = 12; + /** + * INTERNAL = 13; + * + *
+   * Internal errors.  This means that some invariants expected by the
+   * underlying system have been broken.  This error code is reserved
+   * for serious errors.
+   * HTTP Mapping: 500 Internal Server Error
+   * 
+ */ + public static final int INTERNAL_VALUE = 13; + /** + * UNAVAILABLE = 14; + * + *
+   * The service is currently unavailable.  This is most likely a
+   * transient condition, which can be corrected by retrying with
+   * a backoff.
+   * See the guidelines above for deciding between `FAILED_PRECONDITION`,
+   * `ABORTED`, and `UNAVAILABLE`.
+   * HTTP Mapping: 503 Service Unavailable
+   * 
+ */ + public static final int UNAVAILABLE_VALUE = 14; + /** + * DATA_LOSS = 15; + * + *
+   * Unrecoverable data loss or corruption.
+   * HTTP Mapping: 500 Internal Server Error
+   * 
+ */ + public static final int DATA_LOSS_VALUE = 15; + + + 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 Code valueOf(int value) { + switch (value) { + case 0: return OK; + case 1: return CANCELLED; + case 2: return UNKNOWN; + case 3: return INVALID_ARGUMENT; + case 4: return DEADLINE_EXCEEDED; + case 5: return NOT_FOUND; + case 6: return ALREADY_EXISTS; + case 7: return PERMISSION_DENIED; + case 16: return UNAUTHENTICATED; + case 8: return RESOURCE_EXHAUSTED; + case 9: return FAILED_PRECONDITION; + case 10: return ABORTED; + case 11: return OUT_OF_RANGE; + case 12: return UNIMPLEMENTED; + case 13: return INTERNAL; + case 14: return UNAVAILABLE; + case 15: return DATA_LOSS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Code> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Code findValueByNumber(int number) { + return Code.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.rpc.CodeProto.getDescriptor() + .getEnumTypes().get(0); + } + + private static final Code[] VALUES = values(); + + public static Code valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Code(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.rpc.Code) +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/CodeProto.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/CodeProto.java new file mode 100644 index 000000000000..95dc036ed327 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/CodeProto.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/code.proto + +package com.google.rpc; + +public final class CodeProto { + private CodeProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\025google/rpc/code.proto\022\ngoogle.rpc*\267\002\n\004" + + "Code\022\006\n\002OK\020\000\022\r\n\tCANCELLED\020\001\022\013\n\007UNKNOWN\020\002" + + "\022\024\n\020INVALID_ARGUMENT\020\003\022\025\n\021DEADLINE_EXCEE" + + "DED\020\004\022\r\n\tNOT_FOUND\020\005\022\022\n\016ALREADY_EXISTS\020\006" + + "\022\025\n\021PERMISSION_DENIED\020\007\022\023\n\017UNAUTHENTICAT" + + "ED\020\020\022\026\n\022RESOURCE_EXHAUSTED\020\010\022\027\n\023FAILED_P" + + "RECONDITION\020\t\022\013\n\007ABORTED\020\n\022\020\n\014OUT_OF_RAN" + + "GE\020\013\022\021\n\rUNIMPLEMENTED\020\014\022\014\n\010INTERNAL\020\r\022\017\n" + + "\013UNAVAILABLE\020\016\022\r\n\tDATA_LOSS\020\017B\035\n\016com.goo" + + "gle.rpcB\tCodeProtoP\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); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfo.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfo.java new file mode 100644 index 000000000000..74550a10502d --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfo.java @@ -0,0 +1,697 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +/** + * Protobuf type {@code google.rpc.DebugInfo} + * + *
+ * Describes additional debugging info.
+ * 
+ */ +public final class DebugInfo extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.rpc.DebugInfo) + DebugInfoOrBuilder { + // Use DebugInfo.newBuilder() to construct. + private DebugInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DebugInfo() { + stackEntries_ = com.google.protobuf.LazyStringArrayList.EMPTY; + detail_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private DebugInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + stackEntries_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + stackEntries_.add(s); + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + detail_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + stackEntries_ = stackEntries_.getUnmodifiableView(); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.DebugInfo.class, com.google.rpc.DebugInfo.Builder.class); + } + + private int bitField0_; + public static final int STACK_ENTRIES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList stackEntries_; + /** + * repeated string stack_entries = 1; + * + *
+   * The stack trace entries indicating where the error occurred.
+   * 
+ */ + public com.google.protobuf.ProtocolStringList + getStackEntriesList() { + return stackEntries_; + } + /** + * repeated string stack_entries = 1; + * + *
+   * The stack trace entries indicating where the error occurred.
+   * 
+ */ + public int getStackEntriesCount() { + return stackEntries_.size(); + } + /** + * repeated string stack_entries = 1; + * + *
+   * The stack trace entries indicating where the error occurred.
+   * 
+ */ + public java.lang.String getStackEntries(int index) { + return stackEntries_.get(index); + } + /** + * repeated string stack_entries = 1; + * + *
+   * The stack trace entries indicating where the error occurred.
+   * 
+ */ + public com.google.protobuf.ByteString + getStackEntriesBytes(int index) { + return stackEntries_.getByteString(index); + } + + public static final int DETAIL_FIELD_NUMBER = 2; + private volatile java.lang.Object detail_; + /** + * optional string detail = 2; + * + *
+   * Additional debugging information provided by the server.
+   * 
+ */ + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + 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(); + detail_ = s; + return s; + } + } + /** + * optional string detail = 2; + * + *
+   * Additional debugging information provided by the server.
+   * 
+ */ + public com.google.protobuf.ByteString + getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + detail_ = 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 { + for (int i = 0; i < stackEntries_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, stackEntries_.getRaw(i)); + } + if (!getDetailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, detail_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < stackEntries_.size(); i++) { + dataSize += computeStringSizeNoTag(stackEntries_.getRaw(i)); + } + size += dataSize; + size += 1 * getStackEntriesList().size(); + } + if (!getDetailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, detail_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.rpc.DebugInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.DebugInfo 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.rpc.DebugInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.DebugInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.rpc.DebugInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.DebugInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.rpc.DebugInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.rpc.DebugInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.rpc.DebugInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.DebugInfo 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.rpc.DebugInfo 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.rpc.DebugInfo} + * + *
+   * Describes additional debugging info.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.rpc.DebugInfo) + com.google.rpc.DebugInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.DebugInfo.class, com.google.rpc.DebugInfo.Builder.class); + } + + // Construct using com.google.rpc.DebugInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + stackEntries_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + detail_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_descriptor; + } + + public com.google.rpc.DebugInfo getDefaultInstanceForType() { + return com.google.rpc.DebugInfo.getDefaultInstance(); + } + + public com.google.rpc.DebugInfo build() { + com.google.rpc.DebugInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.rpc.DebugInfo buildPartial() { + com.google.rpc.DebugInfo result = new com.google.rpc.DebugInfo(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + stackEntries_ = stackEntries_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.stackEntries_ = stackEntries_; + result.detail_ = detail_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.DebugInfo) { + return mergeFrom((com.google.rpc.DebugInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.DebugInfo other) { + if (other == com.google.rpc.DebugInfo.getDefaultInstance()) return this; + if (!other.stackEntries_.isEmpty()) { + if (stackEntries_.isEmpty()) { + stackEntries_ = other.stackEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStackEntriesIsMutable(); + stackEntries_.addAll(other.stackEntries_); + } + onChanged(); + } + if (!other.getDetail().isEmpty()) { + detail_ = other.detail_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.rpc.DebugInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.rpc.DebugInfo) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList stackEntries_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureStackEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + stackEntries_ = new com.google.protobuf.LazyStringArrayList(stackEntries_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string stack_entries = 1; + * + *
+     * The stack trace entries indicating where the error occurred.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getStackEntriesList() { + return stackEntries_.getUnmodifiableView(); + } + /** + * repeated string stack_entries = 1; + * + *
+     * The stack trace entries indicating where the error occurred.
+     * 
+ */ + public int getStackEntriesCount() { + return stackEntries_.size(); + } + /** + * repeated string stack_entries = 1; + * + *
+     * The stack trace entries indicating where the error occurred.
+     * 
+ */ + public java.lang.String getStackEntries(int index) { + return stackEntries_.get(index); + } + /** + * repeated string stack_entries = 1; + * + *
+     * The stack trace entries indicating where the error occurred.
+     * 
+ */ + public com.google.protobuf.ByteString + getStackEntriesBytes(int index) { + return stackEntries_.getByteString(index); + } + /** + * repeated string stack_entries = 1; + * + *
+     * The stack trace entries indicating where the error occurred.
+     * 
+ */ + public Builder setStackEntries( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStackEntriesIsMutable(); + stackEntries_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string stack_entries = 1; + * + *
+     * The stack trace entries indicating where the error occurred.
+     * 
+ */ + public Builder addStackEntries( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStackEntriesIsMutable(); + stackEntries_.add(value); + onChanged(); + return this; + } + /** + * repeated string stack_entries = 1; + * + *
+     * The stack trace entries indicating where the error occurred.
+     * 
+ */ + public Builder addAllStackEntries( + java.lang.Iterable values) { + ensureStackEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, stackEntries_); + onChanged(); + return this; + } + /** + * repeated string stack_entries = 1; + * + *
+     * The stack trace entries indicating where the error occurred.
+     * 
+ */ + public Builder clearStackEntries() { + stackEntries_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string stack_entries = 1; + * + *
+     * The stack trace entries indicating where the error occurred.
+     * 
+ */ + public Builder addStackEntriesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureStackEntriesIsMutable(); + stackEntries_.add(value); + onChanged(); + return this; + } + + private java.lang.Object detail_ = ""; + /** + * optional string detail = 2; + * + *
+     * Additional debugging information provided by the server.
+     * 
+ */ + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string detail = 2; + * + *
+     * Additional debugging information provided by the server.
+     * 
+ */ + public com.google.protobuf.ByteString + getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string detail = 2; + * + *
+     * Additional debugging information provided by the server.
+     * 
+ */ + public Builder setDetail( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + detail_ = value; + onChanged(); + return this; + } + /** + * optional string detail = 2; + * + *
+     * Additional debugging information provided by the server.
+     * 
+ */ + public Builder clearDetail() { + + detail_ = getDefaultInstance().getDetail(); + onChanged(); + return this; + } + /** + * optional string detail = 2; + * + *
+     * Additional debugging information provided by the server.
+     * 
+ */ + public Builder setDetailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + detail_ = 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.rpc.DebugInfo) + } + + // @@protoc_insertion_point(class_scope:google.rpc.DebugInfo) + private static final com.google.rpc.DebugInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.rpc.DebugInfo(); + } + + public static com.google.rpc.DebugInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DebugInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new DebugInfo(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.rpc.DebugInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfoOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfoOrBuilder.java new file mode 100644 index 000000000000..25d0e498747a --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfoOrBuilder.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +public interface DebugInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.rpc.DebugInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string stack_entries = 1; + * + *
+   * The stack trace entries indicating where the error occurred.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getStackEntriesList(); + /** + * repeated string stack_entries = 1; + * + *
+   * The stack trace entries indicating where the error occurred.
+   * 
+ */ + int getStackEntriesCount(); + /** + * repeated string stack_entries = 1; + * + *
+   * The stack trace entries indicating where the error occurred.
+   * 
+ */ + java.lang.String getStackEntries(int index); + /** + * repeated string stack_entries = 1; + * + *
+   * The stack trace entries indicating where the error occurred.
+   * 
+ */ + com.google.protobuf.ByteString + getStackEntriesBytes(int index); + + /** + * optional string detail = 2; + * + *
+   * Additional debugging information provided by the server.
+   * 
+ */ + java.lang.String getDetail(); + /** + * optional string detail = 2; + * + *
+   * Additional debugging information provided by the server.
+   * 
+ */ + com.google.protobuf.ByteString + getDetailBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/ErrorDetailsProto.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/ErrorDetailsProto.java new file mode 100644 index 000000000000..1760e0a1d4bf --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/ErrorDetailsProto.java @@ -0,0 +1,167 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +public final class ErrorDetailsProto { + private ErrorDetailsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_RetryInfo_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_RetryInfo_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_DebugInfo_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_DebugInfo_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_QuotaFailure_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_QuotaFailure_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_QuotaFailure_Violation_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_BadRequest_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_BadRequest_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_BadRequest_FieldViolation_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_BadRequest_FieldViolation_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_RequestInfo_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_RequestInfo_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_ResourceInfo_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_ResourceInfo_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_Help_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_Help_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_Help_Link_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_Help_Link_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036google/rpc/error_details.proto\022\ngoogle" + + ".rpc\032\036google/protobuf/duration.proto\";\n\t" + + "RetryInfo\022.\n\013retry_delay\030\001 \001(\0132\031.google." + + "protobuf.Duration\"2\n\tDebugInfo\022\025\n\rstack_" + + "entries\030\001 \003(\t\022\016\n\006detail\030\002 \001(\t\"y\n\014QuotaFa" + + "ilure\0226\n\nviolations\030\001 \003(\0132\".google.rpc.Q" + + "uotaFailure.Violation\0321\n\tViolation\022\017\n\007su" + + "bject\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\"\203\001\n\nBad" + + "Request\022?\n\020field_violations\030\001 \003(\0132%.goog" + + "le.rpc.BadRequest.FieldViolation\0324\n\016Fiel", + "dViolation\022\r\n\005field\030\001 \001(\t\022\023\n\013description" + + "\030\002 \001(\t\"7\n\013RequestInfo\022\022\n\nrequest_id\030\001 \001(" + + "\t\022\024\n\014serving_data\030\002 \001(\t\"`\n\014ResourceInfo\022" + + "\025\n\rresource_type\030\001 \001(\t\022\025\n\rresource_name\030" + + "\002 \001(\t\022\r\n\005owner\030\003 \001(\t\022\023\n\013description\030\004 \001(" + + "\t\"V\n\004Help\022$\n\005links\030\001 \003(\0132\025.google.rpc.He" + + "lp.Link\032(\n\004Link\022\023\n\013description\030\001 \001(\t\022\013\n\003" + + "url\030\002 \001(\tB%\n\016com.google.rpcB\021ErrorDetail" + + "sProtoP\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.protobuf.DurationProto.getDescriptor(), + }, assigner); + internal_static_google_rpc_RetryInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_rpc_RetryInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_RetryInfo_descriptor, + new java.lang.String[] { "RetryDelay", }); + internal_static_google_rpc_DebugInfo_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_rpc_DebugInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_DebugInfo_descriptor, + new java.lang.String[] { "StackEntries", "Detail", }); + internal_static_google_rpc_QuotaFailure_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_rpc_QuotaFailure_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_QuotaFailure_descriptor, + new java.lang.String[] { "Violations", }); + internal_static_google_rpc_QuotaFailure_Violation_descriptor = + internal_static_google_rpc_QuotaFailure_descriptor.getNestedTypes().get(0); + internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_QuotaFailure_Violation_descriptor, + new java.lang.String[] { "Subject", "Description", }); + internal_static_google_rpc_BadRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_rpc_BadRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_BadRequest_descriptor, + new java.lang.String[] { "FieldViolations", }); + internal_static_google_rpc_BadRequest_FieldViolation_descriptor = + internal_static_google_rpc_BadRequest_descriptor.getNestedTypes().get(0); + internal_static_google_rpc_BadRequest_FieldViolation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_BadRequest_FieldViolation_descriptor, + new java.lang.String[] { "Field", "Description", }); + internal_static_google_rpc_RequestInfo_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_rpc_RequestInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_RequestInfo_descriptor, + new java.lang.String[] { "RequestId", "ServingData", }); + internal_static_google_rpc_ResourceInfo_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_rpc_ResourceInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_ResourceInfo_descriptor, + new java.lang.String[] { "ResourceType", "ResourceName", "Owner", "Description", }); + internal_static_google_rpc_Help_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_rpc_Help_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_Help_descriptor, + new java.lang.String[] { "Links", }); + internal_static_google_rpc_Help_Link_descriptor = + internal_static_google_rpc_Help_descriptor.getNestedTypes().get(0); + internal_static_google_rpc_Help_Link_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_Help_Link_descriptor, + new java.lang.String[] { "Description", "Url", }); + com.google.protobuf.DurationProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/Help.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/Help.java new file mode 100644 index 000000000000..92fe066f6f78 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/Help.java @@ -0,0 +1,1423 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +/** + * Protobuf type {@code google.rpc.Help} + * + *
+ * Provides links to documentation or for performing an out of band action.
+ * For example, if a quota check failed with an error indicating the calling
+ * project hasn't enabled the accessed service, this can contain a URL pointing
+ * directly to the right place in the developer console to flip the bit.
+ * 
+ */ +public final class Help extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.rpc.Help) + HelpOrBuilder { + // Use Help.newBuilder() to construct. + private Help(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Help() { + links_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Help( + 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)) { + links_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + links_.add(input.readMessage(com.google.rpc.Help.Link.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + links_ = java.util.Collections.unmodifiableList(links_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.Help.class, com.google.rpc.Help.Builder.class); + } + + public interface LinkOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.rpc.Help.Link) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string description = 1; + * + *
+     * Describes what the link offers.
+     * 
+ */ + java.lang.String getDescription(); + /** + * optional string description = 1; + * + *
+     * Describes what the link offers.
+     * 
+ */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + * optional string url = 2; + * + *
+     * The URL of the link.
+     * 
+ */ + java.lang.String getUrl(); + /** + * optional string url = 2; + * + *
+     * The URL of the link.
+     * 
+ */ + com.google.protobuf.ByteString + getUrlBytes(); + } + /** + * Protobuf type {@code google.rpc.Help.Link} + * + *
+   * Describes a URL link.
+   * 
+ */ + public static final class Link extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.rpc.Help.Link) + LinkOrBuilder { + // Use Link.newBuilder() to construct. + private Link(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Link() { + description_ = ""; + url_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Link( + 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(); + + description_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + url_ = 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.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.Help.Link.class, com.google.rpc.Help.Link.Builder.class); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + private volatile java.lang.Object description_; + /** + * optional string description = 1; + * + *
+     * Describes what the link offers.
+     * 
+ */ + 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 = 1; + * + *
+     * Describes what the link offers.
+     * 
+ */ + 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 URL_FIELD_NUMBER = 2; + private volatile java.lang.Object url_; + /** + * optional string url = 2; + * + *
+     * The URL of the link.
+     * 
+ */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + 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(); + url_ = s; + return s; + } + } + /** + * optional string url = 2; + * + *
+     * The URL of the link.
+     * 
+ */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = 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 (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); + } + if (!getUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, url_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); + } + if (!getUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, url_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.rpc.Help.Link parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.Help.Link 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.rpc.Help.Link parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.Help.Link parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.rpc.Help.Link parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.Help.Link parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.rpc.Help.Link parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.rpc.Help.Link parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.rpc.Help.Link parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.Help.Link 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.rpc.Help.Link 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.rpc.Help.Link} + * + *
+     * Describes a URL link.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.rpc.Help.Link) + com.google.rpc.Help.LinkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.Help.Link.class, com.google.rpc.Help.Link.Builder.class); + } + + // Construct using com.google.rpc.Help.Link.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + description_ = ""; + + url_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor; + } + + public com.google.rpc.Help.Link getDefaultInstanceForType() { + return com.google.rpc.Help.Link.getDefaultInstance(); + } + + public com.google.rpc.Help.Link build() { + com.google.rpc.Help.Link result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.rpc.Help.Link buildPartial() { + com.google.rpc.Help.Link result = new com.google.rpc.Help.Link(this); + result.description_ = description_; + result.url_ = url_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.Help.Link) { + return mergeFrom((com.google.rpc.Help.Link)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.Help.Link other) { + if (other == com.google.rpc.Help.Link.getDefaultInstance()) return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.rpc.Help.Link parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.rpc.Help.Link) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object description_ = ""; + /** + * optional string description = 1; + * + *
+       * Describes what the link offers.
+       * 
+ */ + 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 = 1; + * + *
+       * Describes what the link offers.
+       * 
+ */ + 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 = 1; + * + *
+       * Describes what the link offers.
+       * 
+ */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * optional string description = 1; + * + *
+       * Describes what the link offers.
+       * 
+ */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * optional string description = 1; + * + *
+       * Describes what the link offers.
+       * 
+ */ + 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 url_ = ""; + /** + * optional string url = 2; + * + *
+       * The URL of the link.
+       * 
+ */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string url = 2; + * + *
+       * The URL of the link.
+       * 
+ */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string url = 2; + * + *
+       * The URL of the link.
+       * 
+ */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + * optional string url = 2; + * + *
+       * The URL of the link.
+       * 
+ */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + * optional string url = 2; + * + *
+       * The URL of the link.
+       * 
+ */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = 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.rpc.Help.Link) + } + + // @@protoc_insertion_point(class_scope:google.rpc.Help.Link) + private static final com.google.rpc.Help.Link DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.rpc.Help.Link(); + } + + public static com.google.rpc.Help.Link getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Link parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Link(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.rpc.Help.Link getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int LINKS_FIELD_NUMBER = 1; + private java.util.List links_; + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+   * URL(s) pointing to additional information on handling the current error.
+   * 
+ */ + public java.util.List getLinksList() { + return links_; + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+   * URL(s) pointing to additional information on handling the current error.
+   * 
+ */ + public java.util.List + getLinksOrBuilderList() { + return links_; + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+   * URL(s) pointing to additional information on handling the current error.
+   * 
+ */ + public int getLinksCount() { + return links_.size(); + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+   * URL(s) pointing to additional information on handling the current error.
+   * 
+ */ + public com.google.rpc.Help.Link getLinks(int index) { + return links_.get(index); + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+   * URL(s) pointing to additional information on handling the current error.
+   * 
+ */ + public com.google.rpc.Help.LinkOrBuilder getLinksOrBuilder( + int index) { + return links_.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 < links_.size(); i++) { + output.writeMessage(1, links_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < links_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, links_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.rpc.Help parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.Help 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.rpc.Help parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.Help parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.rpc.Help parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.Help parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.rpc.Help parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.rpc.Help parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.rpc.Help parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.Help 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.rpc.Help 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.rpc.Help} + * + *
+   * Provides links to documentation or for performing an out of band action.
+   * For example, if a quota check failed with an error indicating the calling
+   * project hasn't enabled the accessed service, this can contain a URL pointing
+   * directly to the right place in the developer console to flip the bit.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.rpc.Help) + com.google.rpc.HelpOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.Help.class, com.google.rpc.Help.Builder.class); + } + + // Construct using com.google.rpc.Help.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getLinksFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + linksBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor; + } + + public com.google.rpc.Help getDefaultInstanceForType() { + return com.google.rpc.Help.getDefaultInstance(); + } + + public com.google.rpc.Help build() { + com.google.rpc.Help result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.rpc.Help buildPartial() { + com.google.rpc.Help result = new com.google.rpc.Help(this); + int from_bitField0_ = bitField0_; + if (linksBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + links_ = java.util.Collections.unmodifiableList(links_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.links_ = links_; + } else { + result.links_ = linksBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.Help) { + return mergeFrom((com.google.rpc.Help)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.Help other) { + if (other == com.google.rpc.Help.getDefaultInstance()) return this; + if (linksBuilder_ == null) { + if (!other.links_.isEmpty()) { + if (links_.isEmpty()) { + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinksIsMutable(); + links_.addAll(other.links_); + } + onChanged(); + } + } else { + if (!other.links_.isEmpty()) { + if (linksBuilder_.isEmpty()) { + linksBuilder_.dispose(); + linksBuilder_ = null; + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + linksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLinksFieldBuilder() : null; + } else { + linksBuilder_.addAllMessages(other.links_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.rpc.Help parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.rpc.Help) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List links_ = + java.util.Collections.emptyList(); + private void ensureLinksIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + links_ = new java.util.ArrayList(links_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Help.Link, com.google.rpc.Help.Link.Builder, com.google.rpc.Help.LinkOrBuilder> linksBuilder_; + + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public java.util.List getLinksList() { + if (linksBuilder_ == null) { + return java.util.Collections.unmodifiableList(links_); + } else { + return linksBuilder_.getMessageList(); + } + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public int getLinksCount() { + if (linksBuilder_ == null) { + return links_.size(); + } else { + return linksBuilder_.getCount(); + } + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public com.google.rpc.Help.Link getLinks(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessage(index); + } + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public Builder setLinks( + int index, com.google.rpc.Help.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.set(index, value); + onChanged(); + } else { + linksBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public Builder setLinks( + int index, com.google.rpc.Help.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.set(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public Builder addLinks(com.google.rpc.Help.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + } else { + linksBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public Builder addLinks( + int index, com.google.rpc.Help.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(index, value); + onChanged(); + } else { + linksBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public Builder addLinks( + com.google.rpc.Help.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public Builder addLinks( + int index, com.google.rpc.Help.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public Builder addAllLinks( + java.lang.Iterable values) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, links_); + onChanged(); + } else { + linksBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public Builder clearLinks() { + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + linksBuilder_.clear(); + } + return this; + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public Builder removeLinks(int index) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.remove(index); + onChanged(); + } else { + linksBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public com.google.rpc.Help.Link.Builder getLinksBuilder( + int index) { + return getLinksFieldBuilder().getBuilder(index); + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public com.google.rpc.Help.LinkOrBuilder getLinksOrBuilder( + int index) { + if (linksBuilder_ == null) { + return links_.get(index); } else { + return linksBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public java.util.List + getLinksOrBuilderList() { + if (linksBuilder_ != null) { + return linksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(links_); + } + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public com.google.rpc.Help.Link.Builder addLinksBuilder() { + return getLinksFieldBuilder().addBuilder( + com.google.rpc.Help.Link.getDefaultInstance()); + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public com.google.rpc.Help.Link.Builder addLinksBuilder( + int index) { + return getLinksFieldBuilder().addBuilder( + index, com.google.rpc.Help.Link.getDefaultInstance()); + } + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+     * URL(s) pointing to additional information on handling the current error.
+     * 
+ */ + public java.util.List + getLinksBuilderList() { + return getLinksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Help.Link, com.google.rpc.Help.Link.Builder, com.google.rpc.Help.LinkOrBuilder> + getLinksFieldBuilder() { + if (linksBuilder_ == null) { + linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Help.Link, com.google.rpc.Help.Link.Builder, com.google.rpc.Help.LinkOrBuilder>( + links_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + links_ = null; + } + return linksBuilder_; + } + 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.rpc.Help) + } + + // @@protoc_insertion_point(class_scope:google.rpc.Help) + private static final com.google.rpc.Help DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.rpc.Help(); + } + + public static com.google.rpc.Help getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Help parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Help(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.rpc.Help getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/HelpOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/HelpOrBuilder.java new file mode 100644 index 000000000000..ffaca8109020 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/HelpOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +public interface HelpOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.rpc.Help) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+   * URL(s) pointing to additional information on handling the current error.
+   * 
+ */ + java.util.List + getLinksList(); + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+   * URL(s) pointing to additional information on handling the current error.
+   * 
+ */ + com.google.rpc.Help.Link getLinks(int index); + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+   * URL(s) pointing to additional information on handling the current error.
+   * 
+ */ + int getLinksCount(); + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+   * URL(s) pointing to additional information on handling the current error.
+   * 
+ */ + java.util.List + getLinksOrBuilderList(); + /** + * repeated .google.rpc.Help.Link links = 1; + * + *
+   * URL(s) pointing to additional information on handling the current error.
+   * 
+ */ + com.google.rpc.Help.LinkOrBuilder getLinksOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailure.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailure.java new file mode 100644 index 000000000000..3051a2773fbb --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailure.java @@ -0,0 +1,1498 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +/** + * Protobuf type {@code google.rpc.QuotaFailure} + * + *
+ * Describes how a quota check failed.
+ * For example if a daily limit was exceeded for the calling project,
+ * a service could respond with a QuotaFailure detail containing the project
+ * id and the description of the quota limit that was exceeded.  If the
+ * calling project hasn't enabled the service in the developer console, then
+ * a service could respond with the project id and set `service_disabled`
+ * to true.
+ * Also see RetryDetail and Help types for other details about handling a
+ * quota failure.
+ * 
+ */ +public final class QuotaFailure extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.rpc.QuotaFailure) + QuotaFailureOrBuilder { + // Use QuotaFailure.newBuilder() to construct. + private QuotaFailure(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private QuotaFailure() { + violations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private QuotaFailure( + 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)) { + violations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + violations_.add(input.readMessage(com.google.rpc.QuotaFailure.Violation.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + violations_ = java.util.Collections.unmodifiableList(violations_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.QuotaFailure.class, com.google.rpc.QuotaFailure.Builder.class); + } + + public interface ViolationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.rpc.QuotaFailure.Violation) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string subject = 1; + * + *
+     * The subject on which the quota check failed.
+     * For example, "clientip:<ip address of client>" or "project:<Google
+     * developer project id>".
+     * 
+ */ + java.lang.String getSubject(); + /** + * optional string subject = 1; + * + *
+     * The subject on which the quota check failed.
+     * For example, "clientip:<ip address of client>" or "project:<Google
+     * developer project id>".
+     * 
+ */ + com.google.protobuf.ByteString + getSubjectBytes(); + + /** + * optional string description = 2; + * + *
+     * A description of how the quota check failed. Clients can use this
+     * description to find more about the quota configuration in the service's
+     * public documentation, or find the relevant quota limit to adjust through
+     * developer console.
+     * For example: "Service disabled" or "Daily Limit for read operations
+     * exceeded".
+     * 
+ */ + java.lang.String getDescription(); + /** + * optional string description = 2; + * + *
+     * A description of how the quota check failed. Clients can use this
+     * description to find more about the quota configuration in the service's
+     * public documentation, or find the relevant quota limit to adjust through
+     * developer console.
+     * For example: "Service disabled" or "Daily Limit for read operations
+     * exceeded".
+     * 
+ */ + com.google.protobuf.ByteString + getDescriptionBytes(); + } + /** + * Protobuf type {@code google.rpc.QuotaFailure.Violation} + * + *
+   * A message type used to describe a single quota violation.  For example, a
+   * daily quota or a custom quota that was exceeded.
+   * 
+ */ + public static final class Violation extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.rpc.QuotaFailure.Violation) + ViolationOrBuilder { + // Use Violation.newBuilder() to construct. + private Violation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Violation() { + subject_ = ""; + description_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Violation( + 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(); + + subject_ = s; + break; + } + case 18: { + 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.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.QuotaFailure.Violation.class, com.google.rpc.QuotaFailure.Violation.Builder.class); + } + + public static final int SUBJECT_FIELD_NUMBER = 1; + private volatile java.lang.Object subject_; + /** + * optional string subject = 1; + * + *
+     * The subject on which the quota check failed.
+     * For example, "clientip:<ip address of client>" or "project:<Google
+     * developer project id>".
+     * 
+ */ + public java.lang.String getSubject() { + java.lang.Object ref = subject_; + 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(); + subject_ = s; + return s; + } + } + /** + * optional string subject = 1; + * + *
+     * The subject on which the quota check failed.
+     * For example, "clientip:<ip address of client>" or "project:<Google
+     * developer project id>".
+     * 
+ */ + public com.google.protobuf.ByteString + getSubjectBytes() { + java.lang.Object ref = subject_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * optional string description = 2; + * + *
+     * A description of how the quota check failed. Clients can use this
+     * description to find more about the quota configuration in the service's
+     * public documentation, or find the relevant quota limit to adjust through
+     * developer console.
+     * For example: "Service disabled" or "Daily Limit for read operations
+     * exceeded".
+     * 
+ */ + 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 = 2; + * + *
+     * A description of how the quota check failed. Clients can use this
+     * description to find more about the quota configuration in the service's
+     * public documentation, or find the relevant quota limit to adjust through
+     * developer console.
+     * For example: "Service disabled" or "Daily Limit for read operations
+     * exceeded".
+     * 
+ */ + 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 (!getSubjectBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, subject_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSubjectBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subject_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.rpc.QuotaFailure.Violation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.QuotaFailure.Violation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.rpc.QuotaFailure.Violation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.QuotaFailure.Violation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.rpc.QuotaFailure.Violation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.QuotaFailure.Violation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.rpc.QuotaFailure.Violation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.rpc.QuotaFailure.Violation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.rpc.QuotaFailure.Violation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.QuotaFailure.Violation 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.rpc.QuotaFailure.Violation 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.rpc.QuotaFailure.Violation} + * + *
+     * A message type used to describe a single quota violation.  For example, a
+     * daily quota or a custom quota that was exceeded.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.rpc.QuotaFailure.Violation) + com.google.rpc.QuotaFailure.ViolationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.QuotaFailure.Violation.class, com.google.rpc.QuotaFailure.Violation.Builder.class); + } + + // Construct using com.google.rpc.QuotaFailure.Violation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + subject_ = ""; + + description_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor; + } + + public com.google.rpc.QuotaFailure.Violation getDefaultInstanceForType() { + return com.google.rpc.QuotaFailure.Violation.getDefaultInstance(); + } + + public com.google.rpc.QuotaFailure.Violation build() { + com.google.rpc.QuotaFailure.Violation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.rpc.QuotaFailure.Violation buildPartial() { + com.google.rpc.QuotaFailure.Violation result = new com.google.rpc.QuotaFailure.Violation(this); + result.subject_ = subject_; + result.description_ = description_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.QuotaFailure.Violation) { + return mergeFrom((com.google.rpc.QuotaFailure.Violation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.QuotaFailure.Violation other) { + if (other == com.google.rpc.QuotaFailure.Violation.getDefaultInstance()) return this; + if (!other.getSubject().isEmpty()) { + subject_ = other.subject_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.rpc.QuotaFailure.Violation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.rpc.QuotaFailure.Violation) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object subject_ = ""; + /** + * optional string subject = 1; + * + *
+       * The subject on which the quota check failed.
+       * For example, "clientip:<ip address of client>" or "project:<Google
+       * developer project id>".
+       * 
+ */ + public java.lang.String getSubject() { + java.lang.Object ref = subject_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subject_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string subject = 1; + * + *
+       * The subject on which the quota check failed.
+       * For example, "clientip:<ip address of client>" or "project:<Google
+       * developer project id>".
+       * 
+ */ + public com.google.protobuf.ByteString + getSubjectBytes() { + java.lang.Object ref = subject_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string subject = 1; + * + *
+       * The subject on which the quota check failed.
+       * For example, "clientip:<ip address of client>" or "project:<Google
+       * developer project id>".
+       * 
+ */ + public Builder setSubject( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subject_ = value; + onChanged(); + return this; + } + /** + * optional string subject = 1; + * + *
+       * The subject on which the quota check failed.
+       * For example, "clientip:<ip address of client>" or "project:<Google
+       * developer project id>".
+       * 
+ */ + public Builder clearSubject() { + + subject_ = getDefaultInstance().getSubject(); + onChanged(); + return this; + } + /** + * optional string subject = 1; + * + *
+       * The subject on which the quota check failed.
+       * For example, "clientip:<ip address of client>" or "project:<Google
+       * developer project id>".
+       * 
+ */ + public Builder setSubjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subject_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * optional string description = 2; + * + *
+       * A description of how the quota check failed. Clients can use this
+       * description to find more about the quota configuration in the service's
+       * public documentation, or find the relevant quota limit to adjust through
+       * developer console.
+       * For example: "Service disabled" or "Daily Limit for read operations
+       * exceeded".
+       * 
+ */ + 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 = 2; + * + *
+       * A description of how the quota check failed. Clients can use this
+       * description to find more about the quota configuration in the service's
+       * public documentation, or find the relevant quota limit to adjust through
+       * developer console.
+       * For example: "Service disabled" or "Daily Limit for read operations
+       * exceeded".
+       * 
+ */ + 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 = 2; + * + *
+       * A description of how the quota check failed. Clients can use this
+       * description to find more about the quota configuration in the service's
+       * public documentation, or find the relevant quota limit to adjust through
+       * developer console.
+       * For example: "Service disabled" or "Daily Limit for read operations
+       * exceeded".
+       * 
+ */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * optional string description = 2; + * + *
+       * A description of how the quota check failed. Clients can use this
+       * description to find more about the quota configuration in the service's
+       * public documentation, or find the relevant quota limit to adjust through
+       * developer console.
+       * For example: "Service disabled" or "Daily Limit for read operations
+       * exceeded".
+       * 
+ */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * optional string description = 2; + * + *
+       * A description of how the quota check failed. Clients can use this
+       * description to find more about the quota configuration in the service's
+       * public documentation, or find the relevant quota limit to adjust through
+       * developer console.
+       * For example: "Service disabled" or "Daily Limit for read operations
+       * exceeded".
+       * 
+ */ + 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.rpc.QuotaFailure.Violation) + } + + // @@protoc_insertion_point(class_scope:google.rpc.QuotaFailure.Violation) + private static final com.google.rpc.QuotaFailure.Violation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.rpc.QuotaFailure.Violation(); + } + + public static com.google.rpc.QuotaFailure.Violation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Violation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Violation(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.rpc.QuotaFailure.Violation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int VIOLATIONS_FIELD_NUMBER = 1; + private java.util.List violations_; + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+   * Describes all quota violations.
+   * 
+ */ + public java.util.List getViolationsList() { + return violations_; + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+   * Describes all quota violations.
+   * 
+ */ + public java.util.List + getViolationsOrBuilderList() { + return violations_; + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+   * Describes all quota violations.
+   * 
+ */ + public int getViolationsCount() { + return violations_.size(); + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+   * Describes all quota violations.
+   * 
+ */ + public com.google.rpc.QuotaFailure.Violation getViolations(int index) { + return violations_.get(index); + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+   * Describes all quota violations.
+   * 
+ */ + public com.google.rpc.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder( + int index) { + return violations_.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 < violations_.size(); i++) { + output.writeMessage(1, violations_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < violations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, violations_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.rpc.QuotaFailure parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.QuotaFailure 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.rpc.QuotaFailure parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.QuotaFailure parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.rpc.QuotaFailure parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.QuotaFailure parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.rpc.QuotaFailure parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.rpc.QuotaFailure parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.rpc.QuotaFailure parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.QuotaFailure 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.rpc.QuotaFailure 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.rpc.QuotaFailure} + * + *
+   * Describes how a quota check failed.
+   * For example if a daily limit was exceeded for the calling project,
+   * a service could respond with a QuotaFailure detail containing the project
+   * id and the description of the quota limit that was exceeded.  If the
+   * calling project hasn't enabled the service in the developer console, then
+   * a service could respond with the project id and set `service_disabled`
+   * to true.
+   * Also see RetryDetail and Help types for other details about handling a
+   * quota failure.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.rpc.QuotaFailure) + com.google.rpc.QuotaFailureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.QuotaFailure.class, com.google.rpc.QuotaFailure.Builder.class); + } + + // Construct using com.google.rpc.QuotaFailure.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getViolationsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (violationsBuilder_ == null) { + violations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + violationsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor; + } + + public com.google.rpc.QuotaFailure getDefaultInstanceForType() { + return com.google.rpc.QuotaFailure.getDefaultInstance(); + } + + public com.google.rpc.QuotaFailure build() { + com.google.rpc.QuotaFailure result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.rpc.QuotaFailure buildPartial() { + com.google.rpc.QuotaFailure result = new com.google.rpc.QuotaFailure(this); + int from_bitField0_ = bitField0_; + if (violationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + violations_ = java.util.Collections.unmodifiableList(violations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.violations_ = violations_; + } else { + result.violations_ = violationsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.QuotaFailure) { + return mergeFrom((com.google.rpc.QuotaFailure)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.QuotaFailure other) { + if (other == com.google.rpc.QuotaFailure.getDefaultInstance()) return this; + if (violationsBuilder_ == null) { + if (!other.violations_.isEmpty()) { + if (violations_.isEmpty()) { + violations_ = other.violations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureViolationsIsMutable(); + violations_.addAll(other.violations_); + } + onChanged(); + } + } else { + if (!other.violations_.isEmpty()) { + if (violationsBuilder_.isEmpty()) { + violationsBuilder_.dispose(); + violationsBuilder_ = null; + violations_ = other.violations_; + bitField0_ = (bitField0_ & ~0x00000001); + violationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getViolationsFieldBuilder() : null; + } else { + violationsBuilder_.addAllMessages(other.violations_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.rpc.QuotaFailure parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.rpc.QuotaFailure) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List violations_ = + java.util.Collections.emptyList(); + private void ensureViolationsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + violations_ = new java.util.ArrayList(violations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.QuotaFailure.Violation, com.google.rpc.QuotaFailure.Violation.Builder, com.google.rpc.QuotaFailure.ViolationOrBuilder> violationsBuilder_; + + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public java.util.List getViolationsList() { + if (violationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(violations_); + } else { + return violationsBuilder_.getMessageList(); + } + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public int getViolationsCount() { + if (violationsBuilder_ == null) { + return violations_.size(); + } else { + return violationsBuilder_.getCount(); + } + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public com.google.rpc.QuotaFailure.Violation getViolations(int index) { + if (violationsBuilder_ == null) { + return violations_.get(index); + } else { + return violationsBuilder_.getMessage(index); + } + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public Builder setViolations( + int index, com.google.rpc.QuotaFailure.Violation value) { + if (violationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureViolationsIsMutable(); + violations_.set(index, value); + onChanged(); + } else { + violationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public Builder setViolations( + int index, com.google.rpc.QuotaFailure.Violation.Builder builderForValue) { + if (violationsBuilder_ == null) { + ensureViolationsIsMutable(); + violations_.set(index, builderForValue.build()); + onChanged(); + } else { + violationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public Builder addViolations(com.google.rpc.QuotaFailure.Violation value) { + if (violationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureViolationsIsMutable(); + violations_.add(value); + onChanged(); + } else { + violationsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public Builder addViolations( + int index, com.google.rpc.QuotaFailure.Violation value) { + if (violationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureViolationsIsMutable(); + violations_.add(index, value); + onChanged(); + } else { + violationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public Builder addViolations( + com.google.rpc.QuotaFailure.Violation.Builder builderForValue) { + if (violationsBuilder_ == null) { + ensureViolationsIsMutable(); + violations_.add(builderForValue.build()); + onChanged(); + } else { + violationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public Builder addViolations( + int index, com.google.rpc.QuotaFailure.Violation.Builder builderForValue) { + if (violationsBuilder_ == null) { + ensureViolationsIsMutable(); + violations_.add(index, builderForValue.build()); + onChanged(); + } else { + violationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public Builder addAllViolations( + java.lang.Iterable values) { + if (violationsBuilder_ == null) { + ensureViolationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, violations_); + onChanged(); + } else { + violationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public Builder clearViolations() { + if (violationsBuilder_ == null) { + violations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + violationsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public Builder removeViolations(int index) { + if (violationsBuilder_ == null) { + ensureViolationsIsMutable(); + violations_.remove(index); + onChanged(); + } else { + violationsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public com.google.rpc.QuotaFailure.Violation.Builder getViolationsBuilder( + int index) { + return getViolationsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public com.google.rpc.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder( + int index) { + if (violationsBuilder_ == null) { + return violations_.get(index); } else { + return violationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public java.util.List + getViolationsOrBuilderList() { + if (violationsBuilder_ != null) { + return violationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(violations_); + } + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public com.google.rpc.QuotaFailure.Violation.Builder addViolationsBuilder() { + return getViolationsFieldBuilder().addBuilder( + com.google.rpc.QuotaFailure.Violation.getDefaultInstance()); + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public com.google.rpc.QuotaFailure.Violation.Builder addViolationsBuilder( + int index) { + return getViolationsFieldBuilder().addBuilder( + index, com.google.rpc.QuotaFailure.Violation.getDefaultInstance()); + } + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+     * Describes all quota violations.
+     * 
+ */ + public java.util.List + getViolationsBuilderList() { + return getViolationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.QuotaFailure.Violation, com.google.rpc.QuotaFailure.Violation.Builder, com.google.rpc.QuotaFailure.ViolationOrBuilder> + getViolationsFieldBuilder() { + if (violationsBuilder_ == null) { + violationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.QuotaFailure.Violation, com.google.rpc.QuotaFailure.Violation.Builder, com.google.rpc.QuotaFailure.ViolationOrBuilder>( + violations_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + violations_ = null; + } + return violationsBuilder_; + } + 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.rpc.QuotaFailure) + } + + // @@protoc_insertion_point(class_scope:google.rpc.QuotaFailure) + private static final com.google.rpc.QuotaFailure DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.rpc.QuotaFailure(); + } + + public static com.google.rpc.QuotaFailure getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public QuotaFailure parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new QuotaFailure(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.rpc.QuotaFailure getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java new file mode 100644 index 000000000000..e586659760de --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +public interface QuotaFailureOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.rpc.QuotaFailure) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+   * Describes all quota violations.
+   * 
+ */ + java.util.List + getViolationsList(); + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+   * Describes all quota violations.
+   * 
+ */ + com.google.rpc.QuotaFailure.Violation getViolations(int index); + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+   * Describes all quota violations.
+   * 
+ */ + int getViolationsCount(); + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+   * Describes all quota violations.
+   * 
+ */ + java.util.List + getViolationsOrBuilderList(); + /** + * repeated .google.rpc.QuotaFailure.Violation violations = 1; + * + *
+   * Describes all quota violations.
+   * 
+ */ + com.google.rpc.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfo.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfo.java new file mode 100644 index 000000000000..1654fd4aaab8 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfo.java @@ -0,0 +1,643 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +/** + * Protobuf type {@code google.rpc.RequestInfo} + * + *
+ * Contains metadata about the request that clients can attach when filing a bug
+ * or providing other forms of feedback.
+ * 
+ */ +public final class RequestInfo extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.rpc.RequestInfo) + RequestInfoOrBuilder { + // Use RequestInfo.newBuilder() to construct. + private RequestInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private RequestInfo() { + requestId_ = ""; + servingData_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private RequestInfo( + 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(); + + requestId_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + servingData_ = 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.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.RequestInfo.class, com.google.rpc.RequestInfo.Builder.class); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object requestId_; + /** + * optional string request_id = 1; + * + *
+   * An opaque string that should only be interpreted by the service generating
+   * it. For example, it can be used to identify requests in the service's logs.
+   * 
+ */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * optional string request_id = 1; + * + *
+   * An opaque string that should only be interpreted by the service generating
+   * it. For example, it can be used to identify requests in the service's logs.
+   * 
+ */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVING_DATA_FIELD_NUMBER = 2; + private volatile java.lang.Object servingData_; + /** + * optional string serving_data = 2; + * + *
+   * Any data that was used to serve this request. For example, an encrypted
+   * stack trace that can be sent back to the service provider for debugging.
+   * 
+ */ + public java.lang.String getServingData() { + java.lang.Object ref = servingData_; + 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(); + servingData_ = s; + return s; + } + } + /** + * optional string serving_data = 2; + * + *
+   * Any data that was used to serve this request. For example, an encrypted
+   * stack trace that can be sent back to the service provider for debugging.
+   * 
+ */ + public com.google.protobuf.ByteString + getServingDataBytes() { + java.lang.Object ref = servingData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + servingData_ = 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 (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, requestId_); + } + if (!getServingDataBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, servingData_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, requestId_); + } + if (!getServingDataBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, servingData_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.rpc.RequestInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.RequestInfo 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.rpc.RequestInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.RequestInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.rpc.RequestInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.RequestInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.rpc.RequestInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.rpc.RequestInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.rpc.RequestInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.RequestInfo 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.rpc.RequestInfo 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.rpc.RequestInfo} + * + *
+   * Contains metadata about the request that clients can attach when filing a bug
+   * or providing other forms of feedback.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.rpc.RequestInfo) + com.google.rpc.RequestInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.RequestInfo.class, com.google.rpc.RequestInfo.Builder.class); + } + + // Construct using com.google.rpc.RequestInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + requestId_ = ""; + + servingData_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_descriptor; + } + + public com.google.rpc.RequestInfo getDefaultInstanceForType() { + return com.google.rpc.RequestInfo.getDefaultInstance(); + } + + public com.google.rpc.RequestInfo build() { + com.google.rpc.RequestInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.rpc.RequestInfo buildPartial() { + com.google.rpc.RequestInfo result = new com.google.rpc.RequestInfo(this); + result.requestId_ = requestId_; + result.servingData_ = servingData_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.RequestInfo) { + return mergeFrom((com.google.rpc.RequestInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.RequestInfo other) { + if (other == com.google.rpc.RequestInfo.getDefaultInstance()) return this; + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (!other.getServingData().isEmpty()) { + servingData_ = other.servingData_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.rpc.RequestInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.rpc.RequestInfo) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * optional string request_id = 1; + * + *
+     * An opaque string that should only be interpreted by the service generating
+     * it. For example, it can be used to identify requests in the service's logs.
+     * 
+ */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string request_id = 1; + * + *
+     * An opaque string that should only be interpreted by the service generating
+     * it. For example, it can be used to identify requests in the service's logs.
+     * 
+ */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string request_id = 1; + * + *
+     * An opaque string that should only be interpreted by the service generating
+     * it. For example, it can be used to identify requests in the service's logs.
+     * 
+ */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * optional string request_id = 1; + * + *
+     * An opaque string that should only be interpreted by the service generating
+     * it. For example, it can be used to identify requests in the service's logs.
+     * 
+ */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * optional string request_id = 1; + * + *
+     * An opaque string that should only be interpreted by the service generating
+     * it. For example, it can be used to identify requests in the service's logs.
+     * 
+ */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private java.lang.Object servingData_ = ""; + /** + * optional string serving_data = 2; + * + *
+     * Any data that was used to serve this request. For example, an encrypted
+     * stack trace that can be sent back to the service provider for debugging.
+     * 
+ */ + public java.lang.String getServingData() { + java.lang.Object ref = servingData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servingData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string serving_data = 2; + * + *
+     * Any data that was used to serve this request. For example, an encrypted
+     * stack trace that can be sent back to the service provider for debugging.
+     * 
+ */ + public com.google.protobuf.ByteString + getServingDataBytes() { + java.lang.Object ref = servingData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + servingData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string serving_data = 2; + * + *
+     * Any data that was used to serve this request. For example, an encrypted
+     * stack trace that can be sent back to the service provider for debugging.
+     * 
+ */ + public Builder setServingData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + servingData_ = value; + onChanged(); + return this; + } + /** + * optional string serving_data = 2; + * + *
+     * Any data that was used to serve this request. For example, an encrypted
+     * stack trace that can be sent back to the service provider for debugging.
+     * 
+ */ + public Builder clearServingData() { + + servingData_ = getDefaultInstance().getServingData(); + onChanged(); + return this; + } + /** + * optional string serving_data = 2; + * + *
+     * Any data that was used to serve this request. For example, an encrypted
+     * stack trace that can be sent back to the service provider for debugging.
+     * 
+ */ + public Builder setServingDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + servingData_ = 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.rpc.RequestInfo) + } + + // @@protoc_insertion_point(class_scope:google.rpc.RequestInfo) + private static final com.google.rpc.RequestInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.rpc.RequestInfo(); + } + + public static com.google.rpc.RequestInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public RequestInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new RequestInfo(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.rpc.RequestInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfoOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfoOrBuilder.java new file mode 100644 index 000000000000..94ad03b0f1c9 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfoOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +public interface RequestInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.rpc.RequestInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string request_id = 1; + * + *
+   * An opaque string that should only be interpreted by the service generating
+   * it. For example, it can be used to identify requests in the service's logs.
+   * 
+ */ + java.lang.String getRequestId(); + /** + * optional string request_id = 1; + * + *
+   * An opaque string that should only be interpreted by the service generating
+   * it. For example, it can be used to identify requests in the service's logs.
+   * 
+ */ + com.google.protobuf.ByteString + getRequestIdBytes(); + + /** + * optional string serving_data = 2; + * + *
+   * Any data that was used to serve this request. For example, an encrypted
+   * stack trace that can be sent back to the service provider for debugging.
+   * 
+ */ + java.lang.String getServingData(); + /** + * optional string serving_data = 2; + * + *
+   * Any data that was used to serve this request. For example, an encrypted
+   * stack trace that can be sent back to the service provider for debugging.
+   * 
+ */ + com.google.protobuf.ByteString + getServingDataBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfo.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfo.java new file mode 100644 index 000000000000..9e69a569483e --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfo.java @@ -0,0 +1,985 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +/** + * Protobuf type {@code google.rpc.ResourceInfo} + * + *
+ * Describes the resource that is being accessed.
+ * 
+ */ +public final class ResourceInfo extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.rpc.ResourceInfo) + ResourceInfoOrBuilder { + // Use ResourceInfo.newBuilder() to construct. + private ResourceInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ResourceInfo() { + resourceType_ = ""; + resourceName_ = ""; + owner_ = ""; + description_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private ResourceInfo( + 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(); + + resourceType_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + resourceName_ = s; + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + owner_ = s; + break; + } + case 34: { + 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.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.ResourceInfo.class, com.google.rpc.ResourceInfo.Builder.class); + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object resourceType_; + /** + * optional string resource_type = 1; + * + *
+   * A name for the type of resource being accessed, e.g. "sql table",
+   * "cloud storage bucket", "file", "Google calendar"; or the type URL
+   * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+   * 
+ */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + 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(); + resourceType_ = s; + return s; + } + } + /** + * optional string resource_type = 1; + * + *
+   * A name for the type of resource being accessed, e.g. "sql table",
+   * "cloud storage bucket", "file", "Google calendar"; or the type URL
+   * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+   * 
+ */ + public com.google.protobuf.ByteString + getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object resourceName_; + /** + * optional string resource_name = 2; + * + *
+   * The name of the resource being accessed.  For example, a shared calendar
+   * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+   * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+   * 
+ */ + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + 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(); + resourceName_ = s; + return s; + } + } + /** + * optional string resource_name = 2; + * + *
+   * The name of the resource being accessed.  For example, a shared calendar
+   * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+   * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+   * 
+ */ + public com.google.protobuf.ByteString + getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OWNER_FIELD_NUMBER = 3; + private volatile java.lang.Object owner_; + /** + * optional string owner = 3; + * + *
+   * The owner of the resource (optional).
+   * For example, "user:<owner email>" or "project:<Google developer project
+   * id>".
+   * 
+ */ + public java.lang.String getOwner() { + java.lang.Object ref = owner_; + 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(); + owner_ = s; + return s; + } + } + /** + * optional string owner = 3; + * + *
+   * The owner of the resource (optional).
+   * For example, "user:<owner email>" or "project:<Google developer project
+   * id>".
+   * 
+ */ + public com.google.protobuf.ByteString + getOwnerBytes() { + java.lang.Object ref = owner_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + owner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + private volatile java.lang.Object description_; + /** + * optional string description = 4; + * + *
+   * Describes what error is encountered when accessing this resource.
+   * For example, updating a cloud project may require the `writer` permission
+   * on the developer console project.
+   * 
+ */ + 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 = 4; + * + *
+   * Describes what error is encountered when accessing this resource.
+   * For example, updating a cloud project may require the `writer` permission
+   * on the developer console project.
+   * 
+ */ + 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 (!getResourceTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, resourceType_); + } + if (!getResourceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, resourceName_); + } + if (!getOwnerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, owner_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, description_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getResourceTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, resourceType_); + } + if (!getResourceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, resourceName_); + } + if (!getOwnerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, owner_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, description_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.rpc.ResourceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.ResourceInfo 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.rpc.ResourceInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.ResourceInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.rpc.ResourceInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.ResourceInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.rpc.ResourceInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.rpc.ResourceInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.rpc.ResourceInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.ResourceInfo 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.rpc.ResourceInfo 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.rpc.ResourceInfo} + * + *
+   * Describes the resource that is being accessed.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.rpc.ResourceInfo) + com.google.rpc.ResourceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.ResourceInfo.class, com.google.rpc.ResourceInfo.Builder.class); + } + + // Construct using com.google.rpc.ResourceInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + resourceType_ = ""; + + resourceName_ = ""; + + owner_ = ""; + + description_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_descriptor; + } + + public com.google.rpc.ResourceInfo getDefaultInstanceForType() { + return com.google.rpc.ResourceInfo.getDefaultInstance(); + } + + public com.google.rpc.ResourceInfo build() { + com.google.rpc.ResourceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.rpc.ResourceInfo buildPartial() { + com.google.rpc.ResourceInfo result = new com.google.rpc.ResourceInfo(this); + result.resourceType_ = resourceType_; + result.resourceName_ = resourceName_; + result.owner_ = owner_; + result.description_ = description_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.ResourceInfo) { + return mergeFrom((com.google.rpc.ResourceInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.ResourceInfo other) { + if (other == com.google.rpc.ResourceInfo.getDefaultInstance()) return this; + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + onChanged(); + } + if (!other.getResourceName().isEmpty()) { + resourceName_ = other.resourceName_; + onChanged(); + } + if (!other.getOwner().isEmpty()) { + owner_ = other.owner_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.rpc.ResourceInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.rpc.ResourceInfo) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object resourceType_ = ""; + /** + * optional string resource_type = 1; + * + *
+     * A name for the type of resource being accessed, e.g. "sql table",
+     * "cloud storage bucket", "file", "Google calendar"; or the type URL
+     * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+     * 
+ */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string resource_type = 1; + * + *
+     * A name for the type of resource being accessed, e.g. "sql table",
+     * "cloud storage bucket", "file", "Google calendar"; or the type URL
+     * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+     * 
+ */ + public com.google.protobuf.ByteString + getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string resource_type = 1; + * + *
+     * A name for the type of resource being accessed, e.g. "sql table",
+     * "cloud storage bucket", "file", "Google calendar"; or the type URL
+     * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+     * 
+ */ + public Builder setResourceType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceType_ = value; + onChanged(); + return this; + } + /** + * optional string resource_type = 1; + * + *
+     * A name for the type of resource being accessed, e.g. "sql table",
+     * "cloud storage bucket", "file", "Google calendar"; or the type URL
+     * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+     * 
+ */ + public Builder clearResourceType() { + + resourceType_ = getDefaultInstance().getResourceType(); + onChanged(); + return this; + } + /** + * optional string resource_type = 1; + * + *
+     * A name for the type of resource being accessed, e.g. "sql table",
+     * "cloud storage bucket", "file", "Google calendar"; or the type URL
+     * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+     * 
+ */ + public Builder setResourceTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceType_ = value; + onChanged(); + return this; + } + + private java.lang.Object resourceName_ = ""; + /** + * optional string resource_name = 2; + * + *
+     * The name of the resource being accessed.  For example, a shared calendar
+     * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+     * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+     * 
+ */ + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string resource_name = 2; + * + *
+     * The name of the resource being accessed.  For example, a shared calendar
+     * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+     * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+     * 
+ */ + public com.google.protobuf.ByteString + getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string resource_name = 2; + * + *
+     * The name of the resource being accessed.  For example, a shared calendar
+     * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+     * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+     * 
+ */ + public Builder setResourceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceName_ = value; + onChanged(); + return this; + } + /** + * optional string resource_name = 2; + * + *
+     * The name of the resource being accessed.  For example, a shared calendar
+     * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+     * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+     * 
+ */ + public Builder clearResourceName() { + + resourceName_ = getDefaultInstance().getResourceName(); + onChanged(); + return this; + } + /** + * optional string resource_name = 2; + * + *
+     * The name of the resource being accessed.  For example, a shared calendar
+     * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+     * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+     * 
+ */ + public Builder setResourceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object owner_ = ""; + /** + * optional string owner = 3; + * + *
+     * The owner of the resource (optional).
+     * For example, "user:<owner email>" or "project:<Google developer project
+     * id>".
+     * 
+ */ + public java.lang.String getOwner() { + java.lang.Object ref = owner_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + owner_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string owner = 3; + * + *
+     * The owner of the resource (optional).
+     * For example, "user:<owner email>" or "project:<Google developer project
+     * id>".
+     * 
+ */ + public com.google.protobuf.ByteString + getOwnerBytes() { + java.lang.Object ref = owner_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + owner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string owner = 3; + * + *
+     * The owner of the resource (optional).
+     * For example, "user:<owner email>" or "project:<Google developer project
+     * id>".
+     * 
+ */ + public Builder setOwner( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + owner_ = value; + onChanged(); + return this; + } + /** + * optional string owner = 3; + * + *
+     * The owner of the resource (optional).
+     * For example, "user:<owner email>" or "project:<Google developer project
+     * id>".
+     * 
+ */ + public Builder clearOwner() { + + owner_ = getDefaultInstance().getOwner(); + onChanged(); + return this; + } + /** + * optional string owner = 3; + * + *
+     * The owner of the resource (optional).
+     * For example, "user:<owner email>" or "project:<Google developer project
+     * id>".
+     * 
+ */ + public Builder setOwnerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + owner_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * optional string description = 4; + * + *
+     * Describes what error is encountered when accessing this resource.
+     * For example, updating a cloud project may require the `writer` permission
+     * on the developer console project.
+     * 
+ */ + 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 = 4; + * + *
+     * Describes what error is encountered when accessing this resource.
+     * For example, updating a cloud project may require the `writer` permission
+     * on the developer console project.
+     * 
+ */ + 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 = 4; + * + *
+     * Describes what error is encountered when accessing this resource.
+     * For example, updating a cloud project may require the `writer` permission
+     * on the developer console project.
+     * 
+ */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * optional string description = 4; + * + *
+     * Describes what error is encountered when accessing this resource.
+     * For example, updating a cloud project may require the `writer` permission
+     * on the developer console project.
+     * 
+ */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * optional string description = 4; + * + *
+     * Describes what error is encountered when accessing this resource.
+     * For example, updating a cloud project may require the `writer` permission
+     * on the developer console project.
+     * 
+ */ + 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.rpc.ResourceInfo) + } + + // @@protoc_insertion_point(class_scope:google.rpc.ResourceInfo) + private static final com.google.rpc.ResourceInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.rpc.ResourceInfo(); + } + + public static com.google.rpc.ResourceInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ResourceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ResourceInfo(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.rpc.ResourceInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java new file mode 100644 index 000000000000..5c48486c13a8 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +public interface ResourceInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.rpc.ResourceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string resource_type = 1; + * + *
+   * A name for the type of resource being accessed, e.g. "sql table",
+   * "cloud storage bucket", "file", "Google calendar"; or the type URL
+   * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+   * 
+ */ + java.lang.String getResourceType(); + /** + * optional string resource_type = 1; + * + *
+   * A name for the type of resource being accessed, e.g. "sql table",
+   * "cloud storage bucket", "file", "Google calendar"; or the type URL
+   * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+   * 
+ */ + com.google.protobuf.ByteString + getResourceTypeBytes(); + + /** + * optional string resource_name = 2; + * + *
+   * The name of the resource being accessed.  For example, a shared calendar
+   * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+   * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+   * 
+ */ + java.lang.String getResourceName(); + /** + * optional string resource_name = 2; + * + *
+   * The name of the resource being accessed.  For example, a shared calendar
+   * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+   * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+   * 
+ */ + com.google.protobuf.ByteString + getResourceNameBytes(); + + /** + * optional string owner = 3; + * + *
+   * The owner of the resource (optional).
+   * For example, "user:<owner email>" or "project:<Google developer project
+   * id>".
+   * 
+ */ + java.lang.String getOwner(); + /** + * optional string owner = 3; + * + *
+   * The owner of the resource (optional).
+   * For example, "user:<owner email>" or "project:<Google developer project
+   * id>".
+   * 
+ */ + com.google.protobuf.ByteString + getOwnerBytes(); + + /** + * optional string description = 4; + * + *
+   * Describes what error is encountered when accessing this resource.
+   * For example, updating a cloud project may require the `writer` permission
+   * on the developer console project.
+   * 
+ */ + java.lang.String getDescription(); + /** + * optional string description = 4; + * + *
+   * Describes what error is encountered when accessing this resource.
+   * For example, updating a cloud project may require the `writer` permission
+   * on the developer console project.
+   * 
+ */ + com.google.protobuf.ByteString + getDescriptionBytes(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfo.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfo.java new file mode 100644 index 000000000000..8da5185492bd --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfo.java @@ -0,0 +1,565 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +/** + * Protobuf type {@code google.rpc.RetryInfo} + * + *
+ * Describes when the clients can retry a failed request. Clients could ignore
+ * the recommendation here or retry when this information is missing from error
+ * responses.
+ * It's always recommended that clients should use exponential backoff when
+ * retrying.
+ * Clients should wait until `retry_delay` amount of time has passed since
+ * receiving the error response before retrying.  If retrying requests also
+ * fail, clients should use an exponential backoff scheme to gradually increase
+ * the delay between retries based on `retry_delay`, until either a maximum
+ * number of retires have been reached or a maximum retry delay cap has been
+ * reached.
+ * 
+ */ +public final class RetryInfo extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.rpc.RetryInfo) + RetryInfoOrBuilder { + // Use RetryInfo.newBuilder() to construct. + private RetryInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private RetryInfo() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private RetryInfo( + 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: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (retryDelay_ != null) { + subBuilder = retryDelay_.toBuilder(); + } + retryDelay_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(retryDelay_); + retryDelay_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.RetryInfo.class, com.google.rpc.RetryInfo.Builder.class); + } + + public static final int RETRY_DELAY_FIELD_NUMBER = 1; + private com.google.protobuf.Duration retryDelay_; + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+   * Clients should wait at least this long between retrying the same request.
+   * 
+ */ + public boolean hasRetryDelay() { + return retryDelay_ != null; + } + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+   * Clients should wait at least this long between retrying the same request.
+   * 
+ */ + public com.google.protobuf.Duration getRetryDelay() { + return retryDelay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retryDelay_; + } + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+   * Clients should wait at least this long between retrying the same request.
+   * 
+ */ + public com.google.protobuf.DurationOrBuilder getRetryDelayOrBuilder() { + return getRetryDelay(); + } + + 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 (retryDelay_ != null) { + output.writeMessage(1, getRetryDelay()); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (retryDelay_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRetryDelay()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.rpc.RetryInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.RetryInfo 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.rpc.RetryInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.RetryInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.rpc.RetryInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.RetryInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.rpc.RetryInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.rpc.RetryInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.rpc.RetryInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.RetryInfo 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.rpc.RetryInfo 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.rpc.RetryInfo} + * + *
+   * Describes when the clients can retry a failed request. Clients could ignore
+   * the recommendation here or retry when this information is missing from error
+   * responses.
+   * It's always recommended that clients should use exponential backoff when
+   * retrying.
+   * Clients should wait until `retry_delay` amount of time has passed since
+   * receiving the error response before retrying.  If retrying requests also
+   * fail, clients should use an exponential backoff scheme to gradually increase
+   * the delay between retries based on `retry_delay`, until either a maximum
+   * number of retires have been reached or a maximum retry delay cap has been
+   * reached.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.rpc.RetryInfo) + com.google.rpc.RetryInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.RetryInfo.class, com.google.rpc.RetryInfo.Builder.class); + } + + // Construct using com.google.rpc.RetryInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (retryDelayBuilder_ == null) { + retryDelay_ = null; + } else { + retryDelay_ = null; + retryDelayBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_descriptor; + } + + public com.google.rpc.RetryInfo getDefaultInstanceForType() { + return com.google.rpc.RetryInfo.getDefaultInstance(); + } + + public com.google.rpc.RetryInfo build() { + com.google.rpc.RetryInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.rpc.RetryInfo buildPartial() { + com.google.rpc.RetryInfo result = new com.google.rpc.RetryInfo(this); + if (retryDelayBuilder_ == null) { + result.retryDelay_ = retryDelay_; + } else { + result.retryDelay_ = retryDelayBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.RetryInfo) { + return mergeFrom((com.google.rpc.RetryInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.RetryInfo other) { + if (other == com.google.rpc.RetryInfo.getDefaultInstance()) return this; + if (other.hasRetryDelay()) { + mergeRetryDelay(other.getRetryDelay()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.rpc.RetryInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.rpc.RetryInfo) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Duration retryDelay_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> retryDelayBuilder_; + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+     * Clients should wait at least this long between retrying the same request.
+     * 
+ */ + public boolean hasRetryDelay() { + return retryDelayBuilder_ != null || retryDelay_ != null; + } + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+     * Clients should wait at least this long between retrying the same request.
+     * 
+ */ + public com.google.protobuf.Duration getRetryDelay() { + if (retryDelayBuilder_ == null) { + return retryDelay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retryDelay_; + } else { + return retryDelayBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+     * Clients should wait at least this long between retrying the same request.
+     * 
+ */ + public Builder setRetryDelay(com.google.protobuf.Duration value) { + if (retryDelayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + retryDelay_ = value; + onChanged(); + } else { + retryDelayBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+     * Clients should wait at least this long between retrying the same request.
+     * 
+ */ + public Builder setRetryDelay( + com.google.protobuf.Duration.Builder builderForValue) { + if (retryDelayBuilder_ == null) { + retryDelay_ = builderForValue.build(); + onChanged(); + } else { + retryDelayBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+     * Clients should wait at least this long between retrying the same request.
+     * 
+ */ + public Builder mergeRetryDelay(com.google.protobuf.Duration value) { + if (retryDelayBuilder_ == null) { + if (retryDelay_ != null) { + retryDelay_ = + com.google.protobuf.Duration.newBuilder(retryDelay_).mergeFrom(value).buildPartial(); + } else { + retryDelay_ = value; + } + onChanged(); + } else { + retryDelayBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+     * Clients should wait at least this long between retrying the same request.
+     * 
+ */ + public Builder clearRetryDelay() { + if (retryDelayBuilder_ == null) { + retryDelay_ = null; + onChanged(); + } else { + retryDelay_ = null; + retryDelayBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+     * Clients should wait at least this long between retrying the same request.
+     * 
+ */ + public com.google.protobuf.Duration.Builder getRetryDelayBuilder() { + + onChanged(); + return getRetryDelayFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+     * Clients should wait at least this long between retrying the same request.
+     * 
+ */ + public com.google.protobuf.DurationOrBuilder getRetryDelayOrBuilder() { + if (retryDelayBuilder_ != null) { + return retryDelayBuilder_.getMessageOrBuilder(); + } else { + return retryDelay_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : retryDelay_; + } + } + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+     * Clients should wait at least this long between retrying the same request.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getRetryDelayFieldBuilder() { + if (retryDelayBuilder_ == null) { + retryDelayBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getRetryDelay(), + getParentForChildren(), + isClean()); + retryDelay_ = null; + } + return retryDelayBuilder_; + } + 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.rpc.RetryInfo) + } + + // @@protoc_insertion_point(class_scope:google.rpc.RetryInfo) + private static final com.google.rpc.RetryInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.rpc.RetryInfo(); + } + + public static com.google.rpc.RetryInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public RetryInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new RetryInfo(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.rpc.RetryInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfoOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfoOrBuilder.java new file mode 100644 index 000000000000..f4b347a1d04e --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfoOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/error_details.proto + +package com.google.rpc; + +public interface RetryInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.rpc.RetryInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+   * Clients should wait at least this long between retrying the same request.
+   * 
+ */ + boolean hasRetryDelay(); + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+   * Clients should wait at least this long between retrying the same request.
+   * 
+ */ + com.google.protobuf.Duration getRetryDelay(); + /** + * optional .google.protobuf.Duration retry_delay = 1; + * + *
+   * Clients should wait at least this long between retrying the same request.
+   * 
+ */ + com.google.protobuf.DurationOrBuilder getRetryDelayOrBuilder(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/Status.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/Status.java new file mode 100644 index 000000000000..be0c3a54ec64 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/Status.java @@ -0,0 +1,1092 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/status.proto + +package com.google.rpc; + +/** + * Protobuf type {@code google.rpc.Status} + * + *
+ * The `Status` type defines a logical error model that is suitable for different
+ * programming environments, including REST APIs and RPC APIs. It is used by
+ * [gRPC](https://github.com/grpc). The error model is designed to be:
+ * - Simple to use and understand for most users
+ * - Flexible enough to meet unexpected needs
+ * # Overview
+ * The `Status` message contains three pieces of data: error code, error message,
+ * and error details. The error code should be an enum value of
+ * [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed.  The
+ * error message should be a developer-facing English message that helps
+ * developers *understand* and *resolve* the error. If a localized user-facing
+ * error message is needed, put the localized message in the error details or
+ * localize it in the client. The optional error details may contain arbitrary
+ * information about the error. There is a predefined set of error detail types
+ * in the package `google.rpc` which can be used for common error conditions.
+ * # Language mapping
+ * The `Status` message is the logical representation of the error model, but it
+ * is not necessarily the actual wire format. When the `Status` message is
+ * exposed in different client libraries and different wire protocols, it can be
+ * mapped differently. For example, it will likely be mapped to some exceptions
+ * in Java, but more likely mapped to some error codes in C.
+ * # Other uses
+ * The error model and the `Status` message can be used in a variety of
+ * environments, either with or without APIs, to provide a
+ * consistent developer experience across different environments.
+ * Example uses of this error model include:
+ * - Partial errors. If a service needs to return partial errors to the client,
+ *     it may embed the `Status` in the normal response to indicate the partial
+ *     errors.
+ * - Workflow errors. A typical workflow has multiple steps. Each step may
+ *     have a `Status` message for error reporting purpose.
+ * - Batch operations. If a client uses batch request and batch response, the
+ *     `Status` message should be used directly inside batch response, one for
+ *     each error sub-response.
+ * - Asynchronous operations. If an API call embeds asynchronous operation
+ *     results in its response, the status of those operations should be
+ *     represented directly using the `Status` message.
+ * - Logging. If some API errors are stored in logs, the message `Status` could
+ *     be used directly after any stripping needed for security/privacy reasons.
+ * 
+ */ +public final class Status extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.rpc.Status) + StatusOrBuilder { + // Use Status.newBuilder() to construct. + private Status(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Status() { + code_ = 0; + message_ = ""; + details_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Status( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + code_ = input.readInt32(); + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + message_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + details_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + details_.add(input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + details_ = java.util.Collections.unmodifiableList(details_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.StatusProto.internal_static_google_rpc_Status_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.StatusProto.internal_static_google_rpc_Status_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.Status.class, com.google.rpc.Status.Builder.class); + } + + private int bitField0_; + public static final int CODE_FIELD_NUMBER = 1; + private int code_; + /** + * optional int32 code = 1; + * + *
+   * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
+   * 
+ */ + public int getCode() { + return code_; + } + + public static final int MESSAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object message_; + /** + * optional string message = 2; + * + *
+   * A developer-facing error message, which should be in English. Any
+   * user-facing error message should be localized and sent in the
+   * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
+   * 
+ */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + 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(); + message_ = s; + return s; + } + } + /** + * optional string message = 2; + * + *
+   * A developer-facing error message, which should be in English. Any
+   * user-facing error message should be localized and sent in the
+   * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
+   * 
+ */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DETAILS_FIELD_NUMBER = 3; + private java.util.List details_; + /** + * repeated .google.protobuf.Any details = 3; + * + *
+   * A list of messages that carry the error details.  There will be a
+   * common set of message types for APIs to use.
+   * 
+ */ + public java.util.List getDetailsList() { + return details_; + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+   * A list of messages that carry the error details.  There will be a
+   * common set of message types for APIs to use.
+   * 
+ */ + public java.util.List + getDetailsOrBuilderList() { + return details_; + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+   * A list of messages that carry the error details.  There will be a
+   * common set of message types for APIs to use.
+   * 
+ */ + public int getDetailsCount() { + return details_.size(); + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+   * A list of messages that carry the error details.  There will be a
+   * common set of message types for APIs to use.
+   * 
+ */ + public com.google.protobuf.Any getDetails(int index) { + return details_.get(index); + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+   * A list of messages that carry the error details.  There will be a
+   * common set of message types for APIs to use.
+   * 
+ */ + public com.google.protobuf.AnyOrBuilder getDetailsOrBuilder( + int index) { + return details_.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 (code_ != 0) { + output.writeInt32(1, code_); + } + if (!getMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, message_); + } + for (int i = 0; i < details_.size(); i++) { + output.writeMessage(3, details_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, code_); + } + if (!getMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, message_); + } + for (int i = 0; i < details_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, details_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.rpc.Status parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.Status 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.rpc.Status parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.rpc.Status parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.rpc.Status parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.Status parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.rpc.Status parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.rpc.Status parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.rpc.Status parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.rpc.Status 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.rpc.Status 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.rpc.Status} + * + *
+   * The `Status` type defines a logical error model that is suitable for different
+   * programming environments, including REST APIs and RPC APIs. It is used by
+   * [gRPC](https://github.com/grpc). The error model is designed to be:
+   * - Simple to use and understand for most users
+   * - Flexible enough to meet unexpected needs
+   * # Overview
+   * The `Status` message contains three pieces of data: error code, error message,
+   * and error details. The error code should be an enum value of
+   * [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed.  The
+   * error message should be a developer-facing English message that helps
+   * developers *understand* and *resolve* the error. If a localized user-facing
+   * error message is needed, put the localized message in the error details or
+   * localize it in the client. The optional error details may contain arbitrary
+   * information about the error. There is a predefined set of error detail types
+   * in the package `google.rpc` which can be used for common error conditions.
+   * # Language mapping
+   * The `Status` message is the logical representation of the error model, but it
+   * is not necessarily the actual wire format. When the `Status` message is
+   * exposed in different client libraries and different wire protocols, it can be
+   * mapped differently. For example, it will likely be mapped to some exceptions
+   * in Java, but more likely mapped to some error codes in C.
+   * # Other uses
+   * The error model and the `Status` message can be used in a variety of
+   * environments, either with or without APIs, to provide a
+   * consistent developer experience across different environments.
+   * Example uses of this error model include:
+   * - Partial errors. If a service needs to return partial errors to the client,
+   *     it may embed the `Status` in the normal response to indicate the partial
+   *     errors.
+   * - Workflow errors. A typical workflow has multiple steps. Each step may
+   *     have a `Status` message for error reporting purpose.
+   * - Batch operations. If a client uses batch request and batch response, the
+   *     `Status` message should be used directly inside batch response, one for
+   *     each error sub-response.
+   * - Asynchronous operations. If an API call embeds asynchronous operation
+   *     results in its response, the status of those operations should be
+   *     represented directly using the `Status` message.
+   * - Logging. If some API errors are stored in logs, the message `Status` could
+   *     be used directly after any stripping needed for security/privacy reasons.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.rpc.Status) + com.google.rpc.StatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.rpc.StatusProto.internal_static_google_rpc_Status_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.StatusProto.internal_static_google_rpc_Status_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.Status.class, com.google.rpc.Status.Builder.class); + } + + // Construct using com.google.rpc.Status.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getDetailsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + code_ = 0; + + message_ = ""; + + if (detailsBuilder_ == null) { + details_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + detailsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.rpc.StatusProto.internal_static_google_rpc_Status_descriptor; + } + + public com.google.rpc.Status getDefaultInstanceForType() { + return com.google.rpc.Status.getDefaultInstance(); + } + + public com.google.rpc.Status build() { + com.google.rpc.Status result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.rpc.Status buildPartial() { + com.google.rpc.Status result = new com.google.rpc.Status(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.code_ = code_; + result.message_ = message_; + if (detailsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + details_ = java.util.Collections.unmodifiableList(details_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.details_ = details_; + } else { + result.details_ = detailsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.Status) { + return mergeFrom((com.google.rpc.Status)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.Status other) { + if (other == com.google.rpc.Status.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + onChanged(); + } + if (detailsBuilder_ == null) { + if (!other.details_.isEmpty()) { + if (details_.isEmpty()) { + details_ = other.details_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDetailsIsMutable(); + details_.addAll(other.details_); + } + onChanged(); + } + } else { + if (!other.details_.isEmpty()) { + if (detailsBuilder_.isEmpty()) { + detailsBuilder_.dispose(); + detailsBuilder_ = null; + details_ = other.details_; + bitField0_ = (bitField0_ & ~0x00000004); + detailsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getDetailsFieldBuilder() : null; + } else { + detailsBuilder_.addAllMessages(other.details_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.rpc.Status parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.rpc.Status) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int code_ ; + /** + * optional int32 code = 1; + * + *
+     * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
+     * 
+ */ + public int getCode() { + return code_; + } + /** + * optional int32 code = 1; + * + *
+     * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
+     * 
+ */ + public Builder setCode(int value) { + + code_ = value; + onChanged(); + return this; + } + /** + * optional int32 code = 1; + * + *
+     * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
+     * 
+ */ + public Builder clearCode() { + + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + /** + * optional string message = 2; + * + *
+     * A developer-facing error message, which should be in English. Any
+     * user-facing error message should be localized and sent in the
+     * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
+     * 
+ */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string message = 2; + * + *
+     * A developer-facing error message, which should be in English. Any
+     * user-facing error message should be localized and sent in the
+     * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
+     * 
+ */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string message = 2; + * + *
+     * A developer-facing error message, which should be in English. Any
+     * user-facing error message should be localized and sent in the
+     * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
+     * 
+ */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + * optional string message = 2; + * + *
+     * A developer-facing error message, which should be in English. Any
+     * user-facing error message should be localized and sent in the
+     * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
+     * 
+ */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + * optional string message = 2; + * + *
+     * A developer-facing error message, which should be in English. Any
+     * user-facing error message should be localized and sent in the
+     * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
+     * 
+ */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + message_ = value; + onChanged(); + return this; + } + + private java.util.List details_ = + java.util.Collections.emptyList(); + private void ensureDetailsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + details_ = new java.util.ArrayList(details_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> detailsBuilder_; + + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public java.util.List getDetailsList() { + if (detailsBuilder_ == null) { + return java.util.Collections.unmodifiableList(details_); + } else { + return detailsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public int getDetailsCount() { + if (detailsBuilder_ == null) { + return details_.size(); + } else { + return detailsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public com.google.protobuf.Any getDetails(int index) { + if (detailsBuilder_ == null) { + return details_.get(index); + } else { + return detailsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public Builder setDetails( + int index, com.google.protobuf.Any value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetailsIsMutable(); + details_.set(index, value); + onChanged(); + } else { + detailsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public Builder setDetails( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.set(index, builderForValue.build()); + onChanged(); + } else { + detailsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public Builder addDetails(com.google.protobuf.Any value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetailsIsMutable(); + details_.add(value); + onChanged(); + } else { + detailsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public Builder addDetails( + int index, com.google.protobuf.Any value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetailsIsMutable(); + details_.add(index, value); + onChanged(); + } else { + detailsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public Builder addDetails( + com.google.protobuf.Any.Builder builderForValue) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.add(builderForValue.build()); + onChanged(); + } else { + detailsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public Builder addDetails( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.add(index, builderForValue.build()); + onChanged(); + } else { + detailsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public Builder addAllDetails( + java.lang.Iterable values) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, details_); + onChanged(); + } else { + detailsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public Builder clearDetails() { + if (detailsBuilder_ == null) { + details_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + detailsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public Builder removeDetails(int index) { + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.remove(index); + onChanged(); + } else { + detailsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public com.google.protobuf.Any.Builder getDetailsBuilder( + int index) { + return getDetailsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public com.google.protobuf.AnyOrBuilder getDetailsOrBuilder( + int index) { + if (detailsBuilder_ == null) { + return details_.get(index); } else { + return detailsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public java.util.List + getDetailsOrBuilderList() { + if (detailsBuilder_ != null) { + return detailsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(details_); + } + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public com.google.protobuf.Any.Builder addDetailsBuilder() { + return getDetailsFieldBuilder().addBuilder( + com.google.protobuf.Any.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public com.google.protobuf.Any.Builder addDetailsBuilder( + int index) { + return getDetailsFieldBuilder().addBuilder( + index, com.google.protobuf.Any.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Any details = 3; + * + *
+     * A list of messages that carry the error details.  There will be a
+     * common set of message types for APIs to use.
+     * 
+ */ + public java.util.List + getDetailsBuilderList() { + return getDetailsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getDetailsFieldBuilder() { + if (detailsBuilder_ == null) { + detailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + details_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + details_ = null; + } + return detailsBuilder_; + } + 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.rpc.Status) + } + + // @@protoc_insertion_point(class_scope:google.rpc.Status) + private static final com.google.rpc.Status DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.rpc.Status(); + } + + public static com.google.rpc.Status getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Status parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Status(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.rpc.Status getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusOrBuilder.java new file mode 100644 index 000000000000..d34e7133da6a --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusOrBuilder.java @@ -0,0 +1,89 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/status.proto + +package com.google.rpc; + +public interface StatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.rpc.Status) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 code = 1; + * + *
+   * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
+   * 
+ */ + int getCode(); + + /** + * optional string message = 2; + * + *
+   * A developer-facing error message, which should be in English. Any
+   * user-facing error message should be localized and sent in the
+   * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
+   * 
+ */ + java.lang.String getMessage(); + /** + * optional string message = 2; + * + *
+   * A developer-facing error message, which should be in English. Any
+   * user-facing error message should be localized and sent in the
+   * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
+   * 
+ */ + com.google.protobuf.ByteString + getMessageBytes(); + + /** + * repeated .google.protobuf.Any details = 3; + * + *
+   * A list of messages that carry the error details.  There will be a
+   * common set of message types for APIs to use.
+   * 
+ */ + java.util.List + getDetailsList(); + /** + * repeated .google.protobuf.Any details = 3; + * + *
+   * A list of messages that carry the error details.  There will be a
+   * common set of message types for APIs to use.
+   * 
+ */ + com.google.protobuf.Any getDetails(int index); + /** + * repeated .google.protobuf.Any details = 3; + * + *
+   * A list of messages that carry the error details.  There will be a
+   * common set of message types for APIs to use.
+   * 
+ */ + int getDetailsCount(); + /** + * repeated .google.protobuf.Any details = 3; + * + *
+   * A list of messages that carry the error details.  There will be a
+   * common set of message types for APIs to use.
+   * 
+ */ + java.util.List + getDetailsOrBuilderList(); + /** + * repeated .google.protobuf.Any details = 3; + * + *
+   * A list of messages that carry the error details.  There will be a
+   * common set of message types for APIs to use.
+   * 
+ */ + com.google.protobuf.AnyOrBuilder getDetailsOrBuilder( + int index); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusProto.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusProto.java new file mode 100644 index 000000000000..46c87a712b3f --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusProto.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/rpc/status.proto + +package com.google.rpc; + +public final class StatusProto { + private StatusProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_Status_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_Status_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/rpc/status.proto\022\ngoogle.rpc\032\031g" + + "oogle/protobuf/any.proto\"N\n\006Status\022\014\n\004co" + + "de\030\001 \001(\005\022\017\n\007message\030\002 \001(\t\022%\n\007details\030\003 \003" + + "(\0132\024.google.protobuf.AnyB\037\n\016com.google.r" + + "pcB\013StatusProtoP\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.protobuf.AnyProto.getDescriptor(), + }, assigner); + internal_static_google_rpc_Status_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_rpc_Status_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_Status_descriptor, + new java.lang.String[] { "Code", "Message", "Details", }); + com.google.protobuf.AnyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/Color.java b/gcloud-java-gax/generated/src/main/java/com/google/type/Color.java new file mode 100644 index 000000000000..a4d6c9f79529 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/Color.java @@ -0,0 +1,1047 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/color.proto + +package com.google.type; + +/** + * Protobuf type {@code google.type.Color} + * + *
+ * Represents a color in the RGBA color space. This representation is designed
+ * for simplicity of conversion to/from color representations in various
+ * languages over compactness; for example, the fields of this representation
+ * can be trivially provided to the constructor of "java.awt.Color" in Java; it
+ * can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
+ * method in iOS; and, with just a little work, it can be easily formatted into
+ * a CSS "rgba()" string in JavaScript, as well. Here are some examples:
+ * Example (Java):
+ *      import com.google.type.Color;
+ *      // ...
+ *      public static java.awt.Color fromProto(Color protocolor) {
+ *        float alpha = protocolor.hasAlpha()
+ *            ? protocolor.getAlpha().getValue()
+ *            : 1.0;
+ *        return new java.awt.Color(
+ *            protocolor.getRed(),
+ *            protocolor.getGreen(),
+ *            protocolor.getBlue(),
+ *            alpha);
+ *      }
+ *      public static Color toProto(java.awt.Color color) {
+ *        float red = (float) color.getRed();
+ *        float green = (float) color.getGreen();
+ *        float blue = (float) color.getBlue();
+ *        float denominator = 255.0;
+ *        Color.Builder resultBuilder =
+ *            Color
+ *                .newBuilder()
+ *                .setRed(red / denominator)
+ *                .setGreen(green / denominator)
+ *                .setBlue(blue / denominator);
+ *        int alpha = color.getAlpha();
+ *        if (alpha != 255) {
+ *          result.setAlpha(
+ *              FloatValue
+ *                  .newBuilder()
+ *                  .setValue(((float) alpha) / denominator)
+ *                  .build());
+ *        }
+ *        return resultBuilder.build();
+ *      }
+ *      // ...
+ * Example (iOS / Obj-C):
+ *      // ...
+ *      static UIColor* fromProto(Color* protocolor) {
+ *         float red = [protocolor red];
+ *         float green = [protocolor green];
+ *         float blue = [protocolor blue];
+ *         FloatValue* alpha_wrapper = [protocolor alpha];
+ *         float alpha = 1.0;
+ *         if (alpha_wrapper != nil) {
+ *           alpha = [alpha_wrapper value];
+ *         }
+ *         return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
+ *      }
+ *      static Color* toProto(UIColor* color) {
+ *          CGFloat red, green, blue, alpha;
+ *          if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
+ *            return nil;
+ *          }
+ *          Color* result = [Color alloc] init];
+ *          [result setRed:red];
+ *          [result setGreen:green];
+ *          [result setBlue:blue];
+ *          if (alpha <= 0.9999) {
+ *            [result setAlpha:floatWrapperWithValue(alpha)];
+ *          }
+ *          [result autorelease];
+ *          return result;
+ *     }
+ *     // ...
+ *  Example (JavaScript):
+ *     // ...
+ *     var protoToCssColor = function(rgb_color) {
+ *        var redFrac = rgb_color.red || 0.0;
+ *        var greenFrac = rgb_color.green || 0.0;
+ *        var blueFrac = rgb_color.blue || 0.0;
+ *        var red = Math.floor(redFrac * 255);
+ *        var green = Math.floor(greenFrac * 255);
+ *        var blue = Math.floor(blueFrac * 255);
+ *        if (!('alpha' in rgb_color)) {
+ *           return rgbToCssColor_(red, green, blue);
+ *        }
+ *        var alphaFrac = rgb_color.alpha.value || 0.0;
+ *        var rgbParams = [red, green, blue].join(',');
+ *        return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
+ *     };
+ *     var rgbToCssColor_ = function(red, green, blue) {
+ *       var rgbNumber = new Number((red << 16) | (green << 8) | blue);
+ *       var hexString = rgbNumber.toString(16);
+ *       var missingZeros = 6 - hexString.length;
+ *       var resultBuilder = ['#'];
+ *       for (var i = 0; i < missingZeros; i++) {
+ *          resultBuilder.push('0');
+ *       }
+ *       resultBuilder.push(hexString);
+ *       return resultBuilder.join('');
+ *     };
+ *     // ...
+ * 
+ */ +public final class Color extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.type.Color) + ColorOrBuilder { + // Use Color.newBuilder() to construct. + private Color(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Color() { + red_ = 0F; + green_ = 0F; + blue_ = 0F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Color( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 13: { + + red_ = input.readFloat(); + break; + } + case 21: { + + green_ = input.readFloat(); + break; + } + case 29: { + + blue_ = input.readFloat(); + break; + } + case 34: { + com.google.protobuf.FloatValue.Builder subBuilder = null; + if (alpha_ != null) { + subBuilder = alpha_.toBuilder(); + } + alpha_ = input.readMessage(com.google.protobuf.FloatValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(alpha_); + alpha_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.type.ColorProto.internal_static_google_type_Color_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.ColorProto.internal_static_google_type_Color_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.Color.class, com.google.type.Color.Builder.class); + } + + public static final int RED_FIELD_NUMBER = 1; + private float red_; + /** + * optional float red = 1; + * + *
+   * The amount of red in the color as a value in the interval [0, 1].
+   * 
+ */ + public float getRed() { + return red_; + } + + public static final int GREEN_FIELD_NUMBER = 2; + private float green_; + /** + * optional float green = 2; + * + *
+   * The amount of green in the color as a value in the interval [0, 1].
+   * 
+ */ + public float getGreen() { + return green_; + } + + public static final int BLUE_FIELD_NUMBER = 3; + private float blue_; + /** + * optional float blue = 3; + * + *
+   * The amount of blue in the color as a value in the interval [0, 1].
+   * 
+ */ + public float getBlue() { + return blue_; + } + + public static final int ALPHA_FIELD_NUMBER = 4; + private com.google.protobuf.FloatValue alpha_; + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+   * The fraction of this color that should be applied to the pixel. That is,
+   * the final pixel color is defined by the equation:
+   *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+   * This means that a value of 1.0 corresponds to a solid color, whereas
+   * a value of 0.0 corresponds to a completely transparent color. This
+   * uses a wrapper message rather than a simple float scalar so that it is
+   * possible to distinguish between a default value and the value being unset.
+   * If omitted, this color object is to be rendered as a solid color
+   * (as if the alpha value had been explicitly given with a value of 1.0).
+   * 
+ */ + public boolean hasAlpha() { + return alpha_ != null; + } + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+   * The fraction of this color that should be applied to the pixel. That is,
+   * the final pixel color is defined by the equation:
+   *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+   * This means that a value of 1.0 corresponds to a solid color, whereas
+   * a value of 0.0 corresponds to a completely transparent color. This
+   * uses a wrapper message rather than a simple float scalar so that it is
+   * possible to distinguish between a default value and the value being unset.
+   * If omitted, this color object is to be rendered as a solid color
+   * (as if the alpha value had been explicitly given with a value of 1.0).
+   * 
+ */ + public com.google.protobuf.FloatValue getAlpha() { + return alpha_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : alpha_; + } + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+   * The fraction of this color that should be applied to the pixel. That is,
+   * the final pixel color is defined by the equation:
+   *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+   * This means that a value of 1.0 corresponds to a solid color, whereas
+   * a value of 0.0 corresponds to a completely transparent color. This
+   * uses a wrapper message rather than a simple float scalar so that it is
+   * possible to distinguish between a default value and the value being unset.
+   * If omitted, this color object is to be rendered as a solid color
+   * (as if the alpha value had been explicitly given with a value of 1.0).
+   * 
+ */ + public com.google.protobuf.FloatValueOrBuilder getAlphaOrBuilder() { + return getAlpha(); + } + + 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 (red_ != 0F) { + output.writeFloat(1, red_); + } + if (green_ != 0F) { + output.writeFloat(2, green_); + } + if (blue_ != 0F) { + output.writeFloat(3, blue_); + } + if (alpha_ != null) { + output.writeMessage(4, getAlpha()); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (red_ != 0F) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, red_); + } + if (green_ != 0F) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, green_); + } + if (blue_ != 0F) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, blue_); + } + if (alpha_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getAlpha()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.type.Color parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.Color 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.type.Color parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.Color parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.type.Color parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.type.Color parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.type.Color parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.type.Color parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.type.Color parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.type.Color 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.type.Color 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.type.Color} + * + *
+   * Represents a color in the RGBA color space. This representation is designed
+   * for simplicity of conversion to/from color representations in various
+   * languages over compactness; for example, the fields of this representation
+   * can be trivially provided to the constructor of "java.awt.Color" in Java; it
+   * can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
+   * method in iOS; and, with just a little work, it can be easily formatted into
+   * a CSS "rgba()" string in JavaScript, as well. Here are some examples:
+   * Example (Java):
+   *      import com.google.type.Color;
+   *      // ...
+   *      public static java.awt.Color fromProto(Color protocolor) {
+   *        float alpha = protocolor.hasAlpha()
+   *            ? protocolor.getAlpha().getValue()
+   *            : 1.0;
+   *        return new java.awt.Color(
+   *            protocolor.getRed(),
+   *            protocolor.getGreen(),
+   *            protocolor.getBlue(),
+   *            alpha);
+   *      }
+   *      public static Color toProto(java.awt.Color color) {
+   *        float red = (float) color.getRed();
+   *        float green = (float) color.getGreen();
+   *        float blue = (float) color.getBlue();
+   *        float denominator = 255.0;
+   *        Color.Builder resultBuilder =
+   *            Color
+   *                .newBuilder()
+   *                .setRed(red / denominator)
+   *                .setGreen(green / denominator)
+   *                .setBlue(blue / denominator);
+   *        int alpha = color.getAlpha();
+   *        if (alpha != 255) {
+   *          result.setAlpha(
+   *              FloatValue
+   *                  .newBuilder()
+   *                  .setValue(((float) alpha) / denominator)
+   *                  .build());
+   *        }
+   *        return resultBuilder.build();
+   *      }
+   *      // ...
+   * Example (iOS / Obj-C):
+   *      // ...
+   *      static UIColor* fromProto(Color* protocolor) {
+   *         float red = [protocolor red];
+   *         float green = [protocolor green];
+   *         float blue = [protocolor blue];
+   *         FloatValue* alpha_wrapper = [protocolor alpha];
+   *         float alpha = 1.0;
+   *         if (alpha_wrapper != nil) {
+   *           alpha = [alpha_wrapper value];
+   *         }
+   *         return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
+   *      }
+   *      static Color* toProto(UIColor* color) {
+   *          CGFloat red, green, blue, alpha;
+   *          if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
+   *            return nil;
+   *          }
+   *          Color* result = [Color alloc] init];
+   *          [result setRed:red];
+   *          [result setGreen:green];
+   *          [result setBlue:blue];
+   *          if (alpha <= 0.9999) {
+   *            [result setAlpha:floatWrapperWithValue(alpha)];
+   *          }
+   *          [result autorelease];
+   *          return result;
+   *     }
+   *     // ...
+   *  Example (JavaScript):
+   *     // ...
+   *     var protoToCssColor = function(rgb_color) {
+   *        var redFrac = rgb_color.red || 0.0;
+   *        var greenFrac = rgb_color.green || 0.0;
+   *        var blueFrac = rgb_color.blue || 0.0;
+   *        var red = Math.floor(redFrac * 255);
+   *        var green = Math.floor(greenFrac * 255);
+   *        var blue = Math.floor(blueFrac * 255);
+   *        if (!('alpha' in rgb_color)) {
+   *           return rgbToCssColor_(red, green, blue);
+   *        }
+   *        var alphaFrac = rgb_color.alpha.value || 0.0;
+   *        var rgbParams = [red, green, blue].join(',');
+   *        return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
+   *     };
+   *     var rgbToCssColor_ = function(red, green, blue) {
+   *       var rgbNumber = new Number((red << 16) | (green << 8) | blue);
+   *       var hexString = rgbNumber.toString(16);
+   *       var missingZeros = 6 - hexString.length;
+   *       var resultBuilder = ['#'];
+   *       for (var i = 0; i < missingZeros; i++) {
+   *          resultBuilder.push('0');
+   *       }
+   *       resultBuilder.push(hexString);
+   *       return resultBuilder.join('');
+   *     };
+   *     // ...
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.type.Color) + com.google.type.ColorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.type.ColorProto.internal_static_google_type_Color_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.ColorProto.internal_static_google_type_Color_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.Color.class, com.google.type.Color.Builder.class); + } + + // Construct using com.google.type.Color.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + red_ = 0F; + + green_ = 0F; + + blue_ = 0F; + + if (alphaBuilder_ == null) { + alpha_ = null; + } else { + alpha_ = null; + alphaBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.type.ColorProto.internal_static_google_type_Color_descriptor; + } + + public com.google.type.Color getDefaultInstanceForType() { + return com.google.type.Color.getDefaultInstance(); + } + + public com.google.type.Color build() { + com.google.type.Color result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.type.Color buildPartial() { + com.google.type.Color result = new com.google.type.Color(this); + result.red_ = red_; + result.green_ = green_; + result.blue_ = blue_; + if (alphaBuilder_ == null) { + result.alpha_ = alpha_; + } else { + result.alpha_ = alphaBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.type.Color) { + return mergeFrom((com.google.type.Color)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.type.Color other) { + if (other == com.google.type.Color.getDefaultInstance()) return this; + if (other.getRed() != 0F) { + setRed(other.getRed()); + } + if (other.getGreen() != 0F) { + setGreen(other.getGreen()); + } + if (other.getBlue() != 0F) { + setBlue(other.getBlue()); + } + if (other.hasAlpha()) { + mergeAlpha(other.getAlpha()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.type.Color parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.type.Color) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float red_ ; + /** + * optional float red = 1; + * + *
+     * The amount of red in the color as a value in the interval [0, 1].
+     * 
+ */ + public float getRed() { + return red_; + } + /** + * optional float red = 1; + * + *
+     * The amount of red in the color as a value in the interval [0, 1].
+     * 
+ */ + public Builder setRed(float value) { + + red_ = value; + onChanged(); + return this; + } + /** + * optional float red = 1; + * + *
+     * The amount of red in the color as a value in the interval [0, 1].
+     * 
+ */ + public Builder clearRed() { + + red_ = 0F; + onChanged(); + return this; + } + + private float green_ ; + /** + * optional float green = 2; + * + *
+     * The amount of green in the color as a value in the interval [0, 1].
+     * 
+ */ + public float getGreen() { + return green_; + } + /** + * optional float green = 2; + * + *
+     * The amount of green in the color as a value in the interval [0, 1].
+     * 
+ */ + public Builder setGreen(float value) { + + green_ = value; + onChanged(); + return this; + } + /** + * optional float green = 2; + * + *
+     * The amount of green in the color as a value in the interval [0, 1].
+     * 
+ */ + public Builder clearGreen() { + + green_ = 0F; + onChanged(); + return this; + } + + private float blue_ ; + /** + * optional float blue = 3; + * + *
+     * The amount of blue in the color as a value in the interval [0, 1].
+     * 
+ */ + public float getBlue() { + return blue_; + } + /** + * optional float blue = 3; + * + *
+     * The amount of blue in the color as a value in the interval [0, 1].
+     * 
+ */ + public Builder setBlue(float value) { + + blue_ = value; + onChanged(); + return this; + } + /** + * optional float blue = 3; + * + *
+     * The amount of blue in the color as a value in the interval [0, 1].
+     * 
+ */ + public Builder clearBlue() { + + blue_ = 0F; + onChanged(); + return this; + } + + private com.google.protobuf.FloatValue alpha_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> alphaBuilder_; + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+     * The fraction of this color that should be applied to the pixel. That is,
+     * the final pixel color is defined by the equation:
+     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+     * This means that a value of 1.0 corresponds to a solid color, whereas
+     * a value of 0.0 corresponds to a completely transparent color. This
+     * uses a wrapper message rather than a simple float scalar so that it is
+     * possible to distinguish between a default value and the value being unset.
+     * If omitted, this color object is to be rendered as a solid color
+     * (as if the alpha value had been explicitly given with a value of 1.0).
+     * 
+ */ + public boolean hasAlpha() { + return alphaBuilder_ != null || alpha_ != null; + } + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+     * The fraction of this color that should be applied to the pixel. That is,
+     * the final pixel color is defined by the equation:
+     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+     * This means that a value of 1.0 corresponds to a solid color, whereas
+     * a value of 0.0 corresponds to a completely transparent color. This
+     * uses a wrapper message rather than a simple float scalar so that it is
+     * possible to distinguish between a default value and the value being unset.
+     * If omitted, this color object is to be rendered as a solid color
+     * (as if the alpha value had been explicitly given with a value of 1.0).
+     * 
+ */ + public com.google.protobuf.FloatValue getAlpha() { + if (alphaBuilder_ == null) { + return alpha_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : alpha_; + } else { + return alphaBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+     * The fraction of this color that should be applied to the pixel. That is,
+     * the final pixel color is defined by the equation:
+     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+     * This means that a value of 1.0 corresponds to a solid color, whereas
+     * a value of 0.0 corresponds to a completely transparent color. This
+     * uses a wrapper message rather than a simple float scalar so that it is
+     * possible to distinguish between a default value and the value being unset.
+     * If omitted, this color object is to be rendered as a solid color
+     * (as if the alpha value had been explicitly given with a value of 1.0).
+     * 
+ */ + public Builder setAlpha(com.google.protobuf.FloatValue value) { + if (alphaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + alpha_ = value; + onChanged(); + } else { + alphaBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+     * The fraction of this color that should be applied to the pixel. That is,
+     * the final pixel color is defined by the equation:
+     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+     * This means that a value of 1.0 corresponds to a solid color, whereas
+     * a value of 0.0 corresponds to a completely transparent color. This
+     * uses a wrapper message rather than a simple float scalar so that it is
+     * possible to distinguish between a default value and the value being unset.
+     * If omitted, this color object is to be rendered as a solid color
+     * (as if the alpha value had been explicitly given with a value of 1.0).
+     * 
+ */ + public Builder setAlpha( + com.google.protobuf.FloatValue.Builder builderForValue) { + if (alphaBuilder_ == null) { + alpha_ = builderForValue.build(); + onChanged(); + } else { + alphaBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+     * The fraction of this color that should be applied to the pixel. That is,
+     * the final pixel color is defined by the equation:
+     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+     * This means that a value of 1.0 corresponds to a solid color, whereas
+     * a value of 0.0 corresponds to a completely transparent color. This
+     * uses a wrapper message rather than a simple float scalar so that it is
+     * possible to distinguish between a default value and the value being unset.
+     * If omitted, this color object is to be rendered as a solid color
+     * (as if the alpha value had been explicitly given with a value of 1.0).
+     * 
+ */ + public Builder mergeAlpha(com.google.protobuf.FloatValue value) { + if (alphaBuilder_ == null) { + if (alpha_ != null) { + alpha_ = + com.google.protobuf.FloatValue.newBuilder(alpha_).mergeFrom(value).buildPartial(); + } else { + alpha_ = value; + } + onChanged(); + } else { + alphaBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+     * The fraction of this color that should be applied to the pixel. That is,
+     * the final pixel color is defined by the equation:
+     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+     * This means that a value of 1.0 corresponds to a solid color, whereas
+     * a value of 0.0 corresponds to a completely transparent color. This
+     * uses a wrapper message rather than a simple float scalar so that it is
+     * possible to distinguish between a default value and the value being unset.
+     * If omitted, this color object is to be rendered as a solid color
+     * (as if the alpha value had been explicitly given with a value of 1.0).
+     * 
+ */ + public Builder clearAlpha() { + if (alphaBuilder_ == null) { + alpha_ = null; + onChanged(); + } else { + alpha_ = null; + alphaBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+     * The fraction of this color that should be applied to the pixel. That is,
+     * the final pixel color is defined by the equation:
+     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+     * This means that a value of 1.0 corresponds to a solid color, whereas
+     * a value of 0.0 corresponds to a completely transparent color. This
+     * uses a wrapper message rather than a simple float scalar so that it is
+     * possible to distinguish between a default value and the value being unset.
+     * If omitted, this color object is to be rendered as a solid color
+     * (as if the alpha value had been explicitly given with a value of 1.0).
+     * 
+ */ + public com.google.protobuf.FloatValue.Builder getAlphaBuilder() { + + onChanged(); + return getAlphaFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+     * The fraction of this color that should be applied to the pixel. That is,
+     * the final pixel color is defined by the equation:
+     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+     * This means that a value of 1.0 corresponds to a solid color, whereas
+     * a value of 0.0 corresponds to a completely transparent color. This
+     * uses a wrapper message rather than a simple float scalar so that it is
+     * possible to distinguish between a default value and the value being unset.
+     * If omitted, this color object is to be rendered as a solid color
+     * (as if the alpha value had been explicitly given with a value of 1.0).
+     * 
+ */ + public com.google.protobuf.FloatValueOrBuilder getAlphaOrBuilder() { + if (alphaBuilder_ != null) { + return alphaBuilder_.getMessageOrBuilder(); + } else { + return alpha_ == null ? + com.google.protobuf.FloatValue.getDefaultInstance() : alpha_; + } + } + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+     * The fraction of this color that should be applied to the pixel. That is,
+     * the final pixel color is defined by the equation:
+     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+     * This means that a value of 1.0 corresponds to a solid color, whereas
+     * a value of 0.0 corresponds to a completely transparent color. This
+     * uses a wrapper message rather than a simple float scalar so that it is
+     * possible to distinguish between a default value and the value being unset.
+     * If omitted, this color object is to be rendered as a solid color
+     * (as if the alpha value had been explicitly given with a value of 1.0).
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> + getAlphaFieldBuilder() { + if (alphaBuilder_ == null) { + alphaBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder>( + getAlpha(), + getParentForChildren(), + isClean()); + alpha_ = null; + } + return alphaBuilder_; + } + 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.type.Color) + } + + // @@protoc_insertion_point(class_scope:google.type.Color) + private static final com.google.type.Color DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.type.Color(); + } + + public static com.google.type.Color getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Color parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Color(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.type.Color getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/ColorOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/type/ColorOrBuilder.java new file mode 100644 index 000000000000..d6c1ea1ed3fd --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/ColorOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/color.proto + +package com.google.type; + +public interface ColorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.type.Color) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float red = 1; + * + *
+   * The amount of red in the color as a value in the interval [0, 1].
+   * 
+ */ + float getRed(); + + /** + * optional float green = 2; + * + *
+   * The amount of green in the color as a value in the interval [0, 1].
+   * 
+ */ + float getGreen(); + + /** + * optional float blue = 3; + * + *
+   * The amount of blue in the color as a value in the interval [0, 1].
+   * 
+ */ + float getBlue(); + + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+   * The fraction of this color that should be applied to the pixel. That is,
+   * the final pixel color is defined by the equation:
+   *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+   * This means that a value of 1.0 corresponds to a solid color, whereas
+   * a value of 0.0 corresponds to a completely transparent color. This
+   * uses a wrapper message rather than a simple float scalar so that it is
+   * possible to distinguish between a default value and the value being unset.
+   * If omitted, this color object is to be rendered as a solid color
+   * (as if the alpha value had been explicitly given with a value of 1.0).
+   * 
+ */ + boolean hasAlpha(); + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+   * The fraction of this color that should be applied to the pixel. That is,
+   * the final pixel color is defined by the equation:
+   *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+   * This means that a value of 1.0 corresponds to a solid color, whereas
+   * a value of 0.0 corresponds to a completely transparent color. This
+   * uses a wrapper message rather than a simple float scalar so that it is
+   * possible to distinguish between a default value and the value being unset.
+   * If omitted, this color object is to be rendered as a solid color
+   * (as if the alpha value had been explicitly given with a value of 1.0).
+   * 
+ */ + com.google.protobuf.FloatValue getAlpha(); + /** + * optional .google.protobuf.FloatValue alpha = 4; + * + *
+   * The fraction of this color that should be applied to the pixel. That is,
+   * the final pixel color is defined by the equation:
+   *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
+   * This means that a value of 1.0 corresponds to a solid color, whereas
+   * a value of 0.0 corresponds to a completely transparent color. This
+   * uses a wrapper message rather than a simple float scalar so that it is
+   * possible to distinguish between a default value and the value being unset.
+   * If omitted, this color object is to be rendered as a solid color
+   * (as if the alpha value had been explicitly given with a value of 1.0).
+   * 
+ */ + com.google.protobuf.FloatValueOrBuilder getAlphaOrBuilder(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/ColorProto.java b/gcloud-java-gax/generated/src/main/java/com/google/type/ColorProto.java new file mode 100644 index 000000000000..7706183802ed --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/ColorProto.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/color.proto + +package com.google.type; + +public final class ColorProto { + private ColorProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_type_Color_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_type_Color_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/type/color.proto\022\013google.type\032\036" + + "google/protobuf/wrappers.proto\"]\n\005Color\022" + + "\013\n\003red\030\001 \001(\002\022\r\n\005green\030\002 \001(\002\022\014\n\004blue\030\003 \001(" + + "\002\022*\n\005alpha\030\004 \001(\0132\033.google.protobuf.Float" + + "ValueB\037\n\017com.google.typeB\nColorProtoP\001b\006" + + "proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.WrappersProto.getDescriptor(), + }, assigner); + internal_static_google_type_Color_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_type_Color_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_type_Color_descriptor, + new java.lang.String[] { "Red", "Green", "Blue", "Alpha", }); + com.google.protobuf.WrappersProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/Date.java b/gcloud-java-gax/generated/src/main/java/com/google/type/Date.java new file mode 100644 index 000000000000..b4a06c47f778 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/Date.java @@ -0,0 +1,593 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/date.proto + +package com.google.type; + +/** + * Protobuf type {@code google.type.Date} + * + *
+ * Represents a whole calendar date, e.g. date of birth. The time of day and
+ * time zone are either specified elsewhere or are not significant. The date
+ * is relative to the Proleptic Gregorian Calendar. The day may be 0 to
+ * represent a year and month where the day is not significant, e.g. credit card
+ * expiration date. The year may be 0 to represent a month and day independent
+ * of year, e.g. anniversary date. Related types are [google.type.TimeOfDay][google.type.TimeOfDay]
+ * and [google.protobuf.Timestamp][google.protobuf.Timestamp].
+ * 
+ */ +public final class Date extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.type.Date) + DateOrBuilder { + // Use Date.newBuilder() to construct. + private Date(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Date() { + year_ = 0; + month_ = 0; + day_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Date( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + year_ = input.readInt32(); + break; + } + case 16: { + + month_ = input.readInt32(); + break; + } + case 24: { + + day_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.type.DateProto.internal_static_google_type_Date_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.DateProto.internal_static_google_type_Date_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.Date.class, com.google.type.Date.Builder.class); + } + + public static final int YEAR_FIELD_NUMBER = 1; + private int year_; + /** + * optional int32 year = 1; + * + *
+   * Year of date. Must be from 1 to 9,999, or 0 if specifying a date without
+   * a year.
+   * 
+ */ + public int getYear() { + return year_; + } + + public static final int MONTH_FIELD_NUMBER = 2; + private int month_; + /** + * optional int32 month = 2; + * + *
+   * Month of year of date. Must be from 1 to 12.
+   * 
+ */ + public int getMonth() { + return month_; + } + + public static final int DAY_FIELD_NUMBER = 3; + private int day_; + /** + * optional int32 day = 3; + * + *
+   * Day of month. Must be from 1 to 31 and valid for the year and month, or 0
+   * if specifying a year/month where the day is not sigificant.
+   * 
+ */ + public int getDay() { + return day_; + } + + 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 (year_ != 0) { + output.writeInt32(1, year_); + } + if (month_ != 0) { + output.writeInt32(2, month_); + } + if (day_ != 0) { + output.writeInt32(3, day_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (year_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, year_); + } + if (month_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, month_); + } + if (day_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, day_); + } + 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.type.Date)) { + return super.equals(obj); + } + com.google.type.Date other = (com.google.type.Date) obj; + + boolean result = true; + result = result && (getYear() + == other.getYear()); + result = result && (getMonth() + == other.getMonth()); + result = result && (getDay() + == other.getDay()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + YEAR_FIELD_NUMBER; + hash = (53 * hash) + getYear(); + hash = (37 * hash) + MONTH_FIELD_NUMBER; + hash = (53 * hash) + getMonth(); + hash = (37 * hash) + DAY_FIELD_NUMBER; + hash = (53 * hash) + getDay(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.type.Date parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.Date 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.type.Date parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.Date parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.type.Date parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.type.Date parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.type.Date parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.type.Date parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.type.Date parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.type.Date 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.type.Date 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.type.Date} + * + *
+   * Represents a whole calendar date, e.g. date of birth. The time of day and
+   * time zone are either specified elsewhere or are not significant. The date
+   * is relative to the Proleptic Gregorian Calendar. The day may be 0 to
+   * represent a year and month where the day is not significant, e.g. credit card
+   * expiration date. The year may be 0 to represent a month and day independent
+   * of year, e.g. anniversary date. Related types are [google.type.TimeOfDay][google.type.TimeOfDay]
+   * and [google.protobuf.Timestamp][google.protobuf.Timestamp].
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.type.Date) + com.google.type.DateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.type.DateProto.internal_static_google_type_Date_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.DateProto.internal_static_google_type_Date_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.Date.class, com.google.type.Date.Builder.class); + } + + // Construct using com.google.type.Date.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + year_ = 0; + + month_ = 0; + + day_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.type.DateProto.internal_static_google_type_Date_descriptor; + } + + public com.google.type.Date getDefaultInstanceForType() { + return com.google.type.Date.getDefaultInstance(); + } + + public com.google.type.Date build() { + com.google.type.Date result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.type.Date buildPartial() { + com.google.type.Date result = new com.google.type.Date(this); + result.year_ = year_; + result.month_ = month_; + result.day_ = day_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.type.Date) { + return mergeFrom((com.google.type.Date)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.type.Date other) { + if (other == com.google.type.Date.getDefaultInstance()) return this; + if (other.getYear() != 0) { + setYear(other.getYear()); + } + if (other.getMonth() != 0) { + setMonth(other.getMonth()); + } + if (other.getDay() != 0) { + setDay(other.getDay()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.type.Date parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.type.Date) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int year_ ; + /** + * optional int32 year = 1; + * + *
+     * Year of date. Must be from 1 to 9,999, or 0 if specifying a date without
+     * a year.
+     * 
+ */ + public int getYear() { + return year_; + } + /** + * optional int32 year = 1; + * + *
+     * Year of date. Must be from 1 to 9,999, or 0 if specifying a date without
+     * a year.
+     * 
+ */ + public Builder setYear(int value) { + + year_ = value; + onChanged(); + return this; + } + /** + * optional int32 year = 1; + * + *
+     * Year of date. Must be from 1 to 9,999, or 0 if specifying a date without
+     * a year.
+     * 
+ */ + public Builder clearYear() { + + year_ = 0; + onChanged(); + return this; + } + + private int month_ ; + /** + * optional int32 month = 2; + * + *
+     * Month of year of date. Must be from 1 to 12.
+     * 
+ */ + public int getMonth() { + return month_; + } + /** + * optional int32 month = 2; + * + *
+     * Month of year of date. Must be from 1 to 12.
+     * 
+ */ + public Builder setMonth(int value) { + + month_ = value; + onChanged(); + return this; + } + /** + * optional int32 month = 2; + * + *
+     * Month of year of date. Must be from 1 to 12.
+     * 
+ */ + public Builder clearMonth() { + + month_ = 0; + onChanged(); + return this; + } + + private int day_ ; + /** + * optional int32 day = 3; + * + *
+     * Day of month. Must be from 1 to 31 and valid for the year and month, or 0
+     * if specifying a year/month where the day is not sigificant.
+     * 
+ */ + public int getDay() { + return day_; + } + /** + * optional int32 day = 3; + * + *
+     * Day of month. Must be from 1 to 31 and valid for the year and month, or 0
+     * if specifying a year/month where the day is not sigificant.
+     * 
+ */ + public Builder setDay(int value) { + + day_ = value; + onChanged(); + return this; + } + /** + * optional int32 day = 3; + * + *
+     * Day of month. Must be from 1 to 31 and valid for the year and month, or 0
+     * if specifying a year/month where the day is not sigificant.
+     * 
+ */ + public Builder clearDay() { + + day_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.type.Date) + } + + // @@protoc_insertion_point(class_scope:google.type.Date) + private static final com.google.type.Date DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.type.Date(); + } + + public static com.google.type.Date getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Date parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Date(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.type.Date getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/DateOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/type/DateOrBuilder.java new file mode 100644 index 000000000000..adf3a03af627 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/DateOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/date.proto + +package com.google.type; + +public interface DateOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.type.Date) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 year = 1; + * + *
+   * Year of date. Must be from 1 to 9,999, or 0 if specifying a date without
+   * a year.
+   * 
+ */ + int getYear(); + + /** + * optional int32 month = 2; + * + *
+   * Month of year of date. Must be from 1 to 12.
+   * 
+ */ + int getMonth(); + + /** + * optional int32 day = 3; + * + *
+   * Day of month. Must be from 1 to 31 and valid for the year and month, or 0
+   * if specifying a year/month where the day is not sigificant.
+   * 
+ */ + int getDay(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/DateProto.java b/gcloud-java-gax/generated/src/main/java/com/google/type/DateProto.java new file mode 100644 index 000000000000..2ddd35383cd5 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/DateProto.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/date.proto + +package com.google.type; + +public final class DateProto { + private DateProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_type_Date_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_type_Date_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/type/date.proto\022\013google.type\"0\n" + + "\004Date\022\014\n\004year\030\001 \001(\005\022\r\n\005month\030\002 \001(\005\022\013\n\003da" + + "y\030\003 \001(\005B!\n\017com.google.typeB\tDateProtoP\001\240" + + "\001\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_type_Date_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_type_Date_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_type_Date_descriptor, + new java.lang.String[] { "Year", "Month", "Day", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeek.java b/gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeek.java new file mode 100644 index 000000000000..06df59326e8c --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeek.java @@ -0,0 +1,220 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/dayofweek.proto + +package com.google.type; + +/** + * Protobuf enum {@code google.type.DayOfWeek} + * + *
+ * Represents a day of week.
+ * 
+ */ +public enum DayOfWeek + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DAY_OF_WEEK_UNSPECIFIED = 0; + * + *
+   * The unspecified day-of-week.
+   * 
+ */ + DAY_OF_WEEK_UNSPECIFIED(0, 0), + /** + * MONDAY = 1; + * + *
+   * The day-of-week of Monday.
+   * 
+ */ + MONDAY(1, 1), + /** + * TUESDAY = 2; + * + *
+   * The day-of-week of Tuesday.
+   * 
+ */ + TUESDAY(2, 2), + /** + * WEDNESDAY = 3; + * + *
+   * The day-of-week of Wednesday.
+   * 
+ */ + WEDNESDAY(3, 3), + /** + * THURSDAY = 4; + * + *
+   * The day-of-week of Thursday.
+   * 
+ */ + THURSDAY(4, 4), + /** + * FRIDAY = 5; + * + *
+   * The day-of-week of Friday.
+   * 
+ */ + FRIDAY(5, 5), + /** + * SATURDAY = 6; + * + *
+   * The day-of-week of Saturday.
+   * 
+ */ + SATURDAY(6, 6), + /** + * SUNDAY = 7; + * + *
+   * The day-of-week of Sunday.
+   * 
+ */ + SUNDAY(7, 7), + UNRECOGNIZED(-1, -1), + ; + + /** + * DAY_OF_WEEK_UNSPECIFIED = 0; + * + *
+   * The unspecified day-of-week.
+   * 
+ */ + public static final int DAY_OF_WEEK_UNSPECIFIED_VALUE = 0; + /** + * MONDAY = 1; + * + *
+   * The day-of-week of Monday.
+   * 
+ */ + public static final int MONDAY_VALUE = 1; + /** + * TUESDAY = 2; + * + *
+   * The day-of-week of Tuesday.
+   * 
+ */ + public static final int TUESDAY_VALUE = 2; + /** + * WEDNESDAY = 3; + * + *
+   * The day-of-week of Wednesday.
+   * 
+ */ + public static final int WEDNESDAY_VALUE = 3; + /** + * THURSDAY = 4; + * + *
+   * The day-of-week of Thursday.
+   * 
+ */ + public static final int THURSDAY_VALUE = 4; + /** + * FRIDAY = 5; + * + *
+   * The day-of-week of Friday.
+   * 
+ */ + public static final int FRIDAY_VALUE = 5; + /** + * SATURDAY = 6; + * + *
+   * The day-of-week of Saturday.
+   * 
+ */ + public static final int SATURDAY_VALUE = 6; + /** + * SUNDAY = 7; + * + *
+   * The day-of-week of Sunday.
+   * 
+ */ + public static final int SUNDAY_VALUE = 7; + + + 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 DayOfWeek valueOf(int value) { + switch (value) { + case 0: return DAY_OF_WEEK_UNSPECIFIED; + case 1: return MONDAY; + case 2: return TUESDAY; + case 3: return WEDNESDAY; + case 4: return THURSDAY; + case 5: return FRIDAY; + case 6: return SATURDAY; + case 7: return SUNDAY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DayOfWeek> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DayOfWeek findValueByNumber(int number) { + return DayOfWeek.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.type.DayOfWeekProto.getDescriptor() + .getEnumTypes().get(0); + } + + private static final DayOfWeek[] VALUES = values(); + + public static DayOfWeek valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private DayOfWeek(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.type.DayOfWeek) +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeekProto.java b/gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeekProto.java new file mode 100644 index 000000000000..8fc4a373d4c7 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeekProto.java @@ -0,0 +1,42 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/dayofweek.proto + +package com.google.type; + +public final class DayOfWeekProto { + private DayOfWeekProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033google/type/dayofweek.proto\022\013google.ty" + + "pe*\204\001\n\tDayOfWeek\022\033\n\027DAY_OF_WEEK_UNSPECIF" + + "IED\020\000\022\n\n\006MONDAY\020\001\022\013\n\007TUESDAY\020\002\022\r\n\tWEDNES" + + "DAY\020\003\022\014\n\010THURSDAY\020\004\022\n\n\006FRIDAY\020\005\022\014\n\010SATUR" + + "DAY\020\006\022\n\n\006SUNDAY\020\007B&\n\017com.google.typeB\016Da" + + "yOfWeekProtoP\001\240\001\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); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/LatLng.java b/gcloud-java-gax/generated/src/main/java/com/google/type/LatLng.java new file mode 100644 index 000000000000..a01d4f50b3db --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/LatLng.java @@ -0,0 +1,513 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/latlng.proto + +package com.google.type; + +/** + * Protobuf type {@code google.type.LatLng} + * + *
+ * An object representing a latitude/longitude pair. This is expressed as a pair
+ * of doubles representing degrees latitude and degrees longitude. Unless
+ * specified otherwise, this must conform to the
+ * <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
+ * standard</a>. Values must be within normalized ranges.
+ * 
+ */ +public final class LatLng extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.type.LatLng) + LatLngOrBuilder { + // Use LatLng.newBuilder() to construct. + private LatLng(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LatLng() { + latitude_ = 0D; + longitude_ = 0D; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private LatLng( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 9: { + + latitude_ = input.readDouble(); + break; + } + case 17: { + + longitude_ = input.readDouble(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.type.LatLngProto.internal_static_google_type_LatLng_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.LatLngProto.internal_static_google_type_LatLng_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.LatLng.class, com.google.type.LatLng.Builder.class); + } + + public static final int LATITUDE_FIELD_NUMBER = 1; + private double latitude_; + /** + * optional double latitude = 1; + * + *
+   * The latitude in degrees. It must be in the range [-90.0, +90.0].
+   * 
+ */ + public double getLatitude() { + return latitude_; + } + + public static final int LONGITUDE_FIELD_NUMBER = 2; + private double longitude_; + /** + * optional double longitude = 2; + * + *
+   * The longitude in degrees. It must be in the range [-180.0, +180.0].
+   * 
+ */ + public double getLongitude() { + return longitude_; + } + + 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 (latitude_ != 0D) { + output.writeDouble(1, latitude_); + } + if (longitude_ != 0D) { + output.writeDouble(2, longitude_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (latitude_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, latitude_); + } + if (longitude_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, longitude_); + } + 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.type.LatLng)) { + return super.equals(obj); + } + com.google.type.LatLng other = (com.google.type.LatLng) obj; + + boolean result = true; + result = result && ( + java.lang.Double.doubleToLongBits(getLatitude()) + == java.lang.Double.doubleToLongBits( + other.getLatitude())); + result = result && ( + java.lang.Double.doubleToLongBits(getLongitude()) + == java.lang.Double.doubleToLongBits( + other.getLongitude())); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + LATITUDE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLatitude())); + hash = (37 * hash) + LONGITUDE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLongitude())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.type.LatLng parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.LatLng 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.type.LatLng parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.LatLng parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.type.LatLng parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.type.LatLng parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.type.LatLng parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.type.LatLng parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.type.LatLng parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.type.LatLng 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.type.LatLng 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.type.LatLng} + * + *
+   * An object representing a latitude/longitude pair. This is expressed as a pair
+   * of doubles representing degrees latitude and degrees longitude. Unless
+   * specified otherwise, this must conform to the
+   * <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
+   * standard</a>. Values must be within normalized ranges.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.type.LatLng) + com.google.type.LatLngOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.type.LatLngProto.internal_static_google_type_LatLng_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.LatLngProto.internal_static_google_type_LatLng_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.LatLng.class, com.google.type.LatLng.Builder.class); + } + + // Construct using com.google.type.LatLng.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + latitude_ = 0D; + + longitude_ = 0D; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.type.LatLngProto.internal_static_google_type_LatLng_descriptor; + } + + public com.google.type.LatLng getDefaultInstanceForType() { + return com.google.type.LatLng.getDefaultInstance(); + } + + public com.google.type.LatLng build() { + com.google.type.LatLng result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.type.LatLng buildPartial() { + com.google.type.LatLng result = new com.google.type.LatLng(this); + result.latitude_ = latitude_; + result.longitude_ = longitude_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.type.LatLng) { + return mergeFrom((com.google.type.LatLng)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.type.LatLng other) { + if (other == com.google.type.LatLng.getDefaultInstance()) return this; + if (other.getLatitude() != 0D) { + setLatitude(other.getLatitude()); + } + if (other.getLongitude() != 0D) { + setLongitude(other.getLongitude()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.type.LatLng parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.type.LatLng) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double latitude_ ; + /** + * optional double latitude = 1; + * + *
+     * The latitude in degrees. It must be in the range [-90.0, +90.0].
+     * 
+ */ + public double getLatitude() { + return latitude_; + } + /** + * optional double latitude = 1; + * + *
+     * The latitude in degrees. It must be in the range [-90.0, +90.0].
+     * 
+ */ + public Builder setLatitude(double value) { + + latitude_ = value; + onChanged(); + return this; + } + /** + * optional double latitude = 1; + * + *
+     * The latitude in degrees. It must be in the range [-90.0, +90.0].
+     * 
+ */ + public Builder clearLatitude() { + + latitude_ = 0D; + onChanged(); + return this; + } + + private double longitude_ ; + /** + * optional double longitude = 2; + * + *
+     * The longitude in degrees. It must be in the range [-180.0, +180.0].
+     * 
+ */ + public double getLongitude() { + return longitude_; + } + /** + * optional double longitude = 2; + * + *
+     * The longitude in degrees. It must be in the range [-180.0, +180.0].
+     * 
+ */ + public Builder setLongitude(double value) { + + longitude_ = value; + onChanged(); + return this; + } + /** + * optional double longitude = 2; + * + *
+     * The longitude in degrees. It must be in the range [-180.0, +180.0].
+     * 
+ */ + public Builder clearLongitude() { + + longitude_ = 0D; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.type.LatLng) + } + + // @@protoc_insertion_point(class_scope:google.type.LatLng) + private static final com.google.type.LatLng DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.type.LatLng(); + } + + public static com.google.type.LatLng getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public LatLng parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new LatLng(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.type.LatLng getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/LatLngOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/type/LatLngOrBuilder.java new file mode 100644 index 000000000000..a068aedf045d --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/LatLngOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/latlng.proto + +package com.google.type; + +public interface LatLngOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.type.LatLng) + com.google.protobuf.MessageOrBuilder { + + /** + * optional double latitude = 1; + * + *
+   * The latitude in degrees. It must be in the range [-90.0, +90.0].
+   * 
+ */ + double getLatitude(); + + /** + * optional double longitude = 2; + * + *
+   * The longitude in degrees. It must be in the range [-180.0, +180.0].
+   * 
+ */ + double getLongitude(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/LatLngProto.java b/gcloud-java-gax/generated/src/main/java/com/google/type/LatLngProto.java new file mode 100644 index 000000000000..35b63fce9cda --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/LatLngProto.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/latlng.proto + +package com.google.type; + +public final class LatLngProto { + private LatLngProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_type_LatLng_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_type_LatLng_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/type/latlng.proto\022\013google.type\"" + + "-\n\006LatLng\022\020\n\010latitude\030\001 \001(\001\022\021\n\tlongitude" + + "\030\002 \001(\001B#\n\017com.google.typeB\013LatLngProtoP\001" + + "\240\001\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_type_LatLng_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_type_LatLng_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_type_LatLng_descriptor, + new java.lang.String[] { "Latitude", "Longitude", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/Money.java b/gcloud-java-gax/generated/src/main/java/com/google/type/Money.java new file mode 100644 index 000000000000..18025d34fe87 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/Money.java @@ -0,0 +1,640 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/money.proto + +package com.google.type; + +/** + * Protobuf type {@code google.type.Money} + * + *
+ * Represents an amount of money with its currency type.
+ * 
+ */ +public final class Money extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.type.Money) + MoneyOrBuilder { + // Use Money.newBuilder() to construct. + private Money(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Money() { + currencyCode_ = ""; + units_ = 0L; + nanos_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Money( + 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(); + + currencyCode_ = s; + break; + } + case 16: { + + units_ = input.readInt64(); + break; + } + case 24: { + + nanos_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.type.MoneyProto.internal_static_google_type_Money_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.MoneyProto.internal_static_google_type_Money_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.Money.class, com.google.type.Money.Builder.class); + } + + public static final int CURRENCY_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object currencyCode_; + /** + * optional string currency_code = 1; + * + *
+   * The 3-letter currency code defined in ISO 4217.
+   * 
+ */ + public java.lang.String getCurrencyCode() { + java.lang.Object ref = currencyCode_; + 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(); + currencyCode_ = s; + return s; + } + } + /** + * optional string currency_code = 1; + * + *
+   * The 3-letter currency code defined in ISO 4217.
+   * 
+ */ + public com.google.protobuf.ByteString + getCurrencyCodeBytes() { + java.lang.Object ref = currencyCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + currencyCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNITS_FIELD_NUMBER = 2; + private long units_; + /** + * optional int64 units = 2; + * + *
+   * The whole units of the amount.
+   * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+   * 
+ */ + public long getUnits() { + return units_; + } + + public static final int NANOS_FIELD_NUMBER = 3; + private int nanos_; + /** + * optional int32 nanos = 3; + * + *
+   * Number of nano (10^-9) units of the amount.
+   * The value must be between -999,999,999 and +999,999,999 inclusive.
+   * If `units` is positive, `nanos` must be positive or zero.
+   * If `units` is zero, `nanos` can be positive, zero, or negative.
+   * If `units` is negative, `nanos` must be negative or zero.
+   * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+   * 
+ */ + public int getNanos() { + return nanos_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getCurrencyCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, currencyCode_); + } + if (units_ != 0L) { + output.writeInt64(2, units_); + } + if (nanos_ != 0) { + output.writeInt32(3, nanos_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCurrencyCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, currencyCode_); + } + if (units_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, units_); + } + if (nanos_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, nanos_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.type.Money parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.Money 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.type.Money parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.Money parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.type.Money parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.type.Money parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.type.Money parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.type.Money parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.type.Money parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.type.Money 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.type.Money 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.type.Money} + * + *
+   * Represents an amount of money with its currency type.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.type.Money) + com.google.type.MoneyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.type.MoneyProto.internal_static_google_type_Money_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.MoneyProto.internal_static_google_type_Money_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.Money.class, com.google.type.Money.Builder.class); + } + + // Construct using com.google.type.Money.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + currencyCode_ = ""; + + units_ = 0L; + + nanos_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.type.MoneyProto.internal_static_google_type_Money_descriptor; + } + + public com.google.type.Money getDefaultInstanceForType() { + return com.google.type.Money.getDefaultInstance(); + } + + public com.google.type.Money build() { + com.google.type.Money result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.type.Money buildPartial() { + com.google.type.Money result = new com.google.type.Money(this); + result.currencyCode_ = currencyCode_; + result.units_ = units_; + result.nanos_ = nanos_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.type.Money) { + return mergeFrom((com.google.type.Money)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.type.Money other) { + if (other == com.google.type.Money.getDefaultInstance()) return this; + if (!other.getCurrencyCode().isEmpty()) { + currencyCode_ = other.currencyCode_; + onChanged(); + } + if (other.getUnits() != 0L) { + setUnits(other.getUnits()); + } + if (other.getNanos() != 0) { + setNanos(other.getNanos()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.type.Money parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.type.Money) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object currencyCode_ = ""; + /** + * optional string currency_code = 1; + * + *
+     * The 3-letter currency code defined in ISO 4217.
+     * 
+ */ + public java.lang.String getCurrencyCode() { + java.lang.Object ref = currencyCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currencyCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string currency_code = 1; + * + *
+     * The 3-letter currency code defined in ISO 4217.
+     * 
+ */ + public com.google.protobuf.ByteString + getCurrencyCodeBytes() { + java.lang.Object ref = currencyCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + currencyCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string currency_code = 1; + * + *
+     * The 3-letter currency code defined in ISO 4217.
+     * 
+ */ + public Builder setCurrencyCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + currencyCode_ = value; + onChanged(); + return this; + } + /** + * optional string currency_code = 1; + * + *
+     * The 3-letter currency code defined in ISO 4217.
+     * 
+ */ + public Builder clearCurrencyCode() { + + currencyCode_ = getDefaultInstance().getCurrencyCode(); + onChanged(); + return this; + } + /** + * optional string currency_code = 1; + * + *
+     * The 3-letter currency code defined in ISO 4217.
+     * 
+ */ + public Builder setCurrencyCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + currencyCode_ = value; + onChanged(); + return this; + } + + private long units_ ; + /** + * optional int64 units = 2; + * + *
+     * The whole units of the amount.
+     * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+     * 
+ */ + public long getUnits() { + return units_; + } + /** + * optional int64 units = 2; + * + *
+     * The whole units of the amount.
+     * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+     * 
+ */ + public Builder setUnits(long value) { + + units_ = value; + onChanged(); + return this; + } + /** + * optional int64 units = 2; + * + *
+     * The whole units of the amount.
+     * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+     * 
+ */ + public Builder clearUnits() { + + units_ = 0L; + onChanged(); + return this; + } + + private int nanos_ ; + /** + * optional int32 nanos = 3; + * + *
+     * Number of nano (10^-9) units of the amount.
+     * The value must be between -999,999,999 and +999,999,999 inclusive.
+     * If `units` is positive, `nanos` must be positive or zero.
+     * If `units` is zero, `nanos` can be positive, zero, or negative.
+     * If `units` is negative, `nanos` must be negative or zero.
+     * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+     * 
+ */ + public int getNanos() { + return nanos_; + } + /** + * optional int32 nanos = 3; + * + *
+     * Number of nano (10^-9) units of the amount.
+     * The value must be between -999,999,999 and +999,999,999 inclusive.
+     * If `units` is positive, `nanos` must be positive or zero.
+     * If `units` is zero, `nanos` can be positive, zero, or negative.
+     * If `units` is negative, `nanos` must be negative or zero.
+     * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+     * 
+ */ + public Builder setNanos(int value) { + + nanos_ = value; + onChanged(); + return this; + } + /** + * optional int32 nanos = 3; + * + *
+     * Number of nano (10^-9) units of the amount.
+     * The value must be between -999,999,999 and +999,999,999 inclusive.
+     * If `units` is positive, `nanos` must be positive or zero.
+     * If `units` is zero, `nanos` can be positive, zero, or negative.
+     * If `units` is negative, `nanos` must be negative or zero.
+     * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+     * 
+ */ + public Builder clearNanos() { + + nanos_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.type.Money) + } + + // @@protoc_insertion_point(class_scope:google.type.Money) + private static final com.google.type.Money DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.type.Money(); + } + + public static com.google.type.Money getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Money parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Money(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.type.Money getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/MoneyOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/type/MoneyOrBuilder.java new file mode 100644 index 000000000000..88567eecfba8 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/MoneyOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/money.proto + +package com.google.type; + +public interface MoneyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.type.Money) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string currency_code = 1; + * + *
+   * The 3-letter currency code defined in ISO 4217.
+   * 
+ */ + java.lang.String getCurrencyCode(); + /** + * optional string currency_code = 1; + * + *
+   * The 3-letter currency code defined in ISO 4217.
+   * 
+ */ + com.google.protobuf.ByteString + getCurrencyCodeBytes(); + + /** + * optional int64 units = 2; + * + *
+   * The whole units of the amount.
+   * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+   * 
+ */ + long getUnits(); + + /** + * optional int32 nanos = 3; + * + *
+   * Number of nano (10^-9) units of the amount.
+   * The value must be between -999,999,999 and +999,999,999 inclusive.
+   * If `units` is positive, `nanos` must be positive or zero.
+   * If `units` is zero, `nanos` can be positive, zero, or negative.
+   * If `units` is negative, `nanos` must be negative or zero.
+   * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+   * 
+ */ + int getNanos(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/MoneyProto.java b/gcloud-java-gax/generated/src/main/java/com/google/type/MoneyProto.java new file mode 100644 index 000000000000..4c5f0abec619 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/MoneyProto.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/money.proto + +package com.google.type; + +public final class MoneyProto { + private MoneyProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_type_Money_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_type_Money_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/type/money.proto\022\013google.type\"<" + + "\n\005Money\022\025\n\rcurrency_code\030\001 \001(\t\022\r\n\005units\030" + + "\002 \001(\003\022\r\n\005nanos\030\003 \001(\005B\037\n\017com.google.typeB" + + "\nMoneyProtoP\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_type_Money_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_type_Money_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_type_Money_descriptor, + new java.lang.String[] { "CurrencyCode", "Units", "Nanos", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDay.java b/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDay.java new file mode 100644 index 000000000000..494356df0c58 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDay.java @@ -0,0 +1,659 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/timeofday.proto + +package com.google.type; + +/** + * Protobuf type {@code google.type.TimeOfDay} + * + *
+ * Represents a time of day. The date and time zone are either not significant
+ * or are specified elsewhere. An API may chose to allow leap seconds. Related
+ * types are [google.type.Date][google.type.Date] and [google.protobuf.Timestamp][google.protobuf.Timestamp].
+ * 
+ */ +public final class TimeOfDay extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.type.TimeOfDay) + TimeOfDayOrBuilder { + // Use TimeOfDay.newBuilder() to construct. + private TimeOfDay(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TimeOfDay() { + hours_ = 0; + minutes_ = 0; + seconds_ = 0; + nanos_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private TimeOfDay( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + hours_ = input.readInt32(); + break; + } + case 16: { + + minutes_ = input.readInt32(); + break; + } + case 24: { + + seconds_ = input.readInt32(); + break; + } + case 32: { + + nanos_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.type.TimeOfDayProto.internal_static_google_type_TimeOfDay_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.TimeOfDayProto.internal_static_google_type_TimeOfDay_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.TimeOfDay.class, com.google.type.TimeOfDay.Builder.class); + } + + public static final int HOURS_FIELD_NUMBER = 1; + private int hours_; + /** + * optional int32 hours = 1; + * + *
+   * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
+   * to allow the value "24:00:00" for scenarios like business closing time.
+   * 
+ */ + public int getHours() { + return hours_; + } + + public static final int MINUTES_FIELD_NUMBER = 2; + private int minutes_; + /** + * optional int32 minutes = 2; + * + *
+   * Minutes of hour of day. Must be from 0 to 59.
+   * 
+ */ + public int getMinutes() { + return minutes_; + } + + public static final int SECONDS_FIELD_NUMBER = 3; + private int seconds_; + /** + * optional int32 seconds = 3; + * + *
+   * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
+   * allow the value 60 if it allows leap-seconds.
+   * 
+ */ + public int getSeconds() { + return seconds_; + } + + public static final int NANOS_FIELD_NUMBER = 4; + private int nanos_; + /** + * optional int32 nanos = 4; + * + *
+   * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
+   * 
+ */ + public int getNanos() { + return nanos_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (hours_ != 0) { + output.writeInt32(1, hours_); + } + if (minutes_ != 0) { + output.writeInt32(2, minutes_); + } + if (seconds_ != 0) { + output.writeInt32(3, seconds_); + } + if (nanos_ != 0) { + output.writeInt32(4, nanos_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (hours_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, hours_); + } + if (minutes_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, minutes_); + } + if (seconds_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, seconds_); + } + if (nanos_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, nanos_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.type.TimeOfDay)) { + return super.equals(obj); + } + com.google.type.TimeOfDay other = (com.google.type.TimeOfDay) obj; + + boolean result = true; + result = result && (getHours() + == other.getHours()); + result = result && (getMinutes() + == other.getMinutes()); + result = result && (getSeconds() + == other.getSeconds()); + result = result && (getNanos() + == other.getNanos()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + HOURS_FIELD_NUMBER; + hash = (53 * hash) + getHours(); + hash = (37 * hash) + MINUTES_FIELD_NUMBER; + hash = (53 * hash) + getMinutes(); + hash = (37 * hash) + SECONDS_FIELD_NUMBER; + hash = (53 * hash) + getSeconds(); + hash = (37 * hash) + NANOS_FIELD_NUMBER; + hash = (53 * hash) + getNanos(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.type.TimeOfDay parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.TimeOfDay 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.type.TimeOfDay parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.TimeOfDay parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.type.TimeOfDay parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.type.TimeOfDay parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.type.TimeOfDay parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.type.TimeOfDay parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.type.TimeOfDay parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.type.TimeOfDay 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.type.TimeOfDay 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.type.TimeOfDay} + * + *
+   * Represents a time of day. The date and time zone are either not significant
+   * or are specified elsewhere. An API may chose to allow leap seconds. Related
+   * types are [google.type.Date][google.type.Date] and [google.protobuf.Timestamp][google.protobuf.Timestamp].
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.type.TimeOfDay) + com.google.type.TimeOfDayOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.type.TimeOfDayProto.internal_static_google_type_TimeOfDay_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.TimeOfDayProto.internal_static_google_type_TimeOfDay_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.TimeOfDay.class, com.google.type.TimeOfDay.Builder.class); + } + + // Construct using com.google.type.TimeOfDay.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + hours_ = 0; + + minutes_ = 0; + + seconds_ = 0; + + nanos_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.type.TimeOfDayProto.internal_static_google_type_TimeOfDay_descriptor; + } + + public com.google.type.TimeOfDay getDefaultInstanceForType() { + return com.google.type.TimeOfDay.getDefaultInstance(); + } + + public com.google.type.TimeOfDay build() { + com.google.type.TimeOfDay result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.type.TimeOfDay buildPartial() { + com.google.type.TimeOfDay result = new com.google.type.TimeOfDay(this); + result.hours_ = hours_; + result.minutes_ = minutes_; + result.seconds_ = seconds_; + result.nanos_ = nanos_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.type.TimeOfDay) { + return mergeFrom((com.google.type.TimeOfDay)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.type.TimeOfDay other) { + if (other == com.google.type.TimeOfDay.getDefaultInstance()) return this; + if (other.getHours() != 0) { + setHours(other.getHours()); + } + if (other.getMinutes() != 0) { + setMinutes(other.getMinutes()); + } + if (other.getSeconds() != 0) { + setSeconds(other.getSeconds()); + } + if (other.getNanos() != 0) { + setNanos(other.getNanos()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.type.TimeOfDay parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.type.TimeOfDay) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int hours_ ; + /** + * optional int32 hours = 1; + * + *
+     * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
+     * to allow the value "24:00:00" for scenarios like business closing time.
+     * 
+ */ + public int getHours() { + return hours_; + } + /** + * optional int32 hours = 1; + * + *
+     * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
+     * to allow the value "24:00:00" for scenarios like business closing time.
+     * 
+ */ + public Builder setHours(int value) { + + hours_ = value; + onChanged(); + return this; + } + /** + * optional int32 hours = 1; + * + *
+     * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
+     * to allow the value "24:00:00" for scenarios like business closing time.
+     * 
+ */ + public Builder clearHours() { + + hours_ = 0; + onChanged(); + return this; + } + + private int minutes_ ; + /** + * optional int32 minutes = 2; + * + *
+     * Minutes of hour of day. Must be from 0 to 59.
+     * 
+ */ + public int getMinutes() { + return minutes_; + } + /** + * optional int32 minutes = 2; + * + *
+     * Minutes of hour of day. Must be from 0 to 59.
+     * 
+ */ + public Builder setMinutes(int value) { + + minutes_ = value; + onChanged(); + return this; + } + /** + * optional int32 minutes = 2; + * + *
+     * Minutes of hour of day. Must be from 0 to 59.
+     * 
+ */ + public Builder clearMinutes() { + + minutes_ = 0; + onChanged(); + return this; + } + + private int seconds_ ; + /** + * optional int32 seconds = 3; + * + *
+     * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
+     * allow the value 60 if it allows leap-seconds.
+     * 
+ */ + public int getSeconds() { + return seconds_; + } + /** + * optional int32 seconds = 3; + * + *
+     * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
+     * allow the value 60 if it allows leap-seconds.
+     * 
+ */ + public Builder setSeconds(int value) { + + seconds_ = value; + onChanged(); + return this; + } + /** + * optional int32 seconds = 3; + * + *
+     * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
+     * allow the value 60 if it allows leap-seconds.
+     * 
+ */ + public Builder clearSeconds() { + + seconds_ = 0; + onChanged(); + return this; + } + + private int nanos_ ; + /** + * optional int32 nanos = 4; + * + *
+     * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
+     * 
+ */ + public int getNanos() { + return nanos_; + } + /** + * optional int32 nanos = 4; + * + *
+     * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
+     * 
+ */ + public Builder setNanos(int value) { + + nanos_ = value; + onChanged(); + return this; + } + /** + * optional int32 nanos = 4; + * + *
+     * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
+     * 
+ */ + public Builder clearNanos() { + + nanos_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.type.TimeOfDay) + } + + // @@protoc_insertion_point(class_scope:google.type.TimeOfDay) + private static final com.google.type.TimeOfDay DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.type.TimeOfDay(); + } + + public static com.google.type.TimeOfDay getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public TimeOfDay parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new TimeOfDay(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.type.TimeOfDay getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayOrBuilder.java new file mode 100644 index 000000000000..d1eda79b5fb0 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayOrBuilder.java @@ -0,0 +1,47 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/timeofday.proto + +package com.google.type; + +public interface TimeOfDayOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.type.TimeOfDay) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 hours = 1; + * + *
+   * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
+   * to allow the value "24:00:00" for scenarios like business closing time.
+   * 
+ */ + int getHours(); + + /** + * optional int32 minutes = 2; + * + *
+   * Minutes of hour of day. Must be from 0 to 59.
+   * 
+ */ + int getMinutes(); + + /** + * optional int32 seconds = 3; + * + *
+   * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
+   * allow the value 60 if it allows leap-seconds.
+   * 
+ */ + int getSeconds(); + + /** + * optional int32 nanos = 4; + * + *
+   * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
+   * 
+ */ + int getNanos(); +} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayProto.java b/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayProto.java new file mode 100644 index 000000000000..e995fee5b778 --- /dev/null +++ b/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayProto.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/timeofday.proto + +package com.google.type; + +public final class TimeOfDayProto { + private TimeOfDayProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_type_TimeOfDay_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_type_TimeOfDay_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/type/timeofday.proto\022\013google.ty" + + "pe\"K\n\tTimeOfDay\022\r\n\005hours\030\001 \001(\005\022\017\n\007minute" + + "s\030\002 \001(\005\022\017\n\007seconds\030\003 \001(\005\022\r\n\005nanos\030\004 \001(\005B" + + "&\n\017com.google.typeB\016TimeOfDayProtoP\001\240\001\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_type_TimeOfDay_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_type_TimeOfDay_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_type_TimeOfDay_descriptor, + new java.lang.String[] { "Hours", "Minutes", "Seconds", "Nanos", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/pom.xml b/gcloud-java-gax/pom.xml new file mode 100644 index 000000000000..d170baf4b9b7 --- /dev/null +++ b/gcloud-java-gax/pom.xml @@ -0,0 +1,82 @@ + + + 4.0.0 + com.google.gcloud + gcloud-java-gax + jar + GCloud Api Extensions + + GCloud Api Extensions + + + com.google.gcloud + gcloud-java-pom + 0.0.7-SNAPSHOT + + + + io.grpc + grpc-all + 0.9.0 + + + com.google.auto.value + auto-value + 1.1 + + + junit + junit + 4.12 + test + + + org.mockito + mockito-core + 1.10.19 + test + + + com.google.truth + truth + 0.27 + test + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.9.1 + + + generate-sources + add-source + + + src/generated/main + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.2 + + + attach-javadocs + + jar + + + -Xdoclint:none + + + + + + + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/AnnotationsProto.java b/gcloud-java-gax/src/generated/main/java/com/google/api/AnnotationsProto.java new file mode 100644 index 000000000000..0281d9ddd73b --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/AnnotationsProto.java @@ -0,0 +1,222 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/annotations.proto + +package com.google.api; + +public final class AnnotationsProto { + private AnnotationsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registry.add(com.google.api.AnnotationsProto.fileVisibility); + registry.add(com.google.api.AnnotationsProto.apiVisibility); + registry.add(com.google.api.AnnotationsProto.methodVisibility); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.AnnotationsProto.messageVisibility); + registry.add(com.google.api.AnnotationsProto.customError); + registry.add(com.google.api.AnnotationsProto.fieldVisibility); + registry.add(com.google.api.AnnotationsProto.enumVisibility); + registry.add(com.google.api.AnnotationsProto.valueVisibility); + } + public static final int FILE_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.FileOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + com.google.api.VisibilityRule> fileVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + public static final int API_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.ServiceOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.ServiceOptions, + com.google.api.VisibilityRule> apiVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + public static final int METHOD_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.MethodOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MethodOptions, + com.google.api.VisibilityRule> methodVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + public static final int HTTP_FIELD_NUMBER = 72295728; + /** + * extend .google.protobuf.MethodOptions { ... } + * + *
+   * See `HttpRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MethodOptions, + com.google.api.HttpRule> http = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.HttpRule.class, + com.google.api.HttpRule.getDefaultInstance()); + public static final int MESSAGE_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.MessageOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + com.google.api.VisibilityRule> messageVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + public static final int CUSTOM_ERROR_FIELD_NUMBER = 79365461; + /** + * extend .google.protobuf.MessageOptions { ... } + * + *
+   * See `CustomErrorRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + com.google.api.CustomErrorRule> customError = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.CustomErrorRule.class, + com.google.api.CustomErrorRule.getDefaultInstance()); + public static final int FIELD_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.FieldOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + com.google.api.VisibilityRule> fieldVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + public static final int ENUM_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.EnumOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.EnumOptions, + com.google.api.VisibilityRule> enumVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + public static final int VALUE_VISIBILITY_FIELD_NUMBER = 72295727; + /** + * extend .google.protobuf.EnumValueOptions { ... } + * + *
+   * See `VisibilityRule`.
+   * 
+ */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.EnumValueOptions, + com.google.api.VisibilityRule> valueVisibility = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.VisibilityRule.class, + com.google.api.VisibilityRule.getDefaultInstance()); + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034google/api/annotations.proto\022\ngoogle.a" + + "pi\032 google/protobuf/descriptor.proto\032\026go" + + "ogle/api/error.proto\032\025google/api/http.pr" + + "oto\032\033google/api/visibility.proto:T\n\017file" + + "_visibility\022\034.google.protobuf.FileOption" + + "s\030\257\312\274\" \001(\0132\032.google.api.VisibilityRule:V" + + "\n\016api_visibility\022\037.google.protobuf.Servi" + + "ceOptions\030\257\312\274\" \001(\0132\032.google.api.Visibili" + + "tyRule:X\n\021method_visibility\022\036.google.pro" + + "tobuf.MethodOptions\030\257\312\274\" \001(\0132\032.google.ap", + "i.VisibilityRule:E\n\004http\022\036.google.protob" + + "uf.MethodOptions\030\260\312\274\" \001(\0132\024.google.api.H" + + "ttpRule:Z\n\022message_visibility\022\037.google.p" + + "rotobuf.MessageOptions\030\257\312\274\" \001(\0132\032.google" + + ".api.VisibilityRule:U\n\014custom_error\022\037.go" + + "ogle.protobuf.MessageOptions\030\325\212\354% \001(\0132\033." + + "google.api.CustomErrorRule:V\n\020field_visi" + + "bility\022\035.google.protobuf.FieldOptions\030\257\312" + + "\274\" \001(\0132\032.google.api.VisibilityRule:T\n\017en" + + "um_visibility\022\034.google.protobuf.EnumOpti", + "ons\030\257\312\274\" \001(\0132\032.google.api.VisibilityRule" + + ":Z\n\020value_visibility\022!.google.protobuf.E" + + "numValueOptions\030\257\312\274\" \001(\0132\032.google.api.Vi" + + "sibilityRuleB$\n\016com.google.apiB\020Annotati" + + "onsProtoP\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.protobuf.DescriptorProtos.getDescriptor(), + com.google.api.ErrorFormatProto.getDescriptor(), + com.google.api.HttpProto.getDescriptor(), + com.google.api.VisibilityProto.getDescriptor(), + }, assigner); + fileVisibility.internalInit(descriptor.getExtensions().get(0)); + apiVisibility.internalInit(descriptor.getExtensions().get(1)); + methodVisibility.internalInit(descriptor.getExtensions().get(2)); + http.internalInit(descriptor.getExtensions().get(3)); + messageVisibility.internalInit(descriptor.getExtensions().get(4)); + customError.internalInit(descriptor.getExtensions().get(5)); + fieldVisibility.internalInit(descriptor.getExtensions().get(6)); + enumVisibility.internalInit(descriptor.getExtensions().get(7)); + valueVisibility.internalInit(descriptor.getExtensions().get(8)); + com.google.protobuf.DescriptorProtos.getDescriptor(); + com.google.api.ErrorFormatProto.getDescriptor(); + com.google.api.HttpProto.getDescriptor(); + com.google.api.VisibilityProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/Context.java b/gcloud-java-gax/src/generated/main/java/com/google/api/Context.java new file mode 100644 index 000000000000..1385a7b9ea50 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/Context.java @@ -0,0 +1,779 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Context} + * + *
+ * `Context` defines which contexts an API requests.
+ * Example:
+ *     context:
+ *       rules:
+ *       - selector: "*"
+ *         requested:
+ *         - google.rpc.context.ProjectContext
+ *         - google.rpc.context.OriginContext
+ * The above specifies that all methods in the API request
+ * `google.rpc.context.ProjectContext` and
+ * `google.rpc.context.OriginContext`.
+ * Available context types are defined in package
+ * `google.rpc.context`.
+ * 
+ */ +public final class Context extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Context) + ContextOrBuilder { + // Use Context.newBuilder() to construct. + private Context(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Context() { + rules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Context( + 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)) { + rules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + rules_.add(input.readMessage(com.google.api.ContextRule.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ContextProto.internal_static_google_api_Context_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ContextProto.internal_static_google_api_Context_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Context.class, com.google.api.Context.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + private java.util.List rules_; + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + public java.util.List getRulesList() { + return rules_; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + public int getRulesCount() { + return rules_.size(); + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + public com.google.api.ContextRule getRules(int index) { + return rules_.get(index); + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + public com.google.api.ContextRuleOrBuilder 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 < rules_.size(); i++) { + output.writeMessage(1, rules_.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(1, rules_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Context parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Context 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.Context parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Context parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Context parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Context parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Context parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Context parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Context parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Context 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.Context 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.Context} + * + *
+   * `Context` defines which contexts an API requests.
+   * Example:
+   *     context:
+   *       rules:
+   *       - selector: "*"
+   *         requested:
+   *         - google.rpc.context.ProjectContext
+   *         - google.rpc.context.OriginContext
+   * The above specifies that all methods in the API request
+   * `google.rpc.context.ProjectContext` and
+   * `google.rpc.context.OriginContext`.
+   * Available context types are defined in package
+   * `google.rpc.context`.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Context) + com.google.api.ContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ContextProto.internal_static_google_api_Context_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ContextProto.internal_static_google_api_Context_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Context.class, com.google.api.Context.Builder.class); + } + + // Construct using com.google.api.Context.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRulesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rulesBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.ContextProto.internal_static_google_api_Context_descriptor; + } + + public com.google.api.Context getDefaultInstanceForType() { + return com.google.api.Context.getDefaultInstance(); + } + + public com.google.api.Context build() { + com.google.api.Context result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Context buildPartial() { + com.google.api.Context result = new com.google.api.Context(this); + int from_bitField0_ = bitField0_; + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Context) { + return mergeFrom((com.google.api.Context)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Context other) { + if (other == com.google.api.Context.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.Context parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Context) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.ContextRule, com.google.api.ContextRule.Builder, com.google.api.ContextRuleOrBuilder> rulesBuilder_; + + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public com.google.api.ContextRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.ContextRule 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.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.ContextRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder addRules(com.google.api.ContextRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.ContextRule 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.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder addRules( + com.google.api.ContextRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.ContextRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public com.google.api.ContextRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public com.google.api.ContextRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public com.google.api.ContextRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.api.ContextRule.getDefaultInstance()); + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public com.google.api.ContextRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.api.ContextRule.getDefaultInstance()); + } + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+     * List of rules for context, applicable to methods.
+     * 
+ */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.ContextRule, com.google.api.ContextRule.Builder, com.google.api.ContextRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.ContextRule, com.google.api.ContextRule.Builder, com.google.api.ContextRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.api.Context) + } + + // @@protoc_insertion_point(class_scope:google.api.Context) + private static final com.google.api.Context DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Context(); + } + + public static com.google.api.Context getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Context parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Context(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.Context getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/ContextOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/ContextOrBuilder.java new file mode 100644 index 000000000000..97be9b0b3dd9 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/ContextOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +public interface ContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Context) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + java.util.List + getRulesList(); + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + com.google.api.ContextRule getRules(int index); + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + int getRulesCount(); + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + java.util.List + getRulesOrBuilderList(); + /** + * repeated .google.api.ContextRule rules = 1; + * + *
+   * List of rules for context, applicable to methods.
+   * 
+ */ + com.google.api.ContextRuleOrBuilder getRulesOrBuilder( + int index); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/ContextProto.java b/gcloud-java-gax/src/generated/main/java/com/google/api/ContextProto.java new file mode 100644 index 000000000000..755c670fa8af --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/ContextProto.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +public final class ContextProto { + private ContextProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Context_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Context_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_ContextRule_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_ContextRule_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/context.proto\022\ngoogle.api\"1" + + "\n\007Context\022&\n\005rules\030\001 \003(\0132\027.google.api.Co" + + "ntextRule\"D\n\013ContextRule\022\020\n\010selector\030\001 \001" + + "(\t\022\021\n\trequested\030\002 \003(\t\022\020\n\010provided\030\003 \003(\tB" + + " \n\016com.google.apiB\014ContextProtoP\001b\006proto" + + "3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_api_Context_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Context_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Context_descriptor, + new java.lang.String[] { "Rules", }); + internal_static_google_api_ContextRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_ContextRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_ContextRule_descriptor, + new java.lang.String[] { "Selector", "Requested", "Provided", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/ContextRule.java b/gcloud-java-gax/src/generated/main/java/com/google/api/ContextRule.java new file mode 100644 index 000000000000..9857e3bfdd24 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/ContextRule.java @@ -0,0 +1,922 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.ContextRule} + * + *
+ * A context rule provides information about the context for an individual API
+ * element.
+ * 
+ */ +public final class ContextRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.ContextRule) + ContextRuleOrBuilder { + // Use ContextRule.newBuilder() to construct. + private ContextRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ContextRule() { + selector_ = ""; + requested_ = com.google.protobuf.LazyStringArrayList.EMPTY; + provided_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private ContextRule( + 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: { + String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + requested_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + requested_.add(s); + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + provided_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + provided_.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)) { + requested_ = requested_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + provided_ = provided_.getUnmodifiableView(); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ContextRule.class, com.google.api.ContextRule.Builder.class); + } + + private int bitField0_; + public static final int SELECTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object selector_; + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + public com.google.protobuf.ByteString + getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList requested_; + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + public com.google.protobuf.ProtocolStringList + getRequestedList() { + return requested_; + } + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + public int getRequestedCount() { + return requested_.size(); + } + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + public java.lang.String getRequested(int index) { + return requested_.get(index); + } + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + public com.google.protobuf.ByteString + getRequestedBytes(int index) { + return requested_.getByteString(index); + } + + public static final int PROVIDED_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList provided_; + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + public com.google.protobuf.ProtocolStringList + getProvidedList() { + return provided_; + } + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + public int getProvidedCount() { + return provided_.size(); + } + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + public java.lang.String getProvided(int index) { + return provided_.get(index); + } + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + public com.google.protobuf.ByteString + getProvidedBytes(int index) { + return provided_.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 (!getSelectorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_); + } + for (int i = 0; i < requested_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requested_.getRaw(i)); + } + for (int i = 0; i < provided_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, provided_.getRaw(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_); + } + { + int dataSize = 0; + for (int i = 0; i < requested_.size(); i++) { + dataSize += computeStringSizeNoTag(requested_.getRaw(i)); + } + size += dataSize; + size += 1 * getRequestedList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < provided_.size(); i++) { + dataSize += computeStringSizeNoTag(provided_.getRaw(i)); + } + size += dataSize; + size += 1 * getProvidedList().size(); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.ContextRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.ContextRule 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.ContextRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.ContextRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.ContextRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.ContextRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.ContextRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.ContextRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.ContextRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.ContextRule 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.ContextRule 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.ContextRule} + * + *
+   * A context rule provides information about the context for an individual API
+   * element.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.ContextRule) + com.google.api.ContextRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ContextRule.class, com.google.api.ContextRule.Builder.class); + } + + // Construct using com.google.api.ContextRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + selector_ = ""; + + requested_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + provided_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_descriptor; + } + + public com.google.api.ContextRule getDefaultInstanceForType() { + return com.google.api.ContextRule.getDefaultInstance(); + } + + public com.google.api.ContextRule build() { + com.google.api.ContextRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.ContextRule buildPartial() { + com.google.api.ContextRule result = new com.google.api.ContextRule(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.selector_ = selector_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + requested_ = requested_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.requested_ = requested_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + provided_ = provided_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.provided_ = provided_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.ContextRule) { + return mergeFrom((com.google.api.ContextRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.ContextRule other) { + if (other == com.google.api.ContextRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + onChanged(); + } + if (!other.requested_.isEmpty()) { + if (requested_.isEmpty()) { + requested_ = other.requested_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRequestedIsMutable(); + requested_.addAll(other.requested_); + } + onChanged(); + } + if (!other.provided_.isEmpty()) { + if (provided_.isEmpty()) { + provided_ = other.provided_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureProvidedIsMutable(); + provided_.addAll(other.provided_); + } + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.ContextRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.ContextRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public com.google.protobuf.ByteString + getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public Builder setSelector( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + selector_ = value; + onChanged(); + return this; + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public Builder clearSelector() { + + selector_ = getDefaultInstance().getSelector(); + onChanged(); + return this; + } + /** + * optional string selector = 1; + * + *
+     * Selects the methods to which this rule applies.
+     * Refer to [selector][DocumentationRule.selector] for syntax details.
+     * 
+ */ + public Builder setSelectorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + selector_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList requested_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRequestedIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + requested_ = new com.google.protobuf.LazyStringArrayList(requested_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getRequestedList() { + return requested_.getUnmodifiableView(); + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public int getRequestedCount() { + return requested_.size(); + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public java.lang.String getRequested(int index) { + return requested_.get(index); + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public com.google.protobuf.ByteString + getRequestedBytes(int index) { + return requested_.getByteString(index); + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public Builder setRequested( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestedIsMutable(); + requested_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public Builder addRequested( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestedIsMutable(); + requested_.add(value); + onChanged(); + return this; + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public Builder addAllRequested( + java.lang.Iterable values) { + ensureRequestedIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requested_); + onChanged(); + return this; + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public Builder clearRequested() { + requested_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated string requested = 2; + * + *
+     * A list of full type names of requested contexts.
+     * 
+ */ + public Builder addRequestedBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRequestedIsMutable(); + requested_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList provided_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureProvidedIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + provided_ = new com.google.protobuf.LazyStringArrayList(provided_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getProvidedList() { + return provided_.getUnmodifiableView(); + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public int getProvidedCount() { + return provided_.size(); + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public java.lang.String getProvided(int index) { + return provided_.get(index); + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public com.google.protobuf.ByteString + getProvidedBytes(int index) { + return provided_.getByteString(index); + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public Builder setProvided( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidedIsMutable(); + provided_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public Builder addProvided( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidedIsMutable(); + provided_.add(value); + onChanged(); + return this; + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public Builder addAllProvided( + java.lang.Iterable values) { + ensureProvidedIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, provided_); + onChanged(); + return this; + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public Builder clearProvided() { + provided_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * repeated string provided = 3; + * + *
+     * A list of full type names of provided contexts.
+     * 
+ */ + public Builder addProvidedBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProvidedIsMutable(); + provided_.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.ContextRule) + } + + // @@protoc_insertion_point(class_scope:google.api.ContextRule) + private static final com.google.api.ContextRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.ContextRule(); + } + + public static com.google.api.ContextRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ContextRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ContextRule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.ContextRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/ContextRuleOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/ContextRuleOrBuilder.java new file mode 100644 index 000000000000..3174e0295a35 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/ContextRuleOrBuilder.java @@ -0,0 +1,99 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +public interface ContextRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.ContextRule) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + java.lang.String getSelector(); + /** + * optional string selector = 1; + * + *
+   * Selects the methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getRequestedList(); + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + int getRequestedCount(); + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + java.lang.String getRequested(int index); + /** + * repeated string requested = 2; + * + *
+   * A list of full type names of requested contexts.
+   * 
+ */ + com.google.protobuf.ByteString + getRequestedBytes(int index); + + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getProvidedList(); + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + int getProvidedCount(); + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + java.lang.String getProvided(int index); + /** + * repeated string provided = 3; + * + *
+   * A list of full type names of provided contexts.
+   * 
+ */ + com.google.protobuf.ByteString + getProvidedBytes(int index); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/CustomError.java b/gcloud-java-gax/src/generated/main/java/com/google/api/CustomError.java new file mode 100644 index 000000000000..9b9b004161b3 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/CustomError.java @@ -0,0 +1,1016 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/error.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.CustomError} + * + *
+ * Customize service error responses.  For example, list any service
+ * specific protobuf types that can appear in error detail lists of
+ * error responses.
+ * Example:
+ *     custom_error:
+ *       types:
+ *       - google.foo.v1.CustomError
+ *       - google.foo.v1.AnotherError
+ * (-- For internal Google service producers, instead of listing such
+ * custom error detail types in the YAML configuration file; Stubby
+ * annotation can be used.  Please, see //google/api/annotations.proto
+ * for more details. --)
+ * 
+ */ +public final class CustomError extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.CustomError) + CustomErrorOrBuilder { + // Use CustomError.newBuilder() to construct. + private CustomError(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CustomError() { + rules_ = java.util.Collections.emptyList(); + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private CustomError( + 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)) { + rules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + rules_.add(input.readMessage(com.google.api.CustomErrorRule.parser(), extensionRegistry)); + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + types_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + types_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + types_ = types_.getUnmodifiableView(); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomError.class, com.google.api.CustomError.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + private java.util.List rules_; + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + public java.util.List getRulesList() { + return rules_; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + public int getRulesCount() { + return rules_.size(); + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + public com.google.api.CustomErrorRule getRules(int index) { + return rules_.get(index); + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + public com.google.api.CustomErrorRuleOrBuilder getRulesOrBuilder( + int index) { + return rules_.get(index); + } + + public static final int TYPES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList types_; + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + public com.google.protobuf.ProtocolStringList + getTypesList() { + return types_; + } + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + public int getTypesCount() { + return types_.size(); + } + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + public com.google.protobuf.ByteString + getTypesBytes(int index) { + return types_.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 < rules_.size(); i++) { + output.writeMessage(1, rules_.get(i)); + } + for (int i = 0; i < types_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, types_.getRaw(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(1, rules_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < types_.size(); i++) { + dataSize += computeStringSizeNoTag(types_.getRaw(i)); + } + size += dataSize; + size += 1 * getTypesList().size(); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.CustomError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomError 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.CustomError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomError parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.CustomError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.CustomError parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.CustomError parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.CustomError parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.CustomError parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.CustomError 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.CustomError 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.CustomError} + * + *
+   * Customize service error responses.  For example, list any service
+   * specific protobuf types that can appear in error detail lists of
+   * error responses.
+   * Example:
+   *     custom_error:
+   *       types:
+   *       - google.foo.v1.CustomError
+   *       - google.foo.v1.AnotherError
+   * (-- For internal Google service producers, instead of listing such
+   * custom error detail types in the YAML configuration file; Stubby
+   * annotation can be used.  Please, see //google/api/annotations.proto
+   * for more details. --)
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.CustomError) + com.google.api.CustomErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomError.class, com.google.api.CustomError.Builder.class); + } + + // Construct using com.google.api.CustomError.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRulesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rulesBuilder_.clear(); + } + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_descriptor; + } + + public com.google.api.CustomError getDefaultInstanceForType() { + return com.google.api.CustomError.getDefaultInstance(); + } + + public com.google.api.CustomError build() { + com.google.api.CustomError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.CustomError buildPartial() { + com.google.api.CustomError result = new com.google.api.CustomError(this); + int from_bitField0_ = bitField0_; + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + types_ = types_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.types_ = types_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.CustomError) { + return mergeFrom((com.google.api.CustomError)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.CustomError other) { + if (other == com.google.api.CustomError.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); + } + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.CustomError parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.CustomError) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.CustomErrorRule, com.google.api.CustomErrorRule.Builder, com.google.api.CustomErrorRuleOrBuilder> rulesBuilder_; + + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public com.google.api.CustomErrorRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.CustomErrorRule 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.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.CustomErrorRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder addRules(com.google.api.CustomErrorRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.CustomErrorRule 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.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder addRules( + com.google.api.CustomErrorRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.CustomErrorRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public com.google.api.CustomErrorRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public com.google.api.CustomErrorRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public com.google.api.CustomErrorRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.api.CustomErrorRule.getDefaultInstance()); + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public com.google.api.CustomErrorRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.api.CustomErrorRule.getDefaultInstance()); + } + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+     * The list of custom error rules to select to which messages this should
+     * apply.
+     * 
+ */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.CustomErrorRule, com.google.api.CustomErrorRule.Builder, com.google.api.CustomErrorRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.CustomErrorRule, com.google.api.CustomErrorRule.Builder, com.google.api.CustomErrorRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private com.google.protobuf.LazyStringList types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTypesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + types_ = new com.google.protobuf.LazyStringArrayList(types_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getTypesList() { + return types_.getUnmodifiableView(); + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public int getTypesCount() { + return types_.size(); + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public com.google.protobuf.ByteString + getTypesBytes(int index) { + return types_.getByteString(index); + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public Builder setTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public Builder addTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(value); + onChanged(); + return this; + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public Builder addAllTypes( + java.lang.Iterable values) { + ensureTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, types_); + onChanged(); + return this; + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public Builder clearTypes() { + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated string types = 2; + * + *
+     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+     * 
+ */ + public Builder addTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTypesIsMutable(); + types_.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.CustomError) + } + + // @@protoc_insertion_point(class_scope:google.api.CustomError) + private static final com.google.api.CustomError DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.CustomError(); + } + + public static com.google.api.CustomError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CustomError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CustomError(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.CustomError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/CustomErrorOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/CustomErrorOrBuilder.java new file mode 100644 index 000000000000..9e7fc1d0b94d --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/CustomErrorOrBuilder.java @@ -0,0 +1,93 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/error.proto + +package com.google.api; + +public interface CustomErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.CustomError) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + java.util.List + getRulesList(); + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + com.google.api.CustomErrorRule getRules(int index); + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + int getRulesCount(); + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + java.util.List + getRulesOrBuilderList(); + /** + * repeated .google.api.CustomErrorRule rules = 1; + * + *
+   * The list of custom error rules to select to which messages this should
+   * apply.
+   * 
+ */ + com.google.api.CustomErrorRuleOrBuilder getRulesOrBuilder( + int index); + + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getTypesList(); + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + int getTypesCount(); + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + java.lang.String getTypes(int index); + /** + * repeated string types = 2; + * + *
+   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
+   * 
+ */ + com.google.protobuf.ByteString + getTypesBytes(int index); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/CustomErrorRule.java b/gcloud-java-gax/src/generated/main/java/com/google/api/CustomErrorRule.java new file mode 100644 index 000000000000..6f1333cb2e13 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/CustomErrorRule.java @@ -0,0 +1,627 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/error.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.CustomErrorRule} + * + *
+ * A custom error rule.
+ * 
+ */ +public final class CustomErrorRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.CustomErrorRule) + CustomErrorRuleOrBuilder { + // Use CustomErrorRule.newBuilder() to construct. + private CustomErrorRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CustomErrorRule() { + selector_ = ""; + stubbyBridge_ = 0; + isErrorType_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private CustomErrorRule( + 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: { + + stubbyBridge_ = input.readInt32(); + break; + } + case 24: { + + isErrorType_ = 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.ErrorFormatProto.internal_static_google_api_CustomErrorRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomErrorRule.class, com.google.api.CustomErrorRule.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object selector_; + /** + * optional string selector = 1; + * + *
+   * Selects messages 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 messages 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 STUBBY_BRIDGE_FIELD_NUMBER = 2; + private int stubbyBridge_; + /** + * optional int32 stubby_bridge = 2 [deprecated = true]; + * + *
+   * (--The Stubby bridge of the message.--)
+   * 
+ */ + @java.lang.Deprecated public int getStubbyBridge() { + return stubbyBridge_; + } + + public static final int IS_ERROR_TYPE_FIELD_NUMBER = 3; + private boolean isErrorType_; + /** + * optional bool is_error_type = 3; + * + *
+   * Mark this message as possible payload in error response.  Otherwise,
+   * objects of this type will be filtered when they appear in error payload.
+   * 
+ */ + public boolean getIsErrorType() { + return isErrorType_; + } + + 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 (stubbyBridge_ != 0) { + output.writeInt32(2, stubbyBridge_); + } + if (isErrorType_ != false) { + output.writeBool(3, isErrorType_); + } + } + + 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 (stubbyBridge_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, stubbyBridge_); + } + if (isErrorType_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, isErrorType_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.CustomErrorRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomErrorRule 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.CustomErrorRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomErrorRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.CustomErrorRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.CustomErrorRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.CustomErrorRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.CustomErrorRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.CustomErrorRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.CustomErrorRule 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.CustomErrorRule 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.CustomErrorRule} + * + *
+   * A custom error rule.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.CustomErrorRule) + com.google.api.CustomErrorRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomErrorRule.class, com.google.api.CustomErrorRule.Builder.class); + } + + // Construct using com.google.api.CustomErrorRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + selector_ = ""; + + stubbyBridge_ = 0; + + isErrorType_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_descriptor; + } + + public com.google.api.CustomErrorRule getDefaultInstanceForType() { + return com.google.api.CustomErrorRule.getDefaultInstance(); + } + + public com.google.api.CustomErrorRule build() { + com.google.api.CustomErrorRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.CustomErrorRule buildPartial() { + com.google.api.CustomErrorRule result = new com.google.api.CustomErrorRule(this); + result.selector_ = selector_; + result.stubbyBridge_ = stubbyBridge_; + result.isErrorType_ = isErrorType_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.CustomErrorRule) { + return mergeFrom((com.google.api.CustomErrorRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.CustomErrorRule other) { + if (other == com.google.api.CustomErrorRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + onChanged(); + } + if (other.getStubbyBridge() != 0) { + setStubbyBridge(other.getStubbyBridge()); + } + if (other.getIsErrorType() != false) { + setIsErrorType(other.getIsErrorType()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.CustomErrorRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.CustomErrorRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object selector_ = ""; + /** + * optional string selector = 1; + * + *
+     * Selects messages 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 messages 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 messages 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 messages 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 messages 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 int stubbyBridge_ ; + /** + * optional int32 stubby_bridge = 2 [deprecated = true]; + * + *
+     * (--The Stubby bridge of the message.--)
+     * 
+ */ + @java.lang.Deprecated public int getStubbyBridge() { + return stubbyBridge_; + } + /** + * optional int32 stubby_bridge = 2 [deprecated = true]; + * + *
+     * (--The Stubby bridge of the message.--)
+     * 
+ */ + @java.lang.Deprecated public Builder setStubbyBridge(int value) { + + stubbyBridge_ = value; + onChanged(); + return this; + } + /** + * optional int32 stubby_bridge = 2 [deprecated = true]; + * + *
+     * (--The Stubby bridge of the message.--)
+     * 
+ */ + @java.lang.Deprecated public Builder clearStubbyBridge() { + + stubbyBridge_ = 0; + onChanged(); + return this; + } + + private boolean isErrorType_ ; + /** + * optional bool is_error_type = 3; + * + *
+     * Mark this message as possible payload in error response.  Otherwise,
+     * objects of this type will be filtered when they appear in error payload.
+     * 
+ */ + public boolean getIsErrorType() { + return isErrorType_; + } + /** + * optional bool is_error_type = 3; + * + *
+     * Mark this message as possible payload in error response.  Otherwise,
+     * objects of this type will be filtered when they appear in error payload.
+     * 
+ */ + public Builder setIsErrorType(boolean value) { + + isErrorType_ = value; + onChanged(); + return this; + } + /** + * optional bool is_error_type = 3; + * + *
+     * Mark this message as possible payload in error response.  Otherwise,
+     * objects of this type will be filtered when they appear in error payload.
+     * 
+ */ + public Builder clearIsErrorType() { + + isErrorType_ = 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.CustomErrorRule) + } + + // @@protoc_insertion_point(class_scope:google.api.CustomErrorRule) + private static final com.google.api.CustomErrorRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.CustomErrorRule(); + } + + public static com.google.api.CustomErrorRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CustomErrorRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CustomErrorRule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.CustomErrorRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/CustomErrorRuleOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/CustomErrorRuleOrBuilder.java new file mode 100644 index 000000000000..a4746577b373 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/CustomErrorRuleOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/error.proto + +package com.google.api; + +public interface CustomErrorRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.CustomErrorRule) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string selector = 1; + * + *
+   * Selects messages to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + java.lang.String getSelector(); + /** + * optional string selector = 1; + * + *
+   * Selects messages to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + * optional int32 stubby_bridge = 2 [deprecated = true]; + * + *
+   * (--The Stubby bridge of the message.--)
+   * 
+ */ + @java.lang.Deprecated int getStubbyBridge(); + + /** + * optional bool is_error_type = 3; + * + *
+   * Mark this message as possible payload in error response.  Otherwise,
+   * objects of this type will be filtered when they appear in error payload.
+   * 
+ */ + boolean getIsErrorType(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/CustomHttpPattern.java b/gcloud-java-gax/src/generated/main/java/com/google/api/CustomHttpPattern.java new file mode 100644 index 000000000000..e3a51cd280c7 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/CustomHttpPattern.java @@ -0,0 +1,627 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.CustomHttpPattern} + * + *
+ * A custom pattern is used for defining custom HTTP verb.
+ * 
+ */ +public final class CustomHttpPattern extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.CustomHttpPattern) + CustomHttpPatternOrBuilder { + // Use CustomHttpPattern.newBuilder() to construct. + private CustomHttpPattern(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CustomHttpPattern() { + kind_ = ""; + path_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private CustomHttpPattern( + 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(); + + kind_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + path_ = 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.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomHttpPattern.class, com.google.api.CustomHttpPattern.Builder.class); + } + + public static final int KIND_FIELD_NUMBER = 1; + private volatile java.lang.Object kind_; + /** + * optional string kind = 1; + * + *
+   * The name of this custom HTTP verb.
+   * 
+ */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + 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(); + kind_ = s; + return s; + } + } + /** + * optional string kind = 1; + * + *
+   * The name of this custom HTTP verb.
+   * 
+ */ + public com.google.protobuf.ByteString + getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 2; + private volatile java.lang.Object path_; + /** + * optional string path = 2; + * + *
+   * The path matched by this custom verb.
+   * 
+ */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + 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(); + path_ = s; + return s; + } + } + /** + * optional string path = 2; + * + *
+   * The path matched by this custom verb.
+   * 
+ */ + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = 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 (!getKindBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, kind_); + } + if (!getPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, path_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKindBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, kind_); + } + if (!getPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, path_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.CustomHttpPattern parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomHttpPattern 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.CustomHttpPattern parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomHttpPattern parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.CustomHttpPattern parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.CustomHttpPattern parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.CustomHttpPattern parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.CustomHttpPattern parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.CustomHttpPattern parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.CustomHttpPattern 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.CustomHttpPattern 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.CustomHttpPattern} + * + *
+   * A custom pattern is used for defining custom HTTP verb.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.CustomHttpPattern) + com.google.api.CustomHttpPatternOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomHttpPattern.class, com.google.api.CustomHttpPattern.Builder.class); + } + + // Construct using com.google.api.CustomHttpPattern.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + kind_ = ""; + + path_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; + } + + public com.google.api.CustomHttpPattern getDefaultInstanceForType() { + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + + public com.google.api.CustomHttpPattern build() { + com.google.api.CustomHttpPattern result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.CustomHttpPattern buildPartial() { + com.google.api.CustomHttpPattern result = new com.google.api.CustomHttpPattern(this); + result.kind_ = kind_; + result.path_ = path_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.CustomHttpPattern) { + return mergeFrom((com.google.api.CustomHttpPattern)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.CustomHttpPattern other) { + if (other == com.google.api.CustomHttpPattern.getDefaultInstance()) return this; + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + onChanged(); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.CustomHttpPattern parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.CustomHttpPattern) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object kind_ = ""; + /** + * optional string kind = 1; + * + *
+     * The name of this custom HTTP verb.
+     * 
+ */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string kind = 1; + * + *
+     * The name of this custom HTTP verb.
+     * 
+ */ + public com.google.protobuf.ByteString + getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string kind = 1; + * + *
+     * The name of this custom HTTP verb.
+     * 
+ */ + public Builder setKind( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kind_ = value; + onChanged(); + return this; + } + /** + * optional string kind = 1; + * + *
+     * The name of this custom HTTP verb.
+     * 
+ */ + public Builder clearKind() { + + kind_ = getDefaultInstance().getKind(); + onChanged(); + return this; + } + /** + * optional string kind = 1; + * + *
+     * The name of this custom HTTP verb.
+     * 
+ */ + public Builder setKindBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kind_ = value; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + /** + * optional string path = 2; + * + *
+     * The path matched by this custom verb.
+     * 
+ */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string path = 2; + * + *
+     * The path matched by this custom verb.
+     * 
+ */ + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string path = 2; + * + *
+     * The path matched by this custom verb.
+     * 
+ */ + public Builder setPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** + * optional string path = 2; + * + *
+     * The path matched by this custom verb.
+     * 
+ */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * optional string path = 2; + * + *
+     * The path matched by this custom verb.
+     * 
+ */ + public Builder setPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = 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.CustomHttpPattern) + } + + // @@protoc_insertion_point(class_scope:google.api.CustomHttpPattern) + private static final com.google.api.CustomHttpPattern DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.CustomHttpPattern(); + } + + public static com.google.api.CustomHttpPattern getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CustomHttpPattern parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CustomHttpPattern(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.CustomHttpPattern getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/CustomHttpPatternOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/CustomHttpPatternOrBuilder.java new file mode 100644 index 000000000000..e45514be7749 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/CustomHttpPatternOrBuilder.java @@ -0,0 +1,45 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface CustomHttpPatternOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.CustomHttpPattern) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string kind = 1; + * + *
+   * The name of this custom HTTP verb.
+   * 
+ */ + java.lang.String getKind(); + /** + * optional string kind = 1; + * + *
+   * The name of this custom HTTP verb.
+   * 
+ */ + com.google.protobuf.ByteString + getKindBytes(); + + /** + * optional string path = 2; + * + *
+   * The path matched by this custom verb.
+   * 
+ */ + java.lang.String getPath(); + /** + * optional string path = 2; + * + *
+   * The path matched by this custom verb.
+   * 
+ */ + com.google.protobuf.ByteString + getPathBytes(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/Documentation.java b/gcloud-java-gax/src/generated/main/java/com/google/api/Documentation.java new file mode 100644 index 000000000000..544435e99564 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/Documentation.java @@ -0,0 +1,1816 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Documentation} + * + *
+ * `Documentation` provides the information for describing a service.
+ * Example:
+ *     documentation:
+ *       summary: >
+ *         The Google Calendar API gives access
+ *         to most calendar features.
+ *       pages:
+ *       - name: Overview
+ *         content: (== include google/foo/overview.md ==)
+ *       - name: Tutorial
+ *         content: (== include google/foo/tutorial.md ==)
+ *         subpages;
+ *         - name: Java
+ *           content: (== include google/foo/tutorial_java.md ==)
+ *       rules:
+ *       - selector: google.calendar.Calendar.Get
+ *         description: >
+ *           ...
+ *       - selector: google.calendar.Calendar.Put
+ *         description: >
+ *           ...
+ * Documentation is provided in markdown syntax. In addition to
+ * standard markdown features, definition lists, tables and fenced
+ * code blocks are supported. Section headers can be provided and are
+ * interpreted relative to the section nesting of the context where
+ * a documentation fragment is embedded.
+ * Documentation from the IDL is merged with documentation defined
+ * via the config at normalization time, where documentation provided
+ * by config rules overrides IDL provided.
+ * A number of constructs specific to the API platform are supported
+ * in documentation text.
+ * In order to reference a proto element, the following
+ * notation can be used:
+ * <pre><code>&#91;display text]&#91;fully.qualified.proto.name]
+ * &#91;fully.qualified.proto.name]&#91;]</code></pre>
+ * Text can be excluded from doc using the following notation:
+ * <pre><code>&#40;-- internal comment --&#41;</code></pre>
+ * Comments can be made conditional using a visibility label. The below
+ * text will be only rendered if the `BETA` label is available:
+ * <pre><code>&#40;--BETA: comment for BETA users --&#41;</code></pre>
+ * A few directives are available in documentation. Note that
+ * directives must appear on a single line to be properly
+ * identified. The `include` directive includes a markdown file from
+ * an external source:
+ *     (== include path/to/file> ==)
+ * The `resource_for` directive marks a message to be the resource of
+ * a collection in REST view. If it is not specified, tools attempt
+ * to infer the resource from the operations in a collection:
+ *     (== resource_for v1.shelves.books ==)
+ * The directive `suppress_warning` is not directly effecting documentation
+ * and is documented together with service config validation.
+ * 
+ */ +public final class Documentation extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Documentation) + DocumentationOrBuilder { + // Use Documentation.newBuilder() to construct. + private Documentation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Documentation() { + summary_ = ""; + pages_ = java.util.Collections.emptyList(); + rules_ = java.util.Collections.emptyList(); + documentationRootUrl_ = ""; + overview_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Documentation( + 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(); + + summary_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + overview_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + rules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + rules_.add(input.readMessage(com.google.api.DocumentationRule.parser(), extensionRegistry)); + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + documentationRootUrl_ = s; + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + pages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + pages_.add(input.readMessage(com.google.api.Page.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Documentation.class, com.google.api.Documentation.Builder.class); + } + + private int bitField0_; + public static final int SUMMARY_FIELD_NUMBER = 1; + private volatile java.lang.Object summary_; + /** + * optional string summary = 1; + * + *
+   * A short summary of what the service does. Can only be provided by
+   * plain text.
+   * 
+ */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + 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(); + summary_ = s; + return s; + } + } + /** + * optional string summary = 1; + * + *
+   * A short summary of what the service does. Can only be provided by
+   * plain text.
+   * 
+ */ + public com.google.protobuf.ByteString + getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGES_FIELD_NUMBER = 5; + private java.util.List pages_; + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + public java.util.List getPagesList() { + return pages_; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + public java.util.List + getPagesOrBuilderList() { + return pages_; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + public int getPagesCount() { + return pages_.size(); + } + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + public com.google.api.Page getPages(int index) { + return pages_.get(index); + } + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + public com.google.api.PageOrBuilder getPagesOrBuilder( + int index) { + return pages_.get(index); + } + + public static final int RULES_FIELD_NUMBER = 3; + private java.util.List rules_; + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + public java.util.List getRulesList() { + return rules_; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + public int getRulesCount() { + return rules_.size(); + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + public com.google.api.DocumentationRule getRules(int index) { + return rules_.get(index); + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + public com.google.api.DocumentationRuleOrBuilder getRulesOrBuilder( + int index) { + return rules_.get(index); + } + + public static final int DOCUMENTATION_ROOT_URL_FIELD_NUMBER = 4; + private volatile java.lang.Object documentationRootUrl_; + /** + * optional string documentation_root_url = 4; + * + *
+   * The URL to the root of documentation.
+   * 
+ */ + public java.lang.String getDocumentationRootUrl() { + java.lang.Object ref = documentationRootUrl_; + 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(); + documentationRootUrl_ = s; + return s; + } + } + /** + * optional string documentation_root_url = 4; + * + *
+   * The URL to the root of documentation.
+   * 
+ */ + public com.google.protobuf.ByteString + getDocumentationRootUrlBytes() { + java.lang.Object ref = documentationRootUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + documentationRootUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OVERVIEW_FIELD_NUMBER = 2; + private volatile java.lang.Object overview_; + /** + * optional string overview = 2; + * + *
+   * Declares a single overview page. For example:
+   *     documentation:
+   *       summary: ...
+   *       overview: (== include overview.md ==)
+   * This is a shortcut for the following declaration (using pages style):
+   *     documentation:
+   *       summary: ...
+   *       pages:
+   *       - name: Overview
+   *         content: (== include overview.md ==)
+   * Note: you cannot specify both `overview` field and `pages` field.
+   * 
+ */ + public java.lang.String getOverview() { + java.lang.Object ref = overview_; + 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(); + overview_ = s; + return s; + } + } + /** + * optional string overview = 2; + * + *
+   * Declares a single overview page. For example:
+   *     documentation:
+   *       summary: ...
+   *       overview: (== include overview.md ==)
+   * This is a shortcut for the following declaration (using pages style):
+   *     documentation:
+   *       summary: ...
+   *       pages:
+   *       - name: Overview
+   *         content: (== include overview.md ==)
+   * Note: you cannot specify both `overview` field and `pages` field.
+   * 
+ */ + public com.google.protobuf.ByteString + getOverviewBytes() { + java.lang.Object ref = overview_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + overview_ = 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 (!getSummaryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, summary_); + } + if (!getOverviewBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, overview_); + } + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(3, rules_.get(i)); + } + if (!getDocumentationRootUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, documentationRootUrl_); + } + for (int i = 0; i < pages_.size(); i++) { + output.writeMessage(5, pages_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSummaryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, summary_); + } + if (!getOverviewBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, overview_); + } + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, rules_.get(i)); + } + if (!getDocumentationRootUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, documentationRootUrl_); + } + for (int i = 0; i < pages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, pages_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Documentation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Documentation 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.Documentation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Documentation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Documentation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Documentation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Documentation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Documentation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Documentation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Documentation 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.Documentation 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.Documentation} + * + *
+   * `Documentation` provides the information for describing a service.
+   * Example:
+   *     documentation:
+   *       summary: >
+   *         The Google Calendar API gives access
+   *         to most calendar features.
+   *       pages:
+   *       - name: Overview
+   *         content: (== include google/foo/overview.md ==)
+   *       - name: Tutorial
+   *         content: (== include google/foo/tutorial.md ==)
+   *         subpages;
+   *         - name: Java
+   *           content: (== include google/foo/tutorial_java.md ==)
+   *       rules:
+   *       - selector: google.calendar.Calendar.Get
+   *         description: >
+   *           ...
+   *       - selector: google.calendar.Calendar.Put
+   *         description: >
+   *           ...
+   * Documentation is provided in markdown syntax. In addition to
+   * standard markdown features, definition lists, tables and fenced
+   * code blocks are supported. Section headers can be provided and are
+   * interpreted relative to the section nesting of the context where
+   * a documentation fragment is embedded.
+   * Documentation from the IDL is merged with documentation defined
+   * via the config at normalization time, where documentation provided
+   * by config rules overrides IDL provided.
+   * A number of constructs specific to the API platform are supported
+   * in documentation text.
+   * In order to reference a proto element, the following
+   * notation can be used:
+   * <pre><code>&#91;display text]&#91;fully.qualified.proto.name]
+   * &#91;fully.qualified.proto.name]&#91;]</code></pre>
+   * Text can be excluded from doc using the following notation:
+   * <pre><code>&#40;-- internal comment --&#41;</code></pre>
+   * Comments can be made conditional using a visibility label. The below
+   * text will be only rendered if the `BETA` label is available:
+   * <pre><code>&#40;--BETA: comment for BETA users --&#41;</code></pre>
+   * A few directives are available in documentation. Note that
+   * directives must appear on a single line to be properly
+   * identified. The `include` directive includes a markdown file from
+   * an external source:
+   *     (== include path/to/file> ==)
+   * The `resource_for` directive marks a message to be the resource of
+   * a collection in REST view. If it is not specified, tools attempt
+   * to infer the resource from the operations in a collection:
+   *     (== resource_for v1.shelves.books ==)
+   * The directive `suppress_warning` is not directly effecting documentation
+   * and is documented together with service config validation.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Documentation) + com.google.api.DocumentationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Documentation.class, com.google.api.Documentation.Builder.class); + } + + // Construct using com.google.api.Documentation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getPagesFieldBuilder(); + getRulesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + summary_ = ""; + + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + pagesBuilder_.clear(); + } + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + rulesBuilder_.clear(); + } + documentationRootUrl_ = ""; + + overview_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_descriptor; + } + + public com.google.api.Documentation getDefaultInstanceForType() { + return com.google.api.Documentation.getDefaultInstance(); + } + + public com.google.api.Documentation build() { + com.google.api.Documentation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Documentation buildPartial() { + com.google.api.Documentation result = new com.google.api.Documentation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.summary_ = summary_; + if (pagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.pages_ = pages_; + } else { + result.pages_ = pagesBuilder_.build(); + } + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + result.documentationRootUrl_ = documentationRootUrl_; + result.overview_ = overview_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Documentation) { + return mergeFrom((com.google.api.Documentation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Documentation other) { + if (other == com.google.api.Documentation.getDefaultInstance()) return this; + if (!other.getSummary().isEmpty()) { + summary_ = other.summary_; + onChanged(); + } + if (pagesBuilder_ == null) { + if (!other.pages_.isEmpty()) { + if (pages_.isEmpty()) { + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePagesIsMutable(); + pages_.addAll(other.pages_); + } + onChanged(); + } + } else { + if (!other.pages_.isEmpty()) { + if (pagesBuilder_.isEmpty()) { + pagesBuilder_.dispose(); + pagesBuilder_ = null; + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000002); + pagesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPagesFieldBuilder() : null; + } else { + pagesBuilder_.addAllMessages(other.pages_); + } + } + } + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000004); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (!other.getDocumentationRootUrl().isEmpty()) { + documentationRootUrl_ = other.documentationRootUrl_; + onChanged(); + } + if (!other.getOverview().isEmpty()) { + overview_ = other.overview_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.Documentation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Documentation) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object summary_ = ""; + /** + * optional string summary = 1; + * + *
+     * A short summary of what the service does. Can only be provided by
+     * plain text.
+     * 
+ */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string summary = 1; + * + *
+     * A short summary of what the service does. Can only be provided by
+     * plain text.
+     * 
+ */ + public com.google.protobuf.ByteString + getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string summary = 1; + * + *
+     * A short summary of what the service does. Can only be provided by
+     * plain text.
+     * 
+ */ + public Builder setSummary( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + summary_ = value; + onChanged(); + return this; + } + /** + * optional string summary = 1; + * + *
+     * A short summary of what the service does. Can only be provided by
+     * plain text.
+     * 
+ */ + public Builder clearSummary() { + + summary_ = getDefaultInstance().getSummary(); + onChanged(); + return this; + } + /** + * optional string summary = 1; + * + *
+     * A short summary of what the service does. Can only be provided by
+     * plain text.
+     * 
+ */ + public Builder setSummaryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + summary_ = value; + onChanged(); + return this; + } + + private java.util.List pages_ = + java.util.Collections.emptyList(); + private void ensurePagesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + pages_ = new java.util.ArrayList(pages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> pagesBuilder_; + + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public java.util.List getPagesList() { + if (pagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pages_); + } else { + return pagesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public int getPagesCount() { + if (pagesBuilder_ == null) { + return pages_.size(); + } else { + return pagesBuilder_.getCount(); + } + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public com.google.api.Page getPages(int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); + } else { + return pagesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder setPages( + int index, com.google.api.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.set(index, value); + onChanged(); + } else { + pagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder setPages( + int index, com.google.api.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder addPages(com.google.api.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(value); + onChanged(); + } else { + pagesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder addPages( + int index, com.google.api.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(index, value); + onChanged(); + } else { + pagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder addPages( + com.google.api.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder addPages( + int index, com.google.api.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder addAllPages( + java.lang.Iterable values) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pages_); + onChanged(); + } else { + pagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder clearPages() { + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + pagesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public Builder removePages(int index) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.remove(index); + onChanged(); + } else { + pagesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public com.google.api.Page.Builder getPagesBuilder( + int index) { + return getPagesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public com.google.api.PageOrBuilder getPagesOrBuilder( + int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); } else { + return pagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public java.util.List + getPagesOrBuilderList() { + if (pagesBuilder_ != null) { + return pagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pages_); + } + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public com.google.api.Page.Builder addPagesBuilder() { + return getPagesFieldBuilder().addBuilder( + com.google.api.Page.getDefaultInstance()); + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public com.google.api.Page.Builder addPagesBuilder( + int index) { + return getPagesFieldBuilder().addBuilder( + index, com.google.api.Page.getDefaultInstance()); + } + /** + * repeated .google.api.Page pages = 5; + * + *
+     * The top level pages for the documentation set.
+     * 
+ */ + public java.util.List + getPagesBuilderList() { + return getPagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> + getPagesFieldBuilder() { + if (pagesBuilder_ == null) { + pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder>( + pages_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + pages_ = null; + } + return pagesBuilder_; + } + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.DocumentationRule, com.google.api.DocumentationRule.Builder, com.google.api.DocumentationRuleOrBuilder> rulesBuilder_; + + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public com.google.api.DocumentationRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.DocumentationRule 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.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.DocumentationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder addRules(com.google.api.DocumentationRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.DocumentationRule 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.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder addRules( + com.google.api.DocumentationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.DocumentationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public com.google.api.DocumentationRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public com.google.api.DocumentationRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public com.google.api.DocumentationRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.api.DocumentationRule.getDefaultInstance()); + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public com.google.api.DocumentationRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.api.DocumentationRule.getDefaultInstance()); + } + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+     * Documentation rules for individual elements of the service.
+     * 
+ */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.DocumentationRule, com.google.api.DocumentationRule.Builder, com.google.api.DocumentationRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.DocumentationRule, com.google.api.DocumentationRule.Builder, com.google.api.DocumentationRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private java.lang.Object documentationRootUrl_ = ""; + /** + * optional string documentation_root_url = 4; + * + *
+     * The URL to the root of documentation.
+     * 
+ */ + public java.lang.String getDocumentationRootUrl() { + java.lang.Object ref = documentationRootUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + documentationRootUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string documentation_root_url = 4; + * + *
+     * The URL to the root of documentation.
+     * 
+ */ + public com.google.protobuf.ByteString + getDocumentationRootUrlBytes() { + java.lang.Object ref = documentationRootUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + documentationRootUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string documentation_root_url = 4; + * + *
+     * The URL to the root of documentation.
+     * 
+ */ + public Builder setDocumentationRootUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + documentationRootUrl_ = value; + onChanged(); + return this; + } + /** + * optional string documentation_root_url = 4; + * + *
+     * The URL to the root of documentation.
+     * 
+ */ + public Builder clearDocumentationRootUrl() { + + documentationRootUrl_ = getDefaultInstance().getDocumentationRootUrl(); + onChanged(); + return this; + } + /** + * optional string documentation_root_url = 4; + * + *
+     * The URL to the root of documentation.
+     * 
+ */ + public Builder setDocumentationRootUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + documentationRootUrl_ = value; + onChanged(); + return this; + } + + private java.lang.Object overview_ = ""; + /** + * optional string overview = 2; + * + *
+     * Declares a single overview page. For example:
+     *     documentation:
+     *       summary: ...
+     *       overview: (== include overview.md ==)
+     * This is a shortcut for the following declaration (using pages style):
+     *     documentation:
+     *       summary: ...
+     *       pages:
+     *       - name: Overview
+     *         content: (== include overview.md ==)
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ */ + public java.lang.String getOverview() { + java.lang.Object ref = overview_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + overview_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string overview = 2; + * + *
+     * Declares a single overview page. For example:
+     *     documentation:
+     *       summary: ...
+     *       overview: (== include overview.md ==)
+     * This is a shortcut for the following declaration (using pages style):
+     *     documentation:
+     *       summary: ...
+     *       pages:
+     *       - name: Overview
+     *         content: (== include overview.md ==)
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ */ + public com.google.protobuf.ByteString + getOverviewBytes() { + java.lang.Object ref = overview_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + overview_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string overview = 2; + * + *
+     * Declares a single overview page. For example:
+     *     documentation:
+     *       summary: ...
+     *       overview: (== include overview.md ==)
+     * This is a shortcut for the following declaration (using pages style):
+     *     documentation:
+     *       summary: ...
+     *       pages:
+     *       - name: Overview
+     *         content: (== include overview.md ==)
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ */ + public Builder setOverview( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + overview_ = value; + onChanged(); + return this; + } + /** + * optional string overview = 2; + * + *
+     * Declares a single overview page. For example:
+     *     documentation:
+     *       summary: ...
+     *       overview: (== include overview.md ==)
+     * This is a shortcut for the following declaration (using pages style):
+     *     documentation:
+     *       summary: ...
+     *       pages:
+     *       - name: Overview
+     *         content: (== include overview.md ==)
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ */ + public Builder clearOverview() { + + overview_ = getDefaultInstance().getOverview(); + onChanged(); + return this; + } + /** + * optional string overview = 2; + * + *
+     * Declares a single overview page. For example:
+     *     documentation:
+     *       summary: ...
+     *       overview: (== include overview.md ==)
+     * This is a shortcut for the following declaration (using pages style):
+     *     documentation:
+     *       summary: ...
+     *       pages:
+     *       - name: Overview
+     *         content: (== include overview.md ==)
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ */ + public Builder setOverviewBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + overview_ = 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.Documentation) + } + + // @@protoc_insertion_point(class_scope:google.api.Documentation) + private static final com.google.api.Documentation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Documentation(); + } + + public static com.google.api.Documentation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Documentation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Documentation(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.Documentation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/DocumentationOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/DocumentationOrBuilder.java new file mode 100644 index 000000000000..96368c4a792b --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/DocumentationOrBuilder.java @@ -0,0 +1,173 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +public interface DocumentationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Documentation) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string summary = 1; + * + *
+   * A short summary of what the service does. Can only be provided by
+   * plain text.
+   * 
+ */ + java.lang.String getSummary(); + /** + * optional string summary = 1; + * + *
+   * A short summary of what the service does. Can only be provided by
+   * plain text.
+   * 
+ */ + com.google.protobuf.ByteString + getSummaryBytes(); + + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + java.util.List + getPagesList(); + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + com.google.api.Page getPages(int index); + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + int getPagesCount(); + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + java.util.List + getPagesOrBuilderList(); + /** + * repeated .google.api.Page pages = 5; + * + *
+   * The top level pages for the documentation set.
+   * 
+ */ + com.google.api.PageOrBuilder getPagesOrBuilder( + int index); + + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + java.util.List + getRulesList(); + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + com.google.api.DocumentationRule getRules(int index); + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + int getRulesCount(); + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + java.util.List + getRulesOrBuilderList(); + /** + * repeated .google.api.DocumentationRule rules = 3; + * + *
+   * Documentation rules for individual elements of the service.
+   * 
+ */ + com.google.api.DocumentationRuleOrBuilder getRulesOrBuilder( + int index); + + /** + * optional string documentation_root_url = 4; + * + *
+   * The URL to the root of documentation.
+   * 
+ */ + java.lang.String getDocumentationRootUrl(); + /** + * optional string documentation_root_url = 4; + * + *
+   * The URL to the root of documentation.
+   * 
+ */ + com.google.protobuf.ByteString + getDocumentationRootUrlBytes(); + + /** + * optional string overview = 2; + * + *
+   * Declares a single overview page. For example:
+   *     documentation:
+   *       summary: ...
+   *       overview: (== include overview.md ==)
+   * This is a shortcut for the following declaration (using pages style):
+   *     documentation:
+   *       summary: ...
+   *       pages:
+   *       - name: Overview
+   *         content: (== include overview.md ==)
+   * Note: you cannot specify both `overview` field and `pages` field.
+   * 
+ */ + java.lang.String getOverview(); + /** + * optional string overview = 2; + * + *
+   * Declares a single overview page. For example:
+   *     documentation:
+   *       summary: ...
+   *       overview: (== include overview.md ==)
+   * This is a shortcut for the following declaration (using pages style):
+   *     documentation:
+   *       summary: ...
+   *       pages:
+   *       - name: Overview
+   *         content: (== include overview.md ==)
+   * Note: you cannot specify both `overview` field and `pages` field.
+   * 
+ */ + com.google.protobuf.ByteString + getOverviewBytes(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/DocumentationProto.java b/gcloud-java-gax/src/generated/main/java/com/google/api/DocumentationProto.java new file mode 100644 index 000000000000..f31f29d4752c --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/DocumentationProto.java @@ -0,0 +1,79 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +public final class DocumentationProto { + private DocumentationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Documentation_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Documentation_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_DocumentationRule_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_DocumentationRule_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Page_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Page_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036google/api/documentation.proto\022\ngoogle" + + ".api\"\241\001\n\rDocumentation\022\017\n\007summary\030\001 \001(\t\022" + + "\037\n\005pages\030\005 \003(\0132\020.google.api.Page\022,\n\005rule" + + "s\030\003 \003(\0132\035.google.api.DocumentationRule\022\036" + + "\n\026documentation_root_url\030\004 \001(\t\022\020\n\010overvi" + + "ew\030\002 \001(\t\":\n\021DocumentationRule\022\020\n\010selecto" + + "r\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\"I\n\004Page\022\014\n\004" + + "name\030\001 \001(\t\022\017\n\007content\030\002 \001(\t\022\"\n\010subpages\030" + + "\003 \003(\0132\020.google.api.PageB&\n\016com.google.ap" + + "iB\022DocumentationProtoP\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_Documentation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Documentation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Documentation_descriptor, + new java.lang.String[] { "Summary", "Pages", "Rules", "DocumentationRootUrl", "Overview", }); + internal_static_google_api_DocumentationRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_DocumentationRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_DocumentationRule_descriptor, + new java.lang.String[] { "Selector", "Description", }); + internal_static_google_api_Page_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_api_Page_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Page_descriptor, + new java.lang.String[] { "Name", "Content", "Subpages", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/DocumentationRule.java b/gcloud-java-gax/src/generated/main/java/com/google/api/DocumentationRule.java new file mode 100644 index 000000000000..5f9b9853026b --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/DocumentationRule.java @@ -0,0 +1,662 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.DocumentationRule} + * + *
+ * A documentation rule provides information about individual API elements.
+ * 
+ */ +public final class DocumentationRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.DocumentationRule) + DocumentationRuleOrBuilder { + // Use DocumentationRule.newBuilder() to construct. + private DocumentationRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DocumentationRule() { + selector_ = ""; + description_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private DocumentationRule( + 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: { + 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.DocumentationProto.internal_static_google_api_DocumentationRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.DocumentationRule.class, com.google.api.DocumentationRule.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object selector_; + /** + * optional string selector = 1; + * + *
+   * The selector is a comma-separated list of pattern. Each parttern is a
+   * qualified name of the element which may end in "*", indicating a wildcard.
+   * Wildcards are only allowed at the end and for a whole component of the
+   * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+   * specify a default for all applicable elements, the whole pattern "*"
+   * is used.
+   * 
+ */ + 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; + * + *
+   * The selector is a comma-separated list of pattern. Each parttern is a
+   * qualified name of the element which may end in "*", indicating a wildcard.
+   * Wildcards are only allowed at the end and for a whole component of the
+   * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+   * specify a default for all applicable elements, the whole pattern "*"
+   * is used.
+   * 
+ */ + 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 DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * optional string description = 2; + * + *
+   * Description of the selected API(s).
+   * 
+ */ + 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 = 2; + * + *
+   * Description of the selected API(s).
+   * 
+ */ + 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 (!getSelectorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + } + + 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 (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.DocumentationRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.DocumentationRule 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.DocumentationRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.DocumentationRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.DocumentationRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.DocumentationRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.DocumentationRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.DocumentationRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.DocumentationRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.DocumentationRule 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.DocumentationRule 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.DocumentationRule} + * + *
+   * A documentation rule provides information about individual API elements.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.DocumentationRule) + com.google.api.DocumentationRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.DocumentationRule.class, com.google.api.DocumentationRule.Builder.class); + } + + // Construct using com.google.api.DocumentationRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + selector_ = ""; + + description_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_descriptor; + } + + public com.google.api.DocumentationRule getDefaultInstanceForType() { + return com.google.api.DocumentationRule.getDefaultInstance(); + } + + public com.google.api.DocumentationRule build() { + com.google.api.DocumentationRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.DocumentationRule buildPartial() { + com.google.api.DocumentationRule result = new com.google.api.DocumentationRule(this); + result.selector_ = selector_; + result.description_ = description_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.DocumentationRule) { + return mergeFrom((com.google.api.DocumentationRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.DocumentationRule other) { + if (other == com.google.api.DocumentationRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.DocumentationRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.DocumentationRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object selector_ = ""; + /** + * optional string selector = 1; + * + *
+     * The selector is a comma-separated list of pattern. Each parttern is a
+     * qualified name of the element which may end in "*", indicating a wildcard.
+     * Wildcards are only allowed at the end and for a whole component of the
+     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+     * specify a default for all applicable elements, the whole pattern "*"
+     * is used.
+     * 
+ */ + 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; + * + *
+     * The selector is a comma-separated list of pattern. Each parttern is a
+     * qualified name of the element which may end in "*", indicating a wildcard.
+     * Wildcards are only allowed at the end and for a whole component of the
+     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+     * specify a default for all applicable elements, the whole pattern "*"
+     * is used.
+     * 
+ */ + 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; + * + *
+     * The selector is a comma-separated list of pattern. Each parttern is a
+     * qualified name of the element which may end in "*", indicating a wildcard.
+     * Wildcards are only allowed at the end and for a whole component of the
+     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+     * specify a default for all applicable elements, the whole pattern "*"
+     * is used.
+     * 
+ */ + public Builder setSelector( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + selector_ = value; + onChanged(); + return this; + } + /** + * optional string selector = 1; + * + *
+     * The selector is a comma-separated list of pattern. Each parttern is a
+     * qualified name of the element which may end in "*", indicating a wildcard.
+     * Wildcards are only allowed at the end and for a whole component of the
+     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+     * specify a default for all applicable elements, the whole pattern "*"
+     * is used.
+     * 
+ */ + public Builder clearSelector() { + + selector_ = getDefaultInstance().getSelector(); + onChanged(); + return this; + } + /** + * optional string selector = 1; + * + *
+     * The selector is a comma-separated list of pattern. Each parttern is a
+     * qualified name of the element which may end in "*", indicating a wildcard.
+     * Wildcards are only allowed at the end and for a whole component of the
+     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+     * specify a default for all applicable elements, the whole pattern "*"
+     * is used.
+     * 
+ */ + public Builder setSelectorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + selector_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * optional string description = 2; + * + *
+     * Description of the selected API(s).
+     * 
+ */ + 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 = 2; + * + *
+     * Description of the selected API(s).
+     * 
+ */ + 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 = 2; + * + *
+     * Description of the selected API(s).
+     * 
+ */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * optional string description = 2; + * + *
+     * Description of the selected API(s).
+     * 
+ */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * optional string description = 2; + * + *
+     * Description of the selected API(s).
+     * 
+ */ + 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.DocumentationRule) + } + + // @@protoc_insertion_point(class_scope:google.api.DocumentationRule) + private static final com.google.api.DocumentationRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.DocumentationRule(); + } + + public static com.google.api.DocumentationRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DocumentationRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new DocumentationRule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.DocumentationRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/DocumentationRuleOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/DocumentationRuleOrBuilder.java new file mode 100644 index 000000000000..859e1afd25af --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/DocumentationRuleOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +public interface DocumentationRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.DocumentationRule) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string selector = 1; + * + *
+   * The selector is a comma-separated list of pattern. Each parttern is a
+   * qualified name of the element which may end in "*", indicating a wildcard.
+   * Wildcards are only allowed at the end and for a whole component of the
+   * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+   * specify a default for all applicable elements, the whole pattern "*"
+   * is used.
+   * 
+ */ + java.lang.String getSelector(); + /** + * optional string selector = 1; + * + *
+   * The selector is a comma-separated list of pattern. Each parttern is a
+   * qualified name of the element which may end in "*", indicating a wildcard.
+   * Wildcards are only allowed at the end and for a whole component of the
+   * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
+   * specify a default for all applicable elements, the whole pattern "*"
+   * is used.
+   * 
+ */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + * optional string description = 2; + * + *
+   * Description of the selected API(s).
+   * 
+ */ + java.lang.String getDescription(); + /** + * optional string description = 2; + * + *
+   * Description of the selected API(s).
+   * 
+ */ + com.google.protobuf.ByteString + getDescriptionBytes(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/ErrorFormatProto.java b/gcloud-java-gax/src/generated/main/java/com/google/api/ErrorFormatProto.java new file mode 100644 index 000000000000..c1cbe4a2c182 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/ErrorFormatProto.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/error.proto + +package com.google.api; + +public final class ErrorFormatProto { + private ErrorFormatProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_CustomError_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_CustomError_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_CustomErrorRule_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_CustomErrorRule_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/error.proto\022\ngoogle.api\"H\n\013" + + "CustomError\022*\n\005rules\030\001 \003(\0132\033.google.api." + + "CustomErrorRule\022\r\n\005types\030\002 \003(\t\"U\n\017Custom" + + "ErrorRule\022\020\n\010selector\030\001 \001(\t\022\031\n\rstubby_br" + + "idge\030\002 \001(\005B\002\030\001\022\025\n\ris_error_type\030\003 \001(\010B\'\n" + + "\016com.google.apiB\020ErrorFormatProtoP\001\370\001\001b\006" + + "proto3" + }; + 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_CustomError_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_CustomError_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_CustomError_descriptor, + new java.lang.String[] { "Rules", "Types", }); + internal_static_google_api_CustomErrorRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_CustomErrorRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_CustomErrorRule_descriptor, + new java.lang.String[] { "Selector", "StubbyBridge", "IsErrorType", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/Http.java b/gcloud-java-gax/src/generated/main/java/com/google/api/Http.java new file mode 100644 index 000000000000..b382bc022260 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/Http.java @@ -0,0 +1,759 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Http} + * + *
+ * Defines the HTTP configuration for a service. It contains a list of
+ * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
+ * to one or more HTTP REST API methods.
+ * 
+ */ +public final class Http extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Http) + HttpOrBuilder { + // Use Http.newBuilder() to construct. + private Http(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Http() { + rules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Http( + 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)) { + rules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + rules_.add(input.readMessage(com.google.api.HttpRule.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Http.class, com.google.api.Http.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + private java.util.List rules_; + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + public java.util.List getRulesList() { + return rules_; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + public int getRulesCount() { + return rules_.size(); + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + public com.google.api.HttpRule getRules(int index) { + return rules_.get(index); + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + public com.google.api.HttpRuleOrBuilder 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 < rules_.size(); i++) { + output.writeMessage(1, rules_.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(1, rules_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Http parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Http 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.Http parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Http parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Http parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Http parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Http parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Http parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Http parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Http 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.Http 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.Http} + * + *
+   * Defines the HTTP configuration for a service. It contains a list of
+   * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
+   * to one or more HTTP REST API methods.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Http) + com.google.api.HttpOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Http.class, com.google.api.Http.Builder.class); + } + + // Construct using com.google.api.Http.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRulesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rulesBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; + } + + public com.google.api.Http getDefaultInstanceForType() { + return com.google.api.Http.getDefaultInstance(); + } + + public com.google.api.Http build() { + com.google.api.Http result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Http buildPartial() { + com.google.api.Http result = new com.google.api.Http(this); + int from_bitField0_ = bitField0_; + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Http) { + return mergeFrom((com.google.api.Http)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Http other) { + if (other == com.google.api.Http.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.Http parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Http) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> rulesBuilder_; + + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public com.google.api.HttpRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.HttpRule 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.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder addRules(com.google.api.HttpRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.HttpRule 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.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder addRules( + com.google.api.HttpRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public com.google.api.HttpRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public com.google.api.HttpRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public com.google.api.HttpRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.api.HttpRule.getDefaultInstance()); + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public com.google.api.HttpRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.api.HttpRule.getDefaultInstance()); + } + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+     * A list of HTTP rules for configuring the HTTP REST API methods.
+     * 
+ */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.api.Http) + } + + // @@protoc_insertion_point(class_scope:google.api.Http) + private static final com.google.api.Http DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Http(); + } + + public static com.google.api.Http getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Http parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Http(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.Http getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/HttpOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/HttpOrBuilder.java new file mode 100644 index 000000000000..22192448d7ee --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/HttpOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface HttpOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Http) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + java.util.List + getRulesList(); + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + com.google.api.HttpRule getRules(int index); + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + int getRulesCount(); + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + java.util.List + getRulesOrBuilderList(); + /** + * repeated .google.api.HttpRule rules = 1; + * + *
+   * A list of HTTP rules for configuring the HTTP REST API methods.
+   * 
+ */ + com.google.api.HttpRuleOrBuilder getRulesOrBuilder( + int index); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/HttpProto.java b/gcloud-java-gax/src/generated/main/java/com/google/api/HttpProto.java new file mode 100644 index 000000000000..7ef3d1fdaa97 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/HttpProto.java @@ -0,0 +1,106 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public final class HttpProto { + private HttpProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Http_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Http_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_HttpRule_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_HttpRule_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_CustomHttpPattern_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_CustomHttpPattern_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MediaUpload_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_MediaUpload_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MediaDownload_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_MediaDownload_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/http.proto\022\ngoogle.api\"+\n\004H" + + "ttp\022#\n\005rules\030\001 \003(\0132\024.google.api.HttpRule" + + "\"\314\002\n\010HttpRule\022\020\n\010selector\030\001 \001(\t\022\r\n\003get\030\002" + + " \001(\tH\000\022\r\n\003put\030\003 \001(\tH\000\022\016\n\004post\030\004 \001(\tH\000\022\020\n" + + "\006delete\030\005 \001(\tH\000\022\017\n\005patch\030\006 \001(\tH\000\022/\n\006cust" + + "om\030\010 \001(\0132\035.google.api.CustomHttpPatternH" + + "\000\022\014\n\004body\030\007 \001(\t\022-\n\014media_upload\030\t \001(\0132\027." + + "google.api.MediaUpload\0221\n\016media_download" + + "\030\n \001(\0132\031.google.api.MediaDownload\0221\n\023add" + + "itional_bindings\030\013 \003(\0132\024.google.api.Http", + "RuleB\t\n\007pattern\"/\n\021CustomHttpPattern\022\014\n\004" + + "kind\030\001 \001(\t\022\014\n\004path\030\002 \001(\t\"\036\n\013MediaUpload\022" + + "\017\n\007enabled\030\003 \001(\010\" \n\rMediaDownload\022\017\n\007ena" + + "bled\030\001 \001(\010B \n\016com.google.apiB\tHttpProtoP" + + "\001\370\001\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_Http_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Http_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Http_descriptor, + new java.lang.String[] { "Rules", }); + internal_static_google_api_HttpRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_HttpRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_HttpRule_descriptor, + new java.lang.String[] { "Selector", "Get", "Put", "Post", "Delete", "Patch", "Custom", "Body", "MediaUpload", "MediaDownload", "AdditionalBindings", "Pattern", }); + internal_static_google_api_CustomHttpPattern_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_api_CustomHttpPattern_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_CustomHttpPattern_descriptor, + new java.lang.String[] { "Kind", "Path", }); + internal_static_google_api_MediaUpload_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_api_MediaUpload_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_MediaUpload_descriptor, + new java.lang.String[] { "Enabled", }); + internal_static_google_api_MediaDownload_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_api_MediaDownload_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_MediaDownload_descriptor, + new java.lang.String[] { "Enabled", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/HttpRule.java b/gcloud-java-gax/src/generated/main/java/com/google/api/HttpRule.java new file mode 100644 index 000000000000..e37c48096fdd --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/HttpRule.java @@ -0,0 +1,3069 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.HttpRule} + * + *
+ * `HttpRule` defines the mapping of an RPC method to one or more HTTP
+ * REST APIs.  The mapping determines what portions of the request
+ * message are populated from the path, query parameters, or body of
+ * the HTTP request.  The mapping is typically specified as an
+ * `google.api.http` annotation, see "google/api/annotations.proto"
+ * for details.
+ * The mapping consists of a field specifying the path template and
+ * method kind.  The path template can refer to fields in the request
+ * message, as in the example below which describes a REST GET
+ * operation on a resource collection of messages:
+ * ```proto
+ * service Messaging {
+ *   rpc GetMessage(GetMessageRequest) returns (Message) {
+ *     option (google.api.http).get = "/v1/messages/{message_id}";
+ *   }
+ * }
+ * message GetMessageRequest {
+ *   string message_id = 1; // mapped to the URL
+ * }
+ * message Message {
+ *   string text = 1; // content of the resource
+ * }
+ * ```
+ * This definition enables an automatic, bidrectional mapping of HTTP
+ * JSON to RPC. Example:
+ * HTTP | RPC
+ * -----|-----
+ * `GET /v1/messages/123456`  | `GetMessage(message_id: "123456")`
+ * In general, not only fields but also field paths can be referenced
+ * from a path pattern. Fields mapped to the path pattern cannot be
+ * repeated and must have a primitive (non-message) type.
+ * Any fields in the request message which are not bound by the path
+ * pattern automatically become (optional) HTTP query
+ * parameters. Assume the following definition of the request message:
+ * ```proto
+ * message GetMessageRequest {
+ *   string message_id = 1; // mapped to the URL
+ *   int64 revision = 2;    // becomes a parameter
+ * }
+ * ```
+ * This enables a HTTP JSON to RPC mapping as below:
+ * HTTP | RPC
+ * -----|-----
+ * `GET /v1/messages/123456?revision=2` | `GetMessage(message_id: "123456" revision: 2)`
+ * Note that fields which are mapped to HTTP parameters must have a
+ * primitive type or a repeated primitive type. Message types are not
+ * allowed. In the case of a repeated type, the parameter can be
+ * repeated in the URL, as in `...?param=A&param=B`.
+ * For HTTP method kinds which allow a request body, the `body` field
+ * specifies the mapping. Consider a REST update method on the
+ * message resource collection:
+ * ```proto
+ * service Messaging {
+ *   rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
+ *     option (google.api.http) = {
+ *       put: "/v1/messages/{message_id}"
+ *       body: "message"
+ *   }
+ * }
+ * message UpdateMessageRequest {
+ *   string message_id = 1; // mapped to the URL
+ *   Message message = 2;   // mapped to the body
+ * }
+ * ```
+ * The following HTTP JSON to RPC mapping is enabled, where the
+ * representation of the JSON in the request body is determined by
+ * protos JSON encoding:
+ * HTTP | RPC
+ * -----|-----
+ * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
+ * The special name `*` can be used in the body mapping to define that
+ * every field not bound by the path template should be mapped to the
+ * request body.  This enables the following alternative definition of
+ * the update method:
+ * ```proto
+ * service Messaging {
+ *   rpc UpdateMessage(Message) returns (Message) {
+ *     option (google.api.http) = {
+ *       put: "/v1/messages/{message_id}"
+ *       body: "*"
+ *   }
+ * }
+ * message Message {
+ *   string message_id = 2;
+ *   string text = 2;
+ * }
+ * ```
+ * The following HTTP JSON to RPC mapping is enabled:
+ * HTTP | RPC
+ * -----|-----
+ * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
+ * Note that when using `*` in the body mapping, it is not possible to
+ * have HTTP parameters, as all fields not bound by the path end in
+ * the body. This makes this option more rarely used in practice of
+ * defining REST APIs. The common usage of `*` is in custom methods
+ * which don't use the URL at all for transferring data.
+ * It is possible to define multiple HTTP methods for one RPC by using
+ * the `additional_bindings` option. Example:
+ * ```proto
+ * service Messaging {
+ *   rpc GetMessage(GetMessageRequest) returns (Message) {
+ *     option (google.api.http) = {
+ *       get: "/v1/messages/{message_id}"
+ *       additional_bindings {
+ *         get: "/v1/users/{user_id}/messages/{message_id}"
+ *       }
+ *   }
+ * }
+ * message GetMessageRequest {
+ *   string message_id = 1;
+ *   string user_id = 2;
+ * }
+ * ```
+ * This enables the following two alternative HTTP JSON to RPC
+ * mappings:
+ * HTTP | RPC
+ * -----|-----
+ * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
+ * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
+ * # Rules for HTTP mapping
+ * The rules for mapping HTTP path, query parameters, and body fields
+ * to the request message are as follows:
+ * 1. The `body` field specifies either `*` or a field path, or is
+ *    omitted. If omitted, it assumes there is no HTTP body.
+ * 2. Leaf fields (recursive expansion of nested messages in the
+ *    request) can be classified into three types:
+ *     (a) Matched in the URL template.
+ *     (b) Covered by body (if body is `*`, everything except (a) fields;
+ *         else everything under the body field)
+ *     (c) All other fields.
+ * 3. URL query parameters found in the HTTP request are mapped to (c) fields.
+ * 4. Any body sent with an HTTP request can contain only (b) fields.
+ * The syntax of the path template is as follows:
+ *     Template = "/" Segments [ Verb ] ;
+ *     Segments = Segment { "/" Segment } ;
+ *     Segment  = "*" | "**" | LITERAL | Variable ;
+ *     Variable = "{" FieldPath [ "=" Segments ] "}" ;
+ *     FieldPath = IDENT { "." IDENT } ;
+ *     Verb     = ":" LITERAL ;
+ * The syntax `*` matches a single path segment. It follows the semantics of
+ * [RFC 6570](https://tools.ietf.org/html.rfc6570) Section 3.2.2 Simple String
+ * Expansion.
+ * The syntax `**` matches zero or more path segments. It follows the semantics
+ * of [RFC 6570](https://tools.ietf.org/html.rfc6570) Section 3.2.3 Reserved
+ * Expansion.
+ * The syntax `LITERAL` matches literal text in the URL path.
+ * The syntax `Variable` matches the entire path as specified by its template;
+ * this nested template must not contain further variables. If a variable
+ * matches a single path segment, its template may be omitted, e.g. `{var}`
+ * is equivalent to `{var=*}`.
+ * NOTE: the field paths in variables and in the `body` must not refer to
+ * repeated fields or map fields.
+ * Use CustomHttpPattern to specify any HTTP method that is not included in the
+ * `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for
+ * a given URL path rule. The wild-card rule is useful for services that provide
+ * content to Web (HTML) clients.
+ * 
+ */ +public final class HttpRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.HttpRule) + HttpRuleOrBuilder { + // Use HttpRule.newBuilder() to construct. + private HttpRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HttpRule() { + selector_ = ""; + body_ = ""; + additionalBindings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private HttpRule( + 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: { + String s = input.readStringRequireUtf8(); + patternCase_ = 2; + pattern_ = s; + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + patternCase_ = 3; + pattern_ = s; + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + patternCase_ = 4; + pattern_ = s; + break; + } + case 42: { + String s = input.readStringRequireUtf8(); + patternCase_ = 5; + pattern_ = s; + break; + } + case 50: { + String s = input.readStringRequireUtf8(); + patternCase_ = 6; + pattern_ = s; + break; + } + case 58: { + String s = input.readStringRequireUtf8(); + + body_ = s; + break; + } + case 66: { + com.google.api.CustomHttpPattern.Builder subBuilder = null; + if (patternCase_ == 8) { + subBuilder = ((com.google.api.CustomHttpPattern) pattern_).toBuilder(); + } + pattern_ = + input.readMessage(com.google.api.CustomHttpPattern.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.api.CustomHttpPattern) pattern_); + pattern_ = subBuilder.buildPartial(); + } + patternCase_ = 8; + break; + } + case 74: { + com.google.api.MediaUpload.Builder subBuilder = null; + if (mediaUpload_ != null) { + subBuilder = mediaUpload_.toBuilder(); + } + mediaUpload_ = input.readMessage(com.google.api.MediaUpload.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(mediaUpload_); + mediaUpload_ = subBuilder.buildPartial(); + } + + break; + } + case 82: { + com.google.api.MediaDownload.Builder subBuilder = null; + if (mediaDownload_ != null) { + subBuilder = mediaDownload_.toBuilder(); + } + mediaDownload_ = input.readMessage(com.google.api.MediaDownload.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(mediaDownload_); + mediaDownload_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { + additionalBindings_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000400; + } + additionalBindings_.add(input.readMessage(com.google.api.HttpRule.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { + additionalBindings_ = java.util.Collections.unmodifiableList(additionalBindings_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.HttpRule.class, com.google.api.HttpRule.Builder.class); + } + + private int bitField0_; + private int patternCase_ = 0; + private java.lang.Object pattern_; + public enum PatternCase + implements com.google.protobuf.Internal.EnumLite { + GET(2), + PUT(3), + POST(4), + DELETE(5), + PATCH(6), + CUSTOM(8), + PATTERN_NOT_SET(0); + private int value = 0; + private PatternCase(int value) { + this.value = value; + } + public static PatternCase valueOf(int value) { + switch (value) { + case 2: return GET; + case 3: return PUT; + case 4: return POST; + case 5: return DELETE; + case 6: return PATCH; + case 8: return CUSTOM; + case 0: return PATTERN_NOT_SET; + default: throw new java.lang.IllegalArgumentException( + "Value is undefined for this oneof enum."); + } + } + public int getNumber() { + return this.value; + } + }; + + public PatternCase + getPatternCase() { + return PatternCase.valueOf( + patternCase_); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object selector_; + /** + * optional string selector = 1; + * + *
+   * Selects 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 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 GET_FIELD_NUMBER = 2; + /** + * optional string get = 2; + * + *
+   * Used for listing and getting information about resources.
+   * 
+ */ + public java.lang.String getGet() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + 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(); + if (patternCase_ == 2) { + pattern_ = s; + } + return s; + } + } + /** + * optional string get = 2; + * + *
+   * Used for listing and getting information about resources.
+   * 
+ */ + public com.google.protobuf.ByteString + getGetBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 2) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUT_FIELD_NUMBER = 3; + /** + * optional string put = 3; + * + *
+   * Used for updating a resource.
+   * 
+ */ + public java.lang.String getPut() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + 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(); + if (patternCase_ == 3) { + pattern_ = s; + } + return s; + } + } + /** + * optional string put = 3; + * + *
+   * Used for updating a resource.
+   * 
+ */ + public com.google.protobuf.ByteString + getPutBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 3) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POST_FIELD_NUMBER = 4; + /** + * optional string post = 4; + * + *
+   * Used for creating a resource.
+   * 
+ */ + public java.lang.String getPost() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + 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(); + if (patternCase_ == 4) { + pattern_ = s; + } + return s; + } + } + /** + * optional string post = 4; + * + *
+   * Used for creating a resource.
+   * 
+ */ + public com.google.protobuf.ByteString + getPostBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 4) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELETE_FIELD_NUMBER = 5; + /** + * optional string delete = 5; + * + *
+   * Used for deleting a resource.
+   * 
+ */ + public java.lang.String getDelete() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + 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(); + if (patternCase_ == 5) { + pattern_ = s; + } + return s; + } + } + /** + * optional string delete = 5; + * + *
+   * Used for deleting a resource.
+   * 
+ */ + public com.google.protobuf.ByteString + getDeleteBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 5) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATCH_FIELD_NUMBER = 6; + /** + * optional string patch = 6; + * + *
+   * Used for updating a resource.
+   * 
+ */ + public java.lang.String getPatch() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + 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(); + if (patternCase_ == 6) { + pattern_ = s; + } + return s; + } + } + /** + * optional string patch = 6; + * + *
+   * Used for updating a resource.
+   * 
+ */ + public com.google.protobuf.ByteString + getPatchBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 6) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOM_FIELD_NUMBER = 8; + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+   * Custom pattern is used for defining custom verbs.
+   * 
+ */ + public com.google.api.CustomHttpPattern getCustom() { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+   * Custom pattern is used for defining custom verbs.
+   * 
+ */ + public com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder() { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + + public static final int BODY_FIELD_NUMBER = 7; + private volatile java.lang.Object body_; + /** + * optional string body = 7; + * + *
+   * The name of the request field whose value is mapped to the HTTP body, or
+   * `*` for mapping all fields not captured by the path pattern to the HTTP
+   * body. NOTE: the referred field must not be a repeated field.
+   * 
+ */ + public java.lang.String getBody() { + java.lang.Object ref = body_; + 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(); + body_ = s; + return s; + } + } + /** + * optional string body = 7; + * + *
+   * The name of the request field whose value is mapped to the HTTP body, or
+   * `*` for mapping all fields not captured by the path pattern to the HTTP
+   * body. NOTE: the referred field must not be a repeated field.
+   * 
+ */ + public com.google.protobuf.ByteString + getBodyBytes() { + java.lang.Object ref = body_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + body_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEDIA_UPLOAD_FIELD_NUMBER = 9; + private com.google.api.MediaUpload mediaUpload_; + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public boolean hasMediaUpload() { + return mediaUpload_ != null; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public com.google.api.MediaUpload getMediaUpload() { + return mediaUpload_ == null ? com.google.api.MediaUpload.getDefaultInstance() : mediaUpload_; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public com.google.api.MediaUploadOrBuilder getMediaUploadOrBuilder() { + return getMediaUpload(); + } + + public static final int MEDIA_DOWNLOAD_FIELD_NUMBER = 10; + private com.google.api.MediaDownload mediaDownload_; + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public boolean hasMediaDownload() { + return mediaDownload_ != null; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public com.google.api.MediaDownload getMediaDownload() { + return mediaDownload_ == null ? com.google.api.MediaDownload.getDefaultInstance() : mediaDownload_; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public com.google.api.MediaDownloadOrBuilder getMediaDownloadOrBuilder() { + return getMediaDownload(); + } + + public static final int ADDITIONAL_BINDINGS_FIELD_NUMBER = 11; + private java.util.List additionalBindings_; + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + public java.util.List getAdditionalBindingsList() { + return additionalBindings_; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + public java.util.List + getAdditionalBindingsOrBuilderList() { + return additionalBindings_; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + public int getAdditionalBindingsCount() { + return additionalBindings_.size(); + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + public com.google.api.HttpRule getAdditionalBindings(int index) { + return additionalBindings_.get(index); + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + public com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( + int index) { + return additionalBindings_.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 (patternCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, pattern_); + } + if (patternCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pattern_); + } + if (patternCase_ == 4) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pattern_); + } + if (patternCase_ == 5) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, pattern_); + } + if (patternCase_ == 6) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, pattern_); + } + if (!getBodyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, body_); + } + if (patternCase_ == 8) { + output.writeMessage(8, (com.google.api.CustomHttpPattern) pattern_); + } + if (mediaUpload_ != null) { + output.writeMessage(9, getMediaUpload()); + } + if (mediaDownload_ != null) { + output.writeMessage(10, getMediaDownload()); + } + for (int i = 0; i < additionalBindings_.size(); i++) { + output.writeMessage(11, additionalBindings_.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 (patternCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, pattern_); + } + if (patternCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pattern_); + } + if (patternCase_ == 4) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pattern_); + } + if (patternCase_ == 5) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pattern_); + } + if (patternCase_ == 6) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, pattern_); + } + if (!getBodyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, body_); + } + if (patternCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.api.CustomHttpPattern) pattern_); + } + if (mediaUpload_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getMediaUpload()); + } + if (mediaDownload_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getMediaDownload()); + } + for (int i = 0; i < additionalBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, additionalBindings_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.HttpRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.HttpRule 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.HttpRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.HttpRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.HttpRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.HttpRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.HttpRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.HttpRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.HttpRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.HttpRule 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.HttpRule 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.HttpRule} + * + *
+   * `HttpRule` defines the mapping of an RPC method to one or more HTTP
+   * REST APIs.  The mapping determines what portions of the request
+   * message are populated from the path, query parameters, or body of
+   * the HTTP request.  The mapping is typically specified as an
+   * `google.api.http` annotation, see "google/api/annotations.proto"
+   * for details.
+   * The mapping consists of a field specifying the path template and
+   * method kind.  The path template can refer to fields in the request
+   * message, as in the example below which describes a REST GET
+   * operation on a resource collection of messages:
+   * ```proto
+   * service Messaging {
+   *   rpc GetMessage(GetMessageRequest) returns (Message) {
+   *     option (google.api.http).get = "/v1/messages/{message_id}";
+   *   }
+   * }
+   * message GetMessageRequest {
+   *   string message_id = 1; // mapped to the URL
+   * }
+   * message Message {
+   *   string text = 1; // content of the resource
+   * }
+   * ```
+   * This definition enables an automatic, bidrectional mapping of HTTP
+   * JSON to RPC. Example:
+   * HTTP | RPC
+   * -----|-----
+   * `GET /v1/messages/123456`  | `GetMessage(message_id: "123456")`
+   * In general, not only fields but also field paths can be referenced
+   * from a path pattern. Fields mapped to the path pattern cannot be
+   * repeated and must have a primitive (non-message) type.
+   * Any fields in the request message which are not bound by the path
+   * pattern automatically become (optional) HTTP query
+   * parameters. Assume the following definition of the request message:
+   * ```proto
+   * message GetMessageRequest {
+   *   string message_id = 1; // mapped to the URL
+   *   int64 revision = 2;    // becomes a parameter
+   * }
+   * ```
+   * This enables a HTTP JSON to RPC mapping as below:
+   * HTTP | RPC
+   * -----|-----
+   * `GET /v1/messages/123456?revision=2` | `GetMessage(message_id: "123456" revision: 2)`
+   * Note that fields which are mapped to HTTP parameters must have a
+   * primitive type or a repeated primitive type. Message types are not
+   * allowed. In the case of a repeated type, the parameter can be
+   * repeated in the URL, as in `...?param=A&param=B`.
+   * For HTTP method kinds which allow a request body, the `body` field
+   * specifies the mapping. Consider a REST update method on the
+   * message resource collection:
+   * ```proto
+   * service Messaging {
+   *   rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
+   *     option (google.api.http) = {
+   *       put: "/v1/messages/{message_id}"
+   *       body: "message"
+   *   }
+   * }
+   * message UpdateMessageRequest {
+   *   string message_id = 1; // mapped to the URL
+   *   Message message = 2;   // mapped to the body
+   * }
+   * ```
+   * The following HTTP JSON to RPC mapping is enabled, where the
+   * representation of the JSON in the request body is determined by
+   * protos JSON encoding:
+   * HTTP | RPC
+   * -----|-----
+   * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
+   * The special name `*` can be used in the body mapping to define that
+   * every field not bound by the path template should be mapped to the
+   * request body.  This enables the following alternative definition of
+   * the update method:
+   * ```proto
+   * service Messaging {
+   *   rpc UpdateMessage(Message) returns (Message) {
+   *     option (google.api.http) = {
+   *       put: "/v1/messages/{message_id}"
+   *       body: "*"
+   *   }
+   * }
+   * message Message {
+   *   string message_id = 2;
+   *   string text = 2;
+   * }
+   * ```
+   * The following HTTP JSON to RPC mapping is enabled:
+   * HTTP | RPC
+   * -----|-----
+   * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
+   * Note that when using `*` in the body mapping, it is not possible to
+   * have HTTP parameters, as all fields not bound by the path end in
+   * the body. This makes this option more rarely used in practice of
+   * defining REST APIs. The common usage of `*` is in custom methods
+   * which don't use the URL at all for transferring data.
+   * It is possible to define multiple HTTP methods for one RPC by using
+   * the `additional_bindings` option. Example:
+   * ```proto
+   * service Messaging {
+   *   rpc GetMessage(GetMessageRequest) returns (Message) {
+   *     option (google.api.http) = {
+   *       get: "/v1/messages/{message_id}"
+   *       additional_bindings {
+   *         get: "/v1/users/{user_id}/messages/{message_id}"
+   *       }
+   *   }
+   * }
+   * message GetMessageRequest {
+   *   string message_id = 1;
+   *   string user_id = 2;
+   * }
+   * ```
+   * This enables the following two alternative HTTP JSON to RPC
+   * mappings:
+   * HTTP | RPC
+   * -----|-----
+   * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
+   * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
+   * # Rules for HTTP mapping
+   * The rules for mapping HTTP path, query parameters, and body fields
+   * to the request message are as follows:
+   * 1. The `body` field specifies either `*` or a field path, or is
+   *    omitted. If omitted, it assumes there is no HTTP body.
+   * 2. Leaf fields (recursive expansion of nested messages in the
+   *    request) can be classified into three types:
+   *     (a) Matched in the URL template.
+   *     (b) Covered by body (if body is `*`, everything except (a) fields;
+   *         else everything under the body field)
+   *     (c) All other fields.
+   * 3. URL query parameters found in the HTTP request are mapped to (c) fields.
+   * 4. Any body sent with an HTTP request can contain only (b) fields.
+   * The syntax of the path template is as follows:
+   *     Template = "/" Segments [ Verb ] ;
+   *     Segments = Segment { "/" Segment } ;
+   *     Segment  = "*" | "**" | LITERAL | Variable ;
+   *     Variable = "{" FieldPath [ "=" Segments ] "}" ;
+   *     FieldPath = IDENT { "." IDENT } ;
+   *     Verb     = ":" LITERAL ;
+   * The syntax `*` matches a single path segment. It follows the semantics of
+   * [RFC 6570](https://tools.ietf.org/html.rfc6570) Section 3.2.2 Simple String
+   * Expansion.
+   * The syntax `**` matches zero or more path segments. It follows the semantics
+   * of [RFC 6570](https://tools.ietf.org/html.rfc6570) Section 3.2.3 Reserved
+   * Expansion.
+   * The syntax `LITERAL` matches literal text in the URL path.
+   * The syntax `Variable` matches the entire path as specified by its template;
+   * this nested template must not contain further variables. If a variable
+   * matches a single path segment, its template may be omitted, e.g. `{var}`
+   * is equivalent to `{var=*}`.
+   * NOTE: the field paths in variables and in the `body` must not refer to
+   * repeated fields or map fields.
+   * Use CustomHttpPattern to specify any HTTP method that is not included in the
+   * `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for
+   * a given URL path rule. The wild-card rule is useful for services that provide
+   * content to Web (HTML) clients.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.HttpRule) + com.google.api.HttpRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.HttpRule.class, com.google.api.HttpRule.Builder.class); + } + + // Construct using com.google.api.HttpRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getAdditionalBindingsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + selector_ = ""; + + body_ = ""; + + if (mediaUploadBuilder_ == null) { + mediaUpload_ = null; + } else { + mediaUpload_ = null; + mediaUploadBuilder_ = null; + } + if (mediaDownloadBuilder_ == null) { + mediaDownload_ = null; + } else { + mediaDownload_ = null; + mediaDownloadBuilder_ = null; + } + if (additionalBindingsBuilder_ == null) { + additionalBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + } else { + additionalBindingsBuilder_.clear(); + } + patternCase_ = 0; + pattern_ = null; + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; + } + + public com.google.api.HttpRule getDefaultInstanceForType() { + return com.google.api.HttpRule.getDefaultInstance(); + } + + public com.google.api.HttpRule build() { + com.google.api.HttpRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.HttpRule buildPartial() { + com.google.api.HttpRule result = new com.google.api.HttpRule(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.selector_ = selector_; + if (patternCase_ == 2) { + result.pattern_ = pattern_; + } + if (patternCase_ == 3) { + result.pattern_ = pattern_; + } + if (patternCase_ == 4) { + result.pattern_ = pattern_; + } + if (patternCase_ == 5) { + result.pattern_ = pattern_; + } + if (patternCase_ == 6) { + result.pattern_ = pattern_; + } + if (patternCase_ == 8) { + if (customBuilder_ == null) { + result.pattern_ = pattern_; + } else { + result.pattern_ = customBuilder_.build(); + } + } + result.body_ = body_; + if (mediaUploadBuilder_ == null) { + result.mediaUpload_ = mediaUpload_; + } else { + result.mediaUpload_ = mediaUploadBuilder_.build(); + } + if (mediaDownloadBuilder_ == null) { + result.mediaDownload_ = mediaDownload_; + } else { + result.mediaDownload_ = mediaDownloadBuilder_.build(); + } + if (additionalBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000400) == 0x00000400)) { + additionalBindings_ = java.util.Collections.unmodifiableList(additionalBindings_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.additionalBindings_ = additionalBindings_; + } else { + result.additionalBindings_ = additionalBindingsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + result.patternCase_ = patternCase_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.HttpRule) { + return mergeFrom((com.google.api.HttpRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.HttpRule other) { + if (other == com.google.api.HttpRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + onChanged(); + } + if (!other.getBody().isEmpty()) { + body_ = other.body_; + onChanged(); + } + if (other.hasMediaUpload()) { + mergeMediaUpload(other.getMediaUpload()); + } + if (other.hasMediaDownload()) { + mergeMediaDownload(other.getMediaDownload()); + } + if (additionalBindingsBuilder_ == null) { + if (!other.additionalBindings_.isEmpty()) { + if (additionalBindings_.isEmpty()) { + additionalBindings_ = other.additionalBindings_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.addAll(other.additionalBindings_); + } + onChanged(); + } + } else { + if (!other.additionalBindings_.isEmpty()) { + if (additionalBindingsBuilder_.isEmpty()) { + additionalBindingsBuilder_.dispose(); + additionalBindingsBuilder_ = null; + additionalBindings_ = other.additionalBindings_; + bitField0_ = (bitField0_ & ~0x00000400); + additionalBindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getAdditionalBindingsFieldBuilder() : null; + } else { + additionalBindingsBuilder_.addAllMessages(other.additionalBindings_); + } + } + } + switch (other.getPatternCase()) { + case GET: { + patternCase_ = 2; + pattern_ = other.pattern_; + onChanged(); + break; + } + case PUT: { + patternCase_ = 3; + pattern_ = other.pattern_; + onChanged(); + break; + } + case POST: { + patternCase_ = 4; + pattern_ = other.pattern_; + onChanged(); + break; + } + case DELETE: { + patternCase_ = 5; + pattern_ = other.pattern_; + onChanged(); + break; + } + case PATCH: { + patternCase_ = 6; + pattern_ = other.pattern_; + onChanged(); + break; + } + case CUSTOM: { + mergeCustom(other.getCustom()); + break; + } + case PATTERN_NOT_SET: { + break; + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.HttpRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.HttpRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int patternCase_ = 0; + private java.lang.Object pattern_; + public PatternCase + getPatternCase() { + return PatternCase.valueOf( + patternCase_); + } + + public Builder clearPattern() { + patternCase_ = 0; + pattern_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * optional string selector = 1; + * + *
+     * Selects 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 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 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 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 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; + } + + /** + * optional string get = 2; + * + *
+     * Used for listing and getting information about resources.
+     * 
+ */ + public java.lang.String getGet() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 2) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string get = 2; + * + *
+     * Used for listing and getting information about resources.
+     * 
+ */ + public com.google.protobuf.ByteString + getGetBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 2) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string get = 2; + * + *
+     * Used for listing and getting information about resources.
+     * 
+ */ + public Builder setGet( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 2; + pattern_ = value; + onChanged(); + return this; + } + /** + * optional string get = 2; + * + *
+     * Used for listing and getting information about resources.
+     * 
+ */ + public Builder clearGet() { + if (patternCase_ == 2) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * optional string get = 2; + * + *
+     * Used for listing and getting information about resources.
+     * 
+ */ + public Builder setGetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 2; + pattern_ = value; + onChanged(); + return this; + } + + /** + * optional string put = 3; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public java.lang.String getPut() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 3) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string put = 3; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public com.google.protobuf.ByteString + getPutBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 3) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string put = 3; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public Builder setPut( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 3; + pattern_ = value; + onChanged(); + return this; + } + /** + * optional string put = 3; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public Builder clearPut() { + if (patternCase_ == 3) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * optional string put = 3; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public Builder setPutBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 3; + pattern_ = value; + onChanged(); + return this; + } + + /** + * optional string post = 4; + * + *
+     * Used for creating a resource.
+     * 
+ */ + public java.lang.String getPost() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 4) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string post = 4; + * + *
+     * Used for creating a resource.
+     * 
+ */ + public com.google.protobuf.ByteString + getPostBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 4) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string post = 4; + * + *
+     * Used for creating a resource.
+     * 
+ */ + public Builder setPost( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 4; + pattern_ = value; + onChanged(); + return this; + } + /** + * optional string post = 4; + * + *
+     * Used for creating a resource.
+     * 
+ */ + public Builder clearPost() { + if (patternCase_ == 4) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * optional string post = 4; + * + *
+     * Used for creating a resource.
+     * 
+ */ + public Builder setPostBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 4; + pattern_ = value; + onChanged(); + return this; + } + + /** + * optional string delete = 5; + * + *
+     * Used for deleting a resource.
+     * 
+ */ + public java.lang.String getDelete() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 5) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string delete = 5; + * + *
+     * Used for deleting a resource.
+     * 
+ */ + public com.google.protobuf.ByteString + getDeleteBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 5) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string delete = 5; + * + *
+     * Used for deleting a resource.
+     * 
+ */ + public Builder setDelete( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 5; + pattern_ = value; + onChanged(); + return this; + } + /** + * optional string delete = 5; + * + *
+     * Used for deleting a resource.
+     * 
+ */ + public Builder clearDelete() { + if (patternCase_ == 5) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * optional string delete = 5; + * + *
+     * Used for deleting a resource.
+     * 
+ */ + public Builder setDeleteBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 5; + pattern_ = value; + onChanged(); + return this; + } + + /** + * optional string patch = 6; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public java.lang.String getPatch() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 6) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string patch = 6; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public com.google.protobuf.ByteString + getPatchBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 6) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string patch = 6; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public Builder setPatch( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 6; + pattern_ = value; + onChanged(); + return this; + } + /** + * optional string patch = 6; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public Builder clearPatch() { + if (patternCase_ == 6) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * optional string patch = 6; + * + *
+     * Used for updating a resource.
+     * 
+ */ + public Builder setPatchBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 6; + pattern_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder> customBuilder_; + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public com.google.api.CustomHttpPattern getCustom() { + if (customBuilder_ == null) { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } else { + if (patternCase_ == 8) { + return customBuilder_.getMessage(); + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public Builder setCustom(com.google.api.CustomHttpPattern value) { + if (customBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pattern_ = value; + onChanged(); + } else { + customBuilder_.setMessage(value); + } + patternCase_ = 8; + return this; + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public Builder setCustom( + com.google.api.CustomHttpPattern.Builder builderForValue) { + if (customBuilder_ == null) { + pattern_ = builderForValue.build(); + onChanged(); + } else { + customBuilder_.setMessage(builderForValue.build()); + } + patternCase_ = 8; + return this; + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public Builder mergeCustom(com.google.api.CustomHttpPattern value) { + if (customBuilder_ == null) { + if (patternCase_ == 8 && + pattern_ != com.google.api.CustomHttpPattern.getDefaultInstance()) { + pattern_ = com.google.api.CustomHttpPattern.newBuilder((com.google.api.CustomHttpPattern) pattern_) + .mergeFrom(value).buildPartial(); + } else { + pattern_ = value; + } + onChanged(); + } else { + if (patternCase_ == 8) { + customBuilder_.mergeFrom(value); + } + customBuilder_.setMessage(value); + } + patternCase_ = 8; + return this; + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public Builder clearCustom() { + if (customBuilder_ == null) { + if (patternCase_ == 8) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + } else { + if (patternCase_ == 8) { + patternCase_ = 0; + pattern_ = null; + } + customBuilder_.clear(); + } + return this; + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public com.google.api.CustomHttpPattern.Builder getCustomBuilder() { + return getCustomFieldBuilder().getBuilder(); + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + public com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder() { + if ((patternCase_ == 8) && (customBuilder_ != null)) { + return customBuilder_.getMessageOrBuilder(); + } else { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + } + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+     * Custom pattern is used for defining custom verbs.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder> + getCustomFieldBuilder() { + if (customBuilder_ == null) { + if (!(patternCase_ == 8)) { + pattern_ = com.google.api.CustomHttpPattern.getDefaultInstance(); + } + customBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder>( + (com.google.api.CustomHttpPattern) pattern_, + getParentForChildren(), + isClean()); + pattern_ = null; + } + patternCase_ = 8; + onChanged();; + return customBuilder_; + } + + private java.lang.Object body_ = ""; + /** + * optional string body = 7; + * + *
+     * The name of the request field whose value is mapped to the HTTP body, or
+     * `*` for mapping all fields not captured by the path pattern to the HTTP
+     * body. NOTE: the referred field must not be a repeated field.
+     * 
+ */ + public java.lang.String getBody() { + java.lang.Object ref = body_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + body_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string body = 7; + * + *
+     * The name of the request field whose value is mapped to the HTTP body, or
+     * `*` for mapping all fields not captured by the path pattern to the HTTP
+     * body. NOTE: the referred field must not be a repeated field.
+     * 
+ */ + public com.google.protobuf.ByteString + getBodyBytes() { + java.lang.Object ref = body_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + body_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string body = 7; + * + *
+     * The name of the request field whose value is mapped to the HTTP body, or
+     * `*` for mapping all fields not captured by the path pattern to the HTTP
+     * body. NOTE: the referred field must not be a repeated field.
+     * 
+ */ + public Builder setBody( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + body_ = value; + onChanged(); + return this; + } + /** + * optional string body = 7; + * + *
+     * The name of the request field whose value is mapped to the HTTP body, or
+     * `*` for mapping all fields not captured by the path pattern to the HTTP
+     * body. NOTE: the referred field must not be a repeated field.
+     * 
+ */ + public Builder clearBody() { + + body_ = getDefaultInstance().getBody(); + onChanged(); + return this; + } + /** + * optional string body = 7; + * + *
+     * The name of the request field whose value is mapped to the HTTP body, or
+     * `*` for mapping all fields not captured by the path pattern to the HTTP
+     * body. NOTE: the referred field must not be a repeated field.
+     * 
+ */ + public Builder setBodyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + body_ = value; + onChanged(); + return this; + } + + private com.google.api.MediaUpload mediaUpload_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.MediaUpload, com.google.api.MediaUpload.Builder, com.google.api.MediaUploadOrBuilder> mediaUploadBuilder_; + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public boolean hasMediaUpload() { + return mediaUploadBuilder_ != null || mediaUpload_ != null; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public com.google.api.MediaUpload getMediaUpload() { + if (mediaUploadBuilder_ == null) { + return mediaUpload_ == null ? com.google.api.MediaUpload.getDefaultInstance() : mediaUpload_; + } else { + return mediaUploadBuilder_.getMessage(); + } + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder setMediaUpload(com.google.api.MediaUpload value) { + if (mediaUploadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mediaUpload_ = value; + onChanged(); + } else { + mediaUploadBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder setMediaUpload( + com.google.api.MediaUpload.Builder builderForValue) { + if (mediaUploadBuilder_ == null) { + mediaUpload_ = builderForValue.build(); + onChanged(); + } else { + mediaUploadBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder mergeMediaUpload(com.google.api.MediaUpload value) { + if (mediaUploadBuilder_ == null) { + if (mediaUpload_ != null) { + mediaUpload_ = + com.google.api.MediaUpload.newBuilder(mediaUpload_).mergeFrom(value).buildPartial(); + } else { + mediaUpload_ = value; + } + onChanged(); + } else { + mediaUploadBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder clearMediaUpload() { + if (mediaUploadBuilder_ == null) { + mediaUpload_ = null; + onChanged(); + } else { + mediaUpload_ = null; + mediaUploadBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public com.google.api.MediaUpload.Builder getMediaUploadBuilder() { + + onChanged(); + return getMediaUploadFieldBuilder().getBuilder(); + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public com.google.api.MediaUploadOrBuilder getMediaUploadOrBuilder() { + if (mediaUploadBuilder_ != null) { + return mediaUploadBuilder_.getMessageOrBuilder(); + } else { + return mediaUpload_ == null ? + com.google.api.MediaUpload.getDefaultInstance() : mediaUpload_; + } + } + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.MediaUpload, com.google.api.MediaUpload.Builder, com.google.api.MediaUploadOrBuilder> + getMediaUploadFieldBuilder() { + if (mediaUploadBuilder_ == null) { + mediaUploadBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.MediaUpload, com.google.api.MediaUpload.Builder, com.google.api.MediaUploadOrBuilder>( + getMediaUpload(), + getParentForChildren(), + isClean()); + mediaUpload_ = null; + } + return mediaUploadBuilder_; + } + + private com.google.api.MediaDownload mediaDownload_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.MediaDownload, com.google.api.MediaDownload.Builder, com.google.api.MediaDownloadOrBuilder> mediaDownloadBuilder_; + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public boolean hasMediaDownload() { + return mediaDownloadBuilder_ != null || mediaDownload_ != null; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public com.google.api.MediaDownload getMediaDownload() { + if (mediaDownloadBuilder_ == null) { + return mediaDownload_ == null ? com.google.api.MediaDownload.getDefaultInstance() : mediaDownload_; + } else { + return mediaDownloadBuilder_.getMessage(); + } + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder setMediaDownload(com.google.api.MediaDownload value) { + if (mediaDownloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mediaDownload_ = value; + onChanged(); + } else { + mediaDownloadBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder setMediaDownload( + com.google.api.MediaDownload.Builder builderForValue) { + if (mediaDownloadBuilder_ == null) { + mediaDownload_ = builderForValue.build(); + onChanged(); + } else { + mediaDownloadBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder mergeMediaDownload(com.google.api.MediaDownload value) { + if (mediaDownloadBuilder_ == null) { + if (mediaDownload_ != null) { + mediaDownload_ = + com.google.api.MediaDownload.newBuilder(mediaDownload_).mergeFrom(value).buildPartial(); + } else { + mediaDownload_ = value; + } + onChanged(); + } else { + mediaDownloadBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public Builder clearMediaDownload() { + if (mediaDownloadBuilder_ == null) { + mediaDownload_ = null; + onChanged(); + } else { + mediaDownload_ = null; + mediaDownloadBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public com.google.api.MediaDownload.Builder getMediaDownloadBuilder() { + + onChanged(); + return getMediaDownloadFieldBuilder().getBuilder(); + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + public com.google.api.MediaDownloadOrBuilder getMediaDownloadOrBuilder() { + if (mediaDownloadBuilder_ != null) { + return mediaDownloadBuilder_.getMessageOrBuilder(); + } else { + return mediaDownload_ == null ? + com.google.api.MediaDownload.getDefaultInstance() : mediaDownload_; + } + } + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+     * Do not use this. For media support, add instead
+     * [][google.bytestream.RestByteStream] as an API to your
+     * configuration.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.MediaDownload, com.google.api.MediaDownload.Builder, com.google.api.MediaDownloadOrBuilder> + getMediaDownloadFieldBuilder() { + if (mediaDownloadBuilder_ == null) { + mediaDownloadBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.MediaDownload, com.google.api.MediaDownload.Builder, com.google.api.MediaDownloadOrBuilder>( + getMediaDownload(), + getParentForChildren(), + isClean()); + mediaDownload_ = null; + } + return mediaDownloadBuilder_; + } + + private java.util.List additionalBindings_ = + java.util.Collections.emptyList(); + private void ensureAdditionalBindingsIsMutable() { + if (!((bitField0_ & 0x00000400) == 0x00000400)) { + additionalBindings_ = new java.util.ArrayList(additionalBindings_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> additionalBindingsBuilder_; + + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public java.util.List getAdditionalBindingsList() { + if (additionalBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(additionalBindings_); + } else { + return additionalBindingsBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public int getAdditionalBindingsCount() { + if (additionalBindingsBuilder_ == null) { + return additionalBindings_.size(); + } else { + return additionalBindingsBuilder_.getCount(); + } + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public com.google.api.HttpRule getAdditionalBindings(int index) { + if (additionalBindingsBuilder_ == null) { + return additionalBindings_.get(index); + } else { + return additionalBindingsBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder setAdditionalBindings( + int index, com.google.api.HttpRule value) { + if (additionalBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalBindingsIsMutable(); + additionalBindings_.set(index, value); + onChanged(); + } else { + additionalBindingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder setAdditionalBindings( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + additionalBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder addAdditionalBindings(com.google.api.HttpRule value) { + if (additionalBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(value); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder addAdditionalBindings( + int index, com.google.api.HttpRule value) { + if (additionalBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(index, value); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder addAdditionalBindings( + com.google.api.HttpRule.Builder builderForValue) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(builderForValue.build()); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder addAdditionalBindings( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder addAllAdditionalBindings( + java.lang.Iterable values) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, additionalBindings_); + onChanged(); + } else { + additionalBindingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder clearAdditionalBindings() { + if (additionalBindingsBuilder_ == null) { + additionalBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + additionalBindingsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public Builder removeAdditionalBindings(int index) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.remove(index); + onChanged(); + } else { + additionalBindingsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public com.google.api.HttpRule.Builder getAdditionalBindingsBuilder( + int index) { + return getAdditionalBindingsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( + int index) { + if (additionalBindingsBuilder_ == null) { + return additionalBindings_.get(index); } else { + return additionalBindingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public java.util.List + getAdditionalBindingsOrBuilderList() { + if (additionalBindingsBuilder_ != null) { + return additionalBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(additionalBindings_); + } + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public com.google.api.HttpRule.Builder addAdditionalBindingsBuilder() { + return getAdditionalBindingsFieldBuilder().addBuilder( + com.google.api.HttpRule.getDefaultInstance()); + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public com.google.api.HttpRule.Builder addAdditionalBindingsBuilder( + int index) { + return getAdditionalBindingsFieldBuilder().addBuilder( + index, com.google.api.HttpRule.getDefaultInstance()); + } + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ */ + public java.util.List + getAdditionalBindingsBuilderList() { + return getAdditionalBindingsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> + getAdditionalBindingsFieldBuilder() { + if (additionalBindingsBuilder_ == null) { + additionalBindingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder>( + additionalBindings_, + ((bitField0_ & 0x00000400) == 0x00000400), + getParentForChildren(), + isClean()); + additionalBindings_ = null; + } + return additionalBindingsBuilder_; + } + 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.HttpRule) + } + + // @@protoc_insertion_point(class_scope:google.api.HttpRule) + private static final com.google.api.HttpRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.HttpRule(); + } + + public static com.google.api.HttpRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HttpRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new HttpRule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.HttpRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/HttpRuleOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/HttpRuleOrBuilder.java new file mode 100644 index 000000000000..9a29370416a8 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/HttpRuleOrBuilder.java @@ -0,0 +1,276 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface HttpRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.HttpRule) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string selector = 1; + * + *
+   * Selects methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + java.lang.String getSelector(); + /** + * optional string selector = 1; + * + *
+   * Selects methods to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + * optional string get = 2; + * + *
+   * Used for listing and getting information about resources.
+   * 
+ */ + java.lang.String getGet(); + /** + * optional string get = 2; + * + *
+   * Used for listing and getting information about resources.
+   * 
+ */ + com.google.protobuf.ByteString + getGetBytes(); + + /** + * optional string put = 3; + * + *
+   * Used for updating a resource.
+   * 
+ */ + java.lang.String getPut(); + /** + * optional string put = 3; + * + *
+   * Used for updating a resource.
+   * 
+ */ + com.google.protobuf.ByteString + getPutBytes(); + + /** + * optional string post = 4; + * + *
+   * Used for creating a resource.
+   * 
+ */ + java.lang.String getPost(); + /** + * optional string post = 4; + * + *
+   * Used for creating a resource.
+   * 
+ */ + com.google.protobuf.ByteString + getPostBytes(); + + /** + * optional string delete = 5; + * + *
+   * Used for deleting a resource.
+   * 
+ */ + java.lang.String getDelete(); + /** + * optional string delete = 5; + * + *
+   * Used for deleting a resource.
+   * 
+ */ + com.google.protobuf.ByteString + getDeleteBytes(); + + /** + * optional string patch = 6; + * + *
+   * Used for updating a resource.
+   * 
+ */ + java.lang.String getPatch(); + /** + * optional string patch = 6; + * + *
+   * Used for updating a resource.
+   * 
+ */ + com.google.protobuf.ByteString + getPatchBytes(); + + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+   * Custom pattern is used for defining custom verbs.
+   * 
+ */ + com.google.api.CustomHttpPattern getCustom(); + /** + * optional .google.api.CustomHttpPattern custom = 8; + * + *
+   * Custom pattern is used for defining custom verbs.
+   * 
+ */ + com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder(); + + /** + * optional string body = 7; + * + *
+   * The name of the request field whose value is mapped to the HTTP body, or
+   * `*` for mapping all fields not captured by the path pattern to the HTTP
+   * body. NOTE: the referred field must not be a repeated field.
+   * 
+ */ + java.lang.String getBody(); + /** + * optional string body = 7; + * + *
+   * The name of the request field whose value is mapped to the HTTP body, or
+   * `*` for mapping all fields not captured by the path pattern to the HTTP
+   * body. NOTE: the referred field must not be a repeated field.
+   * 
+ */ + com.google.protobuf.ByteString + getBodyBytes(); + + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + boolean hasMediaUpload(); + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + com.google.api.MediaUpload getMediaUpload(); + /** + * optional .google.api.MediaUpload media_upload = 9; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + com.google.api.MediaUploadOrBuilder getMediaUploadOrBuilder(); + + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + boolean hasMediaDownload(); + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + com.google.api.MediaDownload getMediaDownload(); + /** + * optional .google.api.MediaDownload media_download = 10; + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + com.google.api.MediaDownloadOrBuilder getMediaDownloadOrBuilder(); + + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + java.util.List + getAdditionalBindingsList(); + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + com.google.api.HttpRule getAdditionalBindings(int index); + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + int getAdditionalBindingsCount(); + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + java.util.List + getAdditionalBindingsOrBuilderList(); + /** + * repeated .google.api.HttpRule additional_bindings = 11; + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ */ + com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( + int index); + + public com.google.api.HttpRule.PatternCase getPatternCase(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/MediaDownload.java b/gcloud-java-gax/src/generated/main/java/com/google/api/MediaDownload.java new file mode 100644 index 000000000000..7134429cae8e --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/MediaDownload.java @@ -0,0 +1,399 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.MediaDownload} + * + *
+ * Do not use this. For media support, add instead
+ * [][google.bytestream.RestByteStream] as an API to your
+ * configuration.
+ * 
+ */ +public final class MediaDownload extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.MediaDownload) + MediaDownloadOrBuilder { + // Use MediaDownload.newBuilder() to construct. + private MediaDownload(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MediaDownload() { + enabled_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private MediaDownload( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + enabled_ = 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.HttpProto.internal_static_google_api_MediaDownload_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_MediaDownload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MediaDownload.class, com.google.api.MediaDownload.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_; + /** + * optional bool enabled = 1; + * + *
+   * Whether download is enabled.
+   * 
+ */ + public boolean getEnabled() { + return enabled_; + } + + 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 (enabled_ != false) { + output.writeBool(1, enabled_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enabled_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.MediaDownload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MediaDownload 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.MediaDownload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MediaDownload parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.MediaDownload parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MediaDownload parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.MediaDownload parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.MediaDownload parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.MediaDownload parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MediaDownload 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.MediaDownload 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.MediaDownload} + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.MediaDownload) + com.google.api.MediaDownloadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_MediaDownload_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_MediaDownload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MediaDownload.class, com.google.api.MediaDownload.Builder.class); + } + + // Construct using com.google.api.MediaDownload.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + enabled_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_MediaDownload_descriptor; + } + + public com.google.api.MediaDownload getDefaultInstanceForType() { + return com.google.api.MediaDownload.getDefaultInstance(); + } + + public com.google.api.MediaDownload build() { + com.google.api.MediaDownload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.MediaDownload buildPartial() { + com.google.api.MediaDownload result = new com.google.api.MediaDownload(this); + result.enabled_ = enabled_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MediaDownload) { + return mergeFrom((com.google.api.MediaDownload)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MediaDownload other) { + if (other == com.google.api.MediaDownload.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.MediaDownload parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.MediaDownload) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enabled_ ; + /** + * optional bool enabled = 1; + * + *
+     * Whether download is enabled.
+     * 
+ */ + public boolean getEnabled() { + return enabled_; + } + /** + * optional bool enabled = 1; + * + *
+     * Whether download is enabled.
+     * 
+ */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + onChanged(); + return this; + } + /** + * optional bool enabled = 1; + * + *
+     * Whether download is enabled.
+     * 
+ */ + public Builder clearEnabled() { + + enabled_ = 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.MediaDownload) + } + + // @@protoc_insertion_point(class_scope:google.api.MediaDownload) + private static final com.google.api.MediaDownload DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.MediaDownload(); + } + + public static com.google.api.MediaDownload getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MediaDownload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new MediaDownload(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.MediaDownload getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/MediaDownloadOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/MediaDownloadOrBuilder.java new file mode 100644 index 000000000000..e07a3988c7fe --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/MediaDownloadOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface MediaDownloadOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.MediaDownload) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bool enabled = 1; + * + *
+   * Whether download is enabled.
+   * 
+ */ + boolean getEnabled(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/MediaUpload.java b/gcloud-java-gax/src/generated/main/java/com/google/api/MediaUpload.java new file mode 100644 index 000000000000..856b2954dcea --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/MediaUpload.java @@ -0,0 +1,399 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.MediaUpload} + * + *
+ * Do not use this. For media support, add instead
+ * [][google.bytestream.RestByteStream] as an API to your
+ * configuration.
+ * 
+ */ +public final class MediaUpload extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.MediaUpload) + MediaUploadOrBuilder { + // Use MediaUpload.newBuilder() to construct. + private MediaUpload(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MediaUpload() { + enabled_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private MediaUpload( + 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 24: { + + enabled_ = 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.HttpProto.internal_static_google_api_MediaUpload_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_MediaUpload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MediaUpload.class, com.google.api.MediaUpload.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 3; + private boolean enabled_; + /** + * optional bool enabled = 3; + * + *
+   * Whether upload is enabled.
+   * 
+ */ + public boolean getEnabled() { + return enabled_; + } + + 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 (enabled_ != false) { + output.writeBool(3, enabled_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, enabled_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.MediaUpload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MediaUpload 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.MediaUpload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.MediaUpload parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.MediaUpload parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MediaUpload parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.MediaUpload parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.MediaUpload parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.MediaUpload parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.MediaUpload 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.MediaUpload 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.MediaUpload} + * + *
+   * Do not use this. For media support, add instead
+   * [][google.bytestream.RestByteStream] as an API to your
+   * configuration.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.MediaUpload) + com.google.api.MediaUploadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_MediaUpload_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_MediaUpload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MediaUpload.class, com.google.api.MediaUpload.Builder.class); + } + + // Construct using com.google.api.MediaUpload.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + enabled_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_MediaUpload_descriptor; + } + + public com.google.api.MediaUpload getDefaultInstanceForType() { + return com.google.api.MediaUpload.getDefaultInstance(); + } + + public com.google.api.MediaUpload build() { + com.google.api.MediaUpload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.MediaUpload buildPartial() { + com.google.api.MediaUpload result = new com.google.api.MediaUpload(this); + result.enabled_ = enabled_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MediaUpload) { + return mergeFrom((com.google.api.MediaUpload)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MediaUpload other) { + if (other == com.google.api.MediaUpload.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.MediaUpload parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.MediaUpload) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enabled_ ; + /** + * optional bool enabled = 3; + * + *
+     * Whether upload is enabled.
+     * 
+ */ + public boolean getEnabled() { + return enabled_; + } + /** + * optional bool enabled = 3; + * + *
+     * Whether upload is enabled.
+     * 
+ */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + onChanged(); + return this; + } + /** + * optional bool enabled = 3; + * + *
+     * Whether upload is enabled.
+     * 
+ */ + public Builder clearEnabled() { + + enabled_ = 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.MediaUpload) + } + + // @@protoc_insertion_point(class_scope:google.api.MediaUpload) + private static final com.google.api.MediaUpload DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.MediaUpload(); + } + + public static com.google.api.MediaUpload getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MediaUpload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new MediaUpload(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.MediaUpload getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/MediaUploadOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/MediaUploadOrBuilder.java new file mode 100644 index 000000000000..a3c55034ce00 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/MediaUploadOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface MediaUploadOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.MediaUpload) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bool enabled = 3; + * + *
+   * Whether upload is enabled.
+   * 
+ */ + boolean getEnabled(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/Page.java b/gcloud-java-gax/src/generated/main/java/com/google/api/Page.java new file mode 100644 index 000000000000..0ed13fb48cf4 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/Page.java @@ -0,0 +1,1176 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Page} + * + *
+ * Represents a documentation page. A page can contain subpages to represent
+ * nested documentation set structure.
+ * 
+ */ +public final class Page extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Page) + PageOrBuilder { + // Use Page.newBuilder() to construct. + private Page(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Page() { + name_ = ""; + content_ = ""; + subpages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Page( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + subpages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + subpages_.add(input.readMessage(com.google.api.Page.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + subpages_ = java.util.Collections.unmodifiableList(subpages_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Page.class, com.google.api.Page.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the page. It will be used as an identity of the page to
+   * generate URI of the page, text of the link to this page in navigation,
+   * etc. The full page name (start from the root page name to this page
+   * concatenated with `.`) can be used as reference to the page in your
+   * documentation. For example:
+   *     pages:
+   *     - name: Tutorial
+   *       content: (== include tutorial.md ==)
+   *       subpages:
+   *       - name: Java
+   *         content: (== include tutorial_java.md ==)
+   * You can reference `Java` page using Markdown reference link syntax:
+   * `[Java][Tutorial.Java]`.
+   * 
+ */ + 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 page. It will be used as an identity of the page to
+   * generate URI of the page, text of the link to this page in navigation,
+   * etc. The full page name (start from the root page name to this page
+   * concatenated with `.`) can be used as reference to the page in your
+   * documentation. For example:
+   *     pages:
+   *     - name: Tutorial
+   *       content: (== include tutorial.md ==)
+   *       subpages:
+   *       - name: Java
+   *         content: (== include tutorial_java.md ==)
+   * You can reference `Java` page using Markdown reference link syntax:
+   * `[Java][Tutorial.Java]`.
+   * 
+ */ + 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 CONTENT_FIELD_NUMBER = 2; + private volatile java.lang.Object content_; + /** + * optional string content = 2; + * + *
+   * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+   * to include content from a Markdown file.
+   * 
+ */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } + } + /** + * optional string content = 2; + * + *
+   * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+   * to include content from a Markdown file.
+   * 
+ */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBPAGES_FIELD_NUMBER = 3; + private java.util.List subpages_; + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + public java.util.List getSubpagesList() { + return subpages_; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + public java.util.List + getSubpagesOrBuilderList() { + return subpages_; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + public int getSubpagesCount() { + return subpages_.size(); + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + public com.google.api.Page getSubpages(int index) { + return subpages_.get(index); + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + public com.google.api.PageOrBuilder getSubpagesOrBuilder( + int index) { + return subpages_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!getContentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); + } + for (int i = 0; i < subpages_.size(); i++) { + output.writeMessage(3, subpages_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!getContentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); + } + for (int i = 0; i < subpages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, subpages_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Page parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Page 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.Page parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Page parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Page parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Page parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Page parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Page parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Page parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Page 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.Page 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.Page} + * + *
+   * Represents a documentation page. A page can contain subpages to represent
+   * nested documentation set structure.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Page) + com.google.api.PageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Page.class, com.google.api.Page.Builder.class); + } + + // Construct using com.google.api.Page.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSubpagesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + content_ = ""; + + if (subpagesBuilder_ == null) { + subpages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + subpagesBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_descriptor; + } + + public com.google.api.Page getDefaultInstanceForType() { + return com.google.api.Page.getDefaultInstance(); + } + + public com.google.api.Page build() { + com.google.api.Page result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Page buildPartial() { + com.google.api.Page result = new com.google.api.Page(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + result.content_ = content_; + if (subpagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subpages_ = java.util.Collections.unmodifiableList(subpages_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.subpages_ = subpages_; + } else { + result.subpages_ = subpagesBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Page) { + return mergeFrom((com.google.api.Page)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Page other) { + if (other == com.google.api.Page.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (subpagesBuilder_ == null) { + if (!other.subpages_.isEmpty()) { + if (subpages_.isEmpty()) { + subpages_ = other.subpages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSubpagesIsMutable(); + subpages_.addAll(other.subpages_); + } + onChanged(); + } + } else { + if (!other.subpages_.isEmpty()) { + if (subpagesBuilder_.isEmpty()) { + subpagesBuilder_.dispose(); + subpagesBuilder_ = null; + subpages_ = other.subpages_; + bitField0_ = (bitField0_ & ~0x00000004); + subpagesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getSubpagesFieldBuilder() : null; + } else { + subpagesBuilder_.addAllMessages(other.subpages_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.Page parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Page) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     *     pages:
+     *     - name: Tutorial
+     *       content: (== include tutorial.md ==)
+     *       subpages:
+     *       - name: Java
+     *         content: (== include tutorial_java.md ==)
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ */ + 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 page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     *     pages:
+     *     - name: Tutorial
+     *       content: (== include tutorial.md ==)
+     *       subpages:
+     *       - name: Java
+     *         content: (== include tutorial_java.md ==)
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ */ + 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 page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     *     pages:
+     *     - name: Tutorial
+     *       content: (== include tutorial.md ==)
+     *       subpages:
+     *       - name: Java
+     *         content: (== include tutorial_java.md ==)
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ */ + 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 page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     *     pages:
+     *     - name: Tutorial
+     *       content: (== include tutorial.md ==)
+     *       subpages:
+     *       - name: Java
+     *         content: (== include tutorial_java.md ==)
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     *     pages:
+     *     - name: Tutorial
+     *       content: (== include tutorial.md ==)
+     *       subpages:
+     *       - name: Java
+     *         content: (== include tutorial_java.md ==)
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + * optional string content = 2; + * + *
+     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+     * to include content from a Markdown file.
+     * 
+ */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string content = 2; + * + *
+     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+     * to include content from a Markdown file.
+     * 
+ */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string content = 2; + * + *
+     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+     * to include content from a Markdown file.
+     * 
+ */ + public Builder setContent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * optional string content = 2; + * + *
+     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+     * to include content from a Markdown file.
+     * 
+ */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * optional string content = 2; + * + *
+     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+     * to include content from a Markdown file.
+     * 
+ */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + content_ = value; + onChanged(); + return this; + } + + private java.util.List subpages_ = + java.util.Collections.emptyList(); + private void ensureSubpagesIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + subpages_ = new java.util.ArrayList(subpages_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> subpagesBuilder_; + + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public java.util.List getSubpagesList() { + if (subpagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(subpages_); + } else { + return subpagesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public int getSubpagesCount() { + if (subpagesBuilder_ == null) { + return subpages_.size(); + } else { + return subpagesBuilder_.getCount(); + } + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public com.google.api.Page getSubpages(int index) { + if (subpagesBuilder_ == null) { + return subpages_.get(index); + } else { + return subpagesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder setSubpages( + int index, com.google.api.Page value) { + if (subpagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubpagesIsMutable(); + subpages_.set(index, value); + onChanged(); + } else { + subpagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder setSubpages( + int index, com.google.api.Page.Builder builderForValue) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.set(index, builderForValue.build()); + onChanged(); + } else { + subpagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder addSubpages(com.google.api.Page value) { + if (subpagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubpagesIsMutable(); + subpages_.add(value); + onChanged(); + } else { + subpagesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder addSubpages( + int index, com.google.api.Page value) { + if (subpagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubpagesIsMutable(); + subpages_.add(index, value); + onChanged(); + } else { + subpagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder addSubpages( + com.google.api.Page.Builder builderForValue) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.add(builderForValue.build()); + onChanged(); + } else { + subpagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder addSubpages( + int index, com.google.api.Page.Builder builderForValue) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.add(index, builderForValue.build()); + onChanged(); + } else { + subpagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder addAllSubpages( + java.lang.Iterable values) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subpages_); + onChanged(); + } else { + subpagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder clearSubpages() { + if (subpagesBuilder_ == null) { + subpages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + subpagesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public Builder removeSubpages(int index) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.remove(index); + onChanged(); + } else { + subpagesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public com.google.api.Page.Builder getSubpagesBuilder( + int index) { + return getSubpagesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public com.google.api.PageOrBuilder getSubpagesOrBuilder( + int index) { + if (subpagesBuilder_ == null) { + return subpages_.get(index); } else { + return subpagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public java.util.List + getSubpagesOrBuilderList() { + if (subpagesBuilder_ != null) { + return subpagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subpages_); + } + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public com.google.api.Page.Builder addSubpagesBuilder() { + return getSubpagesFieldBuilder().addBuilder( + com.google.api.Page.getDefaultInstance()); + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public com.google.api.Page.Builder addSubpagesBuilder( + int index) { + return getSubpagesFieldBuilder().addBuilder( + index, com.google.api.Page.getDefaultInstance()); + } + /** + * repeated .google.api.Page subpages = 3; + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ */ + public java.util.List + getSubpagesBuilderList() { + return getSubpagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> + getSubpagesFieldBuilder() { + if (subpagesBuilder_ == null) { + subpagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder>( + subpages_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + subpages_ = null; + } + return subpagesBuilder_; + } + 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.Page) + } + + // @@protoc_insertion_point(class_scope:google.api.Page) + private static final com.google.api.Page DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Page(); + } + + public static com.google.api.Page getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Page parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Page(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.Page getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/PageOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/PageOrBuilder.java new file mode 100644 index 000000000000..5a566c4ad030 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/PageOrBuilder.java @@ -0,0 +1,120 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +public interface PageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Page) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the page. It will be used as an identity of the page to
+   * generate URI of the page, text of the link to this page in navigation,
+   * etc. The full page name (start from the root page name to this page
+   * concatenated with `.`) can be used as reference to the page in your
+   * documentation. For example:
+   *     pages:
+   *     - name: Tutorial
+   *       content: (== include tutorial.md ==)
+   *       subpages:
+   *       - name: Java
+   *         content: (== include tutorial_java.md ==)
+   * You can reference `Java` page using Markdown reference link syntax:
+   * `[Java][Tutorial.Java]`.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the page. It will be used as an identity of the page to
+   * generate URI of the page, text of the link to this page in navigation,
+   * etc. The full page name (start from the root page name to this page
+   * concatenated with `.`) can be used as reference to the page in your
+   * documentation. For example:
+   *     pages:
+   *     - name: Tutorial
+   *       content: (== include tutorial.md ==)
+   *       subpages:
+   *       - name: Java
+   *         content: (== include tutorial_java.md ==)
+   * You can reference `Java` page using Markdown reference link syntax:
+   * `[Java][Tutorial.Java]`.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional string content = 2; + * + *
+   * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+   * to include content from a Markdown file.
+   * 
+ */ + java.lang.String getContent(); + /** + * optional string content = 2; + * + *
+   * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
+   * to include content from a Markdown file.
+   * 
+ */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + java.util.List + getSubpagesList(); + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + com.google.api.Page getSubpages(int index); + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + int getSubpagesCount(); + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + java.util.List + getSubpagesOrBuilderList(); + /** + * repeated .google.api.Page subpages = 3; + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ */ + com.google.api.PageOrBuilder getSubpagesOrBuilder( + int index); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/Service.java b/gcloud-java-gax/src/generated/main/java/com/google/api/Service.java new file mode 100644 index 000000000000..1ba6c8e37d79 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/Service.java @@ -0,0 +1,4591 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/service.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Service} + * + *
+ * (== page basics ==)
+ * `Service` is the root object of the configuration schema. It
+ * describes basic information like the name of the service and the
+ * exposed API interfaces, and delegates other aspects to configuration
+ * sub-sections.
+ * Example:
+ *     type: google.api.Service
+ *     config_version: 1
+ *     name: calendar.googleapis.com
+ *     title: Google Calendar API
+ *     apis:
+ *     - name: google.calendar.Calendar
+ *     visibility:
+ *       rules:
+ *       - selector: "*"
+ *         restriction: TRUSTED_TESTER
+ *     backend:
+ *       rules:
+ *       - selector: "*"
+ *         address: calendar-prod-backend.gslb.googleapis.com
+ * 
+ */ +public final class Service extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Service) + ServiceOrBuilder { + // Use Service.newBuilder() to construct. + private Service(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Service() { + name_ = ""; + title_ = ""; + producerProjectId_ = ""; + apis_ = java.util.Collections.emptyList(); + types_ = java.util.Collections.emptyList(); + enums_ = java.util.Collections.emptyList(); + systemTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Service( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + title_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + apis_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + apis_.add(input.readMessage(com.google.protobuf.Api.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + types_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + types_.add(input.readMessage(com.google.protobuf.Type.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + enums_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000040; + } + enums_.add(input.readMessage(com.google.protobuf.Enum.parser(), extensionRegistry)); + break; + } + case 50: { + com.google.api.Documentation.Builder subBuilder = null; + if (documentation_ != null) { + subBuilder = documentation_.toBuilder(); + } + documentation_ = input.readMessage(com.google.api.Documentation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(documentation_); + documentation_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.google.api.Visibility.Builder subBuilder = null; + if (visibility_ != null) { + subBuilder = visibility_.toBuilder(); + } + visibility_ = input.readMessage(com.google.api.Visibility.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(visibility_); + visibility_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.google.api.Http.Builder subBuilder = null; + if (http_ != null) { + subBuilder = http_.toBuilder(); + } + http_ = input.readMessage(com.google.api.Http.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(http_); + http_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.api.Context.Builder subBuilder = null; + if (context_ != null) { + subBuilder = context_.toBuilder(); + } + context_ = input.readMessage(com.google.api.Context.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(context_); + context_ = subBuilder.buildPartial(); + } + + break; + } + case 130: { + com.google.api.CustomError.Builder subBuilder = null; + if (customError_ != null) { + subBuilder = customError_.toBuilder(); + } + customError_ = input.readMessage(com.google.api.CustomError.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customError_); + customError_ = subBuilder.buildPartial(); + } + + break; + } + case 162: { + com.google.protobuf.UInt32Value.Builder subBuilder = null; + if (configVersion_ != null) { + subBuilder = configVersion_.toBuilder(); + } + configVersion_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(configVersion_); + configVersion_ = subBuilder.buildPartial(); + } + + break; + } + case 178: { + String s = input.readStringRequireUtf8(); + + producerProjectId_ = s; + break; + } + case 802: { + com.google.protobuf.Any.Builder subBuilder = null; + if (derivedData_ != null) { + subBuilder = derivedData_.toBuilder(); + } + derivedData_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(derivedData_); + derivedData_ = subBuilder.buildPartial(); + } + + break; + } + case 818: { + if (!((mutable_bitField0_ & 0x00002000) == 0x00002000)) { + systemTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00002000; + } + systemTypes_.add(input.readMessage(com.google.protobuf.Type.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + apis_ = java.util.Collections.unmodifiableList(apis_); + } + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + types_ = java.util.Collections.unmodifiableList(types_); + } + if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + enums_ = java.util.Collections.unmodifiableList(enums_); + } + if (((mutable_bitField0_ & 0x00002000) == 0x00002000)) { + systemTypes_ = java.util.Collections.unmodifiableList(systemTypes_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ServiceProto.internal_static_google_api_Service_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ServiceProto.internal_static_google_api_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Service.class, com.google.api.Service.Builder.class); + } + + private int bitField0_; + public static final int CONFIG_VERSION_FIELD_NUMBER = 20; + private com.google.protobuf.UInt32Value configVersion_; + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+   * The version of the service configuration. The config version may
+   * influence interpretation of the configuration, for example
+   * determine defaults. This is documented together with applicable
+   * options. The current default for the config version itself is `1`.
+   * 
+ */ + public boolean hasConfigVersion() { + return configVersion_ != null; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+   * The version of the service configuration. The config version may
+   * influence interpretation of the configuration, for example
+   * determine defaults. This is documented together with applicable
+   * options. The current default for the config version itself is `1`.
+   * 
+ */ + public com.google.protobuf.UInt32Value getConfigVersion() { + return configVersion_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : configVersion_; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+   * The version of the service configuration. The config version may
+   * influence interpretation of the configuration, for example
+   * determine defaults. This is documented together with applicable
+   * options. The current default for the config version itself is `1`.
+   * 
+ */ + public com.google.protobuf.UInt32ValueOrBuilder getConfigVersionOrBuilder() { + return getConfigVersion(); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The DNS address at which this service is available,
+   * e.g. `calendar.googleapis.com`.
+   * 
+ */ + 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 DNS address at which this service is available,
+   * e.g. `calendar.googleapis.com`.
+   * 
+ */ + 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 TITLE_FIELD_NUMBER = 2; + private volatile java.lang.Object title_; + /** + * optional string title = 2; + * + *
+   * The product title associated with this service.
+   * 
+ */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + /** + * optional string title = 2; + * + *
+   * The product title associated with this service.
+   * 
+ */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCER_PROJECT_ID_FIELD_NUMBER = 22; + private volatile java.lang.Object producerProjectId_; + /** + * optional string producer_project_id = 22; + * + *
+   * The id of the Google developer project that owns the service.
+   * Members of this project can manage the service configuration,
+   * manage consumption of the service, etc.
+   * 
+ */ + public java.lang.String getProducerProjectId() { + java.lang.Object ref = producerProjectId_; + 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(); + producerProjectId_ = s; + return s; + } + } + /** + * optional string producer_project_id = 22; + * + *
+   * The id of the Google developer project that owns the service.
+   * Members of this project can manage the service configuration,
+   * manage consumption of the service, etc.
+   * 
+ */ + public com.google.protobuf.ByteString + getProducerProjectIdBytes() { + java.lang.Object ref = producerProjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + producerProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APIS_FIELD_NUMBER = 3; + private java.util.List apis_; + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + public java.util.List getApisList() { + return apis_; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + public java.util.List + getApisOrBuilderList() { + return apis_; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + public int getApisCount() { + return apis_.size(); + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + public com.google.protobuf.Api getApis(int index) { + return apis_.get(index); + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + public com.google.protobuf.ApiOrBuilder getApisOrBuilder( + int index) { + return apis_.get(index); + } + + public static final int TYPES_FIELD_NUMBER = 4; + private java.util.List types_; + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + public java.util.List getTypesList() { + return types_; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + public java.util.List + getTypesOrBuilderList() { + return types_; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + public int getTypesCount() { + return types_.size(); + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + public com.google.protobuf.Type getTypes(int index) { + return types_.get(index); + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + public com.google.protobuf.TypeOrBuilder getTypesOrBuilder( + int index) { + return types_.get(index); + } + + public static final int ENUMS_FIELD_NUMBER = 5; + private java.util.List enums_; + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + public java.util.List getEnumsList() { + return enums_; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + public java.util.List + getEnumsOrBuilderList() { + return enums_; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + public int getEnumsCount() { + return enums_.size(); + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + public com.google.protobuf.Enum getEnums(int index) { + return enums_.get(index); + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + public com.google.protobuf.EnumOrBuilder getEnumsOrBuilder( + int index) { + return enums_.get(index); + } + + public static final int DOCUMENTATION_FIELD_NUMBER = 6; + private com.google.api.Documentation documentation_; + /** + * optional .google.api.Documentation documentation = 6; + * + *
+   * Additional API documentation.
+   * 
+ */ + public boolean hasDocumentation() { + return documentation_ != null; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+   * Additional API documentation.
+   * 
+ */ + public com.google.api.Documentation getDocumentation() { + return documentation_ == null ? com.google.api.Documentation.getDefaultInstance() : documentation_; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+   * Additional API documentation.
+   * 
+ */ + public com.google.api.DocumentationOrBuilder getDocumentationOrBuilder() { + return getDocumentation(); + } + + public static final int VISIBILITY_FIELD_NUMBER = 7; + private com.google.api.Visibility visibility_; + /** + * optional .google.api.Visibility visibility = 7; + * + *
+   * API visibility configuration.
+   * 
+ */ + public boolean hasVisibility() { + return visibility_ != null; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+   * API visibility configuration.
+   * 
+ */ + public com.google.api.Visibility getVisibility() { + return visibility_ == null ? com.google.api.Visibility.getDefaultInstance() : visibility_; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+   * API visibility configuration.
+   * 
+ */ + public com.google.api.VisibilityOrBuilder getVisibilityOrBuilder() { + return getVisibility(); + } + + public static final int HTTP_FIELD_NUMBER = 9; + private com.google.api.Http http_; + /** + * optional .google.api.Http http = 9; + * + *
+   * HTTP configuration.
+   * 
+ */ + public boolean hasHttp() { + return http_ != null; + } + /** + * optional .google.api.Http http = 9; + * + *
+   * HTTP configuration.
+   * 
+ */ + public com.google.api.Http getHttp() { + return http_ == null ? com.google.api.Http.getDefaultInstance() : http_; + } + /** + * optional .google.api.Http http = 9; + * + *
+   * HTTP configuration.
+   * 
+ */ + public com.google.api.HttpOrBuilder getHttpOrBuilder() { + return getHttp(); + } + + public static final int CONTEXT_FIELD_NUMBER = 12; + private com.google.api.Context context_; + /** + * optional .google.api.Context context = 12; + * + *
+   * Context configuration.
+   * 
+ */ + public boolean hasContext() { + return context_ != null; + } + /** + * optional .google.api.Context context = 12; + * + *
+   * Context configuration.
+   * 
+ */ + public com.google.api.Context getContext() { + return context_ == null ? com.google.api.Context.getDefaultInstance() : context_; + } + /** + * optional .google.api.Context context = 12; + * + *
+   * Context configuration.
+   * 
+ */ + public com.google.api.ContextOrBuilder getContextOrBuilder() { + return getContext(); + } + + public static final int CUSTOM_ERROR_FIELD_NUMBER = 16; + private com.google.api.CustomError customError_; + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+   * Custom error configuration.
+   * 
+ */ + public boolean hasCustomError() { + return customError_ != null; + } + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+   * Custom error configuration.
+   * 
+ */ + public com.google.api.CustomError getCustomError() { + return customError_ == null ? com.google.api.CustomError.getDefaultInstance() : customError_; + } + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+   * Custom error configuration.
+   * 
+ */ + public com.google.api.CustomErrorOrBuilder getCustomErrorOrBuilder() { + return getCustomError(); + } + + public static final int DERIVED_DATA_FIELD_NUMBER = 100; + private com.google.protobuf.Any derivedData_; + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+   * Service attributes derived by the configuration toolchain, for
+   * use at runtime.  Type is defined in
+   * `//google/internal/api/derived_service.proto`.
+   * 
+ */ + public boolean hasDerivedData() { + return derivedData_ != null; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+   * Service attributes derived by the configuration toolchain, for
+   * use at runtime.  Type is defined in
+   * `//google/internal/api/derived_service.proto`.
+   * 
+ */ + public com.google.protobuf.Any getDerivedData() { + return derivedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : derivedData_; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+   * Service attributes derived by the configuration toolchain, for
+   * use at runtime.  Type is defined in
+   * `//google/internal/api/derived_service.proto`.
+   * 
+ */ + public com.google.protobuf.AnyOrBuilder getDerivedDataOrBuilder() { + return getDerivedData(); + } + + public static final int SYSTEM_TYPES_FIELD_NUMBER = 102; + private java.util.List systemTypes_; + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + public java.util.List getSystemTypesList() { + return systemTypes_; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + public java.util.List + getSystemTypesOrBuilderList() { + return systemTypes_; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + public int getSystemTypesCount() { + return systemTypes_.size(); + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + public com.google.protobuf.Type getSystemTypes(int index) { + return systemTypes_.get(index); + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + public com.google.protobuf.TypeOrBuilder getSystemTypesOrBuilder( + int index) { + return systemTypes_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!getTitleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); + } + for (int i = 0; i < apis_.size(); i++) { + output.writeMessage(3, apis_.get(i)); + } + for (int i = 0; i < types_.size(); i++) { + output.writeMessage(4, types_.get(i)); + } + for (int i = 0; i < enums_.size(); i++) { + output.writeMessage(5, enums_.get(i)); + } + if (documentation_ != null) { + output.writeMessage(6, getDocumentation()); + } + if (visibility_ != null) { + output.writeMessage(7, getVisibility()); + } + if (http_ != null) { + output.writeMessage(9, getHttp()); + } + if (context_ != null) { + output.writeMessage(12, getContext()); + } + if (customError_ != null) { + output.writeMessage(16, getCustomError()); + } + if (configVersion_ != null) { + output.writeMessage(20, getConfigVersion()); + } + if (!getProducerProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 22, producerProjectId_); + } + if (derivedData_ != null) { + output.writeMessage(100, getDerivedData()); + } + for (int i = 0; i < systemTypes_.size(); i++) { + output.writeMessage(102, systemTypes_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!getTitleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); + } + for (int i = 0; i < apis_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, apis_.get(i)); + } + for (int i = 0; i < types_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, types_.get(i)); + } + for (int i = 0; i < enums_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, enums_.get(i)); + } + if (documentation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getDocumentation()); + } + if (visibility_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getVisibility()); + } + if (http_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getHttp()); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getContext()); + } + if (customError_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getCustomError()); + } + if (configVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getConfigVersion()); + } + if (!getProducerProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(22, producerProjectId_); + } + 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 { + return PARSER.parseFrom(data); + } + public static com.google.api.Service 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.Service parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Service parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Service parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Service parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Service parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Service parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Service parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Service 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.Service 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.Service} + * + *
+   * (== page basics ==)
+   * `Service` is the root object of the configuration schema. It
+   * describes basic information like the name of the service and the
+   * exposed API interfaces, and delegates other aspects to configuration
+   * sub-sections.
+   * Example:
+   *     type: google.api.Service
+   *     config_version: 1
+   *     name: calendar.googleapis.com
+   *     title: Google Calendar API
+   *     apis:
+   *     - name: google.calendar.Calendar
+   *     visibility:
+   *       rules:
+   *       - selector: "*"
+   *         restriction: TRUSTED_TESTER
+   *     backend:
+   *       rules:
+   *       - selector: "*"
+   *         address: calendar-prod-backend.gslb.googleapis.com
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Service) + com.google.api.ServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.ServiceProto.internal_static_google_api_Service_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ServiceProto.internal_static_google_api_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Service.class, com.google.api.Service.Builder.class); + } + + // Construct using com.google.api.Service.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getApisFieldBuilder(); + getTypesFieldBuilder(); + getEnumsFieldBuilder(); + getSystemTypesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (configVersionBuilder_ == null) { + configVersion_ = null; + } else { + configVersion_ = null; + configVersionBuilder_ = null; + } + name_ = ""; + + title_ = ""; + + producerProjectId_ = ""; + + if (apisBuilder_ == null) { + apis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + apisBuilder_.clear(); + } + if (typesBuilder_ == null) { + types_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + typesBuilder_.clear(); + } + if (enumsBuilder_ == null) { + enums_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + } else { + enumsBuilder_.clear(); + } + if (documentationBuilder_ == null) { + documentation_ = null; + } else { + documentation_ = null; + documentationBuilder_ = null; + } + if (visibilityBuilder_ == null) { + visibility_ = null; + } else { + visibility_ = null; + visibilityBuilder_ = null; + } + if (httpBuilder_ == null) { + http_ = null; + } else { + http_ = null; + httpBuilder_ = null; + } + if (contextBuilder_ == null) { + context_ = null; + } else { + context_ = null; + contextBuilder_ = null; + } + if (customErrorBuilder_ == null) { + customError_ = null; + } else { + customError_ = null; + customErrorBuilder_ = null; + } + if (derivedDataBuilder_ == null) { + derivedData_ = null; + } else { + derivedData_ = null; + derivedDataBuilder_ = null; + } + if (systemTypesBuilder_ == null) { + systemTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + } else { + systemTypesBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.ServiceProto.internal_static_google_api_Service_descriptor; + } + + public com.google.api.Service getDefaultInstanceForType() { + return com.google.api.Service.getDefaultInstance(); + } + + public com.google.api.Service build() { + com.google.api.Service result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Service buildPartial() { + com.google.api.Service result = new com.google.api.Service(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (configVersionBuilder_ == null) { + result.configVersion_ = configVersion_; + } else { + result.configVersion_ = configVersionBuilder_.build(); + } + result.name_ = name_; + result.title_ = title_; + result.producerProjectId_ = producerProjectId_; + if (apisBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { + apis_ = java.util.Collections.unmodifiableList(apis_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.apis_ = apis_; + } else { + result.apis_ = apisBuilder_.build(); + } + if (typesBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { + types_ = java.util.Collections.unmodifiableList(types_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.types_ = types_; + } else { + result.types_ = typesBuilder_.build(); + } + if (enumsBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { + enums_ = java.util.Collections.unmodifiableList(enums_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.enums_ = enums_; + } else { + result.enums_ = enumsBuilder_.build(); + } + if (documentationBuilder_ == null) { + result.documentation_ = documentation_; + } else { + result.documentation_ = documentationBuilder_.build(); + } + if (visibilityBuilder_ == null) { + result.visibility_ = visibility_; + } else { + result.visibility_ = visibilityBuilder_.build(); + } + if (httpBuilder_ == null) { + result.http_ = http_; + } else { + result.http_ = httpBuilder_.build(); + } + if (contextBuilder_ == null) { + result.context_ = context_; + } else { + result.context_ = contextBuilder_.build(); + } + if (customErrorBuilder_ == null) { + result.customError_ = customError_; + } else { + result.customError_ = customErrorBuilder_.build(); + } + if (derivedDataBuilder_ == null) { + result.derivedData_ = derivedData_; + } else { + result.derivedData_ = derivedDataBuilder_.build(); + } + if (systemTypesBuilder_ == null) { + if (((bitField0_ & 0x00002000) == 0x00002000)) { + systemTypes_ = java.util.Collections.unmodifiableList(systemTypes_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.systemTypes_ = systemTypes_; + } else { + result.systemTypes_ = systemTypesBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Service) { + return mergeFrom((com.google.api.Service)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Service other) { + if (other == com.google.api.Service.getDefaultInstance()) return this; + if (other.hasConfigVersion()) { + mergeConfigVersion(other.getConfigVersion()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + onChanged(); + } + if (!other.getProducerProjectId().isEmpty()) { + producerProjectId_ = other.producerProjectId_; + onChanged(); + } + if (apisBuilder_ == null) { + if (!other.apis_.isEmpty()) { + if (apis_.isEmpty()) { + apis_ = other.apis_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureApisIsMutable(); + apis_.addAll(other.apis_); + } + onChanged(); + } + } else { + if (!other.apis_.isEmpty()) { + if (apisBuilder_.isEmpty()) { + apisBuilder_.dispose(); + apisBuilder_ = null; + apis_ = other.apis_; + bitField0_ = (bitField0_ & ~0x00000010); + apisBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getApisFieldBuilder() : null; + } else { + apisBuilder_.addAllMessages(other.apis_); + } + } + } + if (typesBuilder_ == null) { + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); + } + onChanged(); + } + } else { + if (!other.types_.isEmpty()) { + if (typesBuilder_.isEmpty()) { + typesBuilder_.dispose(); + typesBuilder_ = null; + types_ = other.types_; + bitField0_ = (bitField0_ & ~0x00000020); + typesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTypesFieldBuilder() : null; + } else { + typesBuilder_.addAllMessages(other.types_); + } + } + } + if (enumsBuilder_ == null) { + if (!other.enums_.isEmpty()) { + if (enums_.isEmpty()) { + enums_ = other.enums_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureEnumsIsMutable(); + enums_.addAll(other.enums_); + } + onChanged(); + } + } else { + if (!other.enums_.isEmpty()) { + if (enumsBuilder_.isEmpty()) { + enumsBuilder_.dispose(); + enumsBuilder_ = null; + enums_ = other.enums_; + bitField0_ = (bitField0_ & ~0x00000040); + enumsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getEnumsFieldBuilder() : null; + } else { + enumsBuilder_.addAllMessages(other.enums_); + } + } + } + if (other.hasDocumentation()) { + mergeDocumentation(other.getDocumentation()); + } + if (other.hasVisibility()) { + mergeVisibility(other.getVisibility()); + } + if (other.hasHttp()) { + mergeHttp(other.getHttp()); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + if (other.hasCustomError()) { + mergeCustomError(other.getCustomError()); + } + if (other.hasDerivedData()) { + mergeDerivedData(other.getDerivedData()); + } + if (systemTypesBuilder_ == null) { + if (!other.systemTypes_.isEmpty()) { + if (systemTypes_.isEmpty()) { + systemTypes_ = other.systemTypes_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureSystemTypesIsMutable(); + systemTypes_.addAll(other.systemTypes_); + } + onChanged(); + } + } else { + if (!other.systemTypes_.isEmpty()) { + if (systemTypesBuilder_.isEmpty()) { + systemTypesBuilder_.dispose(); + systemTypesBuilder_ = null; + systemTypes_ = other.systemTypes_; + bitField0_ = (bitField0_ & ~0x00002000); + systemTypesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getSystemTypesFieldBuilder() : null; + } else { + systemTypesBuilder_.addAllMessages(other.systemTypes_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.Service parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Service) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.UInt32Value configVersion_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> configVersionBuilder_; + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public boolean hasConfigVersion() { + return configVersionBuilder_ != null || configVersion_ != null; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public com.google.protobuf.UInt32Value getConfigVersion() { + if (configVersionBuilder_ == null) { + return configVersion_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : configVersion_; + } else { + return configVersionBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public Builder setConfigVersion(com.google.protobuf.UInt32Value value) { + if (configVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configVersion_ = value; + onChanged(); + } else { + configVersionBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public Builder setConfigVersion( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (configVersionBuilder_ == null) { + configVersion_ = builderForValue.build(); + onChanged(); + } else { + configVersionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public Builder mergeConfigVersion(com.google.protobuf.UInt32Value value) { + if (configVersionBuilder_ == null) { + if (configVersion_ != null) { + configVersion_ = + com.google.protobuf.UInt32Value.newBuilder(configVersion_).mergeFrom(value).buildPartial(); + } else { + configVersion_ = value; + } + onChanged(); + } else { + configVersionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public Builder clearConfigVersion() { + if (configVersionBuilder_ == null) { + configVersion_ = null; + onChanged(); + } else { + configVersion_ = null; + configVersionBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public com.google.protobuf.UInt32Value.Builder getConfigVersionBuilder() { + + onChanged(); + return getConfigVersionFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + public com.google.protobuf.UInt32ValueOrBuilder getConfigVersionOrBuilder() { + if (configVersionBuilder_ != null) { + return configVersionBuilder_.getMessageOrBuilder(); + } else { + return configVersion_ == null ? + com.google.protobuf.UInt32Value.getDefaultInstance() : configVersion_; + } + } + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+     * The version of the service configuration. The config version may
+     * influence interpretation of the configuration, for example
+     * determine defaults. This is documented together with applicable
+     * options. The current default for the config version itself is `1`.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getConfigVersionFieldBuilder() { + if (configVersionBuilder_ == null) { + configVersionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + getConfigVersion(), + getParentForChildren(), + isClean()); + configVersion_ = null; + } + return configVersionBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The DNS address at which this service is available,
+     * e.g. `calendar.googleapis.com`.
+     * 
+ */ + 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 DNS address at which this service is available,
+     * e.g. `calendar.googleapis.com`.
+     * 
+ */ + 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 DNS address at which this service is available,
+     * e.g. `calendar.googleapis.com`.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The DNS address at which this service is available,
+     * e.g. `calendar.googleapis.com`.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The DNS address at which this service is available,
+     * e.g. `calendar.googleapis.com`.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + /** + * optional string title = 2; + * + *
+     * The product title associated with this service.
+     * 
+ */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string title = 2; + * + *
+     * The product title associated with this service.
+     * 
+ */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string title = 2; + * + *
+     * The product title associated with this service.
+     * 
+ */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + title_ = value; + onChanged(); + return this; + } + /** + * optional string title = 2; + * + *
+     * The product title associated with this service.
+     * 
+ */ + public Builder clearTitle() { + + title_ = getDefaultInstance().getTitle(); + onChanged(); + return this; + } + /** + * optional string title = 2; + * + *
+     * The product title associated with this service.
+     * 
+ */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + title_ = value; + onChanged(); + return this; + } + + private java.lang.Object producerProjectId_ = ""; + /** + * optional string producer_project_id = 22; + * + *
+     * The id of the Google developer project that owns the service.
+     * Members of this project can manage the service configuration,
+     * manage consumption of the service, etc.
+     * 
+ */ + public java.lang.String getProducerProjectId() { + java.lang.Object ref = producerProjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + producerProjectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string producer_project_id = 22; + * + *
+     * The id of the Google developer project that owns the service.
+     * Members of this project can manage the service configuration,
+     * manage consumption of the service, etc.
+     * 
+ */ + public com.google.protobuf.ByteString + getProducerProjectIdBytes() { + java.lang.Object ref = producerProjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + producerProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string producer_project_id = 22; + * + *
+     * The id of the Google developer project that owns the service.
+     * Members of this project can manage the service configuration,
+     * manage consumption of the service, etc.
+     * 
+ */ + public Builder setProducerProjectId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + producerProjectId_ = value; + onChanged(); + return this; + } + /** + * optional string producer_project_id = 22; + * + *
+     * The id of the Google developer project that owns the service.
+     * Members of this project can manage the service configuration,
+     * manage consumption of the service, etc.
+     * 
+ */ + public Builder clearProducerProjectId() { + + producerProjectId_ = getDefaultInstance().getProducerProjectId(); + onChanged(); + return this; + } + /** + * optional string producer_project_id = 22; + * + *
+     * The id of the Google developer project that owns the service.
+     * Members of this project can manage the service configuration,
+     * manage consumption of the service, etc.
+     * 
+ */ + public Builder setProducerProjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + producerProjectId_ = value; + onChanged(); + return this; + } + + private java.util.List apis_ = + java.util.Collections.emptyList(); + private void ensureApisIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + apis_ = new java.util.ArrayList(apis_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Api, com.google.protobuf.Api.Builder, com.google.protobuf.ApiOrBuilder> apisBuilder_; + + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public java.util.List getApisList() { + if (apisBuilder_ == null) { + return java.util.Collections.unmodifiableList(apis_); + } else { + return apisBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public int getApisCount() { + if (apisBuilder_ == null) { + return apis_.size(); + } else { + return apisBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public com.google.protobuf.Api getApis(int index) { + if (apisBuilder_ == null) { + return apis_.get(index); + } else { + return apisBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder setApis( + int index, com.google.protobuf.Api value) { + if (apisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApisIsMutable(); + apis_.set(index, value); + onChanged(); + } else { + apisBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder setApis( + int index, com.google.protobuf.Api.Builder builderForValue) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + apis_.set(index, builderForValue.build()); + onChanged(); + } else { + apisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder addApis(com.google.protobuf.Api value) { + if (apisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApisIsMutable(); + apis_.add(value); + onChanged(); + } else { + apisBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder addApis( + int index, com.google.protobuf.Api value) { + if (apisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApisIsMutable(); + apis_.add(index, value); + onChanged(); + } else { + apisBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder addApis( + com.google.protobuf.Api.Builder builderForValue) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + apis_.add(builderForValue.build()); + onChanged(); + } else { + apisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder addApis( + int index, com.google.protobuf.Api.Builder builderForValue) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + apis_.add(index, builderForValue.build()); + onChanged(); + } else { + apisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder addAllApis( + java.lang.Iterable values) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, apis_); + onChanged(); + } else { + apisBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder clearApis() { + if (apisBuilder_ == null) { + apis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + apisBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public Builder removeApis(int index) { + if (apisBuilder_ == null) { + ensureApisIsMutable(); + apis_.remove(index); + onChanged(); + } else { + apisBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public com.google.protobuf.Api.Builder getApisBuilder( + int index) { + return getApisFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public com.google.protobuf.ApiOrBuilder getApisOrBuilder( + int index) { + if (apisBuilder_ == null) { + return apis_.get(index); } else { + return apisBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public java.util.List + getApisOrBuilderList() { + if (apisBuilder_ != null) { + return apisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(apis_); + } + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public com.google.protobuf.Api.Builder addApisBuilder() { + return getApisFieldBuilder().addBuilder( + com.google.protobuf.Api.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public com.google.protobuf.Api.Builder addApisBuilder( + int index) { + return getApisFieldBuilder().addBuilder( + index, com.google.protobuf.Api.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+     * A list of API interfaces exported by this service. Only the `name` field
+     * of the [google.protobuf.Api][] needs to be provided by the configuration
+     * author, as the remaining fields will be derived from the IDL during the
+     * normalization process. It is an error to specify an API interface here
+     * which cannot be resolved against the associated IDL files.
+     * 
+ */ + public java.util.List + getApisBuilderList() { + return getApisFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Api, com.google.protobuf.Api.Builder, com.google.protobuf.ApiOrBuilder> + getApisFieldBuilder() { + if (apisBuilder_ == null) { + apisBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Api, com.google.protobuf.Api.Builder, com.google.protobuf.ApiOrBuilder>( + apis_, + ((bitField0_ & 0x00000010) == 0x00000010), + getParentForChildren(), + isClean()); + apis_ = null; + } + return apisBuilder_; + } + + private java.util.List types_ = + java.util.Collections.emptyList(); + private void ensureTypesIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + types_ = new java.util.ArrayList(types_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder> typesBuilder_; + + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public java.util.List getTypesList() { + if (typesBuilder_ == null) { + return java.util.Collections.unmodifiableList(types_); + } else { + return typesBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public int getTypesCount() { + if (typesBuilder_ == null) { + return types_.size(); + } else { + return typesBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public com.google.protobuf.Type getTypes(int index) { + if (typesBuilder_ == null) { + return types_.get(index); + } else { + return typesBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder setTypes( + int index, com.google.protobuf.Type value) { + if (typesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.set(index, value); + onChanged(); + } else { + typesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder setTypes( + int index, com.google.protobuf.Type.Builder builderForValue) { + if (typesBuilder_ == null) { + ensureTypesIsMutable(); + types_.set(index, builderForValue.build()); + onChanged(); + } else { + typesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder addTypes(com.google.protobuf.Type value) { + if (typesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(value); + onChanged(); + } else { + typesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder addTypes( + int index, com.google.protobuf.Type value) { + if (typesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(index, value); + onChanged(); + } else { + typesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder addTypes( + com.google.protobuf.Type.Builder builderForValue) { + if (typesBuilder_ == null) { + ensureTypesIsMutable(); + types_.add(builderForValue.build()); + onChanged(); + } else { + typesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder addTypes( + int index, com.google.protobuf.Type.Builder builderForValue) { + if (typesBuilder_ == null) { + ensureTypesIsMutable(); + types_.add(index, builderForValue.build()); + onChanged(); + } else { + typesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder addAllTypes( + java.lang.Iterable values) { + if (typesBuilder_ == null) { + ensureTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, types_); + onChanged(); + } else { + typesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder clearTypes() { + if (typesBuilder_ == null) { + types_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + typesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public Builder removeTypes(int index) { + if (typesBuilder_ == null) { + ensureTypesIsMutable(); + types_.remove(index); + onChanged(); + } else { + typesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public com.google.protobuf.Type.Builder getTypesBuilder( + int index) { + return getTypesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public com.google.protobuf.TypeOrBuilder getTypesOrBuilder( + int index) { + if (typesBuilder_ == null) { + return types_.get(index); } else { + return typesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public java.util.List + getTypesOrBuilderList() { + if (typesBuilder_ != null) { + return typesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(types_); + } + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public com.google.protobuf.Type.Builder addTypesBuilder() { + return getTypesFieldBuilder().addBuilder( + com.google.protobuf.Type.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public com.google.protobuf.Type.Builder addTypesBuilder( + int index) { + return getTypesFieldBuilder().addBuilder( + index, com.google.protobuf.Type.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Type types = 4; + * + *
+     * A list of all proto message types included in this API service.
+     * Types referenced directly or indirectly by the `apis` are
+     * automatically included.  Messages which are not referenced but
+     * shall be included, such as types used by the `google.protobuf.Any` type,
+     * should be listed here by name. Example:
+     *     types:
+     *     - name: google.protobuf.Int32
+     * 
+ */ + public java.util.List + getTypesBuilderList() { + return getTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder> + getTypesFieldBuilder() { + if (typesBuilder_ == null) { + typesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder>( + types_, + ((bitField0_ & 0x00000020) == 0x00000020), + getParentForChildren(), + isClean()); + types_ = null; + } + return typesBuilder_; + } + + private java.util.List enums_ = + java.util.Collections.emptyList(); + private void ensureEnumsIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + enums_ = new java.util.ArrayList(enums_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Enum, com.google.protobuf.Enum.Builder, com.google.protobuf.EnumOrBuilder> enumsBuilder_; + + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public java.util.List getEnumsList() { + if (enumsBuilder_ == null) { + return java.util.Collections.unmodifiableList(enums_); + } else { + return enumsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public int getEnumsCount() { + if (enumsBuilder_ == null) { + return enums_.size(); + } else { + return enumsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public com.google.protobuf.Enum getEnums(int index) { + if (enumsBuilder_ == null) { + return enums_.get(index); + } else { + return enumsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder setEnums( + int index, com.google.protobuf.Enum value) { + if (enumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumsIsMutable(); + enums_.set(index, value); + onChanged(); + } else { + enumsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder setEnums( + int index, com.google.protobuf.Enum.Builder builderForValue) { + if (enumsBuilder_ == null) { + ensureEnumsIsMutable(); + enums_.set(index, builderForValue.build()); + onChanged(); + } else { + enumsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder addEnums(com.google.protobuf.Enum value) { + if (enumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumsIsMutable(); + enums_.add(value); + onChanged(); + } else { + enumsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder addEnums( + int index, com.google.protobuf.Enum value) { + if (enumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumsIsMutable(); + enums_.add(index, value); + onChanged(); + } else { + enumsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder addEnums( + com.google.protobuf.Enum.Builder builderForValue) { + if (enumsBuilder_ == null) { + ensureEnumsIsMutable(); + enums_.add(builderForValue.build()); + onChanged(); + } else { + enumsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder addEnums( + int index, com.google.protobuf.Enum.Builder builderForValue) { + if (enumsBuilder_ == null) { + ensureEnumsIsMutable(); + enums_.add(index, builderForValue.build()); + onChanged(); + } else { + enumsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder addAllEnums( + java.lang.Iterable values) { + if (enumsBuilder_ == null) { + ensureEnumsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, enums_); + onChanged(); + } else { + enumsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder clearEnums() { + if (enumsBuilder_ == null) { + enums_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + enumsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public Builder removeEnums(int index) { + if (enumsBuilder_ == null) { + ensureEnumsIsMutable(); + enums_.remove(index); + onChanged(); + } else { + enumsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public com.google.protobuf.Enum.Builder getEnumsBuilder( + int index) { + return getEnumsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public com.google.protobuf.EnumOrBuilder getEnumsOrBuilder( + int index) { + if (enumsBuilder_ == null) { + return enums_.get(index); } else { + return enumsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public java.util.List + getEnumsOrBuilderList() { + if (enumsBuilder_ != null) { + return enumsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(enums_); + } + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public com.google.protobuf.Enum.Builder addEnumsBuilder() { + return getEnumsFieldBuilder().addBuilder( + com.google.protobuf.Enum.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public com.google.protobuf.Enum.Builder addEnumsBuilder( + int index) { + return getEnumsFieldBuilder().addBuilder( + index, com.google.protobuf.Enum.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+     * A list of all enum types included in this API service.  Enums
+     * referenced directly or indirectly by the `apis` are automatically
+     * included.  Enums which are not referenced but shall be included
+     * should be listed here by name. Example:
+     *     enums:
+     *     - name: google.someapi.v1.SomeEnum
+     * 
+ */ + public java.util.List + getEnumsBuilderList() { + return getEnumsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Enum, com.google.protobuf.Enum.Builder, com.google.protobuf.EnumOrBuilder> + getEnumsFieldBuilder() { + if (enumsBuilder_ == null) { + enumsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Enum, com.google.protobuf.Enum.Builder, com.google.protobuf.EnumOrBuilder>( + enums_, + ((bitField0_ & 0x00000040) == 0x00000040), + getParentForChildren(), + isClean()); + enums_ = null; + } + return enumsBuilder_; + } + + private com.google.api.Documentation documentation_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Documentation, com.google.api.Documentation.Builder, com.google.api.DocumentationOrBuilder> documentationBuilder_; + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public boolean hasDocumentation() { + return documentationBuilder_ != null || documentation_ != null; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public com.google.api.Documentation getDocumentation() { + if (documentationBuilder_ == null) { + return documentation_ == null ? com.google.api.Documentation.getDefaultInstance() : documentation_; + } else { + return documentationBuilder_.getMessage(); + } + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public Builder setDocumentation(com.google.api.Documentation value) { + if (documentationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + documentation_ = value; + onChanged(); + } else { + documentationBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public Builder setDocumentation( + com.google.api.Documentation.Builder builderForValue) { + if (documentationBuilder_ == null) { + documentation_ = builderForValue.build(); + onChanged(); + } else { + documentationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public Builder mergeDocumentation(com.google.api.Documentation value) { + if (documentationBuilder_ == null) { + if (documentation_ != null) { + documentation_ = + com.google.api.Documentation.newBuilder(documentation_).mergeFrom(value).buildPartial(); + } else { + documentation_ = value; + } + onChanged(); + } else { + documentationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public Builder clearDocumentation() { + if (documentationBuilder_ == null) { + documentation_ = null; + onChanged(); + } else { + documentation_ = null; + documentationBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public com.google.api.Documentation.Builder getDocumentationBuilder() { + + onChanged(); + return getDocumentationFieldBuilder().getBuilder(); + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + public com.google.api.DocumentationOrBuilder getDocumentationOrBuilder() { + if (documentationBuilder_ != null) { + return documentationBuilder_.getMessageOrBuilder(); + } else { + return documentation_ == null ? + com.google.api.Documentation.getDefaultInstance() : documentation_; + } + } + /** + * optional .google.api.Documentation documentation = 6; + * + *
+     * Additional API documentation.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Documentation, com.google.api.Documentation.Builder, com.google.api.DocumentationOrBuilder> + getDocumentationFieldBuilder() { + if (documentationBuilder_ == null) { + documentationBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Documentation, com.google.api.Documentation.Builder, com.google.api.DocumentationOrBuilder>( + getDocumentation(), + getParentForChildren(), + isClean()); + documentation_ = null; + } + return documentationBuilder_; + } + + private com.google.api.Visibility visibility_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Visibility, com.google.api.Visibility.Builder, com.google.api.VisibilityOrBuilder> visibilityBuilder_; + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public boolean hasVisibility() { + return visibilityBuilder_ != null || visibility_ != null; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public com.google.api.Visibility getVisibility() { + if (visibilityBuilder_ == null) { + return visibility_ == null ? com.google.api.Visibility.getDefaultInstance() : visibility_; + } else { + return visibilityBuilder_.getMessage(); + } + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public Builder setVisibility(com.google.api.Visibility value) { + if (visibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + visibility_ = value; + onChanged(); + } else { + visibilityBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public Builder setVisibility( + com.google.api.Visibility.Builder builderForValue) { + if (visibilityBuilder_ == null) { + visibility_ = builderForValue.build(); + onChanged(); + } else { + visibilityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public Builder mergeVisibility(com.google.api.Visibility value) { + if (visibilityBuilder_ == null) { + if (visibility_ != null) { + visibility_ = + com.google.api.Visibility.newBuilder(visibility_).mergeFrom(value).buildPartial(); + } else { + visibility_ = value; + } + onChanged(); + } else { + visibilityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public Builder clearVisibility() { + if (visibilityBuilder_ == null) { + visibility_ = null; + onChanged(); + } else { + visibility_ = null; + visibilityBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public com.google.api.Visibility.Builder getVisibilityBuilder() { + + onChanged(); + return getVisibilityFieldBuilder().getBuilder(); + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + public com.google.api.VisibilityOrBuilder getVisibilityOrBuilder() { + if (visibilityBuilder_ != null) { + return visibilityBuilder_.getMessageOrBuilder(); + } else { + return visibility_ == null ? + com.google.api.Visibility.getDefaultInstance() : visibility_; + } + } + /** + * optional .google.api.Visibility visibility = 7; + * + *
+     * API visibility configuration.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Visibility, com.google.api.Visibility.Builder, com.google.api.VisibilityOrBuilder> + getVisibilityFieldBuilder() { + if (visibilityBuilder_ == null) { + visibilityBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Visibility, com.google.api.Visibility.Builder, com.google.api.VisibilityOrBuilder>( + getVisibility(), + getParentForChildren(), + isClean()); + visibility_ = null; + } + return visibilityBuilder_; + } + + private com.google.api.Http http_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Http, com.google.api.Http.Builder, com.google.api.HttpOrBuilder> httpBuilder_; + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public boolean hasHttp() { + return httpBuilder_ != null || http_ != null; + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public com.google.api.Http getHttp() { + if (httpBuilder_ == null) { + return http_ == null ? com.google.api.Http.getDefaultInstance() : http_; + } else { + return httpBuilder_.getMessage(); + } + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public Builder setHttp(com.google.api.Http value) { + if (httpBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + http_ = value; + onChanged(); + } else { + httpBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public Builder setHttp( + com.google.api.Http.Builder builderForValue) { + if (httpBuilder_ == null) { + http_ = builderForValue.build(); + onChanged(); + } else { + httpBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public Builder mergeHttp(com.google.api.Http value) { + if (httpBuilder_ == null) { + if (http_ != null) { + http_ = + com.google.api.Http.newBuilder(http_).mergeFrom(value).buildPartial(); + } else { + http_ = value; + } + onChanged(); + } else { + httpBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public Builder clearHttp() { + if (httpBuilder_ == null) { + http_ = null; + onChanged(); + } else { + http_ = null; + httpBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public com.google.api.Http.Builder getHttpBuilder() { + + onChanged(); + return getHttpFieldBuilder().getBuilder(); + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + public com.google.api.HttpOrBuilder getHttpOrBuilder() { + if (httpBuilder_ != null) { + return httpBuilder_.getMessageOrBuilder(); + } else { + return http_ == null ? + com.google.api.Http.getDefaultInstance() : http_; + } + } + /** + * optional .google.api.Http http = 9; + * + *
+     * HTTP configuration.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Http, com.google.api.Http.Builder, com.google.api.HttpOrBuilder> + getHttpFieldBuilder() { + if (httpBuilder_ == null) { + httpBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Http, com.google.api.Http.Builder, com.google.api.HttpOrBuilder>( + getHttp(), + getParentForChildren(), + isClean()); + http_ = null; + } + return httpBuilder_; + } + + 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_; + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public boolean hasContext() { + return contextBuilder_ != null || context_ != null; + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public com.google.api.Context getContext() { + if (contextBuilder_ == null) { + return context_ == null ? com.google.api.Context.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public Builder setContext(com.google.api.Context value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + contextBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public Builder setContext( + com.google.api.Context.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public Builder mergeContext(com.google.api.Context value) { + if (contextBuilder_ == null) { + if (context_ != null) { + context_ = + com.google.api.Context.newBuilder(context_).mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + contextBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public Builder clearContext() { + if (contextBuilder_ == null) { + context_ = null; + onChanged(); + } else { + context_ = null; + contextBuilder_ = null; + } + + return this; + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public com.google.api.Context.Builder getContextBuilder() { + + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + public com.google.api.ContextOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.google.api.Context.getDefaultInstance() : context_; + } + } + /** + * optional .google.api.Context context = 12; + * + *
+     * Context configuration.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.Context, com.google.api.Context.Builder, com.google.api.ContextOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.Context, com.google.api.Context.Builder, com.google.api.ContextOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + + 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.protobuf.Any derivedData_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> derivedDataBuilder_; + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public boolean hasDerivedData() { + return derivedDataBuilder_ != null || derivedData_ != null; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public com.google.protobuf.Any getDerivedData() { + if (derivedDataBuilder_ == null) { + return derivedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : derivedData_; + } else { + return derivedDataBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public Builder setDerivedData(com.google.protobuf.Any value) { + if (derivedDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + derivedData_ = value; + onChanged(); + } else { + derivedDataBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public Builder setDerivedData( + com.google.protobuf.Any.Builder builderForValue) { + if (derivedDataBuilder_ == null) { + derivedData_ = builderForValue.build(); + onChanged(); + } else { + derivedDataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public Builder mergeDerivedData(com.google.protobuf.Any value) { + if (derivedDataBuilder_ == null) { + if (derivedData_ != null) { + derivedData_ = + com.google.protobuf.Any.newBuilder(derivedData_).mergeFrom(value).buildPartial(); + } else { + derivedData_ = value; + } + onChanged(); + } else { + derivedDataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public Builder clearDerivedData() { + if (derivedDataBuilder_ == null) { + derivedData_ = null; + onChanged(); + } else { + derivedData_ = null; + derivedDataBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public com.google.protobuf.Any.Builder getDerivedDataBuilder() { + + onChanged(); + return getDerivedDataFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + public com.google.protobuf.AnyOrBuilder getDerivedDataOrBuilder() { + if (derivedDataBuilder_ != null) { + return derivedDataBuilder_.getMessageOrBuilder(); + } else { + return derivedData_ == null ? + com.google.protobuf.Any.getDefaultInstance() : derivedData_; + } + } + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+     * Service attributes derived by the configuration toolchain, for
+     * use at runtime.  Type is defined in
+     * `//google/internal/api/derived_service.proto`.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getDerivedDataFieldBuilder() { + if (derivedDataBuilder_ == null) { + derivedDataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getDerivedData(), + getParentForChildren(), + isClean()); + derivedData_ = null; + } + return derivedDataBuilder_; + } + + private java.util.List systemTypes_ = + java.util.Collections.emptyList(); + private void ensureSystemTypesIsMutable() { + if (!((bitField0_ & 0x00002000) == 0x00002000)) { + systemTypes_ = new java.util.ArrayList(systemTypes_); + bitField0_ |= 0x00002000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder> systemTypesBuilder_; + + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public java.util.List getSystemTypesList() { + if (systemTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(systemTypes_); + } else { + return systemTypesBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public int getSystemTypesCount() { + if (systemTypesBuilder_ == null) { + return systemTypes_.size(); + } else { + return systemTypesBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public com.google.protobuf.Type getSystemTypes(int index) { + if (systemTypesBuilder_ == null) { + return systemTypes_.get(index); + } else { + return systemTypesBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder setSystemTypes( + int index, com.google.protobuf.Type value) { + if (systemTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemTypesIsMutable(); + systemTypes_.set(index, value); + onChanged(); + } else { + systemTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder setSystemTypes( + int index, com.google.protobuf.Type.Builder builderForValue) { + if (systemTypesBuilder_ == null) { + ensureSystemTypesIsMutable(); + systemTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + systemTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder addSystemTypes(com.google.protobuf.Type value) { + if (systemTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemTypesIsMutable(); + systemTypes_.add(value); + onChanged(); + } else { + systemTypesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder addSystemTypes( + int index, com.google.protobuf.Type value) { + if (systemTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemTypesIsMutable(); + systemTypes_.add(index, value); + onChanged(); + } else { + systemTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder addSystemTypes( + com.google.protobuf.Type.Builder builderForValue) { + if (systemTypesBuilder_ == null) { + ensureSystemTypesIsMutable(); + systemTypes_.add(builderForValue.build()); + onChanged(); + } else { + systemTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder addSystemTypes( + int index, com.google.protobuf.Type.Builder builderForValue) { + if (systemTypesBuilder_ == null) { + ensureSystemTypesIsMutable(); + systemTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + systemTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder addAllSystemTypes( + java.lang.Iterable values) { + if (systemTypesBuilder_ == null) { + ensureSystemTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, systemTypes_); + onChanged(); + } else { + systemTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder clearSystemTypes() { + if (systemTypesBuilder_ == null) { + systemTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + } else { + systemTypesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public Builder removeSystemTypes(int index) { + if (systemTypesBuilder_ == null) { + ensureSystemTypesIsMutable(); + systemTypes_.remove(index); + onChanged(); + } else { + systemTypesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public com.google.protobuf.Type.Builder getSystemTypesBuilder( + int index) { + return getSystemTypesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public com.google.protobuf.TypeOrBuilder getSystemTypesOrBuilder( + int index) { + if (systemTypesBuilder_ == null) { + return systemTypes_.get(index); } else { + return systemTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public java.util.List + getSystemTypesOrBuilderList() { + if (systemTypesBuilder_ != null) { + return systemTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(systemTypes_); + } + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public com.google.protobuf.Type.Builder addSystemTypesBuilder() { + return getSystemTypesFieldBuilder().addBuilder( + com.google.protobuf.Type.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public com.google.protobuf.Type.Builder addSystemTypesBuilder( + int index) { + return getSystemTypesFieldBuilder().addBuilder( + index, com.google.protobuf.Type.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+     * A list of all proto message types included in this API service.
+     * It serves similar purpose as [google.api.Service.types], except that
+     * these types are not needed by user-defined APIs. Therefore, they will not
+     * show up in the generated discovery doc. This field should only be used
+     * to define system APIs in ESF.
+     * 
+ */ + public java.util.List + getSystemTypesBuilderList() { + return getSystemTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder> + getSystemTypesFieldBuilder() { + if (systemTypesBuilder_ == null) { + systemTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder>( + systemTypes_, + ((bitField0_ & 0x00002000) == 0x00002000), + getParentForChildren(), + isClean()); + systemTypes_ = null; + } + return systemTypesBuilder_; + } + 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.Service) + } + + // @@protoc_insertion_point(class_scope:google.api.Service) + private static final com.google.api.Service DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Service(); + } + + public static com.google.api.Service getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Service parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Service(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.Service getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/ServiceOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/ServiceOrBuilder.java new file mode 100644 index 000000000000..f3a729e886a7 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/ServiceOrBuilder.java @@ -0,0 +1,530 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/service.proto + +package com.google.api; + +public interface ServiceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Service) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+   * The version of the service configuration. The config version may
+   * influence interpretation of the configuration, for example
+   * determine defaults. This is documented together with applicable
+   * options. The current default for the config version itself is `1`.
+   * 
+ */ + boolean hasConfigVersion(); + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+   * The version of the service configuration. The config version may
+   * influence interpretation of the configuration, for example
+   * determine defaults. This is documented together with applicable
+   * options. The current default for the config version itself is `1`.
+   * 
+ */ + com.google.protobuf.UInt32Value getConfigVersion(); + /** + * optional .google.protobuf.UInt32Value config_version = 20; + * + *
+   * The version of the service configuration. The config version may
+   * influence interpretation of the configuration, for example
+   * determine defaults. This is documented together with applicable
+   * options. The current default for the config version itself is `1`.
+   * 
+ */ + com.google.protobuf.UInt32ValueOrBuilder getConfigVersionOrBuilder(); + + /** + * optional string name = 1; + * + *
+   * The DNS address at which this service is available,
+   * e.g. `calendar.googleapis.com`.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The DNS address at which this service is available,
+   * e.g. `calendar.googleapis.com`.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional string title = 2; + * + *
+   * The product title associated with this service.
+   * 
+ */ + java.lang.String getTitle(); + /** + * optional string title = 2; + * + *
+   * The product title associated with this service.
+   * 
+ */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + * optional string producer_project_id = 22; + * + *
+   * The id of the Google developer project that owns the service.
+   * Members of this project can manage the service configuration,
+   * manage consumption of the service, etc.
+   * 
+ */ + java.lang.String getProducerProjectId(); + /** + * optional string producer_project_id = 22; + * + *
+   * The id of the Google developer project that owns the service.
+   * Members of this project can manage the service configuration,
+   * manage consumption of the service, etc.
+   * 
+ */ + com.google.protobuf.ByteString + getProducerProjectIdBytes(); + + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + java.util.List + getApisList(); + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + com.google.protobuf.Api getApis(int index); + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + int getApisCount(); + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + java.util.List + getApisOrBuilderList(); + /** + * repeated .google.protobuf.Api apis = 3; + * + *
+   * A list of API interfaces exported by this service. Only the `name` field
+   * of the [google.protobuf.Api][] needs to be provided by the configuration
+   * author, as the remaining fields will be derived from the IDL during the
+   * normalization process. It is an error to specify an API interface here
+   * which cannot be resolved against the associated IDL files.
+   * 
+ */ + com.google.protobuf.ApiOrBuilder getApisOrBuilder( + int index); + + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + java.util.List + getTypesList(); + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + com.google.protobuf.Type getTypes(int index); + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + int getTypesCount(); + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + java.util.List + getTypesOrBuilderList(); + /** + * repeated .google.protobuf.Type types = 4; + * + *
+   * A list of all proto message types included in this API service.
+   * Types referenced directly or indirectly by the `apis` are
+   * automatically included.  Messages which are not referenced but
+   * shall be included, such as types used by the `google.protobuf.Any` type,
+   * should be listed here by name. Example:
+   *     types:
+   *     - name: google.protobuf.Int32
+   * 
+ */ + com.google.protobuf.TypeOrBuilder getTypesOrBuilder( + int index); + + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + java.util.List + getEnumsList(); + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + com.google.protobuf.Enum getEnums(int index); + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + int getEnumsCount(); + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + java.util.List + getEnumsOrBuilderList(); + /** + * repeated .google.protobuf.Enum enums = 5; + * + *
+   * A list of all enum types included in this API service.  Enums
+   * referenced directly or indirectly by the `apis` are automatically
+   * included.  Enums which are not referenced but shall be included
+   * should be listed here by name. Example:
+   *     enums:
+   *     - name: google.someapi.v1.SomeEnum
+   * 
+ */ + com.google.protobuf.EnumOrBuilder getEnumsOrBuilder( + int index); + + /** + * optional .google.api.Documentation documentation = 6; + * + *
+   * Additional API documentation.
+   * 
+ */ + boolean hasDocumentation(); + /** + * optional .google.api.Documentation documentation = 6; + * + *
+   * Additional API documentation.
+   * 
+ */ + com.google.api.Documentation getDocumentation(); + /** + * optional .google.api.Documentation documentation = 6; + * + *
+   * Additional API documentation.
+   * 
+ */ + com.google.api.DocumentationOrBuilder getDocumentationOrBuilder(); + + /** + * optional .google.api.Visibility visibility = 7; + * + *
+   * API visibility configuration.
+   * 
+ */ + boolean hasVisibility(); + /** + * optional .google.api.Visibility visibility = 7; + * + *
+   * API visibility configuration.
+   * 
+ */ + com.google.api.Visibility getVisibility(); + /** + * optional .google.api.Visibility visibility = 7; + * + *
+   * API visibility configuration.
+   * 
+ */ + com.google.api.VisibilityOrBuilder getVisibilityOrBuilder(); + + /** + * optional .google.api.Http http = 9; + * + *
+   * HTTP configuration.
+   * 
+ */ + boolean hasHttp(); + /** + * optional .google.api.Http http = 9; + * + *
+   * HTTP configuration.
+   * 
+ */ + com.google.api.Http getHttp(); + /** + * optional .google.api.Http http = 9; + * + *
+   * HTTP configuration.
+   * 
+ */ + com.google.api.HttpOrBuilder getHttpOrBuilder(); + + /** + * optional .google.api.Context context = 12; + * + *
+   * Context configuration.
+   * 
+ */ + boolean hasContext(); + /** + * optional .google.api.Context context = 12; + * + *
+   * Context configuration.
+   * 
+ */ + com.google.api.Context getContext(); + /** + * optional .google.api.Context context = 12; + * + *
+   * Context configuration.
+   * 
+ */ + com.google.api.ContextOrBuilder getContextOrBuilder(); + + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+   * Custom error configuration.
+   * 
+ */ + boolean hasCustomError(); + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+   * Custom error configuration.
+   * 
+ */ + com.google.api.CustomError getCustomError(); + /** + * optional .google.api.CustomError custom_error = 16; + * + *
+   * Custom error configuration.
+   * 
+ */ + com.google.api.CustomErrorOrBuilder getCustomErrorOrBuilder(); + + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+   * Service attributes derived by the configuration toolchain, for
+   * use at runtime.  Type is defined in
+   * `//google/internal/api/derived_service.proto`.
+   * 
+ */ + boolean hasDerivedData(); + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+   * Service attributes derived by the configuration toolchain, for
+   * use at runtime.  Type is defined in
+   * `//google/internal/api/derived_service.proto`.
+   * 
+ */ + com.google.protobuf.Any getDerivedData(); + /** + * optional .google.protobuf.Any derived_data = 100; + * + *
+   * Service attributes derived by the configuration toolchain, for
+   * use at runtime.  Type is defined in
+   * `//google/internal/api/derived_service.proto`.
+   * 
+ */ + com.google.protobuf.AnyOrBuilder getDerivedDataOrBuilder(); + + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + java.util.List + getSystemTypesList(); + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + com.google.protobuf.Type getSystemTypes(int index); + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + int getSystemTypesCount(); + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + java.util.List + getSystemTypesOrBuilderList(); + /** + * repeated .google.protobuf.Type system_types = 102; + * + *
+   * A list of all proto message types included in this API service.
+   * It serves similar purpose as [google.api.Service.types], except that
+   * these types are not needed by user-defined APIs. Therefore, they will not
+   * show up in the generated discovery doc. This field should only be used
+   * to define system APIs in ESF.
+   * 
+ */ + com.google.protobuf.TypeOrBuilder getSystemTypesOrBuilder( + int index); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/ServiceProto.java b/gcloud-java-gax/src/generated/main/java/com/google/api/ServiceProto.java new file mode 100644 index 000000000000..fa6c564c7644 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/ServiceProto.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/service.proto + +package com.google.api; + +public final class ServiceProto { + private ServiceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Service_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Service_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/service.proto\022\ngoogle.api\032\031" + + "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" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.ApiProto.getDescriptor(), + com.google.protobuf.TypeProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ContextProto.getDescriptor(), + com.google.api.DocumentationProto.getDescriptor(), + com.google.api.ErrorFormatProto.getDescriptor(), + com.google.api.HttpProto.getDescriptor(), + com.google.api.VisibilityProto.getDescriptor(), + }, assigner); + internal_static_google_api_Service_descriptor = + getDescriptor().getMessageTypes().get(0); + 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", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.fieldVisibility); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.ApiProto.getDescriptor(); + com.google.protobuf.TypeProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ContextProto.getDescriptor(); + com.google.api.DocumentationProto.getDescriptor(); + com.google.api.ErrorFormatProto.getDescriptor(); + com.google.api.HttpProto.getDescriptor(); + com.google.api.VisibilityProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/Visibility.java b/gcloud-java-gax/src/generated/main/java/com/google/api/Visibility.java new file mode 100644 index 000000000000..2ef3f2b0442d --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/Visibility.java @@ -0,0 +1,1370 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/visibility.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.Visibility} + * + *
+ * `Visibility` defines restrictions for the visibility of service
+ * elements.  Restrictions are specified using visibility labels
+ * (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.
+ * User and projects can have access to more than one visibility label. The
+ * effective visibility for multiple labels is the union of each label's
+ * elements, plus any unrestricted elements. You must list any supported label
+ * combinations in `label_combinations`.
+ * If an element and its parents have no restrictions, visibility is
+ * unconditionally granted.
+ * Example:
+ *     visibility:
+ *       label_combinations:
+ *       - GOOGLE_INTERNAL, TRUSTED_TESTER
+ *       rules:
+ *       - selector: google.calendar.Calendar.EnhancedSearch
+ *         restriction: TRUSTED_TESTER
+ *       - selector: google.calendar.Calendar.Delegate
+ *         restriction: GOOGLE_INTERNAL
+ * Here, all methods are publicly visible except for the restricted methods
+ * EnhancedSearch and Delegate. In addition, since `label_combinations`
+ * lists both GOOGLE_INTERNAL and TRUSTED_TESTER, users and projects can be
+ * given access to a combined visibility with both EnhancedSearch and Delegate.
+ * 
+ */ +public final class Visibility extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Visibility) + VisibilityOrBuilder { + // Use Visibility.newBuilder() to construct. + private Visibility(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Visibility() { + rules_ = java.util.Collections.emptyList(); + labelCombinations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Visibility( + 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)) { + rules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + rules_.add(input.readMessage(com.google.api.VisibilityRule.parser(), extensionRegistry)); + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + labelCombinations_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + labelCombinations_.add(s); + break; + } + case 26: { + com.google.protobuf.BoolValue.Builder subBuilder = null; + if (enforceRuntimeVisibility_ != null) { + subBuilder = enforceRuntimeVisibility_.toBuilder(); + } + enforceRuntimeVisibility_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(enforceRuntimeVisibility_); + enforceRuntimeVisibility_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + labelCombinations_ = labelCombinations_.getUnmodifiableView(); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.VisibilityProto.internal_static_google_api_Visibility_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.VisibilityProto.internal_static_google_api_Visibility_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Visibility.class, com.google.api.Visibility.Builder.class); + } + + private int bitField0_; + public static final int RULES_FIELD_NUMBER = 1; + private java.util.List rules_; + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + public java.util.List getRulesList() { + return rules_; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + public int getRulesCount() { + return rules_.size(); + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + public com.google.api.VisibilityRule getRules(int index) { + return rules_.get(index); + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + public com.google.api.VisibilityRuleOrBuilder getRulesOrBuilder( + int index) { + return rules_.get(index); + } + + public static final int LABEL_COMBINATIONS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList labelCombinations_; + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + public com.google.protobuf.ProtocolStringList + getLabelCombinationsList() { + return labelCombinations_; + } + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + public int getLabelCombinationsCount() { + return labelCombinations_.size(); + } + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + public java.lang.String getLabelCombinations(int index) { + return labelCombinations_.get(index); + } + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + public com.google.protobuf.ByteString + getLabelCombinationsBytes(int index) { + return labelCombinations_.getByteString(index); + } + + public static final int ENFORCE_RUNTIME_VISIBILITY_FIELD_NUMBER = 3; + private com.google.protobuf.BoolValue enforceRuntimeVisibility_; + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility rules are enforced at runtime for requests to
+   * all APIs and methods.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is false.
+   * Note, the `enforce_runtime_visibility` specified in a visibility rule
+   * overrides this setting for the APIs or methods asscoiated with the rule.
+   * 
+ */ + public boolean hasEnforceRuntimeVisibility() { + return enforceRuntimeVisibility_ != null; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility rules are enforced at runtime for requests to
+   * all APIs and methods.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is false.
+   * Note, the `enforce_runtime_visibility` specified in a visibility rule
+   * overrides this setting for the APIs or methods asscoiated with the rule.
+   * 
+ */ + public com.google.protobuf.BoolValue getEnforceRuntimeVisibility() { + return enforceRuntimeVisibility_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility rules are enforced at runtime for requests to
+   * all APIs and methods.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is false.
+   * Note, the `enforce_runtime_visibility` specified in a visibility rule
+   * overrides this setting for the APIs or methods asscoiated with the rule.
+   * 
+ */ + public com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder() { + return getEnforceRuntimeVisibility(); + } + + 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(1, rules_.get(i)); + } + for (int i = 0; i < labelCombinations_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, labelCombinations_.getRaw(i)); + } + if (enforceRuntimeVisibility_ != null) { + output.writeMessage(3, getEnforceRuntimeVisibility()); + } + } + + 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(1, rules_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < labelCombinations_.size(); i++) { + dataSize += computeStringSizeNoTag(labelCombinations_.getRaw(i)); + } + size += dataSize; + size += 1 * getLabelCombinationsList().size(); + } + if (enforceRuntimeVisibility_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getEnforceRuntimeVisibility()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.Visibility parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Visibility 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.Visibility parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Visibility parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Visibility parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Visibility parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.Visibility parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.Visibility parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.Visibility parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.Visibility 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.Visibility 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.Visibility} + * + *
+   * `Visibility` defines restrictions for the visibility of service
+   * elements.  Restrictions are specified using visibility labels
+   * (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.
+   * User and projects can have access to more than one visibility label. The
+   * effective visibility for multiple labels is the union of each label's
+   * elements, plus any unrestricted elements. You must list any supported label
+   * combinations in `label_combinations`.
+   * If an element and its parents have no restrictions, visibility is
+   * unconditionally granted.
+   * Example:
+   *     visibility:
+   *       label_combinations:
+   *       - GOOGLE_INTERNAL, TRUSTED_TESTER
+   *       rules:
+   *       - selector: google.calendar.Calendar.EnhancedSearch
+   *         restriction: TRUSTED_TESTER
+   *       - selector: google.calendar.Calendar.Delegate
+   *         restriction: GOOGLE_INTERNAL
+   * Here, all methods are publicly visible except for the restricted methods
+   * EnhancedSearch and Delegate. In addition, since `label_combinations`
+   * lists both GOOGLE_INTERNAL and TRUSTED_TESTER, users and projects can be
+   * given access to a combined visibility with both EnhancedSearch and Delegate.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Visibility) + com.google.api.VisibilityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.VisibilityProto.internal_static_google_api_Visibility_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.VisibilityProto.internal_static_google_api_Visibility_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Visibility.class, com.google.api.Visibility.Builder.class); + } + + // Construct using com.google.api.Visibility.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRulesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rulesBuilder_.clear(); + } + labelCombinations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibility_ = null; + } else { + enforceRuntimeVisibility_ = null; + enforceRuntimeVisibilityBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.VisibilityProto.internal_static_google_api_Visibility_descriptor; + } + + public com.google.api.Visibility getDefaultInstanceForType() { + return com.google.api.Visibility.getDefaultInstance(); + } + + public com.google.api.Visibility build() { + com.google.api.Visibility result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.Visibility buildPartial() { + com.google.api.Visibility result = new com.google.api.Visibility(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + labelCombinations_ = labelCombinations_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.labelCombinations_ = labelCombinations_; + if (enforceRuntimeVisibilityBuilder_ == null) { + result.enforceRuntimeVisibility_ = enforceRuntimeVisibility_; + } else { + result.enforceRuntimeVisibility_ = enforceRuntimeVisibilityBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Visibility) { + return mergeFrom((com.google.api.Visibility)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Visibility other) { + if (other == com.google.api.Visibility.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (!other.labelCombinations_.isEmpty()) { + if (labelCombinations_.isEmpty()) { + labelCombinations_ = other.labelCombinations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLabelCombinationsIsMutable(); + labelCombinations_.addAll(other.labelCombinations_); + } + onChanged(); + } + if (other.hasEnforceRuntimeVisibility()) { + mergeEnforceRuntimeVisibility(other.getEnforceRuntimeVisibility()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.Visibility parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.Visibility) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.VisibilityRule, com.google.api.VisibilityRule.Builder, com.google.api.VisibilityRuleOrBuilder> rulesBuilder_; + + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public com.google.api.VisibilityRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.VisibilityRule 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.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder setRules( + int index, com.google.api.VisibilityRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder addRules(com.google.api.VisibilityRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.VisibilityRule 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.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder addRules( + com.google.api.VisibilityRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder addRules( + int index, com.google.api.VisibilityRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public com.google.api.VisibilityRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public com.google.api.VisibilityRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public com.google.api.VisibilityRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.api.VisibilityRule.getDefaultInstance()); + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public com.google.api.VisibilityRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.api.VisibilityRule.getDefaultInstance()); + } + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+     * A list of visibility rules providing visibility configuration for
+     * individual API elements.
+     * 
+ */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.VisibilityRule, com.google.api.VisibilityRule.Builder, com.google.api.VisibilityRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.VisibilityRule, com.google.api.VisibilityRule.Builder, com.google.api.VisibilityRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private com.google.protobuf.LazyStringList labelCombinations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureLabelCombinationsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + labelCombinations_ = new com.google.protobuf.LazyStringArrayList(labelCombinations_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getLabelCombinationsList() { + return labelCombinations_.getUnmodifiableView(); + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public int getLabelCombinationsCount() { + return labelCombinations_.size(); + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public java.lang.String getLabelCombinations(int index) { + return labelCombinations_.get(index); + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public com.google.protobuf.ByteString + getLabelCombinationsBytes(int index) { + return labelCombinations_.getByteString(index); + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public Builder setLabelCombinations( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelCombinationsIsMutable(); + labelCombinations_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public Builder addLabelCombinations( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelCombinationsIsMutable(); + labelCombinations_.add(value); + onChanged(); + return this; + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public Builder addAllLabelCombinations( + java.lang.Iterable values) { + ensureLabelCombinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, labelCombinations_); + onChanged(); + return this; + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public Builder clearLabelCombinations() { + labelCombinations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated string label_combinations = 2; + * + *
+     * Lists valid label combinations for this service in comma-delimited form.
+     * This lets users and projects see the union of these labels' elements.
+     * Removing a label combination can be a breaking change, as clients with
+     * access to the combination will now see non-restricted elements only.
+     * 
+ */ + public Builder addLabelCombinationsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLabelCombinationsIsMutable(); + labelCombinations_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue enforceRuntimeVisibility_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> enforceRuntimeVisibilityBuilder_; + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public boolean hasEnforceRuntimeVisibility() { + return enforceRuntimeVisibilityBuilder_ != null || enforceRuntimeVisibility_ != null; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public com.google.protobuf.BoolValue getEnforceRuntimeVisibility() { + if (enforceRuntimeVisibilityBuilder_ == null) { + return enforceRuntimeVisibility_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; + } else { + return enforceRuntimeVisibilityBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public Builder setEnforceRuntimeVisibility(com.google.protobuf.BoolValue value) { + if (enforceRuntimeVisibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + enforceRuntimeVisibility_ = value; + onChanged(); + } else { + enforceRuntimeVisibilityBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public Builder setEnforceRuntimeVisibility( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibility_ = builderForValue.build(); + onChanged(); + } else { + enforceRuntimeVisibilityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public Builder mergeEnforceRuntimeVisibility(com.google.protobuf.BoolValue value) { + if (enforceRuntimeVisibilityBuilder_ == null) { + if (enforceRuntimeVisibility_ != null) { + enforceRuntimeVisibility_ = + com.google.protobuf.BoolValue.newBuilder(enforceRuntimeVisibility_).mergeFrom(value).buildPartial(); + } else { + enforceRuntimeVisibility_ = value; + } + onChanged(); + } else { + enforceRuntimeVisibilityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public Builder clearEnforceRuntimeVisibility() { + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibility_ = null; + onChanged(); + } else { + enforceRuntimeVisibility_ = null; + enforceRuntimeVisibilityBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public com.google.protobuf.BoolValue.Builder getEnforceRuntimeVisibilityBuilder() { + + onChanged(); + return getEnforceRuntimeVisibilityFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + public com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder() { + if (enforceRuntimeVisibilityBuilder_ != null) { + return enforceRuntimeVisibilityBuilder_.getMessageOrBuilder(); + } else { + return enforceRuntimeVisibility_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; + } + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility rules are enforced at runtime for requests to
+     * all APIs and methods.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is false.
+     * Note, the `enforce_runtime_visibility` specified in a visibility rule
+     * overrides this setting for the APIs or methods asscoiated with the rule.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getEnforceRuntimeVisibilityFieldBuilder() { + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibilityBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getEnforceRuntimeVisibility(), + getParentForChildren(), + isClean()); + enforceRuntimeVisibility_ = null; + } + return enforceRuntimeVisibilityBuilder_; + } + 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.Visibility) + } + + // @@protoc_insertion_point(class_scope:google.api.Visibility) + private static final com.google.api.Visibility DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Visibility(); + } + + public static com.google.api.Visibility getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Visibility parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Visibility(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.Visibility getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/VisibilityOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/VisibilityOrBuilder.java new file mode 100644 index 000000000000..1c8cb2bca4b8 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/VisibilityOrBuilder.java @@ -0,0 +1,148 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/visibility.proto + +package com.google.api; + +public interface VisibilityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Visibility) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + java.util.List + getRulesList(); + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + com.google.api.VisibilityRule getRules(int index); + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + int getRulesCount(); + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + java.util.List + getRulesOrBuilderList(); + /** + * repeated .google.api.VisibilityRule rules = 1; + * + *
+   * A list of visibility rules providing visibility configuration for
+   * individual API elements.
+   * 
+ */ + com.google.api.VisibilityRuleOrBuilder getRulesOrBuilder( + int index); + + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getLabelCombinationsList(); + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + int getLabelCombinationsCount(); + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + java.lang.String getLabelCombinations(int index); + /** + * repeated string label_combinations = 2; + * + *
+   * Lists valid label combinations for this service in comma-delimited form.
+   * This lets users and projects see the union of these labels' elements.
+   * Removing a label combination can be a breaking change, as clients with
+   * access to the combination will now see non-restricted elements only.
+   * 
+ */ + com.google.protobuf.ByteString + getLabelCombinationsBytes(int index); + + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility rules are enforced at runtime for requests to
+   * all APIs and methods.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is false.
+   * Note, the `enforce_runtime_visibility` specified in a visibility rule
+   * overrides this setting for the APIs or methods asscoiated with the rule.
+   * 
+ */ + boolean hasEnforceRuntimeVisibility(); + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility rules are enforced at runtime for requests to
+   * all APIs and methods.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is false.
+   * Note, the `enforce_runtime_visibility` specified in a visibility rule
+   * overrides this setting for the APIs or methods asscoiated with the rule.
+   * 
+ */ + com.google.protobuf.BoolValue getEnforceRuntimeVisibility(); + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility rules are enforced at runtime for requests to
+   * all APIs and methods.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is false.
+   * Note, the `enforce_runtime_visibility` specified in a visibility rule
+   * overrides this setting for the APIs or methods asscoiated with the rule.
+   * 
+ */ + com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/VisibilityProto.java b/gcloud-java-gax/src/generated/main/java/com/google/api/VisibilityProto.java new file mode 100644 index 000000000000..75f797d990e2 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/VisibilityProto.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/visibility.proto + +package com.google.api; + +public final class VisibilityProto { + private VisibilityProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Visibility_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Visibility_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_VisibilityRule_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_VisibilityRule_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/visibility.proto\022\ngoogle.ap" + + "i\032\036google/protobuf/wrappers.proto\"\223\001\n\nVi" + + "sibility\022)\n\005rules\030\001 \003(\0132\032.google.api.Vis" + + "ibilityRule\022\032\n\022label_combinations\030\002 \003(\t\022" + + ">\n\032enforce_runtime_visibility\030\003 \001(\0132\032.go" + + "ogle.protobuf.BoolValue\"w\n\016VisibilityRul" + + "e\022\020\n\010selector\030\001 \001(\t\022\023\n\013restriction\030\002 \001(\t" + + "\022>\n\032enforce_runtime_visibility\030\003 \001(\0132\032.g" + + "oogle.protobuf.BoolValueB&\n\016com.google.a" + + "piB\017VisibilityProtoP\001\370\001\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.protobuf.WrappersProto.getDescriptor(), + }, assigner); + internal_static_google_api_Visibility_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Visibility_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Visibility_descriptor, + new java.lang.String[] { "Rules", "LabelCombinations", "EnforceRuntimeVisibility", }); + internal_static_google_api_VisibilityRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_VisibilityRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_VisibilityRule_descriptor, + new java.lang.String[] { "Selector", "Restriction", "EnforceRuntimeVisibility", }); + com.google.protobuf.WrappersProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/VisibilityRule.java b/gcloud-java-gax/src/generated/main/java/com/google/api/VisibilityRule.java new file mode 100644 index 000000000000..1fcc76384b70 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/VisibilityRule.java @@ -0,0 +1,998 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/visibility.proto + +package com.google.api; + +/** + * Protobuf type {@code google.api.VisibilityRule} + * + *
+ * A visibility rule provides visibility configuration for an individual API
+ * element.
+ * 
+ */ +public final class VisibilityRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.VisibilityRule) + VisibilityRuleOrBuilder { + // Use VisibilityRule.newBuilder() to construct. + private VisibilityRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private VisibilityRule() { + selector_ = ""; + restriction_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private VisibilityRule( + 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: { + String s = input.readStringRequireUtf8(); + + restriction_ = s; + break; + } + case 26: { + com.google.protobuf.BoolValue.Builder subBuilder = null; + if (enforceRuntimeVisibility_ != null) { + subBuilder = enforceRuntimeVisibility_.toBuilder(); + } + enforceRuntimeVisibility_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(enforceRuntimeVisibility_); + enforceRuntimeVisibility_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.VisibilityRule.class, com.google.api.VisibilityRule.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object selector_; + /** + * optional string selector = 1; + * + *
+   * Selects methods, messages, fields, enums, etc. 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 methods, messages, fields, enums, etc. 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 RESTRICTION_FIELD_NUMBER = 2; + private volatile java.lang.Object restriction_; + /** + * optional string restriction = 2; + * + *
+   * Lists the visibility labels for this rule. Any of the listed labels grants
+   * visibility to the element.
+   * If a rule has multiple labels, removing one of the labels but not all of
+   * them can break clients.
+   * Example:
+   *     visibility:
+   *       rules:
+   *       - selector: google.calendar.Calendar.EnhancedSearch
+   *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+   * Removing GOOGLE_INTERNAL from this restriction will break clients that
+   * rely on this method and only had access to it through GOOGLE_INTERNAL.
+   * 
+ */ + public java.lang.String getRestriction() { + java.lang.Object ref = restriction_; + 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(); + restriction_ = s; + return s; + } + } + /** + * optional string restriction = 2; + * + *
+   * Lists the visibility labels for this rule. Any of the listed labels grants
+   * visibility to the element.
+   * If a rule has multiple labels, removing one of the labels but not all of
+   * them can break clients.
+   * Example:
+   *     visibility:
+   *       rules:
+   *       - selector: google.calendar.Calendar.EnhancedSearch
+   *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+   * Removing GOOGLE_INTERNAL from this restriction will break clients that
+   * rely on this method and only had access to it through GOOGLE_INTERNAL.
+   * 
+ */ + public com.google.protobuf.ByteString + getRestrictionBytes() { + java.lang.Object ref = restriction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + restriction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENFORCE_RUNTIME_VISIBILITY_FIELD_NUMBER = 3; + private com.google.protobuf.BoolValue enforceRuntimeVisibility_; + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility is enforced at runtime for requests to an API
+   * method. This setting has meaning only when the selector applies to a method
+   * or an API.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is determined by the value of
+   * [google.api.Visibility.enforce_runtime_visibility][].
+   * 
+ */ + public boolean hasEnforceRuntimeVisibility() { + return enforceRuntimeVisibility_ != null; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility is enforced at runtime for requests to an API
+   * method. This setting has meaning only when the selector applies to a method
+   * or an API.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is determined by the value of
+   * [google.api.Visibility.enforce_runtime_visibility][].
+   * 
+ */ + public com.google.protobuf.BoolValue getEnforceRuntimeVisibility() { + return enforceRuntimeVisibility_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility is enforced at runtime for requests to an API
+   * method. This setting has meaning only when the selector applies to a method
+   * or an API.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is determined by the value of
+   * [google.api.Visibility.enforce_runtime_visibility][].
+   * 
+ */ + public com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder() { + return getEnforceRuntimeVisibility(); + } + + 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 (!getRestrictionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, restriction_); + } + if (enforceRuntimeVisibility_ != null) { + output.writeMessage(3, getEnforceRuntimeVisibility()); + } + } + + 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 (!getRestrictionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, restriction_); + } + if (enforceRuntimeVisibility_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getEnforceRuntimeVisibility()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.api.VisibilityRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.VisibilityRule 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.VisibilityRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.VisibilityRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.VisibilityRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.VisibilityRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.api.VisibilityRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.api.VisibilityRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.api.VisibilityRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.api.VisibilityRule 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.VisibilityRule 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.VisibilityRule} + * + *
+   * A visibility rule provides visibility configuration for an individual API
+   * element.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.VisibilityRule) + com.google.api.VisibilityRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.VisibilityRule.class, com.google.api.VisibilityRule.Builder.class); + } + + // Construct using com.google.api.VisibilityRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + selector_ = ""; + + restriction_ = ""; + + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibility_ = null; + } else { + enforceRuntimeVisibility_ = null; + enforceRuntimeVisibilityBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_descriptor; + } + + public com.google.api.VisibilityRule getDefaultInstanceForType() { + return com.google.api.VisibilityRule.getDefaultInstance(); + } + + public com.google.api.VisibilityRule build() { + com.google.api.VisibilityRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.api.VisibilityRule buildPartial() { + com.google.api.VisibilityRule result = new com.google.api.VisibilityRule(this); + result.selector_ = selector_; + result.restriction_ = restriction_; + if (enforceRuntimeVisibilityBuilder_ == null) { + result.enforceRuntimeVisibility_ = enforceRuntimeVisibility_; + } else { + result.enforceRuntimeVisibility_ = enforceRuntimeVisibilityBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.VisibilityRule) { + return mergeFrom((com.google.api.VisibilityRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.VisibilityRule other) { + if (other == com.google.api.VisibilityRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + onChanged(); + } + if (!other.getRestriction().isEmpty()) { + restriction_ = other.restriction_; + onChanged(); + } + if (other.hasEnforceRuntimeVisibility()) { + mergeEnforceRuntimeVisibility(other.getEnforceRuntimeVisibility()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.VisibilityRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.VisibilityRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object selector_ = ""; + /** + * optional string selector = 1; + * + *
+     * Selects methods, messages, fields, enums, etc. 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 methods, messages, fields, enums, etc. 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 methods, messages, fields, enums, etc. 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 methods, messages, fields, enums, etc. 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 methods, messages, fields, enums, etc. 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 java.lang.Object restriction_ = ""; + /** + * optional string restriction = 2; + * + *
+     * Lists the visibility labels for this rule. Any of the listed labels grants
+     * visibility to the element.
+     * If a rule has multiple labels, removing one of the labels but not all of
+     * them can break clients.
+     * Example:
+     *     visibility:
+     *       rules:
+     *       - selector: google.calendar.Calendar.EnhancedSearch
+     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+     * Removing GOOGLE_INTERNAL from this restriction will break clients that
+     * rely on this method and only had access to it through GOOGLE_INTERNAL.
+     * 
+ */ + public java.lang.String getRestriction() { + java.lang.Object ref = restriction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + restriction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string restriction = 2; + * + *
+     * Lists the visibility labels for this rule. Any of the listed labels grants
+     * visibility to the element.
+     * If a rule has multiple labels, removing one of the labels but not all of
+     * them can break clients.
+     * Example:
+     *     visibility:
+     *       rules:
+     *       - selector: google.calendar.Calendar.EnhancedSearch
+     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+     * Removing GOOGLE_INTERNAL from this restriction will break clients that
+     * rely on this method and only had access to it through GOOGLE_INTERNAL.
+     * 
+ */ + public com.google.protobuf.ByteString + getRestrictionBytes() { + java.lang.Object ref = restriction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + restriction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string restriction = 2; + * + *
+     * Lists the visibility labels for this rule. Any of the listed labels grants
+     * visibility to the element.
+     * If a rule has multiple labels, removing one of the labels but not all of
+     * them can break clients.
+     * Example:
+     *     visibility:
+     *       rules:
+     *       - selector: google.calendar.Calendar.EnhancedSearch
+     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+     * Removing GOOGLE_INTERNAL from this restriction will break clients that
+     * rely on this method and only had access to it through GOOGLE_INTERNAL.
+     * 
+ */ + public Builder setRestriction( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + restriction_ = value; + onChanged(); + return this; + } + /** + * optional string restriction = 2; + * + *
+     * Lists the visibility labels for this rule. Any of the listed labels grants
+     * visibility to the element.
+     * If a rule has multiple labels, removing one of the labels but not all of
+     * them can break clients.
+     * Example:
+     *     visibility:
+     *       rules:
+     *       - selector: google.calendar.Calendar.EnhancedSearch
+     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+     * Removing GOOGLE_INTERNAL from this restriction will break clients that
+     * rely on this method and only had access to it through GOOGLE_INTERNAL.
+     * 
+ */ + public Builder clearRestriction() { + + restriction_ = getDefaultInstance().getRestriction(); + onChanged(); + return this; + } + /** + * optional string restriction = 2; + * + *
+     * Lists the visibility labels for this rule. Any of the listed labels grants
+     * visibility to the element.
+     * If a rule has multiple labels, removing one of the labels but not all of
+     * them can break clients.
+     * Example:
+     *     visibility:
+     *       rules:
+     *       - selector: google.calendar.Calendar.EnhancedSearch
+     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+     * Removing GOOGLE_INTERNAL from this restriction will break clients that
+     * rely on this method and only had access to it through GOOGLE_INTERNAL.
+     * 
+ */ + public Builder setRestrictionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + restriction_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue enforceRuntimeVisibility_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> enforceRuntimeVisibilityBuilder_; + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public boolean hasEnforceRuntimeVisibility() { + return enforceRuntimeVisibilityBuilder_ != null || enforceRuntimeVisibility_ != null; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public com.google.protobuf.BoolValue getEnforceRuntimeVisibility() { + if (enforceRuntimeVisibilityBuilder_ == null) { + return enforceRuntimeVisibility_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; + } else { + return enforceRuntimeVisibilityBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public Builder setEnforceRuntimeVisibility(com.google.protobuf.BoolValue value) { + if (enforceRuntimeVisibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + enforceRuntimeVisibility_ = value; + onChanged(); + } else { + enforceRuntimeVisibilityBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public Builder setEnforceRuntimeVisibility( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibility_ = builderForValue.build(); + onChanged(); + } else { + enforceRuntimeVisibilityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public Builder mergeEnforceRuntimeVisibility(com.google.protobuf.BoolValue value) { + if (enforceRuntimeVisibilityBuilder_ == null) { + if (enforceRuntimeVisibility_ != null) { + enforceRuntimeVisibility_ = + com.google.protobuf.BoolValue.newBuilder(enforceRuntimeVisibility_).mergeFrom(value).buildPartial(); + } else { + enforceRuntimeVisibility_ = value; + } + onChanged(); + } else { + enforceRuntimeVisibilityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public Builder clearEnforceRuntimeVisibility() { + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibility_ = null; + onChanged(); + } else { + enforceRuntimeVisibility_ = null; + enforceRuntimeVisibilityBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public com.google.protobuf.BoolValue.Builder getEnforceRuntimeVisibilityBuilder() { + + onChanged(); + return getEnforceRuntimeVisibilityFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + public com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder() { + if (enforceRuntimeVisibilityBuilder_ != null) { + return enforceRuntimeVisibilityBuilder_.getMessageOrBuilder(); + } else { + return enforceRuntimeVisibility_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; + } + } + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+     * Controls whether visibility is enforced at runtime for requests to an API
+     * method. This setting has meaning only when the selector applies to a method
+     * or an API.
+     * If true, requests without method visibility will receive a
+     * NOT_FOUND error, and any non-visible fields will be scrubbed from
+     * the response messages. The default is determined by the value of
+     * [google.api.Visibility.enforce_runtime_visibility][].
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getEnforceRuntimeVisibilityFieldBuilder() { + if (enforceRuntimeVisibilityBuilder_ == null) { + enforceRuntimeVisibilityBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getEnforceRuntimeVisibility(), + getParentForChildren(), + isClean()); + enforceRuntimeVisibility_ = null; + } + return enforceRuntimeVisibilityBuilder_; + } + 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.VisibilityRule) + } + + // @@protoc_insertion_point(class_scope:google.api.VisibilityRule) + private static final com.google.api.VisibilityRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.VisibilityRule(); + } + + public static com.google.api.VisibilityRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public VisibilityRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new VisibilityRule(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.api.VisibilityRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/api/VisibilityRuleOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/api/VisibilityRuleOrBuilder.java new file mode 100644 index 000000000000..130f46c58ada --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/api/VisibilityRuleOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/visibility.proto + +package com.google.api; + +public interface VisibilityRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.VisibilityRule) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string selector = 1; + * + *
+   * Selects methods, messages, fields, enums, etc. to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + java.lang.String getSelector(); + /** + * optional string selector = 1; + * + *
+   * Selects methods, messages, fields, enums, etc. to which this rule applies.
+   * Refer to [selector][DocumentationRule.selector] for syntax details.
+   * 
+ */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + * optional string restriction = 2; + * + *
+   * Lists the visibility labels for this rule. Any of the listed labels grants
+   * visibility to the element.
+   * If a rule has multiple labels, removing one of the labels but not all of
+   * them can break clients.
+   * Example:
+   *     visibility:
+   *       rules:
+   *       - selector: google.calendar.Calendar.EnhancedSearch
+   *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+   * Removing GOOGLE_INTERNAL from this restriction will break clients that
+   * rely on this method and only had access to it through GOOGLE_INTERNAL.
+   * 
+ */ + java.lang.String getRestriction(); + /** + * optional string restriction = 2; + * + *
+   * Lists the visibility labels for this rule. Any of the listed labels grants
+   * visibility to the element.
+   * If a rule has multiple labels, removing one of the labels but not all of
+   * them can break clients.
+   * Example:
+   *     visibility:
+   *       rules:
+   *       - selector: google.calendar.Calendar.EnhancedSearch
+   *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
+   * Removing GOOGLE_INTERNAL from this restriction will break clients that
+   * rely on this method and only had access to it through GOOGLE_INTERNAL.
+   * 
+ */ + com.google.protobuf.ByteString + getRestrictionBytes(); + + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility is enforced at runtime for requests to an API
+   * method. This setting has meaning only when the selector applies to a method
+   * or an API.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is determined by the value of
+   * [google.api.Visibility.enforce_runtime_visibility][].
+   * 
+ */ + boolean hasEnforceRuntimeVisibility(); + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility is enforced at runtime for requests to an API
+   * method. This setting has meaning only when the selector applies to a method
+   * or an API.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is determined by the value of
+   * [google.api.Visibility.enforce_runtime_visibility][].
+   * 
+ */ + com.google.protobuf.BoolValue getEnforceRuntimeVisibility(); + /** + * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; + * + *
+   * Controls whether visibility is enforced at runtime for requests to an API
+   * method. This setting has meaning only when the selector applies to a method
+   * or an API.
+   * If true, requests without method visibility will receive a
+   * NOT_FOUND error, and any non-visible fields will be scrubbed from
+   * the response messages. The default is determined by the value of
+   * [google.api.Visibility.enforce_runtime_visibility][].
+   * 
+ */ + com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/CancelOperationRequest.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/CancelOperationRequest.java new file mode 100644 index 000000000000..fe7f54b5b58f --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/CancelOperationRequest.java @@ -0,0 +1,476 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +/** + * Protobuf type {@code google.longrunning.CancelOperationRequest} + * + *
+ * The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
+ * 
+ */ +public final class CancelOperationRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.longrunning.CancelOperationRequest) + CancelOperationRequestOrBuilder { + // Use CancelOperationRequest.newBuilder() to construct. + private CancelOperationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CancelOperationRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private CancelOperationRequest( + 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; + } + } + } + } 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.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.CancelOperationRequest.class, com.google.longrunning.CancelOperationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the operation resource to be cancelled.
+   * 
+ */ + 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 operation resource to be cancelled.
+   * 
+ */ + 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; + } + } + + 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_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.longrunning.CancelOperationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.CancelOperationRequest 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.longrunning.CancelOperationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.CancelOperationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.longrunning.CancelOperationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.CancelOperationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.longrunning.CancelOperationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.longrunning.CancelOperationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.longrunning.CancelOperationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.CancelOperationRequest 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.longrunning.CancelOperationRequest 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.longrunning.CancelOperationRequest} + * + *
+   * The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.longrunning.CancelOperationRequest) + com.google.longrunning.CancelOperationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.CancelOperationRequest.class, com.google.longrunning.CancelOperationRequest.Builder.class); + } + + // Construct using com.google.longrunning.CancelOperationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_descriptor; + } + + public com.google.longrunning.CancelOperationRequest getDefaultInstanceForType() { + return com.google.longrunning.CancelOperationRequest.getDefaultInstance(); + } + + public com.google.longrunning.CancelOperationRequest build() { + com.google.longrunning.CancelOperationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.longrunning.CancelOperationRequest buildPartial() { + com.google.longrunning.CancelOperationRequest result = new com.google.longrunning.CancelOperationRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.longrunning.CancelOperationRequest) { + return mergeFrom((com.google.longrunning.CancelOperationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.longrunning.CancelOperationRequest other) { + if (other == com.google.longrunning.CancelOperationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.longrunning.CancelOperationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.longrunning.CancelOperationRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the operation resource to be cancelled.
+     * 
+ */ + 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 operation resource to be cancelled.
+     * 
+ */ + 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 operation resource to be cancelled.
+     * 
+ */ + 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 operation resource to be cancelled.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the operation resource to be cancelled.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = 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.longrunning.CancelOperationRequest) + } + + // @@protoc_insertion_point(class_scope:google.longrunning.CancelOperationRequest) + private static final com.google.longrunning.CancelOperationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.longrunning.CancelOperationRequest(); + } + + public static com.google.longrunning.CancelOperationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CancelOperationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CancelOperationRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.longrunning.CancelOperationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/CancelOperationRequestOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/CancelOperationRequestOrBuilder.java new file mode 100644 index 000000000000..86004606c35d --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/CancelOperationRequestOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public interface CancelOperationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.longrunning.CancelOperationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the operation resource to be cancelled.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the operation resource to be cancelled.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/DeleteOperationRequest.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/DeleteOperationRequest.java new file mode 100644 index 000000000000..d10d1e3300aa --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/DeleteOperationRequest.java @@ -0,0 +1,476 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +/** + * Protobuf type {@code google.longrunning.DeleteOperationRequest} + * + *
+ * The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
+ * 
+ */ +public final class DeleteOperationRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.longrunning.DeleteOperationRequest) + DeleteOperationRequestOrBuilder { + // Use DeleteOperationRequest.newBuilder() to construct. + private DeleteOperationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeleteOperationRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private DeleteOperationRequest( + 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; + } + } + } + } 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.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.DeleteOperationRequest.class, com.google.longrunning.DeleteOperationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the operation resource to be deleted.
+   * 
+ */ + 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 operation resource to be deleted.
+   * 
+ */ + 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; + } + } + + 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_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.longrunning.DeleteOperationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.DeleteOperationRequest 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.longrunning.DeleteOperationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.DeleteOperationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.longrunning.DeleteOperationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.DeleteOperationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.longrunning.DeleteOperationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.longrunning.DeleteOperationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.longrunning.DeleteOperationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.DeleteOperationRequest 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.longrunning.DeleteOperationRequest 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.longrunning.DeleteOperationRequest} + * + *
+   * The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.longrunning.DeleteOperationRequest) + com.google.longrunning.DeleteOperationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.DeleteOperationRequest.class, com.google.longrunning.DeleteOperationRequest.Builder.class); + } + + // Construct using com.google.longrunning.DeleteOperationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_descriptor; + } + + public com.google.longrunning.DeleteOperationRequest getDefaultInstanceForType() { + return com.google.longrunning.DeleteOperationRequest.getDefaultInstance(); + } + + public com.google.longrunning.DeleteOperationRequest build() { + com.google.longrunning.DeleteOperationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.longrunning.DeleteOperationRequest buildPartial() { + com.google.longrunning.DeleteOperationRequest result = new com.google.longrunning.DeleteOperationRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.longrunning.DeleteOperationRequest) { + return mergeFrom((com.google.longrunning.DeleteOperationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.longrunning.DeleteOperationRequest other) { + if (other == com.google.longrunning.DeleteOperationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.longrunning.DeleteOperationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.longrunning.DeleteOperationRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the operation resource to be deleted.
+     * 
+ */ + 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 operation resource to be deleted.
+     * 
+ */ + 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 operation resource to be deleted.
+     * 
+ */ + 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 operation resource to be deleted.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the operation resource to be deleted.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = 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.longrunning.DeleteOperationRequest) + } + + // @@protoc_insertion_point(class_scope:google.longrunning.DeleteOperationRequest) + private static final com.google.longrunning.DeleteOperationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.longrunning.DeleteOperationRequest(); + } + + public static com.google.longrunning.DeleteOperationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DeleteOperationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new DeleteOperationRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.longrunning.DeleteOperationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/DeleteOperationRequestOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/DeleteOperationRequestOrBuilder.java new file mode 100644 index 000000000000..16f7c82c171a --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/DeleteOperationRequestOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public interface DeleteOperationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.longrunning.DeleteOperationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the operation resource to be deleted.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the operation resource to be deleted.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/GetOperationRequest.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/GetOperationRequest.java new file mode 100644 index 000000000000..111563850c1a --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/GetOperationRequest.java @@ -0,0 +1,476 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +/** + * Protobuf type {@code google.longrunning.GetOperationRequest} + * + *
+ * The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation].
+ * 
+ */ +public final class GetOperationRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.longrunning.GetOperationRequest) + GetOperationRequestOrBuilder { + // Use GetOperationRequest.newBuilder() to construct. + private GetOperationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GetOperationRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private GetOperationRequest( + 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; + } + } + } + } 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.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.GetOperationRequest.class, com.google.longrunning.GetOperationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the operation resource.
+   * 
+ */ + 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 operation resource.
+   * 
+ */ + 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; + } + } + + 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_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.longrunning.GetOperationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.GetOperationRequest 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.longrunning.GetOperationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.GetOperationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.longrunning.GetOperationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.GetOperationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.longrunning.GetOperationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.longrunning.GetOperationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.longrunning.GetOperationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.GetOperationRequest 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.longrunning.GetOperationRequest 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.longrunning.GetOperationRequest} + * + *
+   * The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation].
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.longrunning.GetOperationRequest) + com.google.longrunning.GetOperationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.GetOperationRequest.class, com.google.longrunning.GetOperationRequest.Builder.class); + } + + // Construct using com.google.longrunning.GetOperationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_descriptor; + } + + public com.google.longrunning.GetOperationRequest getDefaultInstanceForType() { + return com.google.longrunning.GetOperationRequest.getDefaultInstance(); + } + + public com.google.longrunning.GetOperationRequest build() { + com.google.longrunning.GetOperationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.longrunning.GetOperationRequest buildPartial() { + com.google.longrunning.GetOperationRequest result = new com.google.longrunning.GetOperationRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.longrunning.GetOperationRequest) { + return mergeFrom((com.google.longrunning.GetOperationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.longrunning.GetOperationRequest other) { + if (other == com.google.longrunning.GetOperationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.longrunning.GetOperationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.longrunning.GetOperationRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the operation resource.
+     * 
+ */ + 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 operation resource.
+     * 
+ */ + 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 operation resource.
+     * 
+ */ + 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 operation resource.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the operation resource.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = 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.longrunning.GetOperationRequest) + } + + // @@protoc_insertion_point(class_scope:google.longrunning.GetOperationRequest) + private static final com.google.longrunning.GetOperationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.longrunning.GetOperationRequest(); + } + + public static com.google.longrunning.GetOperationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GetOperationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new GetOperationRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.longrunning.GetOperationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/GetOperationRequestOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/GetOperationRequestOrBuilder.java new file mode 100644 index 000000000000..099a7072cd23 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/GetOperationRequestOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public interface GetOperationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.longrunning.GetOperationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the operation resource.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the operation resource.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/ListOperationsRequest.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/ListOperationsRequest.java new file mode 100644 index 000000000000..12a996ead622 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/ListOperationsRequest.java @@ -0,0 +1,848 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +/** + * Protobuf type {@code google.longrunning.ListOperationsRequest} + * + *
+ * The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
+ * 
+ */ +public final class ListOperationsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.longrunning.ListOperationsRequest) + ListOperationsRequestOrBuilder { + // Use ListOperationsRequest.newBuilder() to construct. + private ListOperationsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListOperationsRequest() { + name_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private ListOperationsRequest( + 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(); + + filter_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + name_ = 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.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.ListOperationsRequest.class, com.google.longrunning.ListOperationsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object name_; + /** + * optional string name = 4; + * + *
+   * The name of the operation collection.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 4; + * + *
+   * The name of the operation collection.
+   * 
+ */ + 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 FILTER_FIELD_NUMBER = 1; + private volatile java.lang.Object filter_; + /** + * optional string filter = 1; + * + *
+   * The standard List filter.
+   * 
+ */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * optional string filter = 1; + * + *
+   * The standard List filter.
+   * 
+ */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * optional int32 page_size = 2; + * + *
+   * The standard List page size.
+   * 
+ */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * optional string page_token = 3; + * + *
+   * The standard List page token.
+   * 
+ */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * optional string page_token = 3; + * + *
+   * The standard List page token.
+   * 
+ */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = 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 (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, name_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, name_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.longrunning.ListOperationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.ListOperationsRequest 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.longrunning.ListOperationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.ListOperationsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.longrunning.ListOperationsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.ListOperationsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.longrunning.ListOperationsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.longrunning.ListOperationsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.longrunning.ListOperationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.ListOperationsRequest 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.longrunning.ListOperationsRequest 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.longrunning.ListOperationsRequest} + * + *
+   * The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.longrunning.ListOperationsRequest) + com.google.longrunning.ListOperationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.ListOperationsRequest.class, com.google.longrunning.ListOperationsRequest.Builder.class); + } + + // Construct using com.google.longrunning.ListOperationsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_descriptor; + } + + public com.google.longrunning.ListOperationsRequest getDefaultInstanceForType() { + return com.google.longrunning.ListOperationsRequest.getDefaultInstance(); + } + + public com.google.longrunning.ListOperationsRequest build() { + com.google.longrunning.ListOperationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.longrunning.ListOperationsRequest buildPartial() { + com.google.longrunning.ListOperationsRequest result = new com.google.longrunning.ListOperationsRequest(this); + result.name_ = name_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.longrunning.ListOperationsRequest) { + return mergeFrom((com.google.longrunning.ListOperationsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.longrunning.ListOperationsRequest other) { + if (other == com.google.longrunning.ListOperationsRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.longrunning.ListOperationsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.longrunning.ListOperationsRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 4; + * + *
+     * The name of the operation collection.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 4; + * + *
+     * The name of the operation collection.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 4; + * + *
+     * The name of the operation collection.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 4; + * + *
+     * The name of the operation collection.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 4; + * + *
+     * The name of the operation collection.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * optional string filter = 1; + * + *
+     * The standard List filter.
+     * 
+ */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string filter = 1; + * + *
+     * The standard List filter.
+     * 
+ */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string filter = 1; + * + *
+     * The standard List filter.
+     * 
+ */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * optional string filter = 1; + * + *
+     * The standard List filter.
+     * 
+ */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * optional string filter = 1; + * + *
+     * The standard List filter.
+     * 
+ */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + * optional int32 page_size = 2; + * + *
+     * The standard List page size.
+     * 
+ */ + public int getPageSize() { + return pageSize_; + } + /** + * optional int32 page_size = 2; + * + *
+     * The standard List page size.
+     * 
+ */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * optional int32 page_size = 2; + * + *
+     * The standard List page size.
+     * 
+ */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * optional string page_token = 3; + * + *
+     * The standard List page token.
+     * 
+ */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string page_token = 3; + * + *
+     * The standard List page token.
+     * 
+ */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string page_token = 3; + * + *
+     * The standard List page token.
+     * 
+ */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * optional string page_token = 3; + * + *
+     * The standard List page token.
+     * 
+ */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * optional string page_token = 3; + * + *
+     * The standard List page token.
+     * 
+ */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = 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.longrunning.ListOperationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.longrunning.ListOperationsRequest) + private static final com.google.longrunning.ListOperationsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.longrunning.ListOperationsRequest(); + } + + public static com.google.longrunning.ListOperationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ListOperationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ListOperationsRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.longrunning.ListOperationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/ListOperationsRequestOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/ListOperationsRequestOrBuilder.java new file mode 100644 index 000000000000..4d16f4b037d3 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/ListOperationsRequestOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public interface ListOperationsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.longrunning.ListOperationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 4; + * + *
+   * The name of the operation collection.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 4; + * + *
+   * The name of the operation collection.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional string filter = 1; + * + *
+   * The standard List filter.
+   * 
+ */ + java.lang.String getFilter(); + /** + * optional string filter = 1; + * + *
+   * The standard List filter.
+   * 
+ */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + * optional int32 page_size = 2; + * + *
+   * The standard List page size.
+   * 
+ */ + int getPageSize(); + + /** + * optional string page_token = 3; + * + *
+   * The standard List page token.
+   * 
+ */ + java.lang.String getPageToken(); + /** + * optional string page_token = 3; + * + *
+   * The standard List page token.
+   * 
+ */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/ListOperationsResponse.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/ListOperationsResponse.java new file mode 100644 index 000000000000..7d329933d9e6 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/ListOperationsResponse.java @@ -0,0 +1,909 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +/** + * Protobuf type {@code google.longrunning.ListOperationsResponse} + * + *
+ * The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
+ * 
+ */ +public final class ListOperationsResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.longrunning.ListOperationsResponse) + ListOperationsResponseOrBuilder { + // Use ListOperationsResponse.newBuilder() to construct. + private ListOperationsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListOperationsResponse() { + operations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private ListOperationsResponse( + 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)) { + operations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + operations_.add(input.readMessage(com.google.longrunning.Operation.parser(), extensionRegistry)); + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + operations_ = java.util.Collections.unmodifiableList(operations_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.ListOperationsResponse.class, com.google.longrunning.ListOperationsResponse.Builder.class); + } + + private int bitField0_; + public static final int OPERATIONS_FIELD_NUMBER = 1; + private java.util.List operations_; + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + public java.util.List getOperationsList() { + return operations_; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + public java.util.List + getOperationsOrBuilderList() { + return operations_; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + public int getOperationsCount() { + return operations_.size(); + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + public com.google.longrunning.Operation getOperations(int index) { + return operations_.get(index); + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder( + int index) { + return operations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * optional string next_page_token = 2; + * + *
+   * The standard List next-page token.
+   * 
+ */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * optional string next_page_token = 2; + * + *
+   * The standard List next-page token.
+   * 
+ */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < operations_.size(); i++) { + output.writeMessage(1, operations_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < operations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, operations_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.longrunning.ListOperationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.ListOperationsResponse 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.longrunning.ListOperationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.ListOperationsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.longrunning.ListOperationsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.ListOperationsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.longrunning.ListOperationsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.longrunning.ListOperationsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.longrunning.ListOperationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.ListOperationsResponse 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.longrunning.ListOperationsResponse 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.longrunning.ListOperationsResponse} + * + *
+   * The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.longrunning.ListOperationsResponse) + com.google.longrunning.ListOperationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.ListOperationsResponse.class, com.google.longrunning.ListOperationsResponse.Builder.class); + } + + // Construct using com.google.longrunning.ListOperationsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getOperationsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (operationsBuilder_ == null) { + operations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + operationsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_descriptor; + } + + public com.google.longrunning.ListOperationsResponse getDefaultInstanceForType() { + return com.google.longrunning.ListOperationsResponse.getDefaultInstance(); + } + + public com.google.longrunning.ListOperationsResponse build() { + com.google.longrunning.ListOperationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.longrunning.ListOperationsResponse buildPartial() { + com.google.longrunning.ListOperationsResponse result = new com.google.longrunning.ListOperationsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (operationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + operations_ = java.util.Collections.unmodifiableList(operations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.operations_ = operations_; + } else { + result.operations_ = operationsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.longrunning.ListOperationsResponse) { + return mergeFrom((com.google.longrunning.ListOperationsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.longrunning.ListOperationsResponse other) { + if (other == com.google.longrunning.ListOperationsResponse.getDefaultInstance()) return this; + if (operationsBuilder_ == null) { + if (!other.operations_.isEmpty()) { + if (operations_.isEmpty()) { + operations_ = other.operations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOperationsIsMutable(); + operations_.addAll(other.operations_); + } + onChanged(); + } + } else { + if (!other.operations_.isEmpty()) { + if (operationsBuilder_.isEmpty()) { + operationsBuilder_.dispose(); + operationsBuilder_ = null; + operations_ = other.operations_; + bitField0_ = (bitField0_ & ~0x00000001); + operationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOperationsFieldBuilder() : null; + } else { + operationsBuilder_.addAllMessages(other.operations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.longrunning.ListOperationsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.longrunning.ListOperationsResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List operations_ = + java.util.Collections.emptyList(); + private void ensureOperationsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + operations_ = new java.util.ArrayList(operations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> operationsBuilder_; + + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public java.util.List getOperationsList() { + if (operationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(operations_); + } else { + return operationsBuilder_.getMessageList(); + } + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public int getOperationsCount() { + if (operationsBuilder_ == null) { + return operations_.size(); + } else { + return operationsBuilder_.getCount(); + } + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public com.google.longrunning.Operation getOperations(int index) { + if (operationsBuilder_ == null) { + return operations_.get(index); + } else { + return operationsBuilder_.getMessage(index); + } + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder setOperations( + int index, com.google.longrunning.Operation value) { + if (operationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperationsIsMutable(); + operations_.set(index, value); + onChanged(); + } else { + operationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder setOperations( + int index, com.google.longrunning.Operation.Builder builderForValue) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.set(index, builderForValue.build()); + onChanged(); + } else { + operationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder addOperations(com.google.longrunning.Operation value) { + if (operationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperationsIsMutable(); + operations_.add(value); + onChanged(); + } else { + operationsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder addOperations( + int index, com.google.longrunning.Operation value) { + if (operationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperationsIsMutable(); + operations_.add(index, value); + onChanged(); + } else { + operationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder addOperations( + com.google.longrunning.Operation.Builder builderForValue) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.add(builderForValue.build()); + onChanged(); + } else { + operationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder addOperations( + int index, com.google.longrunning.Operation.Builder builderForValue) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.add(index, builderForValue.build()); + onChanged(); + } else { + operationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder addAllOperations( + java.lang.Iterable values) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, operations_); + onChanged(); + } else { + operationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder clearOperations() { + if (operationsBuilder_ == null) { + operations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + operationsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public Builder removeOperations(int index) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.remove(index); + onChanged(); + } else { + operationsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public com.google.longrunning.Operation.Builder getOperationsBuilder( + int index) { + return getOperationsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder( + int index) { + if (operationsBuilder_ == null) { + return operations_.get(index); } else { + return operationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public java.util.List + getOperationsOrBuilderList() { + if (operationsBuilder_ != null) { + return operationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(operations_); + } + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public com.google.longrunning.Operation.Builder addOperationsBuilder() { + return getOperationsFieldBuilder().addBuilder( + com.google.longrunning.Operation.getDefaultInstance()); + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public com.google.longrunning.Operation.Builder addOperationsBuilder( + int index) { + return getOperationsFieldBuilder().addBuilder( + index, com.google.longrunning.Operation.getDefaultInstance()); + } + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+     * A list of operations that match the specified filter in the request.
+     * 
+ */ + public java.util.List + getOperationsBuilderList() { + return getOperationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> + getOperationsFieldBuilder() { + if (operationsBuilder_ == null) { + operationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder>( + operations_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + operations_ = null; + } + return operationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * optional string next_page_token = 2; + * + *
+     * The standard List next-page token.
+     * 
+ */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string next_page_token = 2; + * + *
+     * The standard List next-page token.
+     * 
+ */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string next_page_token = 2; + * + *
+     * The standard List next-page token.
+     * 
+ */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * optional string next_page_token = 2; + * + *
+     * The standard List next-page token.
+     * 
+ */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * optional string next_page_token = 2; + * + *
+     * The standard List next-page token.
+     * 
+ */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = 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.longrunning.ListOperationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.longrunning.ListOperationsResponse) + private static final com.google.longrunning.ListOperationsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.longrunning.ListOperationsResponse(); + } + + public static com.google.longrunning.ListOperationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ListOperationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ListOperationsResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.longrunning.ListOperationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/ListOperationsResponseOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/ListOperationsResponseOrBuilder.java new file mode 100644 index 000000000000..8e2c047294a5 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/ListOperationsResponseOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public interface ListOperationsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.longrunning.ListOperationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + java.util.List + getOperationsList(); + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + com.google.longrunning.Operation getOperations(int index); + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + int getOperationsCount(); + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + java.util.List + getOperationsOrBuilderList(); + /** + * repeated .google.longrunning.Operation operations = 1; + * + *
+   * A list of operations that match the specified filter in the request.
+   * 
+ */ + com.google.longrunning.OperationOrBuilder getOperationsOrBuilder( + int index); + + /** + * optional string next_page_token = 2; + * + *
+   * The standard List next-page token.
+   * 
+ */ + java.lang.String getNextPageToken(); + /** + * optional string next_page_token = 2; + * + *
+   * The standard List next-page token.
+   * 
+ */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/Operation.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/Operation.java new file mode 100644 index 000000000000..750f3a657b25 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/Operation.java @@ -0,0 +1,1383 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +/** + * Protobuf type {@code google.longrunning.Operation} + * + *
+ * This resource represents a long-running operation that is the result of a
+ * network API call.
+ * 
+ */ +public final class Operation extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.longrunning.Operation) + OperationOrBuilder { + // Use Operation.newBuilder() to construct. + private Operation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Operation() { + name_ = ""; + done_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Operation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.protobuf.Any.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + + done_ = input.readBool(); + break; + } + case 34: { + com.google.rpc.Status.Builder subBuilder = null; + if (resultCase_ == 4) { + subBuilder = ((com.google.rpc.Status) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.rpc.Status) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 4; + break; + } + case 42: { + com.google.protobuf.Any.Builder subBuilder = null; + if (resultCase_ == 5) { + subBuilder = ((com.google.protobuf.Any) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Any) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 5; + 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.longrunning.OperationsProto.internal_static_google_longrunning_Operation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.Operation.class, com.google.longrunning.Operation.Builder.class); + } + + private int resultCase_ = 0; + private java.lang.Object result_; + public enum ResultCase + implements com.google.protobuf.Internal.EnumLite { + ERROR(4), + RESPONSE(5), + RESULT_NOT_SET(0); + private int value = 0; + private ResultCase(int value) { + this.value = value; + } + public static ResultCase valueOf(int value) { + switch (value) { + case 4: return ERROR; + case 5: return RESPONSE; + case 0: return RESULT_NOT_SET; + default: throw new java.lang.IllegalArgumentException( + "Value is undefined for this oneof enum."); + } + } + public int getNumber() { + return this.value; + } + }; + + public ResultCase + getResultCase() { + return ResultCase.valueOf( + resultCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the operation resource, which is only unique within the same
+   * service that originally returns it.
+   * 
+ */ + 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 operation resource, which is only unique within the same
+   * service that originally returns it.
+   * 
+ */ + 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 METADATA_FIELD_NUMBER = 2; + private com.google.protobuf.Any metadata_; + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+   * Some service-specific metadata associated with the operation.  It typically
+   * contains progress information and common metadata such as create time.
+   * Some services may not provide such metadata.  Any method that returns a
+   * long-running operation should document the metadata type, if any.
+   * 
+ */ + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+   * Some service-specific metadata associated with the operation.  It typically
+   * contains progress information and common metadata such as create time.
+   * Some services may not provide such metadata.  Any method that returns a
+   * long-running operation should document the metadata type, if any.
+   * 
+ */ + public com.google.protobuf.Any getMetadata() { + return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+   * Some service-specific metadata associated with the operation.  It typically
+   * contains progress information and common metadata such as create time.
+   * Some services may not provide such metadata.  Any method that returns a
+   * long-running operation should document the metadata type, if any.
+   * 
+ */ + public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + public static final int DONE_FIELD_NUMBER = 3; + private boolean done_; + /** + * optional bool done = 3; + * + *
+   * If the value is false, it means the operation is still in progress.
+   * If true, the operation is completed and the `result` is available.
+   * 
+ */ + public boolean getDone() { + return done_; + } + + public static final int ERROR_FIELD_NUMBER = 4; + /** + * optional .google.rpc.Status error = 4; + * + *
+   * The error result of the operation in case of failure.
+   * 
+ */ + public com.google.rpc.Status getError() { + if (resultCase_ == 4) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + /** + * optional .google.rpc.Status error = 4; + * + *
+   * The error result of the operation in case of failure.
+   * 
+ */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (resultCase_ == 4) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + + public static final int RESPONSE_FIELD_NUMBER = 5; + /** + * optional .google.protobuf.Any response = 5; + * + *
+   * The normal response of the operation in case of success.  If the original
+   * method returns no data on success, such as `Delete`, the response will be
+   * `google.protobuf.Empty`.  If the original method is standard
+   * `Get`/`Create`/`Update`, the response should be the resource.  For other
+   * methods, the response should have the type `XxxResponse`, where `Xxx`
+   * is the original method name.  For example, if the original method name
+   * is `TakeSnapshot()`, the inferred response type will be
+   * `TakeSnapshotResponse`.
+   * 
+ */ + public com.google.protobuf.Any getResponse() { + if (resultCase_ == 5) { + return (com.google.protobuf.Any) result_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+   * The normal response of the operation in case of success.  If the original
+   * method returns no data on success, such as `Delete`, the response will be
+   * `google.protobuf.Empty`.  If the original method is standard
+   * `Get`/`Create`/`Update`, the response should be the resource.  For other
+   * methods, the response should have the type `XxxResponse`, where `Xxx`
+   * is the original method name.  For example, if the original method name
+   * is `TakeSnapshot()`, the inferred response type will be
+   * `TakeSnapshotResponse`.
+   * 
+ */ + public com.google.protobuf.AnyOrBuilder getResponseOrBuilder() { + if (resultCase_ == 5) { + return (com.google.protobuf.Any) result_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (metadata_ != null) { + output.writeMessage(2, getMetadata()); + } + if (done_ != false) { + output.writeBool(3, done_); + } + if (resultCase_ == 4) { + output.writeMessage(4, (com.google.rpc.Status) result_); + } + if (resultCase_ == 5) { + output.writeMessage(5, (com.google.protobuf.Any) result_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMetadata()); + } + if (done_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, done_); + } + if (resultCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.rpc.Status) result_); + } + if (resultCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.protobuf.Any) result_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static com.google.longrunning.Operation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.Operation 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.longrunning.Operation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.longrunning.Operation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.longrunning.Operation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.Operation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.longrunning.Operation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.longrunning.Operation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.longrunning.Operation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.longrunning.Operation 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.longrunning.Operation 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.longrunning.Operation} + * + *
+   * This resource represents a long-running operation that is the result of a
+   * network API call.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.longrunning.Operation) + com.google.longrunning.OperationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.longrunning.Operation.class, com.google.longrunning.Operation.Builder.class); + } + + // Construct using com.google.longrunning.Operation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + done_ = false; + + resultCase_ = 0; + result_ = null; + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_descriptor; + } + + public com.google.longrunning.Operation getDefaultInstanceForType() { + return com.google.longrunning.Operation.getDefaultInstance(); + } + + public com.google.longrunning.Operation build() { + com.google.longrunning.Operation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.longrunning.Operation buildPartial() { + com.google.longrunning.Operation result = new com.google.longrunning.Operation(this); + result.name_ = name_; + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + result.done_ = done_; + if (resultCase_ == 4) { + if (errorBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = errorBuilder_.build(); + } + } + if (resultCase_ == 5) { + if (responseBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = responseBuilder_.build(); + } + } + result.resultCase_ = resultCase_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.longrunning.Operation) { + return mergeFrom((com.google.longrunning.Operation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.longrunning.Operation other) { + if (other == com.google.longrunning.Operation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.getDone() != false) { + setDone(other.getDone()); + } + switch (other.getResultCase()) { + case ERROR: { + mergeError(other.getError()); + break; + } + case RESPONSE: { + mergeResponse(other.getResponse()); + break; + } + case RESULT_NOT_SET: { + break; + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.longrunning.Operation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.longrunning.Operation) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int resultCase_ = 0; + private java.lang.Object result_; + public ResultCase + getResultCase() { + return ResultCase.valueOf( + resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the operation resource, which is only unique within the same
+     * service that originally returns it.
+     * 
+ */ + 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 operation resource, which is only unique within the same
+     * service that originally returns it.
+     * 
+ */ + 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 operation resource, which is only unique within the same
+     * service that originally returns it.
+     * 
+ */ + 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 operation resource, which is only unique within the same
+     * service that originally returns it.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the operation resource, which is only unique within the same
+     * service that originally returns it.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Any metadata_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> metadataBuilder_; + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public com.google.protobuf.Any getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public Builder setMetadata(com.google.protobuf.Any value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public Builder setMetadata( + com.google.protobuf.Any.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public Builder mergeMetadata(com.google.protobuf.Any value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.protobuf.Any.newBuilder(metadata_).mergeFrom(value).buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public com.google.protobuf.Any.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + com.google.protobuf.Any.getDefaultInstance() : metadata_; + } + } + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+     * Some service-specific metadata associated with the operation.  It typically
+     * contains progress information and common metadata such as create time.
+     * Some services may not provide such metadata.  Any method that returns a
+     * long-running operation should document the metadata type, if any.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private boolean done_ ; + /** + * optional bool done = 3; + * + *
+     * If the value is false, it means the operation is still in progress.
+     * If true, the operation is completed and the `result` is available.
+     * 
+ */ + public boolean getDone() { + return done_; + } + /** + * optional bool done = 3; + * + *
+     * If the value is false, it means the operation is still in progress.
+     * If true, the operation is completed and the `result` is available.
+     * 
+ */ + public Builder setDone(boolean value) { + + done_ = value; + onChanged(); + return this; + } + /** + * optional bool done = 3; + * + *
+     * If the value is false, it means the operation is still in progress.
+     * If true, the operation is completed and the `result` is available.
+     * 
+ */ + public Builder clearDone() { + + done_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + if (resultCase_ == 4) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } else { + if (resultCase_ == 4) { + return errorBuilder_.getMessage(); + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + resultCase_ = 4; + return this; + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 4; + return this; + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (resultCase_ == 4 && + result_ != com.google.rpc.Status.getDefaultInstance()) { + result_ = com.google.rpc.Status.newBuilder((com.google.rpc.Status) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 4) { + errorBuilder_.mergeFrom(value); + } + errorBuilder_.setMessage(value); + } + resultCase_ = 4; + return this; + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + } + errorBuilder_.clear(); + } + return this; + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public com.google.rpc.Status.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if ((resultCase_ == 4) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 4) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * optional .google.rpc.Status error = 4; + * + *
+     * The error result of the operation in case of failure.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(resultCase_ == 4)) { + result_ = com.google.rpc.Status.getDefaultInstance(); + } + errorBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + (com.google.rpc.Status) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 4; + onChanged();; + return errorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> responseBuilder_; + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public com.google.protobuf.Any getResponse() { + if (responseBuilder_ == null) { + if (resultCase_ == 5) { + return (com.google.protobuf.Any) result_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } else { + if (resultCase_ == 5) { + return responseBuilder_.getMessage(); + } + return com.google.protobuf.Any.getDefaultInstance(); + } + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public Builder setResponse(com.google.protobuf.Any value) { + if (responseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + responseBuilder_.setMessage(value); + } + resultCase_ = 5; + return this; + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public Builder setResponse( + com.google.protobuf.Any.Builder builderForValue) { + if (responseBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + responseBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 5; + return this; + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public Builder mergeResponse(com.google.protobuf.Any value) { + if (responseBuilder_ == null) { + if (resultCase_ == 5 && + result_ != com.google.protobuf.Any.getDefaultInstance()) { + result_ = com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 5) { + responseBuilder_.mergeFrom(value); + } + responseBuilder_.setMessage(value); + } + resultCase_ = 5; + return this; + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public Builder clearResponse() { + if (responseBuilder_ == null) { + if (resultCase_ == 5) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 5) { + resultCase_ = 0; + result_ = null; + } + responseBuilder_.clear(); + } + return this; + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public com.google.protobuf.Any.Builder getResponseBuilder() { + return getResponseFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + public com.google.protobuf.AnyOrBuilder getResponseOrBuilder() { + if ((resultCase_ == 5) && (responseBuilder_ != null)) { + return responseBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 5) { + return (com.google.protobuf.Any) result_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + } + /** + * optional .google.protobuf.Any response = 5; + * + *
+     * The normal response of the operation in case of success.  If the original
+     * method returns no data on success, such as `Delete`, the response will be
+     * `google.protobuf.Empty`.  If the original method is standard
+     * `Get`/`Create`/`Update`, the response should be the resource.  For other
+     * methods, the response should have the type `XxxResponse`, where `Xxx`
+     * is the original method name.  For example, if the original method name
+     * is `TakeSnapshot()`, the inferred response type will be
+     * `TakeSnapshotResponse`.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getResponseFieldBuilder() { + if (responseBuilder_ == null) { + if (!(resultCase_ == 5)) { + result_ = com.google.protobuf.Any.getDefaultInstance(); + } + responseBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + (com.google.protobuf.Any) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 5; + onChanged();; + return responseBuilder_; + } + 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.longrunning.Operation) + } + + // @@protoc_insertion_point(class_scope:google.longrunning.Operation) + private static final com.google.longrunning.Operation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.longrunning.Operation(); + } + + public static com.google.longrunning.Operation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Operation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Operation(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.longrunning.Operation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/OperationOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/OperationOrBuilder.java new file mode 100644 index 000000000000..8366f5d21f3e --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/OperationOrBuilder.java @@ -0,0 +1,123 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public interface OperationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.longrunning.Operation) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the operation resource, which is only unique within the same
+   * service that originally returns it.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the operation resource, which is only unique within the same
+   * service that originally returns it.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+   * Some service-specific metadata associated with the operation.  It typically
+   * contains progress information and common metadata such as create time.
+   * Some services may not provide such metadata.  Any method that returns a
+   * long-running operation should document the metadata type, if any.
+   * 
+ */ + boolean hasMetadata(); + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+   * Some service-specific metadata associated with the operation.  It typically
+   * contains progress information and common metadata such as create time.
+   * Some services may not provide such metadata.  Any method that returns a
+   * long-running operation should document the metadata type, if any.
+   * 
+ */ + com.google.protobuf.Any getMetadata(); + /** + * optional .google.protobuf.Any metadata = 2; + * + *
+   * Some service-specific metadata associated with the operation.  It typically
+   * contains progress information and common metadata such as create time.
+   * Some services may not provide such metadata.  Any method that returns a
+   * long-running operation should document the metadata type, if any.
+   * 
+ */ + com.google.protobuf.AnyOrBuilder getMetadataOrBuilder(); + + /** + * optional bool done = 3; + * + *
+   * If the value is false, it means the operation is still in progress.
+   * If true, the operation is completed and the `result` is available.
+   * 
+ */ + boolean getDone(); + + /** + * optional .google.rpc.Status error = 4; + * + *
+   * The error result of the operation in case of failure.
+   * 
+ */ + com.google.rpc.Status getError(); + /** + * optional .google.rpc.Status error = 4; + * + *
+   * The error result of the operation in case of failure.
+   * 
+ */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * optional .google.protobuf.Any response = 5; + * + *
+   * The normal response of the operation in case of success.  If the original
+   * method returns no data on success, such as `Delete`, the response will be
+   * `google.protobuf.Empty`.  If the original method is standard
+   * `Get`/`Create`/`Update`, the response should be the resource.  For other
+   * methods, the response should have the type `XxxResponse`, where `Xxx`
+   * is the original method name.  For example, if the original method name
+   * is `TakeSnapshot()`, the inferred response type will be
+   * `TakeSnapshotResponse`.
+   * 
+ */ + com.google.protobuf.Any getResponse(); + /** + * optional .google.protobuf.Any response = 5; + * + *
+   * The normal response of the operation in case of success.  If the original
+   * method returns no data on success, such as `Delete`, the response will be
+   * `google.protobuf.Empty`.  If the original method is standard
+   * `Get`/`Create`/`Update`, the response should be the resource.  For other
+   * methods, the response should have the type `XxxResponse`, where `Xxx`
+   * is the original method name.  For example, if the original method name
+   * is `TakeSnapshot()`, the inferred response type will be
+   * `TakeSnapshotResponse`.
+   * 
+ */ + com.google.protobuf.AnyOrBuilder getResponseOrBuilder(); + + public com.google.longrunning.Operation.ResultCase getResultCase(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/OperationsGrpc.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/OperationsGrpc.java new file mode 100644 index 000000000000..0c1c82a52874 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/OperationsGrpc.java @@ -0,0 +1,306 @@ +package com.google.longrunning; + +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; + +@javax.annotation.Generated("by gRPC proto compiler") +public class OperationsGrpc { + + private OperationsGrpc() {} + + public static final String SERVICE_NAME = "google.longrunning.Operations"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi + public static final io.grpc.MethodDescriptor METHOD_GET_OPERATION = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.UNARY, + generateFullMethodName( + "google.longrunning.Operations", "GetOperation"), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.GetOperationRequest.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.Operation.getDefaultInstance())); + @io.grpc.ExperimentalApi + public static final io.grpc.MethodDescriptor METHOD_LIST_OPERATIONS = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.UNARY, + generateFullMethodName( + "google.longrunning.Operations", "ListOperations"), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.ListOperationsRequest.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.ListOperationsResponse.getDefaultInstance())); + @io.grpc.ExperimentalApi + public static final io.grpc.MethodDescriptor METHOD_CANCEL_OPERATION = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.UNARY, + generateFullMethodName( + "google.longrunning.Operations", "CancelOperation"), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.CancelOperationRequest.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance())); + @io.grpc.ExperimentalApi + public static final io.grpc.MethodDescriptor METHOD_DELETE_OPERATION = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.UNARY, + generateFullMethodName( + "google.longrunning.Operations", "DeleteOperation"), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.DeleteOperationRequest.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance())); + + public static OperationsStub newStub(io.grpc.Channel channel) { + return new OperationsStub(channel); + } + + public static OperationsBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new OperationsBlockingStub(channel); + } + + public static OperationsFutureStub newFutureStub( + io.grpc.Channel channel) { + return new OperationsFutureStub(channel); + } + + public static interface Operations { + + public void getOperation(com.google.longrunning.GetOperationRequest request, + io.grpc.stub.StreamObserver responseObserver); + + public void listOperations(com.google.longrunning.ListOperationsRequest request, + io.grpc.stub.StreamObserver responseObserver); + + public void cancelOperation(com.google.longrunning.CancelOperationRequest request, + io.grpc.stub.StreamObserver responseObserver); + + public void deleteOperation(com.google.longrunning.DeleteOperationRequest request, + io.grpc.stub.StreamObserver responseObserver); + } + + public static interface OperationsBlockingClient { + + public com.google.longrunning.Operation getOperation(com.google.longrunning.GetOperationRequest request); + + public com.google.longrunning.ListOperationsResponse listOperations(com.google.longrunning.ListOperationsRequest request); + + public com.google.protobuf.Empty cancelOperation(com.google.longrunning.CancelOperationRequest request); + + public com.google.protobuf.Empty deleteOperation(com.google.longrunning.DeleteOperationRequest request); + } + + public static interface OperationsFutureClient { + + public com.google.common.util.concurrent.ListenableFuture getOperation( + com.google.longrunning.GetOperationRequest request); + + public com.google.common.util.concurrent.ListenableFuture listOperations( + com.google.longrunning.ListOperationsRequest request); + + public com.google.common.util.concurrent.ListenableFuture cancelOperation( + com.google.longrunning.CancelOperationRequest request); + + public com.google.common.util.concurrent.ListenableFuture deleteOperation( + com.google.longrunning.DeleteOperationRequest request); + } + + public static class OperationsStub extends io.grpc.stub.AbstractStub + implements Operations { + private OperationsStub(io.grpc.Channel channel) { + super(channel); + } + + private OperationsStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected OperationsStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new OperationsStub(channel, callOptions); + } + + @java.lang.Override + public void getOperation(com.google.longrunning.GetOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(METHOD_GET_OPERATION, getCallOptions()), request, responseObserver); + } + + @java.lang.Override + public void listOperations(com.google.longrunning.ListOperationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(METHOD_LIST_OPERATIONS, getCallOptions()), request, responseObserver); + } + + @java.lang.Override + public void cancelOperation(com.google.longrunning.CancelOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(METHOD_CANCEL_OPERATION, getCallOptions()), request, responseObserver); + } + + @java.lang.Override + public void deleteOperation(com.google.longrunning.DeleteOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(METHOD_DELETE_OPERATION, getCallOptions()), request, responseObserver); + } + } + + public static class OperationsBlockingStub extends io.grpc.stub.AbstractStub + implements OperationsBlockingClient { + private OperationsBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private OperationsBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected OperationsBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new OperationsBlockingStub(channel, callOptions); + } + + @java.lang.Override + public com.google.longrunning.Operation getOperation(com.google.longrunning.GetOperationRequest request) { + return blockingUnaryCall( + getChannel().newCall(METHOD_GET_OPERATION, getCallOptions()), request); + } + + @java.lang.Override + public com.google.longrunning.ListOperationsResponse listOperations(com.google.longrunning.ListOperationsRequest request) { + return blockingUnaryCall( + getChannel().newCall(METHOD_LIST_OPERATIONS, getCallOptions()), request); + } + + @java.lang.Override + public com.google.protobuf.Empty cancelOperation(com.google.longrunning.CancelOperationRequest request) { + return blockingUnaryCall( + getChannel().newCall(METHOD_CANCEL_OPERATION, getCallOptions()), request); + } + + @java.lang.Override + public com.google.protobuf.Empty deleteOperation(com.google.longrunning.DeleteOperationRequest request) { + return blockingUnaryCall( + getChannel().newCall(METHOD_DELETE_OPERATION, getCallOptions()), request); + } + } + + public static class OperationsFutureStub extends io.grpc.stub.AbstractStub + implements OperationsFutureClient { + private OperationsFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private OperationsFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected OperationsFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new OperationsFutureStub(channel, callOptions); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture getOperation( + com.google.longrunning.GetOperationRequest request) { + return futureUnaryCall( + getChannel().newCall(METHOD_GET_OPERATION, getCallOptions()), request); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture listOperations( + com.google.longrunning.ListOperationsRequest request) { + return futureUnaryCall( + getChannel().newCall(METHOD_LIST_OPERATIONS, getCallOptions()), request); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture cancelOperation( + com.google.longrunning.CancelOperationRequest request) { + return futureUnaryCall( + getChannel().newCall(METHOD_CANCEL_OPERATION, getCallOptions()), request); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture deleteOperation( + com.google.longrunning.DeleteOperationRequest request) { + return futureUnaryCall( + getChannel().newCall(METHOD_DELETE_OPERATION, getCallOptions()), request); + } + } + + public static io.grpc.ServerServiceDefinition bindService( + final Operations serviceImpl) { + return io.grpc.ServerServiceDefinition.builder(SERVICE_NAME) + .addMethod( + METHOD_GET_OPERATION, + asyncUnaryCall( + new io.grpc.stub.ServerCalls.UnaryMethod< + com.google.longrunning.GetOperationRequest, + com.google.longrunning.Operation>() { + @java.lang.Override + public void invoke( + com.google.longrunning.GetOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.getOperation(request, responseObserver); + } + })) + .addMethod( + METHOD_LIST_OPERATIONS, + asyncUnaryCall( + new io.grpc.stub.ServerCalls.UnaryMethod< + com.google.longrunning.ListOperationsRequest, + com.google.longrunning.ListOperationsResponse>() { + @java.lang.Override + public void invoke( + com.google.longrunning.ListOperationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.listOperations(request, responseObserver); + } + })) + .addMethod( + METHOD_CANCEL_OPERATION, + asyncUnaryCall( + new io.grpc.stub.ServerCalls.UnaryMethod< + com.google.longrunning.CancelOperationRequest, + com.google.protobuf.Empty>() { + @java.lang.Override + public void invoke( + com.google.longrunning.CancelOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.cancelOperation(request, responseObserver); + } + })) + .addMethod( + METHOD_DELETE_OPERATION, + asyncUnaryCall( + new io.grpc.stub.ServerCalls.UnaryMethod< + com.google.longrunning.DeleteOperationRequest, + com.google.protobuf.Empty>() { + @java.lang.Override + public void invoke( + com.google.longrunning.DeleteOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.deleteOperation(request, responseObserver); + } + })).build(); + } +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/longrunning/OperationsProto.java b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/OperationsProto.java new file mode 100644 index 000000000000..462e611fba19 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/longrunning/OperationsProto.java @@ -0,0 +1,146 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/longrunning/operations.proto + +package com.google.longrunning; + +public final class OperationsProto { + private OperationsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_longrunning_Operation_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_longrunning_Operation_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_longrunning_GetOperationRequest_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_longrunning_GetOperationRequest_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_longrunning_ListOperationsRequest_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_longrunning_ListOperationsRequest_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_longrunning_ListOperationsResponse_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_longrunning_ListOperationsResponse_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_longrunning_CancelOperationRequest_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_longrunning_CancelOperationRequest_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_longrunning_DeleteOperationRequest_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_longrunning_DeleteOperationRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n#google/longrunning/operations.proto\022\022g" + + "oogle.longrunning\032\034google/api/annotation" + + "s.proto\032\031google/protobuf/any.proto\032\033goog" + + "le/protobuf/empty.proto\032\027google/rpc/stat" + + "us.proto\"\250\001\n\tOperation\022\014\n\004name\030\001 \001(\t\022&\n\010" + + "metadata\030\002 \001(\0132\024.google.protobuf.Any\022\014\n\004" + + "done\030\003 \001(\010\022#\n\005error\030\004 \001(\0132\022.google.rpc.S" + + "tatusH\000\022(\n\010response\030\005 \001(\0132\024.google.proto" + + "buf.AnyH\000B\010\n\006result\"#\n\023GetOperationReque" + + "st\022\014\n\004name\030\001 \001(\t\"\\\n\025ListOperationsReques", + "t\022\014\n\004name\030\004 \001(\t\022\016\n\006filter\030\001 \001(\t\022\021\n\tpage_" + + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"d\n\026ListOp" + + "erationsResponse\0221\n\noperations\030\001 \003(\0132\035.g" + + "oogle.longrunning.Operation\022\027\n\017next_page" + + "_token\030\002 \001(\t\"&\n\026CancelOperationRequest\022\014" + + "\n\004name\030\001 \001(\t\"&\n\026DeleteOperationRequest\022\014" + + "\n\004name\030\001 \001(\t2\214\004\n\nOperations\022x\n\014GetOperat" + + "ion\022\'.google.longrunning.GetOperationReq" + + "uest\032\035.google.longrunning.Operation\" \202\323\344" + + "\223\002\032\022\030/v1/{name=operations/**}\022\206\001\n\016ListOp", + "erations\022).google.longrunning.ListOperat" + + "ionsRequest\032*.google.longrunning.ListOpe" + + "rationsResponse\"\035\202\323\344\223\002\027\022\025/v1/{name=opera" + + "tions}\022\201\001\n\017CancelOperation\022*.google.long" + + "running.CancelOperationRequest\032\026.google." + + "protobuf.Empty\"*\202\323\344\223\002$\"\037/v1/{name=operat" + + "ions/**}:cancel:\001*\022w\n\017DeleteOperation\022*." + + "google.longrunning.DeleteOperationReques" + + "t\032\026.google.protobuf.Empty\" \202\323\344\223\002\032*\030/v1/{" + + "name=operations/**}B+\n\026com.google.longru", + "nningB\017OperationsProtoP\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.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }, assigner); + internal_static_google_longrunning_Operation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_longrunning_Operation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_longrunning_Operation_descriptor, + new java.lang.String[] { "Name", "Metadata", "Done", "Error", "Response", "Result", }); + internal_static_google_longrunning_GetOperationRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_longrunning_GetOperationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_longrunning_GetOperationRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_longrunning_ListOperationsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_longrunning_ListOperationsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_longrunning_ListOperationsRequest_descriptor, + new java.lang.String[] { "Name", "Filter", "PageSize", "PageToken", }); + internal_static_google_longrunning_ListOperationsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_longrunning_ListOperationsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_longrunning_ListOperationsResponse_descriptor, + new java.lang.String[] { "Operations", "NextPageToken", }); + internal_static_google_longrunning_CancelOperationRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_longrunning_CancelOperationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_longrunning_CancelOperationRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_longrunning_DeleteOperationRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_longrunning_DeleteOperationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_longrunning_DeleteOperationRequest_descriptor, + new java.lang.String[] { "Name", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Any.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Any.java new file mode 100644 index 000000000000..5799f20a8702 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Any.java @@ -0,0 +1,810 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/any.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Any} + * + *
+ * `Any` contains an arbitrary serialized message along with a URL
+ * that describes the type of the serialized message.
+ * (--GOOGLE_INTERNAL: The proto runtimes and/or compiler will eventually
+ *  provide utilities to pack/unpack Any values (projected Q4/15). See
+ *  http://goto/proto3-impl-status for each language status. --)
+ * JSON
+ * ====
+ * The JSON representation of an `Any` value uses the regular
+ * representation of the deserialized, embedded message, with an
+ * additional field `@type` which contains the type URL. Example:
+ *     package google.profile;
+ *     message Person {
+ *       string first_name = 1;
+ *       string last_name = 2;
+ *     }
+ *     {
+ *       "@type": "type.googleapis.com/google.profile.Person",
+ *       "firstName": <string>,
+ *       "lastName": <string>
+ *     }
+ * If the embedded message type is well-known and has a custom JSON
+ * representation, that representation will be embedded adding a field
+ * `value` which holds the custom JSON in addition to the the `@type`
+ * field. Example (for message [google.protobuf.Duration][]):
+ *     {
+ *       "@type": "type.googleapis.com/google.protobuf.Duration",
+ *       "value": "1.212s"
+ *     }
+ * 
+ */ +public final class Any extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Any) + AnyOrBuilder { + // Use Any.newBuilder() to construct. + private Any(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Any() { + typeUrl_ = ""; + value_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Any( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + typeUrl_ = s; + break; + } + case 18: { + + value_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Any.class, com.google.protobuf.Any.Builder.class); + } + + private static String getTypeUrl( + com.google.protobuf.Descriptors.Descriptor descriptor) { + return "type.googleapis.com/" + descriptor.getFullName(); + } + + public static Any pack( + T message) { + return Any.newBuilder() + .setTypeUrl(getTypeUrl(message.getDescriptorForType())) + .setValue(message.toByteString()) + .build(); + } + + public boolean is( + java.lang.Class clazz) { + T defaultInstance = + com.google.protobuf.Internal.getDefaultInstance(clazz); + return getTypeUrl().equals( + getTypeUrl(defaultInstance.getDescriptorForType())); + } + + private volatile com.google.protobuf.Message cachedUnpackValue; + + public T unpack( + java.lang.Class clazz) + throws com.google.protobuf.InvalidProtocolBufferException { + if (!is(clazz)) { + throw new com.google.protobuf.InvalidProtocolBufferException( + "Type of the Any messsage does not match the given class."); + } + if (cachedUnpackValue != null) { + return (T) cachedUnpackValue; + } + T defaultInstance = + com.google.protobuf.Internal.getDefaultInstance(clazz); + T result = (T) defaultInstance.getParserForType() + .parseFrom(getValue()); + cachedUnpackValue = result; + return result; + } + public static final int TYPE_URL_FIELD_NUMBER = 1; + private volatile java.lang.Object typeUrl_; + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+   * A URL/resource name whose content describes the type of the
+   * serialized message.
+   * For URLs which use the schema `http`, `https`, or no schema, the
+   * following restrictions and interpretations apply:
+   * * If no schema is provided, `https` is assumed.
+   * * The last segment of the URL's path must represent the fully
+   *   qualified name of the type (as in `path/google.protobuf.Duration`).
+   * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+   *   value in binary format, or produce an error.
+   * * Applications are allowed to cache lookup results based on the
+   *   URL, or have them precompiled into a binary to avoid any
+   *   lookup. Therefore, binary compatibility needs to be preserved
+   *   on changes to types. (Use versioned type names to manage
+   *   breaking changes.)
+   * Schemas other than `http`, `https` (or the empty schema) might be
+   * used with implementation specific semantics.
+   * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+   * namespace should use `type.googleapis.com/full.type.name` (without
+   * schema and path). A type service will eventually become available which
+   * serves those URLs (projected Q2/15). --)
+   * 
+ */ + public java.lang.String getTypeUrl() { + java.lang.Object ref = typeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeUrl_ = s; + return s; + } + } + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+   * A URL/resource name whose content describes the type of the
+   * serialized message.
+   * For URLs which use the schema `http`, `https`, or no schema, the
+   * following restrictions and interpretations apply:
+   * * If no schema is provided, `https` is assumed.
+   * * The last segment of the URL's path must represent the fully
+   *   qualified name of the type (as in `path/google.protobuf.Duration`).
+   * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+   *   value in binary format, or produce an error.
+   * * Applications are allowed to cache lookup results based on the
+   *   URL, or have them precompiled into a binary to avoid any
+   *   lookup. Therefore, binary compatibility needs to be preserved
+   *   on changes to types. (Use versioned type names to manage
+   *   breaking changes.)
+   * Schemas other than `http`, `https` (or the empty schema) might be
+   * used with implementation specific semantics.
+   * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+   * namespace should use `type.googleapis.com/full.type.name` (without
+   * schema and path). A type service will eventually become available which
+   * serves those URLs (projected Q2/15). --)
+   * 
+ */ + public com.google.protobuf.ByteString + getTypeUrlBytes() { + java.lang.Object ref = typeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString value_; + /** + * optional bytes value = 2 [ctype = CORD]; + * + *
+   * Must be valid serialized data of the above specified type.
+   * 
+ */ + public com.google.protobuf.ByteString getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getTypeUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, typeUrl_); + } + if (!value_.isEmpty()) { + output.writeBytes(2, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTypeUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, typeUrl_); + } + if (!value_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Any)) { + return super.equals(obj); + } + com.google.protobuf.Any other = (com.google.protobuf.Any) obj; + + boolean result = true; + result = result && getTypeUrl() + .equals(other.getTypeUrl()); + result = result && getValue() + .equals(other.getValue()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + TYPE_URL_FIELD_NUMBER; + hash = (53 * hash) + getTypeUrl().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Any parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Any parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Any parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Any parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Any parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Any parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Any parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Any parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Any parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Any parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.Any prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.Any} + * + *
+   * `Any` contains an arbitrary serialized message along with a URL
+   * that describes the type of the serialized message.
+   * (--GOOGLE_INTERNAL: The proto runtimes and/or compiler will eventually
+   *  provide utilities to pack/unpack Any values (projected Q4/15). See
+   *  http://goto/proto3-impl-status for each language status. --)
+   * JSON
+   * ====
+   * The JSON representation of an `Any` value uses the regular
+   * representation of the deserialized, embedded message, with an
+   * additional field `@type` which contains the type URL. Example:
+   *     package google.profile;
+   *     message Person {
+   *       string first_name = 1;
+   *       string last_name = 2;
+   *     }
+   *     {
+   *       "@type": "type.googleapis.com/google.profile.Person",
+   *       "firstName": <string>,
+   *       "lastName": <string>
+   *     }
+   * If the embedded message type is well-known and has a custom JSON
+   * representation, that representation will be embedded adding a field
+   * `value` which holds the custom JSON in addition to the the `@type`
+   * field. Example (for message [google.protobuf.Duration][]):
+   *     {
+   *       "@type": "type.googleapis.com/google.protobuf.Duration",
+   *       "value": "1.212s"
+   *     }
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Any) + com.google.protobuf.AnyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Any.class, com.google.protobuf.Any.Builder.class); + } + + // Construct using com.google.protobuf.Any.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + typeUrl_ = ""; + + value_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_descriptor; + } + + public com.google.protobuf.Any getDefaultInstanceForType() { + return com.google.protobuf.Any.getDefaultInstance(); + } + + public com.google.protobuf.Any build() { + com.google.protobuf.Any result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Any buildPartial() { + com.google.protobuf.Any result = new com.google.protobuf.Any(this); + result.typeUrl_ = typeUrl_; + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Any) { + return mergeFrom((com.google.protobuf.Any)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Any other) { + if (other == com.google.protobuf.Any.getDefaultInstance()) return this; + if (!other.getTypeUrl().isEmpty()) { + typeUrl_ = other.typeUrl_; + onChanged(); + } + if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { + setValue(other.getValue()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.Any parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Any) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object typeUrl_ = ""; + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+     * A URL/resource name whose content describes the type of the
+     * serialized message.
+     * For URLs which use the schema `http`, `https`, or no schema, the
+     * following restrictions and interpretations apply:
+     * * If no schema is provided, `https` is assumed.
+     * * The last segment of the URL's path must represent the fully
+     *   qualified name of the type (as in `path/google.protobuf.Duration`).
+     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+     *   value in binary format, or produce an error.
+     * * Applications are allowed to cache lookup results based on the
+     *   URL, or have them precompiled into a binary to avoid any
+     *   lookup. Therefore, binary compatibility needs to be preserved
+     *   on changes to types. (Use versioned type names to manage
+     *   breaking changes.)
+     * Schemas other than `http`, `https` (or the empty schema) might be
+     * used with implementation specific semantics.
+     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+     * namespace should use `type.googleapis.com/full.type.name` (without
+     * schema and path). A type service will eventually become available which
+     * serves those URLs (projected Q2/15). --)
+     * 
+ */ + public java.lang.String getTypeUrl() { + java.lang.Object ref = typeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+     * A URL/resource name whose content describes the type of the
+     * serialized message.
+     * For URLs which use the schema `http`, `https`, or no schema, the
+     * following restrictions and interpretations apply:
+     * * If no schema is provided, `https` is assumed.
+     * * The last segment of the URL's path must represent the fully
+     *   qualified name of the type (as in `path/google.protobuf.Duration`).
+     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+     *   value in binary format, or produce an error.
+     * * Applications are allowed to cache lookup results based on the
+     *   URL, or have them precompiled into a binary to avoid any
+     *   lookup. Therefore, binary compatibility needs to be preserved
+     *   on changes to types. (Use versioned type names to manage
+     *   breaking changes.)
+     * Schemas other than `http`, `https` (or the empty schema) might be
+     * used with implementation specific semantics.
+     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+     * namespace should use `type.googleapis.com/full.type.name` (without
+     * schema and path). A type service will eventually become available which
+     * serves those URLs (projected Q2/15). --)
+     * 
+ */ + public com.google.protobuf.ByteString + getTypeUrlBytes() { + java.lang.Object ref = typeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+     * A URL/resource name whose content describes the type of the
+     * serialized message.
+     * For URLs which use the schema `http`, `https`, or no schema, the
+     * following restrictions and interpretations apply:
+     * * If no schema is provided, `https` is assumed.
+     * * The last segment of the URL's path must represent the fully
+     *   qualified name of the type (as in `path/google.protobuf.Duration`).
+     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+     *   value in binary format, or produce an error.
+     * * Applications are allowed to cache lookup results based on the
+     *   URL, or have them precompiled into a binary to avoid any
+     *   lookup. Therefore, binary compatibility needs to be preserved
+     *   on changes to types. (Use versioned type names to manage
+     *   breaking changes.)
+     * Schemas other than `http`, `https` (or the empty schema) might be
+     * used with implementation specific semantics.
+     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+     * namespace should use `type.googleapis.com/full.type.name` (without
+     * schema and path). A type service will eventually become available which
+     * serves those URLs (projected Q2/15). --)
+     * 
+ */ + public Builder setTypeUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + typeUrl_ = value; + onChanged(); + return this; + } + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+     * A URL/resource name whose content describes the type of the
+     * serialized message.
+     * For URLs which use the schema `http`, `https`, or no schema, the
+     * following restrictions and interpretations apply:
+     * * If no schema is provided, `https` is assumed.
+     * * The last segment of the URL's path must represent the fully
+     *   qualified name of the type (as in `path/google.protobuf.Duration`).
+     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+     *   value in binary format, or produce an error.
+     * * Applications are allowed to cache lookup results based on the
+     *   URL, or have them precompiled into a binary to avoid any
+     *   lookup. Therefore, binary compatibility needs to be preserved
+     *   on changes to types. (Use versioned type names to manage
+     *   breaking changes.)
+     * Schemas other than `http`, `https` (or the empty schema) might be
+     * used with implementation specific semantics.
+     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+     * namespace should use `type.googleapis.com/full.type.name` (without
+     * schema and path). A type service will eventually become available which
+     * serves those URLs (projected Q2/15). --)
+     * 
+ */ + public Builder clearTypeUrl() { + + typeUrl_ = getDefaultInstance().getTypeUrl(); + onChanged(); + return this; + } + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+     * A URL/resource name whose content describes the type of the
+     * serialized message.
+     * For URLs which use the schema `http`, `https`, or no schema, the
+     * following restrictions and interpretations apply:
+     * * If no schema is provided, `https` is assumed.
+     * * The last segment of the URL's path must represent the fully
+     *   qualified name of the type (as in `path/google.protobuf.Duration`).
+     * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+     *   value in binary format, or produce an error.
+     * * Applications are allowed to cache lookup results based on the
+     *   URL, or have them precompiled into a binary to avoid any
+     *   lookup. Therefore, binary compatibility needs to be preserved
+     *   on changes to types. (Use versioned type names to manage
+     *   breaking changes.)
+     * Schemas other than `http`, `https` (or the empty schema) might be
+     * used with implementation specific semantics.
+     * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+     * namespace should use `type.googleapis.com/full.type.name` (without
+     * schema and path). A type service will eventually become available which
+     * serves those URLs (projected Q2/15). --)
+     * 
+ */ + public Builder setTypeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + typeUrl_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes value = 2 [ctype = CORD]; + * + *
+     * Must be valid serialized data of the above specified type.
+     * 
+ */ + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + * optional bytes value = 2 [ctype = CORD]; + * + *
+     * Must be valid serialized data of the above specified type.
+     * 
+ */ + public Builder setValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * optional bytes value = 2 [ctype = CORD]; + * + *
+     * Must be valid serialized data of the above specified type.
+     * 
+ */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.Any) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Any) + private static final com.google.protobuf.Any DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Any(); + } + + public static com.google.protobuf.Any getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Any parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Any(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.Any getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/AnyOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/AnyOrBuilder.java new file mode 100644 index 000000000000..e94d7325991d --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/AnyOrBuilder.java @@ -0,0 +1,74 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/any.proto + +package com.google.protobuf; + +public interface AnyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Any) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+   * A URL/resource name whose content describes the type of the
+   * serialized message.
+   * For URLs which use the schema `http`, `https`, or no schema, the
+   * following restrictions and interpretations apply:
+   * * If no schema is provided, `https` is assumed.
+   * * The last segment of the URL's path must represent the fully
+   *   qualified name of the type (as in `path/google.protobuf.Duration`).
+   * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+   *   value in binary format, or produce an error.
+   * * Applications are allowed to cache lookup results based on the
+   *   URL, or have them precompiled into a binary to avoid any
+   *   lookup. Therefore, binary compatibility needs to be preserved
+   *   on changes to types. (Use versioned type names to manage
+   *   breaking changes.)
+   * Schemas other than `http`, `https` (or the empty schema) might be
+   * used with implementation specific semantics.
+   * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+   * namespace should use `type.googleapis.com/full.type.name` (without
+   * schema and path). A type service will eventually become available which
+   * serves those URLs (projected Q2/15). --)
+   * 
+ */ + java.lang.String getTypeUrl(); + /** + * optional string type_url = 1 [ctype = STRING_PIECE]; + * + *
+   * A URL/resource name whose content describes the type of the
+   * serialized message.
+   * For URLs which use the schema `http`, `https`, or no schema, the
+   * following restrictions and interpretations apply:
+   * * If no schema is provided, `https` is assumed.
+   * * The last segment of the URL's path must represent the fully
+   *   qualified name of the type (as in `path/google.protobuf.Duration`).
+   * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+   *   value in binary format, or produce an error.
+   * * Applications are allowed to cache lookup results based on the
+   *   URL, or have them precompiled into a binary to avoid any
+   *   lookup. Therefore, binary compatibility needs to be preserved
+   *   on changes to types. (Use versioned type names to manage
+   *   breaking changes.)
+   * Schemas other than `http`, `https` (or the empty schema) might be
+   * used with implementation specific semantics.
+   * (--GOOGLE_INTERNAL: Types originating from the `google.*` package
+   * namespace should use `type.googleapis.com/full.type.name` (without
+   * schema and path). A type service will eventually become available which
+   * serves those URLs (projected Q2/15). --)
+   * 
+ */ + com.google.protobuf.ByteString + getTypeUrlBytes(); + + /** + * optional bytes value = 2 [ctype = CORD]; + * + *
+   * Must be valid serialized data of the above specified type.
+   * 
+ */ + com.google.protobuf.ByteString getValue(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/AnyProto.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/AnyProto.java new file mode 100644 index 000000000000..2271fdf4ade8 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/AnyProto.java @@ -0,0 +1,51 @@ +// 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\001B*\n\023com.google.protobufB\010Any" + + "ProtoP\001\240\001\001\242\002\003GPBb\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/src/generated/main/java/com/google/protobuf/Api.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Api.java new file mode 100644 index 000000000000..f75ddaf045e1 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Api.java @@ -0,0 +1,2474 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Api} + * + *
+ * Api is a light-weight descriptor for a protocol buffer service.
+ * 
+ */ +public final class Api extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Api) + ApiOrBuilder { + // Use Api.newBuilder() to construct. + private Api(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Api() { + name_ = ""; + methods_ = java.util.Collections.emptyList(); + options_ = java.util.Collections.emptyList(); + version_ = ""; + mixins_ = java.util.Collections.emptyList(); + syntax_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Api( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + methods_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + methods_.add(input.readMessage(com.google.protobuf.Method.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + options_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 42: { + com.google.protobuf.SourceContext.Builder subBuilder = null; + if (sourceContext_ != null) { + subBuilder = sourceContext_.toBuilder(); + } + sourceContext_ = input.readMessage(com.google.protobuf.SourceContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sourceContext_); + sourceContext_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + mixins_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + mixins_.add(input.readMessage(com.google.protobuf.Mixin.parser(), extensionRegistry)); + break; + } + case 56: { + int rawValue = input.readEnum(); + + syntax_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + methods_ = java.util.Collections.unmodifiableList(methods_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + options_ = java.util.Collections.unmodifiableList(options_); + } + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + mixins_ = java.util.Collections.unmodifiableList(mixins_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Api.class, com.google.protobuf.Api.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The fully qualified name of this api, including package name
+   * followed by the api's simple name.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * The fully qualified name of this api, including package name
+   * followed by the api's simple name.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METHODS_FIELD_NUMBER = 2; + private java.util.List methods_; + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + public java.util.List getMethodsList() { + return methods_; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + public java.util.List + getMethodsOrBuilderList() { + return methods_; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + public int getMethodsCount() { + return methods_.size(); + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + public com.google.protobuf.Method getMethods(int index) { + return methods_.get(index); + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + public com.google.protobuf.MethodOrBuilder getMethodsOrBuilder( + int index) { + return methods_.get(index); + } + + public static final int OPTIONS_FIELD_NUMBER = 3; + private java.util.List options_; + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + public java.util.List getOptionsList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + public int getOptionsCount() { + return options_.size(); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + return options_.get(index); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + return options_.get(index); + } + + public static final int VERSION_FIELD_NUMBER = 4; + private volatile java.lang.Object version_; + /** + * optional string version = 4; + * + *
+   * A version string for this api. If specified, must have the form
+   * `major-version.minor-version`, as in `1.10`. If the minor version
+   * is omitted, it defaults to zero. If the entire version field is
+   * empty, the major version is derived from the package name, as
+   * outlined below. If the field is not empty, the version in the
+   * package name will be verified to be consistent with what is
+   * provided here.
+   * The versioning schema uses [semantic
+   * versioning](http://semver.org) where the major version number
+   * indicates a breaking change and the minor version an additive,
+   * non-breaking change. Both version numbers are signals to users
+   * what to expect from different versions, and should be carefully
+   * chosen based on the product plan.
+   * The major version is also reflected in the package name of the
+   * API, which must end in `v<major-version>`, as in
+   * `google.feature.v1`. For major versions 0 and 1, the suffix can
+   * be omitted. Zero major versions must only be used for
+   * experimental, none-GA apis.
+   * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+   * --)
+   * (-- TODO(wgg): determine whether we want to enable specifying
+   * this via an option in the proto file. --)
+   * 
+ */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * optional string version = 4; + * + *
+   * A version string for this api. If specified, must have the form
+   * `major-version.minor-version`, as in `1.10`. If the minor version
+   * is omitted, it defaults to zero. If the entire version field is
+   * empty, the major version is derived from the package name, as
+   * outlined below. If the field is not empty, the version in the
+   * package name will be verified to be consistent with what is
+   * provided here.
+   * The versioning schema uses [semantic
+   * versioning](http://semver.org) where the major version number
+   * indicates a breaking change and the minor version an additive,
+   * non-breaking change. Both version numbers are signals to users
+   * what to expect from different versions, and should be carefully
+   * chosen based on the product plan.
+   * The major version is also reflected in the package name of the
+   * API, which must end in `v<major-version>`, as in
+   * `google.feature.v1`. For major versions 0 and 1, the suffix can
+   * be omitted. Zero major versions must only be used for
+   * experimental, none-GA apis.
+   * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+   * --)
+   * (-- TODO(wgg): determine whether we want to enable specifying
+   * this via an option in the proto file. --)
+   * 
+ */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_CONTEXT_FIELD_NUMBER = 5; + private com.google.protobuf.SourceContext sourceContext_; + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+   * Source context for the protocol buffer service represented by this
+   * message.
+   * 
+ */ + public boolean hasSourceContext() { + return sourceContext_ != null; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+   * Source context for the protocol buffer service represented by this
+   * message.
+   * 
+ */ + public com.google.protobuf.SourceContext getSourceContext() { + return sourceContext_ == null ? com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+   * Source context for the protocol buffer service represented by this
+   * message.
+   * 
+ */ + public com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder() { + return getSourceContext(); + } + + public static final int MIXINS_FIELD_NUMBER = 6; + private java.util.List mixins_; + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + public java.util.List getMixinsList() { + return mixins_; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + public java.util.List + getMixinsOrBuilderList() { + return mixins_; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + public int getMixinsCount() { + return mixins_.size(); + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + public com.google.protobuf.Mixin getMixins(int index) { + return mixins_.get(index); + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + public com.google.protobuf.MixinOrBuilder getMixinsOrBuilder( + int index) { + return mixins_.get(index); + } + + public static final int SYNTAX_FIELD_NUMBER = 7; + private int syntax_; + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of the service.
+   * 
+ */ + public int getSyntaxValue() { + return syntax_; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of the service.
+   * 
+ */ + public com.google.protobuf.Syntax getSyntax() { + com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); + return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + for (int i = 0; i < methods_.size(); i++) { + output.writeMessage(2, methods_.get(i)); + } + for (int i = 0; i < options_.size(); i++) { + output.writeMessage(3, options_.get(i)); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, version_); + } + if (sourceContext_ != null) { + output.writeMessage(5, getSourceContext()); + } + for (int i = 0; i < mixins_.size(); i++) { + output.writeMessage(6, mixins_.get(i)); + } + if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { + output.writeEnum(7, syntax_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + for (int i = 0; i < methods_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, methods_.get(i)); + } + for (int i = 0; i < options_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, options_.get(i)); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, version_); + } + if (sourceContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getSourceContext()); + } + for (int i = 0; i < mixins_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, mixins_.get(i)); + } + if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, syntax_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Api)) { + return super.equals(obj); + } + com.google.protobuf.Api other = (com.google.protobuf.Api) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && getMethodsList() + .equals(other.getMethodsList()); + result = result && getOptionsList() + .equals(other.getOptionsList()); + result = result && getVersion() + .equals(other.getVersion()); + result = result && (hasSourceContext() == other.hasSourceContext()); + if (hasSourceContext()) { + result = result && getSourceContext() + .equals(other.getSourceContext()); + } + result = result && getMixinsList() + .equals(other.getMixinsList()); + result = result && syntax_ == other.syntax_; + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getMethodsCount() > 0) { + hash = (37 * hash) + METHODS_FIELD_NUMBER; + hash = (53 * hash) + getMethodsList().hashCode(); + } + if (getOptionsCount() > 0) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptionsList().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (hasSourceContext()) { + hash = (37 * hash) + SOURCE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getSourceContext().hashCode(); + } + if (getMixinsCount() > 0) { + hash = (37 * hash) + MIXINS_FIELD_NUMBER; + hash = (53 * hash) + getMixinsList().hashCode(); + } + hash = (37 * hash) + SYNTAX_FIELD_NUMBER; + hash = (53 * hash) + syntax_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Api parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Api parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Api parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Api parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Api parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Api parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Api parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Api parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Api parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Api parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.Api prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.Api} + * + *
+   * Api is a light-weight descriptor for a protocol buffer service.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Api) + com.google.protobuf.ApiOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Api.class, com.google.protobuf.Api.Builder.class); + } + + // Construct using com.google.protobuf.Api.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getMethodsFieldBuilder(); + getOptionsFieldBuilder(); + getMixinsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (methodsBuilder_ == null) { + methods_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + methodsBuilder_.clear(); + } + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + optionsBuilder_.clear(); + } + version_ = ""; + + if (sourceContextBuilder_ == null) { + sourceContext_ = null; + } else { + sourceContext_ = null; + sourceContextBuilder_ = null; + } + if (mixinsBuilder_ == null) { + mixins_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + mixinsBuilder_.clear(); + } + syntax_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_descriptor; + } + + public com.google.protobuf.Api getDefaultInstanceForType() { + return com.google.protobuf.Api.getDefaultInstance(); + } + + public com.google.protobuf.Api build() { + com.google.protobuf.Api result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Api buildPartial() { + com.google.protobuf.Api result = new com.google.protobuf.Api(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (methodsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + methods_ = java.util.Collections.unmodifiableList(methods_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.methods_ = methods_; + } else { + result.methods_ = methodsBuilder_.build(); + } + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + options_ = java.util.Collections.unmodifiableList(options_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + result.version_ = version_; + if (sourceContextBuilder_ == null) { + result.sourceContext_ = sourceContext_; + } else { + result.sourceContext_ = sourceContextBuilder_.build(); + } + if (mixinsBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { + mixins_ = java.util.Collections.unmodifiableList(mixins_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.mixins_ = mixins_; + } else { + result.mixins_ = mixinsBuilder_.build(); + } + result.syntax_ = syntax_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Api) { + return mergeFrom((com.google.protobuf.Api)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Api other) { + if (other == com.google.protobuf.Api.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (methodsBuilder_ == null) { + if (!other.methods_.isEmpty()) { + if (methods_.isEmpty()) { + methods_ = other.methods_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMethodsIsMutable(); + methods_.addAll(other.methods_); + } + onChanged(); + } + } else { + if (!other.methods_.isEmpty()) { + if (methodsBuilder_.isEmpty()) { + methodsBuilder_.dispose(); + methodsBuilder_ = null; + methods_ = other.methods_; + bitField0_ = (bitField0_ & ~0x00000002); + methodsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMethodsFieldBuilder() : null; + } else { + methodsBuilder_.addAllMessages(other.methods_); + } + } + } + if (optionsBuilder_ == null) { + if (!other.options_.isEmpty()) { + if (options_.isEmpty()) { + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureOptionsIsMutable(); + options_.addAll(other.options_); + } + onChanged(); + } + } else { + if (!other.options_.isEmpty()) { + if (optionsBuilder_.isEmpty()) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000004); + optionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOptionsFieldBuilder() : null; + } else { + optionsBuilder_.addAllMessages(other.options_); + } + } + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (other.hasSourceContext()) { + mergeSourceContext(other.getSourceContext()); + } + if (mixinsBuilder_ == null) { + if (!other.mixins_.isEmpty()) { + if (mixins_.isEmpty()) { + mixins_ = other.mixins_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureMixinsIsMutable(); + mixins_.addAll(other.mixins_); + } + onChanged(); + } + } else { + if (!other.mixins_.isEmpty()) { + if (mixinsBuilder_.isEmpty()) { + mixinsBuilder_.dispose(); + mixinsBuilder_ = null; + mixins_ = other.mixins_; + bitField0_ = (bitField0_ & ~0x00000020); + mixinsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMixinsFieldBuilder() : null; + } else { + mixinsBuilder_.addAllMessages(other.mixins_); + } + } + } + if (other.syntax_ != 0) { + setSyntaxValue(other.getSyntaxValue()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.Api parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Api) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The fully qualified name of this api, including package name
+     * followed by the api's simple name.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of this api, including package name
+     * followed by the api's simple name.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of this api, including package name
+     * followed by the api's simple name.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of this api, including package name
+     * followed by the api's simple name.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of this api, including package name
+     * followed by the api's simple name.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List methods_ = + java.util.Collections.emptyList(); + private void ensureMethodsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + methods_ = new java.util.ArrayList(methods_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Method, com.google.protobuf.Method.Builder, com.google.protobuf.MethodOrBuilder> methodsBuilder_; + + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public java.util.List getMethodsList() { + if (methodsBuilder_ == null) { + return java.util.Collections.unmodifiableList(methods_); + } else { + return methodsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public int getMethodsCount() { + if (methodsBuilder_ == null) { + return methods_.size(); + } else { + return methodsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public com.google.protobuf.Method getMethods(int index) { + if (methodsBuilder_ == null) { + return methods_.get(index); + } else { + return methodsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder setMethods( + int index, com.google.protobuf.Method value) { + if (methodsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodsIsMutable(); + methods_.set(index, value); + onChanged(); + } else { + methodsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder setMethods( + int index, com.google.protobuf.Method.Builder builderForValue) { + if (methodsBuilder_ == null) { + ensureMethodsIsMutable(); + methods_.set(index, builderForValue.build()); + onChanged(); + } else { + methodsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder addMethods(com.google.protobuf.Method value) { + if (methodsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodsIsMutable(); + methods_.add(value); + onChanged(); + } else { + methodsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder addMethods( + int index, com.google.protobuf.Method value) { + if (methodsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodsIsMutable(); + methods_.add(index, value); + onChanged(); + } else { + methodsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder addMethods( + com.google.protobuf.Method.Builder builderForValue) { + if (methodsBuilder_ == null) { + ensureMethodsIsMutable(); + methods_.add(builderForValue.build()); + onChanged(); + } else { + methodsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder addMethods( + int index, com.google.protobuf.Method.Builder builderForValue) { + if (methodsBuilder_ == null) { + ensureMethodsIsMutable(); + methods_.add(index, builderForValue.build()); + onChanged(); + } else { + methodsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder addAllMethods( + java.lang.Iterable values) { + if (methodsBuilder_ == null) { + ensureMethodsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, methods_); + onChanged(); + } else { + methodsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder clearMethods() { + if (methodsBuilder_ == null) { + methods_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + methodsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public Builder removeMethods(int index) { + if (methodsBuilder_ == null) { + ensureMethodsIsMutable(); + methods_.remove(index); + onChanged(); + } else { + methodsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public com.google.protobuf.Method.Builder getMethodsBuilder( + int index) { + return getMethodsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public com.google.protobuf.MethodOrBuilder getMethodsOrBuilder( + int index) { + if (methodsBuilder_ == null) { + return methods_.get(index); } else { + return methodsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public java.util.List + getMethodsOrBuilderList() { + if (methodsBuilder_ != null) { + return methodsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(methods_); + } + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public com.google.protobuf.Method.Builder addMethodsBuilder() { + return getMethodsFieldBuilder().addBuilder( + com.google.protobuf.Method.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public com.google.protobuf.Method.Builder addMethodsBuilder( + int index) { + return getMethodsFieldBuilder().addBuilder( + index, com.google.protobuf.Method.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+     * The methods of this api, in unspecified order.
+     * 
+ */ + public java.util.List + getMethodsBuilderList() { + return getMethodsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Method, com.google.protobuf.Method.Builder, com.google.protobuf.MethodOrBuilder> + getMethodsFieldBuilder() { + if (methodsBuilder_ == null) { + methodsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Method, com.google.protobuf.Method.Builder, com.google.protobuf.MethodOrBuilder>( + methods_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + methods_ = null; + } + return methodsBuilder_; + } + + private java.util.List options_ = + java.util.Collections.emptyList(); + private void ensureOptionsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + options_ = new java.util.ArrayList(options_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; + + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public java.util.List getOptionsList() { + if (optionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(options_); + } else { + return optionsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public int getOptionsCount() { + if (optionsBuilder_ == null) { + return options_.size(); + } else { + return optionsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + if (optionsBuilder_ == null) { + return options_.get(index); + } else { + return optionsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.set(index, value); + onChanged(); + } else { + optionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.set(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder addOptions(com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(value); + onChanged(); + } else { + optionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(index, value); + onChanged(); + } else { + optionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder addOptions( + com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder addAllOptions( + java.lang.Iterable values) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, options_); + onChanged(); + } else { + optionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + optionsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public Builder removeOptions(int index) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.remove(index); + onChanged(); + } else { + optionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public com.google.protobuf.Option.Builder getOptionsBuilder( + int index) { + return getOptionsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + if (optionsBuilder_ == null) { + return options_.get(index); } else { + return optionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(options_); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder() { + return getOptionsFieldBuilder().addBuilder( + com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder( + int index) { + return getOptionsFieldBuilder().addBuilder( + index, com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Any metadata attached to the API.
+     * 
+ */ + public java.util.List + getOptionsBuilderList() { + return getOptionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( + options_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private java.lang.Object version_ = ""; + /** + * optional string version = 4; + * + *
+     * A version string for this api. If specified, must have the form
+     * `major-version.minor-version`, as in `1.10`. If the minor version
+     * is omitted, it defaults to zero. If the entire version field is
+     * empty, the major version is derived from the package name, as
+     * outlined below. If the field is not empty, the version in the
+     * package name will be verified to be consistent with what is
+     * provided here.
+     * The versioning schema uses [semantic
+     * versioning](http://semver.org) where the major version number
+     * indicates a breaking change and the minor version an additive,
+     * non-breaking change. Both version numbers are signals to users
+     * what to expect from different versions, and should be carefully
+     * chosen based on the product plan.
+     * The major version is also reflected in the package name of the
+     * API, which must end in `v<major-version>`, as in
+     * `google.feature.v1`. For major versions 0 and 1, the suffix can
+     * be omitted. Zero major versions must only be used for
+     * experimental, none-GA apis.
+     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+     * --)
+     * (-- TODO(wgg): determine whether we want to enable specifying
+     * this via an option in the proto file. --)
+     * 
+ */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string version = 4; + * + *
+     * A version string for this api. If specified, must have the form
+     * `major-version.minor-version`, as in `1.10`. If the minor version
+     * is omitted, it defaults to zero. If the entire version field is
+     * empty, the major version is derived from the package name, as
+     * outlined below. If the field is not empty, the version in the
+     * package name will be verified to be consistent with what is
+     * provided here.
+     * The versioning schema uses [semantic
+     * versioning](http://semver.org) where the major version number
+     * indicates a breaking change and the minor version an additive,
+     * non-breaking change. Both version numbers are signals to users
+     * what to expect from different versions, and should be carefully
+     * chosen based on the product plan.
+     * The major version is also reflected in the package name of the
+     * API, which must end in `v<major-version>`, as in
+     * `google.feature.v1`. For major versions 0 and 1, the suffix can
+     * be omitted. Zero major versions must only be used for
+     * experimental, none-GA apis.
+     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+     * --)
+     * (-- TODO(wgg): determine whether we want to enable specifying
+     * this via an option in the proto file. --)
+     * 
+ */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string version = 4; + * + *
+     * A version string for this api. If specified, must have the form
+     * `major-version.minor-version`, as in `1.10`. If the minor version
+     * is omitted, it defaults to zero. If the entire version field is
+     * empty, the major version is derived from the package name, as
+     * outlined below. If the field is not empty, the version in the
+     * package name will be verified to be consistent with what is
+     * provided here.
+     * The versioning schema uses [semantic
+     * versioning](http://semver.org) where the major version number
+     * indicates a breaking change and the minor version an additive,
+     * non-breaking change. Both version numbers are signals to users
+     * what to expect from different versions, and should be carefully
+     * chosen based on the product plan.
+     * The major version is also reflected in the package name of the
+     * API, which must end in `v<major-version>`, as in
+     * `google.feature.v1`. For major versions 0 and 1, the suffix can
+     * be omitted. Zero major versions must only be used for
+     * experimental, none-GA apis.
+     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+     * --)
+     * (-- TODO(wgg): determine whether we want to enable specifying
+     * this via an option in the proto file. --)
+     * 
+ */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * optional string version = 4; + * + *
+     * A version string for this api. If specified, must have the form
+     * `major-version.minor-version`, as in `1.10`. If the minor version
+     * is omitted, it defaults to zero. If the entire version field is
+     * empty, the major version is derived from the package name, as
+     * outlined below. If the field is not empty, the version in the
+     * package name will be verified to be consistent with what is
+     * provided here.
+     * The versioning schema uses [semantic
+     * versioning](http://semver.org) where the major version number
+     * indicates a breaking change and the minor version an additive,
+     * non-breaking change. Both version numbers are signals to users
+     * what to expect from different versions, and should be carefully
+     * chosen based on the product plan.
+     * The major version is also reflected in the package name of the
+     * API, which must end in `v<major-version>`, as in
+     * `google.feature.v1`. For major versions 0 and 1, the suffix can
+     * be omitted. Zero major versions must only be used for
+     * experimental, none-GA apis.
+     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+     * --)
+     * (-- TODO(wgg): determine whether we want to enable specifying
+     * this via an option in the proto file. --)
+     * 
+ */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * optional string version = 4; + * + *
+     * A version string for this api. If specified, must have the form
+     * `major-version.minor-version`, as in `1.10`. If the minor version
+     * is omitted, it defaults to zero. If the entire version field is
+     * empty, the major version is derived from the package name, as
+     * outlined below. If the field is not empty, the version in the
+     * package name will be verified to be consistent with what is
+     * provided here.
+     * The versioning schema uses [semantic
+     * versioning](http://semver.org) where the major version number
+     * indicates a breaking change and the minor version an additive,
+     * non-breaking change. Both version numbers are signals to users
+     * what to expect from different versions, and should be carefully
+     * chosen based on the product plan.
+     * The major version is also reflected in the package name of the
+     * API, which must end in `v<major-version>`, as in
+     * `google.feature.v1`. For major versions 0 and 1, the suffix can
+     * be omitted. Zero major versions must only be used for
+     * experimental, none-GA apis.
+     * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+     * --)
+     * (-- TODO(wgg): determine whether we want to enable specifying
+     * this via an option in the proto file. --)
+     * 
+ */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SourceContext sourceContext_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder> sourceContextBuilder_; + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public boolean hasSourceContext() { + return sourceContextBuilder_ != null || sourceContext_ != null; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public com.google.protobuf.SourceContext getSourceContext() { + if (sourceContextBuilder_ == null) { + return sourceContext_ == null ? com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; + } else { + return sourceContextBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public Builder setSourceContext(com.google.protobuf.SourceContext value) { + if (sourceContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceContext_ = value; + onChanged(); + } else { + sourceContextBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public Builder setSourceContext( + com.google.protobuf.SourceContext.Builder builderForValue) { + if (sourceContextBuilder_ == null) { + sourceContext_ = builderForValue.build(); + onChanged(); + } else { + sourceContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public Builder mergeSourceContext(com.google.protobuf.SourceContext value) { + if (sourceContextBuilder_ == null) { + if (sourceContext_ != null) { + sourceContext_ = + com.google.protobuf.SourceContext.newBuilder(sourceContext_).mergeFrom(value).buildPartial(); + } else { + sourceContext_ = value; + } + onChanged(); + } else { + sourceContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public Builder clearSourceContext() { + if (sourceContextBuilder_ == null) { + sourceContext_ = null; + onChanged(); + } else { + sourceContext_ = null; + sourceContextBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public com.google.protobuf.SourceContext.Builder getSourceContextBuilder() { + + onChanged(); + return getSourceContextFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + public com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder() { + if (sourceContextBuilder_ != null) { + return sourceContextBuilder_.getMessageOrBuilder(); + } else { + return sourceContext_ == null ? + com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; + } + } + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+     * Source context for the protocol buffer service represented by this
+     * message.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder> + getSourceContextFieldBuilder() { + if (sourceContextBuilder_ == null) { + sourceContextBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder>( + getSourceContext(), + getParentForChildren(), + isClean()); + sourceContext_ = null; + } + return sourceContextBuilder_; + } + + private java.util.List mixins_ = + java.util.Collections.emptyList(); + private void ensureMixinsIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + mixins_ = new java.util.ArrayList(mixins_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Mixin, com.google.protobuf.Mixin.Builder, com.google.protobuf.MixinOrBuilder> mixinsBuilder_; + + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public java.util.List getMixinsList() { + if (mixinsBuilder_ == null) { + return java.util.Collections.unmodifiableList(mixins_); + } else { + return mixinsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public int getMixinsCount() { + if (mixinsBuilder_ == null) { + return mixins_.size(); + } else { + return mixinsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public com.google.protobuf.Mixin getMixins(int index) { + if (mixinsBuilder_ == null) { + return mixins_.get(index); + } else { + return mixinsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder setMixins( + int index, com.google.protobuf.Mixin value) { + if (mixinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMixinsIsMutable(); + mixins_.set(index, value); + onChanged(); + } else { + mixinsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder setMixins( + int index, com.google.protobuf.Mixin.Builder builderForValue) { + if (mixinsBuilder_ == null) { + ensureMixinsIsMutable(); + mixins_.set(index, builderForValue.build()); + onChanged(); + } else { + mixinsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder addMixins(com.google.protobuf.Mixin value) { + if (mixinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMixinsIsMutable(); + mixins_.add(value); + onChanged(); + } else { + mixinsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder addMixins( + int index, com.google.protobuf.Mixin value) { + if (mixinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMixinsIsMutable(); + mixins_.add(index, value); + onChanged(); + } else { + mixinsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder addMixins( + com.google.protobuf.Mixin.Builder builderForValue) { + if (mixinsBuilder_ == null) { + ensureMixinsIsMutable(); + mixins_.add(builderForValue.build()); + onChanged(); + } else { + mixinsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder addMixins( + int index, com.google.protobuf.Mixin.Builder builderForValue) { + if (mixinsBuilder_ == null) { + ensureMixinsIsMutable(); + mixins_.add(index, builderForValue.build()); + onChanged(); + } else { + mixinsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder addAllMixins( + java.lang.Iterable values) { + if (mixinsBuilder_ == null) { + ensureMixinsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, mixins_); + onChanged(); + } else { + mixinsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder clearMixins() { + if (mixinsBuilder_ == null) { + mixins_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + mixinsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public Builder removeMixins(int index) { + if (mixinsBuilder_ == null) { + ensureMixinsIsMutable(); + mixins_.remove(index); + onChanged(); + } else { + mixinsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public com.google.protobuf.Mixin.Builder getMixinsBuilder( + int index) { + return getMixinsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public com.google.protobuf.MixinOrBuilder getMixinsOrBuilder( + int index) { + if (mixinsBuilder_ == null) { + return mixins_.get(index); } else { + return mixinsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public java.util.List + getMixinsOrBuilderList() { + if (mixinsBuilder_ != null) { + return mixinsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mixins_); + } + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public com.google.protobuf.Mixin.Builder addMixinsBuilder() { + return getMixinsFieldBuilder().addBuilder( + com.google.protobuf.Mixin.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public com.google.protobuf.Mixin.Builder addMixinsBuilder( + int index) { + return getMixinsFieldBuilder().addBuilder( + index, com.google.protobuf.Mixin.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+     * Included APIs. See [Mixin][].
+     * 
+ */ + public java.util.List + getMixinsBuilderList() { + return getMixinsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Mixin, com.google.protobuf.Mixin.Builder, com.google.protobuf.MixinOrBuilder> + getMixinsFieldBuilder() { + if (mixinsBuilder_ == null) { + mixinsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Mixin, com.google.protobuf.Mixin.Builder, com.google.protobuf.MixinOrBuilder>( + mixins_, + ((bitField0_ & 0x00000020) == 0x00000020), + getParentForChildren(), + isClean()); + mixins_ = null; + } + return mixinsBuilder_; + } + + private int syntax_ = 0; + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of the service.
+     * 
+ */ + public int getSyntaxValue() { + return syntax_; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of the service.
+     * 
+ */ + public Builder setSyntaxValue(int value) { + syntax_ = value; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of the service.
+     * 
+ */ + public com.google.protobuf.Syntax getSyntax() { + com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); + return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of the service.
+     * 
+ */ + public Builder setSyntax(com.google.protobuf.Syntax value) { + if (value == null) { + throw new NullPointerException(); + } + + syntax_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of the service.
+     * 
+ */ + public Builder clearSyntax() { + + syntax_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.Api) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Api) + private static final com.google.protobuf.Api DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Api(); + } + + public static com.google.protobuf.Api getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Api parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Api(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.Api getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/ApiOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/ApiOrBuilder.java new file mode 100644 index 000000000000..6cbec48994b9 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/ApiOrBuilder.java @@ -0,0 +1,266 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +public interface ApiOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Api) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The fully qualified name of this api, including package name
+   * followed by the api's simple name.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The fully qualified name of this api, including package name
+   * followed by the api's simple name.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + java.util.List + getMethodsList(); + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + com.google.protobuf.Method getMethods(int index); + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + int getMethodsCount(); + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + java.util.List + getMethodsOrBuilderList(); + /** + * repeated .google.protobuf.Method methods = 2; + * + *
+   * The methods of this api, in unspecified order.
+   * 
+ */ + com.google.protobuf.MethodOrBuilder getMethodsOrBuilder( + int index); + + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + java.util.List + getOptionsList(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + com.google.protobuf.Option getOptions(int index); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + int getOptionsCount(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + java.util.List + getOptionsOrBuilderList(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Any metadata attached to the API.
+   * 
+ */ + com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index); + + /** + * optional string version = 4; + * + *
+   * A version string for this api. If specified, must have the form
+   * `major-version.minor-version`, as in `1.10`. If the minor version
+   * is omitted, it defaults to zero. If the entire version field is
+   * empty, the major version is derived from the package name, as
+   * outlined below. If the field is not empty, the version in the
+   * package name will be verified to be consistent with what is
+   * provided here.
+   * The versioning schema uses [semantic
+   * versioning](http://semver.org) where the major version number
+   * indicates a breaking change and the minor version an additive,
+   * non-breaking change. Both version numbers are signals to users
+   * what to expect from different versions, and should be carefully
+   * chosen based on the product plan.
+   * The major version is also reflected in the package name of the
+   * API, which must end in `v<major-version>`, as in
+   * `google.feature.v1`. For major versions 0 and 1, the suffix can
+   * be omitted. Zero major versions must only be used for
+   * experimental, none-GA apis.
+   * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+   * --)
+   * (-- TODO(wgg): determine whether we want to enable specifying
+   * this via an option in the proto file. --)
+   * 
+ */ + java.lang.String getVersion(); + /** + * optional string version = 4; + * + *
+   * A version string for this api. If specified, must have the form
+   * `major-version.minor-version`, as in `1.10`. If the minor version
+   * is omitted, it defaults to zero. If the entire version field is
+   * empty, the major version is derived from the package name, as
+   * outlined below. If the field is not empty, the version in the
+   * package name will be verified to be consistent with what is
+   * provided here.
+   * The versioning schema uses [semantic
+   * versioning](http://semver.org) where the major version number
+   * indicates a breaking change and the minor version an additive,
+   * non-breaking change. Both version numbers are signals to users
+   * what to expect from different versions, and should be carefully
+   * chosen based on the product plan.
+   * The major version is also reflected in the package name of the
+   * API, which must end in `v<major-version>`, as in
+   * `google.feature.v1`. For major versions 0 and 1, the suffix can
+   * be omitted. Zero major versions must only be used for
+   * experimental, none-GA apis.
+   * (--GOOGLE_INTERNAL: See also: [design doc](http://go/api-versioning).
+   * --)
+   * (-- TODO(wgg): determine whether we want to enable specifying
+   * this via an option in the proto file. --)
+   * 
+ */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+   * Source context for the protocol buffer service represented by this
+   * message.
+   * 
+ */ + boolean hasSourceContext(); + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+   * Source context for the protocol buffer service represented by this
+   * message.
+   * 
+ */ + com.google.protobuf.SourceContext getSourceContext(); + /** + * optional .google.protobuf.SourceContext source_context = 5; + * + *
+   * Source context for the protocol buffer service represented by this
+   * message.
+   * 
+ */ + com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder(); + + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + java.util.List + getMixinsList(); + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + com.google.protobuf.Mixin getMixins(int index); + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + int getMixinsCount(); + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + java.util.List + getMixinsOrBuilderList(); + /** + * repeated .google.protobuf.Mixin mixins = 6; + * + *
+   * Included APIs. See [Mixin][].
+   * 
+ */ + com.google.protobuf.MixinOrBuilder getMixinsOrBuilder( + int index); + + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of the service.
+   * 
+ */ + int getSyntaxValue(); + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of the service.
+   * 
+ */ + com.google.protobuf.Syntax getSyntax(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/ApiProto.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/ApiProto.java new file mode 100644 index 000000000000..02c8e635697f --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/ApiProto.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +public final class ApiProto { + private ApiProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_Api_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_Api_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_Method_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_Method_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_Mixin_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_Mixin_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031google/protobuf/api.proto\022\017google.prot" + + "obuf\032$google/protobuf/source_context.pro" + + "to\032\032google/protobuf/type.proto\"\201\002\n\003Api\022\014" + + "\n\004name\030\001 \001(\t\022(\n\007methods\030\002 \003(\0132\027.google.p" + + "rotobuf.Method\022(\n\007options\030\003 \003(\0132\027.google" + + ".protobuf.Option\022\017\n\007version\030\004 \001(\t\0226\n\016sou" + + "rce_context\030\005 \001(\0132\036.google.protobuf.Sour" + + "ceContext\022&\n\006mixins\030\006 \003(\0132\026.google.proto" + + "buf.Mixin\022\'\n\006syntax\030\007 \001(\0162\027.google.proto" + + "buf.Syntax\"\335\001\n\006Method\022\014\n\004name\030\001 \001(\t\022\034\n\020r", + "equest_type_url\030\002 \001(\tB\002\010\002\022\031\n\021request_str" + + "eaming\030\003 \001(\010\022\035\n\021response_type_url\030\004 \001(\tB" + + "\002\010\002\022\032\n\022response_streaming\030\005 \001(\010\022(\n\007optio" + + "ns\030\006 \003(\0132\027.google.protobuf.Option\022\'\n\006syn" + + "tax\030\007 \001(\0162\027.google.protobuf.Syntax\"#\n\005Mi" + + "xin\022\014\n\004name\030\001 \001(\t\022\014\n\004root\030\002 \001(\tB*\n\023com.g" + + "oogle.protobufB\010ApiProtoP\001\240\001\001\242\002\003GPBb\006pro" + + "to3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.SourceContextProto.getDescriptor(), + com.google.protobuf.TypeProto.getDescriptor(), + }, assigner); + internal_static_google_protobuf_Api_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_protobuf_Api_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_Api_descriptor, + new java.lang.String[] { "Name", "Methods", "Options", "Version", "SourceContext", "Mixins", "Syntax", }); + internal_static_google_protobuf_Method_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_protobuf_Method_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_Method_descriptor, + new java.lang.String[] { "Name", "RequestTypeUrl", "RequestStreaming", "ResponseTypeUrl", "ResponseStreaming", "Options", "Syntax", }); + internal_static_google_protobuf_Mixin_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_protobuf_Mixin_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_Mixin_descriptor, + new java.lang.String[] { "Name", "Root", }); + com.google.protobuf.SourceContextProto.getDescriptor(); + com.google.protobuf.TypeProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/BoolValue.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/BoolValue.java new file mode 100644 index 000000000000..a18c664aae5d --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/BoolValue.java @@ -0,0 +1,428 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.BoolValue} + * + *
+ * Wrapper message for `bool`.
+ * The JSON representation for `BoolValue` is JSON `true` and `false`.
+ * 
+ */ +public final class BoolValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.BoolValue) + BoolValueOrBuilder { + // Use BoolValue.newBuilder() to construct. + private BoolValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BoolValue() { + value_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private BoolValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + value_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.BoolValue.class, com.google.protobuf.BoolValue.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private boolean value_; + /** + * optional bool value = 1; + * + *
+   * The bool value.
+   * 
+ */ + public boolean getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (value_ != false) { + output.writeBool(1, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.BoolValue)) { + return super.equals(obj); + } + com.google.protobuf.BoolValue other = (com.google.protobuf.BoolValue) obj; + + boolean result = true; + result = result && (getValue() + == other.getValue()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getValue()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.BoolValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.BoolValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.BoolValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.BoolValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.BoolValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.BoolValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.BoolValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.BoolValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.BoolValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.BoolValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.BoolValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.BoolValue} + * + *
+   * Wrapper message for `bool`.
+   * The JSON representation for `BoolValue` is JSON `true` and `false`.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.BoolValue) + com.google.protobuf.BoolValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.BoolValue.class, com.google.protobuf.BoolValue.Builder.class); + } + + // Construct using com.google.protobuf.BoolValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + value_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_descriptor; + } + + public com.google.protobuf.BoolValue getDefaultInstanceForType() { + return com.google.protobuf.BoolValue.getDefaultInstance(); + } + + public com.google.protobuf.BoolValue build() { + com.google.protobuf.BoolValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.BoolValue buildPartial() { + com.google.protobuf.BoolValue result = new com.google.protobuf.BoolValue(this); + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.BoolValue) { + return mergeFrom((com.google.protobuf.BoolValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.BoolValue other) { + if (other == com.google.protobuf.BoolValue.getDefaultInstance()) return this; + if (other.getValue() != false) { + setValue(other.getValue()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.BoolValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.BoolValue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean value_ ; + /** + * optional bool value = 1; + * + *
+     * The bool value.
+     * 
+ */ + public boolean getValue() { + return value_; + } + /** + * optional bool value = 1; + * + *
+     * The bool value.
+     * 
+ */ + public Builder setValue(boolean value) { + + value_ = value; + onChanged(); + return this; + } + /** + * optional bool value = 1; + * + *
+     * The bool value.
+     * 
+ */ + public Builder clearValue() { + + value_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.BoolValue) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.BoolValue) + private static final com.google.protobuf.BoolValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.BoolValue(); + } + + public static com.google.protobuf.BoolValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public BoolValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new BoolValue(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.BoolValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/BoolValueOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/BoolValueOrBuilder.java new file mode 100644 index 000000000000..17c3436d6fe2 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/BoolValueOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +public interface BoolValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.BoolValue) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bool value = 1; + * + *
+   * The bool value.
+   * 
+ */ + boolean getValue(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/BytesValue.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/BytesValue.java new file mode 100644 index 000000000000..3d784ca7bc5c --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/BytesValue.java @@ -0,0 +1,430 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.BytesValue} + * + *
+ * Wrapper message for `bytes`.
+ * The JSON representation for `BytesValue` is JSON string.
+ * 
+ */ +public final class BytesValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.BytesValue) + BytesValueOrBuilder { + // Use BytesValue.newBuilder() to construct. + private BytesValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BytesValue() { + value_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private BytesValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + + value_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.BytesValue.class, com.google.protobuf.BytesValue.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString value_; + /** + * optional bytes value = 1 [ctype = CORD]; + * + *
+   * The bytes value.
+   * 
+ */ + public com.google.protobuf.ByteString getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!value_.isEmpty()) { + output.writeBytes(1, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!value_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.BytesValue)) { + return super.equals(obj); + } + com.google.protobuf.BytesValue other = (com.google.protobuf.BytesValue) obj; + + boolean result = true; + result = result && getValue() + .equals(other.getValue()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.BytesValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.BytesValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.BytesValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.BytesValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.BytesValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.BytesValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.BytesValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.BytesValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.BytesValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.BytesValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.BytesValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.BytesValue} + * + *
+   * Wrapper message for `bytes`.
+   * The JSON representation for `BytesValue` is JSON string.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.BytesValue) + com.google.protobuf.BytesValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.BytesValue.class, com.google.protobuf.BytesValue.Builder.class); + } + + // Construct using com.google.protobuf.BytesValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + value_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_descriptor; + } + + public com.google.protobuf.BytesValue getDefaultInstanceForType() { + return com.google.protobuf.BytesValue.getDefaultInstance(); + } + + public com.google.protobuf.BytesValue build() { + com.google.protobuf.BytesValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.BytesValue buildPartial() { + com.google.protobuf.BytesValue result = new com.google.protobuf.BytesValue(this); + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.BytesValue) { + return mergeFrom((com.google.protobuf.BytesValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.BytesValue other) { + if (other == com.google.protobuf.BytesValue.getDefaultInstance()) return this; + if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { + setValue(other.getValue()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.BytesValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.BytesValue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes value = 1 [ctype = CORD]; + * + *
+     * The bytes value.
+     * 
+ */ + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + * optional bytes value = 1 [ctype = CORD]; + * + *
+     * The bytes value.
+     * 
+ */ + public Builder setValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * optional bytes value = 1 [ctype = CORD]; + * + *
+     * The bytes value.
+     * 
+ */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.BytesValue) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.BytesValue) + private static final com.google.protobuf.BytesValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.BytesValue(); + } + + public static com.google.protobuf.BytesValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public BytesValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new BytesValue(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.BytesValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/BytesValueOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/BytesValueOrBuilder.java new file mode 100644 index 000000000000..5d27cb3133d8 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/BytesValueOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +public interface BytesValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.BytesValue) + com.google.protobuf.MessageOrBuilder { + + /** + * optional bytes value = 1 [ctype = CORD]; + * + *
+   * The bytes value.
+   * 
+ */ + com.google.protobuf.ByteString getValue(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/DoubleValue.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/DoubleValue.java new file mode 100644 index 000000000000..2a964a8f8020 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/DoubleValue.java @@ -0,0 +1,430 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.DoubleValue} + * + *
+ * Wrapper message for `double`.
+ * The JSON representation for `DoubleValue` is JSON number.
+ * 
+ */ +public final class DoubleValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.DoubleValue) + DoubleValueOrBuilder { + // Use DoubleValue.newBuilder() to construct. + private DoubleValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DoubleValue() { + value_ = 0D; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private DoubleValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 9: { + + value_ = input.readDouble(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.DoubleValue.class, com.google.protobuf.DoubleValue.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private double value_; + /** + * optional double value = 1; + * + *
+   * The double value.
+   * 
+ */ + public double getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (value_ != 0D) { + output.writeDouble(1, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.DoubleValue)) { + return super.equals(obj); + } + com.google.protobuf.DoubleValue other = (com.google.protobuf.DoubleValue) obj; + + boolean result = true; + result = result && ( + java.lang.Double.doubleToLongBits(getValue()) + == java.lang.Double.doubleToLongBits( + other.getValue())); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getValue())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.DoubleValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.DoubleValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.DoubleValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.DoubleValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.DoubleValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.DoubleValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.DoubleValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.DoubleValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.DoubleValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.DoubleValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.DoubleValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.DoubleValue} + * + *
+   * Wrapper message for `double`.
+   * The JSON representation for `DoubleValue` is JSON number.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.DoubleValue) + com.google.protobuf.DoubleValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.DoubleValue.class, com.google.protobuf.DoubleValue.Builder.class); + } + + // Construct using com.google.protobuf.DoubleValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + value_ = 0D; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_descriptor; + } + + public com.google.protobuf.DoubleValue getDefaultInstanceForType() { + return com.google.protobuf.DoubleValue.getDefaultInstance(); + } + + public com.google.protobuf.DoubleValue build() { + com.google.protobuf.DoubleValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.DoubleValue buildPartial() { + com.google.protobuf.DoubleValue result = new com.google.protobuf.DoubleValue(this); + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.DoubleValue) { + return mergeFrom((com.google.protobuf.DoubleValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.DoubleValue other) { + if (other == com.google.protobuf.DoubleValue.getDefaultInstance()) return this; + if (other.getValue() != 0D) { + setValue(other.getValue()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.DoubleValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.DoubleValue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double value_ ; + /** + * optional double value = 1; + * + *
+     * The double value.
+     * 
+ */ + public double getValue() { + return value_; + } + /** + * optional double value = 1; + * + *
+     * The double value.
+     * 
+ */ + public Builder setValue(double value) { + + value_ = value; + onChanged(); + return this; + } + /** + * optional double value = 1; + * + *
+     * The double value.
+     * 
+ */ + public Builder clearValue() { + + value_ = 0D; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.DoubleValue) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.DoubleValue) + private static final com.google.protobuf.DoubleValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.DoubleValue(); + } + + public static com.google.protobuf.DoubleValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DoubleValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new DoubleValue(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.DoubleValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/DoubleValueOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/DoubleValueOrBuilder.java new file mode 100644 index 000000000000..2b3c30eb3b25 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/DoubleValueOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +public interface DoubleValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.DoubleValue) + com.google.protobuf.MessageOrBuilder { + + /** + * optional double value = 1; + * + *
+   * The double value.
+   * 
+ */ + double getValue(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Duration.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Duration.java new file mode 100644 index 000000000000..6a753cbe33c6 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Duration.java @@ -0,0 +1,586 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/duration.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Duration} + * + *
+ * A Duration represents a signed, fixed-length span of time represented
+ * as a count of seconds and fractions of seconds at nanosecond
+ * resolution. It is independent of any calendar and concepts like "day"
+ * or "month". It is related to Timestamp in that the difference between
+ * two Timestamp values is a Duration and it can be added or subtracted
+ * from a Timestamp. Range is approximately +-10,000 years.
+ * Example 1: Compute Duration from two Timestamps in pseudo code.
+ *     Timestamp start = ...;
+ *     Timestamp end = ...;
+ *     Duration duration = ...;
+ *     duration.seconds = end.seconds - start.seconds;
+ *     duration.nanos = end.nanos - start.nanos;
+ *     if (duration.seconds < 0 && duration.nanos > 0) {
+ *       duration.seconds += 1;
+ *       duration.nanos -= 1000000000;
+ *     } else if (durations.seconds > 0 && duration.nanos < 0) {
+ *       duration.seconds -= 1;
+ *       duration.nanos += 1000000000;
+ *     }
+ * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
+ *     Timestamp start = ...;
+ *     Duration duration = ...;
+ *     Timestamp end = ...;
+ *     end.seconds = start.seconds + duration.seconds;
+ *     end.nanos = start.nanos + duration.nanos;
+ *     if (end.nanos < 0) {
+ *       end.seconds -= 1;
+ *       end.nanos += 1000000000;
+ *     } else if (end.nanos >= 1000000000) {
+ *       end.seconds += 1;
+ *       end.nanos -= 1000000000;
+ *     }
+ * 
+ */ +public final class Duration extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Duration) + DurationOrBuilder { + // Use Duration.newBuilder() to construct. + private Duration(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Duration() { + seconds_ = 0L; + nanos_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Duration( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + seconds_ = input.readInt64(); + break; + } + case 16: { + + nanos_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Duration.class, com.google.protobuf.Duration.Builder.class); + } + + public static final int SECONDS_FIELD_NUMBER = 1; + private long seconds_; + /** + * optional int64 seconds = 1; + * + *
+   * Signed seconds of the span of time. Must be from -315,576,000,000
+   * to +315,576,000,000 inclusive.
+   * 
+ */ + public long getSeconds() { + return seconds_; + } + + public static final int NANOS_FIELD_NUMBER = 2; + private int nanos_; + /** + * optional int32 nanos = 2; + * + *
+   * Signed fractions of a second at nanosecond resolution of the span
+   * of time. Durations less than one second are represented with a 0
+   * `seconds` field and a positive or negative `nanos` field. For durations
+   * of one second or more, a non-zero value for the `nanos` field must be
+   * of the same sign as the `seconds` field. Must be from -999,999,999
+   * to +999,999,999 inclusive.
+   * 
+ */ + public int getNanos() { + return nanos_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (seconds_ != 0L) { + output.writeInt64(1, seconds_); + } + if (nanos_ != 0) { + output.writeInt32(2, nanos_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (seconds_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, seconds_); + } + if (nanos_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, nanos_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Duration)) { + return super.equals(obj); + } + com.google.protobuf.Duration other = (com.google.protobuf.Duration) obj; + + boolean result = true; + result = result && (getSeconds() + == other.getSeconds()); + result = result && (getNanos() + == other.getNanos()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + SECONDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSeconds()); + hash = (37 * hash) + NANOS_FIELD_NUMBER; + hash = (53 * hash) + getNanos(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Duration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Duration parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Duration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Duration parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Duration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Duration parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Duration parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Duration parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Duration parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Duration parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.Duration prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.Duration} + * + *
+   * A Duration represents a signed, fixed-length span of time represented
+   * as a count of seconds and fractions of seconds at nanosecond
+   * resolution. It is independent of any calendar and concepts like "day"
+   * or "month". It is related to Timestamp in that the difference between
+   * two Timestamp values is a Duration and it can be added or subtracted
+   * from a Timestamp. Range is approximately +-10,000 years.
+   * Example 1: Compute Duration from two Timestamps in pseudo code.
+   *     Timestamp start = ...;
+   *     Timestamp end = ...;
+   *     Duration duration = ...;
+   *     duration.seconds = end.seconds - start.seconds;
+   *     duration.nanos = end.nanos - start.nanos;
+   *     if (duration.seconds < 0 && duration.nanos > 0) {
+   *       duration.seconds += 1;
+   *       duration.nanos -= 1000000000;
+   *     } else if (durations.seconds > 0 && duration.nanos < 0) {
+   *       duration.seconds -= 1;
+   *       duration.nanos += 1000000000;
+   *     }
+   * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
+   *     Timestamp start = ...;
+   *     Duration duration = ...;
+   *     Timestamp end = ...;
+   *     end.seconds = start.seconds + duration.seconds;
+   *     end.nanos = start.nanos + duration.nanos;
+   *     if (end.nanos < 0) {
+   *       end.seconds -= 1;
+   *       end.nanos += 1000000000;
+   *     } else if (end.nanos >= 1000000000) {
+   *       end.seconds += 1;
+   *       end.nanos -= 1000000000;
+   *     }
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Duration) + com.google.protobuf.DurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Duration.class, com.google.protobuf.Duration.Builder.class); + } + + // Construct using com.google.protobuf.Duration.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + seconds_ = 0L; + + nanos_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_descriptor; + } + + public com.google.protobuf.Duration getDefaultInstanceForType() { + return com.google.protobuf.Duration.getDefaultInstance(); + } + + public com.google.protobuf.Duration build() { + com.google.protobuf.Duration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Duration buildPartial() { + com.google.protobuf.Duration result = new com.google.protobuf.Duration(this); + result.seconds_ = seconds_; + result.nanos_ = nanos_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Duration) { + return mergeFrom((com.google.protobuf.Duration)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Duration other) { + if (other == com.google.protobuf.Duration.getDefaultInstance()) return this; + if (other.getSeconds() != 0L) { + setSeconds(other.getSeconds()); + } + if (other.getNanos() != 0) { + setNanos(other.getNanos()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.Duration parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Duration) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long seconds_ ; + /** + * optional int64 seconds = 1; + * + *
+     * Signed seconds of the span of time. Must be from -315,576,000,000
+     * to +315,576,000,000 inclusive.
+     * 
+ */ + public long getSeconds() { + return seconds_; + } + /** + * optional int64 seconds = 1; + * + *
+     * Signed seconds of the span of time. Must be from -315,576,000,000
+     * to +315,576,000,000 inclusive.
+     * 
+ */ + public Builder setSeconds(long value) { + + seconds_ = value; + onChanged(); + return this; + } + /** + * optional int64 seconds = 1; + * + *
+     * Signed seconds of the span of time. Must be from -315,576,000,000
+     * to +315,576,000,000 inclusive.
+     * 
+ */ + public Builder clearSeconds() { + + seconds_ = 0L; + onChanged(); + return this; + } + + private int nanos_ ; + /** + * optional int32 nanos = 2; + * + *
+     * Signed fractions of a second at nanosecond resolution of the span
+     * of time. Durations less than one second are represented with a 0
+     * `seconds` field and a positive or negative `nanos` field. For durations
+     * of one second or more, a non-zero value for the `nanos` field must be
+     * of the same sign as the `seconds` field. Must be from -999,999,999
+     * to +999,999,999 inclusive.
+     * 
+ */ + public int getNanos() { + return nanos_; + } + /** + * optional int32 nanos = 2; + * + *
+     * Signed fractions of a second at nanosecond resolution of the span
+     * of time. Durations less than one second are represented with a 0
+     * `seconds` field and a positive or negative `nanos` field. For durations
+     * of one second or more, a non-zero value for the `nanos` field must be
+     * of the same sign as the `seconds` field. Must be from -999,999,999
+     * to +999,999,999 inclusive.
+     * 
+ */ + public Builder setNanos(int value) { + + nanos_ = value; + onChanged(); + return this; + } + /** + * optional int32 nanos = 2; + * + *
+     * Signed fractions of a second at nanosecond resolution of the span
+     * of time. Durations less than one second are represented with a 0
+     * `seconds` field and a positive or negative `nanos` field. For durations
+     * of one second or more, a non-zero value for the `nanos` field must be
+     * of the same sign as the `seconds` field. Must be from -999,999,999
+     * to +999,999,999 inclusive.
+     * 
+ */ + public Builder clearNanos() { + + nanos_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.Duration) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Duration) + private static final com.google.protobuf.Duration DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Duration(); + } + + public static com.google.protobuf.Duration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Duration parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Duration(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.Duration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/DurationOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/DurationOrBuilder.java new file mode 100644 index 000000000000..ef4d57f2ff9c --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/DurationOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/duration.proto + +package com.google.protobuf; + +public interface DurationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Duration) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 seconds = 1; + * + *
+   * Signed seconds of the span of time. Must be from -315,576,000,000
+   * to +315,576,000,000 inclusive.
+   * 
+ */ + long getSeconds(); + + /** + * optional int32 nanos = 2; + * + *
+   * Signed fractions of a second at nanosecond resolution of the span
+   * of time. Durations less than one second are represented with a 0
+   * `seconds` field and a positive or negative `nanos` field. For durations
+   * of one second or more, a non-zero value for the `nanos` field must be
+   * of the same sign as the `seconds` field. Must be from -999,999,999
+   * to +999,999,999 inclusive.
+   * 
+ */ + int getNanos(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/DurationProto.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/DurationProto.java new file mode 100644 index 000000000000..d22bbf615cb6 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/DurationProto.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/duration.proto + +package com.google.protobuf; + +public final class DurationProto { + private DurationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_Duration_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_Duration_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036google/protobuf/duration.proto\022\017google" + + ".protobuf\"*\n\010Duration\022\017\n\007seconds\030\001 \001(\003\022\r" + + "\n\005nanos\030\002 \001(\005B2\n\023com.google.protobufB\rDu" + + "rationProtoP\001\240\001\001\242\002\003GPB\260\002\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_protobuf_Duration_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_protobuf_Duration_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_Duration_descriptor, + new java.lang.String[] { "Seconds", "Nanos", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Empty.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Empty.java new file mode 100644 index 000000000000..e1548e9604e7 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Empty.java @@ -0,0 +1,362 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/empty.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Empty} + * + *
+ * A generic empty message that you can re-use to avoid defining duplicated
+ * empty messages in your APIs. A typical example is to use it as the request
+ * or the response type of an API method. For instance:
+ *     service Foo {
+ *       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
+ *     }
+ * The JSON representation for `Empty` is empty JSON object `{}`.
+ * 
+ */ +public final class Empty extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Empty) + EmptyOrBuilder { + // Use Empty.newBuilder() to construct. + private Empty(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Empty() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Empty( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Empty.class, com.google.protobuf.Empty.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Empty)) { + return super.equals(obj); + } + com.google.protobuf.Empty other = (com.google.protobuf.Empty) obj; + + boolean result = true; + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Empty parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Empty parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Empty parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Empty parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Empty parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Empty parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Empty parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Empty parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Empty parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Empty parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.Empty prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.Empty} + * + *
+   * A generic empty message that you can re-use to avoid defining duplicated
+   * empty messages in your APIs. A typical example is to use it as the request
+   * or the response type of an API method. For instance:
+   *     service Foo {
+   *       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
+   *     }
+   * The JSON representation for `Empty` is empty JSON object `{}`.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Empty) + com.google.protobuf.EmptyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Empty.class, com.google.protobuf.Empty.Builder.class); + } + + // Construct using com.google.protobuf.Empty.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor; + } + + public com.google.protobuf.Empty getDefaultInstanceForType() { + return com.google.protobuf.Empty.getDefaultInstance(); + } + + public com.google.protobuf.Empty build() { + com.google.protobuf.Empty result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Empty buildPartial() { + com.google.protobuf.Empty result = new com.google.protobuf.Empty(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Empty) { + return mergeFrom((com.google.protobuf.Empty)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Empty other) { + if (other == com.google.protobuf.Empty.getDefaultInstance()) return this; + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.Empty parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Empty) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.Empty) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Empty) + private static final com.google.protobuf.Empty DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Empty(); + } + + public static com.google.protobuf.Empty getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Empty parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Empty(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.Empty getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EmptyOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EmptyOrBuilder.java new file mode 100644 index 000000000000..9a3816194fa7 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EmptyOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/empty.proto + +package com.google.protobuf; + +public interface EmptyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Empty) + com.google.protobuf.MessageOrBuilder { +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EmptyProto.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EmptyProto.java new file mode 100644 index 000000000000..8a184bdd78f0 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EmptyProto.java @@ -0,0 +1,50 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/empty.proto + +package com.google.protobuf; + +public final class EmptyProto { + private EmptyProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_Empty_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_Empty_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033google/protobuf/empty.proto\022\017google.pr" + + "otobuf\"\007\n\005EmptyB2\n\023com.google.protobufB\n" + + "EmptyProtoP\001\240\001\001\370\001\001\242\002\003GPB\260\002\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_protobuf_Empty_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_protobuf_Empty_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_Empty_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Enum.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Enum.java new file mode 100644 index 000000000000..ef1f6961d53b --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Enum.java @@ -0,0 +1,1719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Enum} + * + *
+ * Enum type definition.
+ * 
+ */ +public final class Enum extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Enum) + EnumOrBuilder { + // Use Enum.newBuilder() to construct. + private Enum(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Enum() { + name_ = ""; + enumvalue_ = java.util.Collections.emptyList(); + options_ = java.util.Collections.emptyList(); + syntax_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Enum( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + enumvalue_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + enumvalue_.add(input.readMessage(com.google.protobuf.EnumValue.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + options_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); + break; + } + case 34: { + com.google.protobuf.SourceContext.Builder subBuilder = null; + if (sourceContext_ != null) { + subBuilder = sourceContext_.toBuilder(); + } + sourceContext_ = input.readMessage(com.google.protobuf.SourceContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sourceContext_); + sourceContext_ = subBuilder.buildPartial(); + } + + break; + } + case 40: { + int rawValue = input.readEnum(); + + syntax_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + enumvalue_ = java.util.Collections.unmodifiableList(enumvalue_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + options_ = java.util.Collections.unmodifiableList(options_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Enum.class, com.google.protobuf.Enum.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * Enum type name.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * Enum type name.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENUMVALUE_FIELD_NUMBER = 2; + private java.util.List enumvalue_; + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + public java.util.List getEnumvalueList() { + return enumvalue_; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + public java.util.List + getEnumvalueOrBuilderList() { + return enumvalue_; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + public int getEnumvalueCount() { + return enumvalue_.size(); + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + public com.google.protobuf.EnumValue getEnumvalue(int index) { + return enumvalue_.get(index); + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + public com.google.protobuf.EnumValueOrBuilder getEnumvalueOrBuilder( + int index) { + return enumvalue_.get(index); + } + + public static final int OPTIONS_FIELD_NUMBER = 3; + private java.util.List options_; + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public java.util.List getOptionsList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public int getOptionsCount() { + return options_.size(); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + return options_.get(index); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + return options_.get(index); + } + + public static final int SOURCE_CONTEXT_FIELD_NUMBER = 4; + private com.google.protobuf.SourceContext sourceContext_; + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+   * The source context.
+   * 
+ */ + public boolean hasSourceContext() { + return sourceContext_ != null; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+   * The source context.
+   * 
+ */ + public com.google.protobuf.SourceContext getSourceContext() { + return sourceContext_ == null ? com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+   * The source context.
+   * 
+ */ + public com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder() { + return getSourceContext(); + } + + public static final int SYNTAX_FIELD_NUMBER = 5; + private int syntax_; + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+   * The source syntax.
+   * 
+ */ + public int getSyntaxValue() { + return syntax_; + } + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+   * The source syntax.
+   * 
+ */ + public com.google.protobuf.Syntax getSyntax() { + com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); + return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + for (int i = 0; i < enumvalue_.size(); i++) { + output.writeMessage(2, enumvalue_.get(i)); + } + for (int i = 0; i < options_.size(); i++) { + output.writeMessage(3, options_.get(i)); + } + if (sourceContext_ != null) { + output.writeMessage(4, getSourceContext()); + } + if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { + output.writeEnum(5, syntax_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + for (int i = 0; i < enumvalue_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, enumvalue_.get(i)); + } + for (int i = 0; i < options_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, options_.get(i)); + } + if (sourceContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getSourceContext()); + } + if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, syntax_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Enum)) { + return super.equals(obj); + } + com.google.protobuf.Enum other = (com.google.protobuf.Enum) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && getEnumvalueList() + .equals(other.getEnumvalueList()); + result = result && getOptionsList() + .equals(other.getOptionsList()); + result = result && (hasSourceContext() == other.hasSourceContext()); + if (hasSourceContext()) { + result = result && getSourceContext() + .equals(other.getSourceContext()); + } + result = result && syntax_ == other.syntax_; + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getEnumvalueCount() > 0) { + hash = (37 * hash) + ENUMVALUE_FIELD_NUMBER; + hash = (53 * hash) + getEnumvalueList().hashCode(); + } + if (getOptionsCount() > 0) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptionsList().hashCode(); + } + if (hasSourceContext()) { + hash = (37 * hash) + SOURCE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getSourceContext().hashCode(); + } + hash = (37 * hash) + SYNTAX_FIELD_NUMBER; + hash = (53 * hash) + syntax_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Enum parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Enum parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Enum parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Enum parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Enum parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Enum parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Enum parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Enum parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Enum parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Enum parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.Enum prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.Enum} + * + *
+   * Enum type definition.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Enum) + com.google.protobuf.EnumOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Enum.class, com.google.protobuf.Enum.Builder.class); + } + + // Construct using com.google.protobuf.Enum.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getEnumvalueFieldBuilder(); + getOptionsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (enumvalueBuilder_ == null) { + enumvalue_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + enumvalueBuilder_.clear(); + } + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + optionsBuilder_.clear(); + } + if (sourceContextBuilder_ == null) { + sourceContext_ = null; + } else { + sourceContext_ = null; + sourceContextBuilder_ = null; + } + syntax_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_descriptor; + } + + public com.google.protobuf.Enum getDefaultInstanceForType() { + return com.google.protobuf.Enum.getDefaultInstance(); + } + + public com.google.protobuf.Enum build() { + com.google.protobuf.Enum result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Enum buildPartial() { + com.google.protobuf.Enum result = new com.google.protobuf.Enum(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (enumvalueBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + enumvalue_ = java.util.Collections.unmodifiableList(enumvalue_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.enumvalue_ = enumvalue_; + } else { + result.enumvalue_ = enumvalueBuilder_.build(); + } + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + options_ = java.util.Collections.unmodifiableList(options_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + if (sourceContextBuilder_ == null) { + result.sourceContext_ = sourceContext_; + } else { + result.sourceContext_ = sourceContextBuilder_.build(); + } + result.syntax_ = syntax_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Enum) { + return mergeFrom((com.google.protobuf.Enum)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Enum other) { + if (other == com.google.protobuf.Enum.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (enumvalueBuilder_ == null) { + if (!other.enumvalue_.isEmpty()) { + if (enumvalue_.isEmpty()) { + enumvalue_ = other.enumvalue_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEnumvalueIsMutable(); + enumvalue_.addAll(other.enumvalue_); + } + onChanged(); + } + } else { + if (!other.enumvalue_.isEmpty()) { + if (enumvalueBuilder_.isEmpty()) { + enumvalueBuilder_.dispose(); + enumvalueBuilder_ = null; + enumvalue_ = other.enumvalue_; + bitField0_ = (bitField0_ & ~0x00000002); + enumvalueBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getEnumvalueFieldBuilder() : null; + } else { + enumvalueBuilder_.addAllMessages(other.enumvalue_); + } + } + } + if (optionsBuilder_ == null) { + if (!other.options_.isEmpty()) { + if (options_.isEmpty()) { + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureOptionsIsMutable(); + options_.addAll(other.options_); + } + onChanged(); + } + } else { + if (!other.options_.isEmpty()) { + if (optionsBuilder_.isEmpty()) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000004); + optionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOptionsFieldBuilder() : null; + } else { + optionsBuilder_.addAllMessages(other.options_); + } + } + } + if (other.hasSourceContext()) { + mergeSourceContext(other.getSourceContext()); + } + if (other.syntax_ != 0) { + setSyntaxValue(other.getSyntaxValue()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.Enum parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Enum) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * Enum type name.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * Enum type name.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * Enum type name.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * Enum type name.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * Enum type name.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List enumvalue_ = + java.util.Collections.emptyList(); + private void ensureEnumvalueIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + enumvalue_ = new java.util.ArrayList(enumvalue_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.EnumValue, com.google.protobuf.EnumValue.Builder, com.google.protobuf.EnumValueOrBuilder> enumvalueBuilder_; + + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public java.util.List getEnumvalueList() { + if (enumvalueBuilder_ == null) { + return java.util.Collections.unmodifiableList(enumvalue_); + } else { + return enumvalueBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public int getEnumvalueCount() { + if (enumvalueBuilder_ == null) { + return enumvalue_.size(); + } else { + return enumvalueBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public com.google.protobuf.EnumValue getEnumvalue(int index) { + if (enumvalueBuilder_ == null) { + return enumvalue_.get(index); + } else { + return enumvalueBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder setEnumvalue( + int index, com.google.protobuf.EnumValue value) { + if (enumvalueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumvalueIsMutable(); + enumvalue_.set(index, value); + onChanged(); + } else { + enumvalueBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder setEnumvalue( + int index, com.google.protobuf.EnumValue.Builder builderForValue) { + if (enumvalueBuilder_ == null) { + ensureEnumvalueIsMutable(); + enumvalue_.set(index, builderForValue.build()); + onChanged(); + } else { + enumvalueBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder addEnumvalue(com.google.protobuf.EnumValue value) { + if (enumvalueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumvalueIsMutable(); + enumvalue_.add(value); + onChanged(); + } else { + enumvalueBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder addEnumvalue( + int index, com.google.protobuf.EnumValue value) { + if (enumvalueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumvalueIsMutable(); + enumvalue_.add(index, value); + onChanged(); + } else { + enumvalueBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder addEnumvalue( + com.google.protobuf.EnumValue.Builder builderForValue) { + if (enumvalueBuilder_ == null) { + ensureEnumvalueIsMutable(); + enumvalue_.add(builderForValue.build()); + onChanged(); + } else { + enumvalueBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder addEnumvalue( + int index, com.google.protobuf.EnumValue.Builder builderForValue) { + if (enumvalueBuilder_ == null) { + ensureEnumvalueIsMutable(); + enumvalue_.add(index, builderForValue.build()); + onChanged(); + } else { + enumvalueBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder addAllEnumvalue( + java.lang.Iterable values) { + if (enumvalueBuilder_ == null) { + ensureEnumvalueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, enumvalue_); + onChanged(); + } else { + enumvalueBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder clearEnumvalue() { + if (enumvalueBuilder_ == null) { + enumvalue_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + enumvalueBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public Builder removeEnumvalue(int index) { + if (enumvalueBuilder_ == null) { + ensureEnumvalueIsMutable(); + enumvalue_.remove(index); + onChanged(); + } else { + enumvalueBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public com.google.protobuf.EnumValue.Builder getEnumvalueBuilder( + int index) { + return getEnumvalueFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public com.google.protobuf.EnumValueOrBuilder getEnumvalueOrBuilder( + int index) { + if (enumvalueBuilder_ == null) { + return enumvalue_.get(index); } else { + return enumvalueBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public java.util.List + getEnumvalueOrBuilderList() { + if (enumvalueBuilder_ != null) { + return enumvalueBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(enumvalue_); + } + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public com.google.protobuf.EnumValue.Builder addEnumvalueBuilder() { + return getEnumvalueFieldBuilder().addBuilder( + com.google.protobuf.EnumValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public com.google.protobuf.EnumValue.Builder addEnumvalueBuilder( + int index) { + return getEnumvalueFieldBuilder().addBuilder( + index, com.google.protobuf.EnumValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+     * Enum value definitions.
+     * 
+ */ + public java.util.List + getEnumvalueBuilderList() { + return getEnumvalueFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.EnumValue, com.google.protobuf.EnumValue.Builder, com.google.protobuf.EnumValueOrBuilder> + getEnumvalueFieldBuilder() { + if (enumvalueBuilder_ == null) { + enumvalueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.EnumValue, com.google.protobuf.EnumValue.Builder, com.google.protobuf.EnumValueOrBuilder>( + enumvalue_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + enumvalue_ = null; + } + return enumvalueBuilder_; + } + + private java.util.List options_ = + java.util.Collections.emptyList(); + private void ensureOptionsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + options_ = new java.util.ArrayList(options_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; + + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public java.util.List getOptionsList() { + if (optionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(options_); + } else { + return optionsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public int getOptionsCount() { + if (optionsBuilder_ == null) { + return options_.size(); + } else { + return optionsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + if (optionsBuilder_ == null) { + return options_.get(index); + } else { + return optionsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.set(index, value); + onChanged(); + } else { + optionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.set(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions(com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(value); + onChanged(); + } else { + optionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(index, value); + onChanged(); + } else { + optionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions( + com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addAllOptions( + java.lang.Iterable values) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, options_); + onChanged(); + } else { + optionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + optionsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder removeOptions(int index) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.remove(index); + onChanged(); + } else { + optionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder getOptionsBuilder( + int index) { + return getOptionsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + if (optionsBuilder_ == null) { + return options_.get(index); } else { + return optionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(options_); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder() { + return getOptionsFieldBuilder().addBuilder( + com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder( + int index) { + return getOptionsFieldBuilder().addBuilder( + index, com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public java.util.List + getOptionsBuilderList() { + return getOptionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( + options_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private com.google.protobuf.SourceContext sourceContext_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder> sourceContextBuilder_; + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public boolean hasSourceContext() { + return sourceContextBuilder_ != null || sourceContext_ != null; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public com.google.protobuf.SourceContext getSourceContext() { + if (sourceContextBuilder_ == null) { + return sourceContext_ == null ? com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; + } else { + return sourceContextBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public Builder setSourceContext(com.google.protobuf.SourceContext value) { + if (sourceContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceContext_ = value; + onChanged(); + } else { + sourceContextBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public Builder setSourceContext( + com.google.protobuf.SourceContext.Builder builderForValue) { + if (sourceContextBuilder_ == null) { + sourceContext_ = builderForValue.build(); + onChanged(); + } else { + sourceContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public Builder mergeSourceContext(com.google.protobuf.SourceContext value) { + if (sourceContextBuilder_ == null) { + if (sourceContext_ != null) { + sourceContext_ = + com.google.protobuf.SourceContext.newBuilder(sourceContext_).mergeFrom(value).buildPartial(); + } else { + sourceContext_ = value; + } + onChanged(); + } else { + sourceContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public Builder clearSourceContext() { + if (sourceContextBuilder_ == null) { + sourceContext_ = null; + onChanged(); + } else { + sourceContext_ = null; + sourceContextBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public com.google.protobuf.SourceContext.Builder getSourceContextBuilder() { + + onChanged(); + return getSourceContextFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + public com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder() { + if (sourceContextBuilder_ != null) { + return sourceContextBuilder_.getMessageOrBuilder(); + } else { + return sourceContext_ == null ? + com.google.protobuf.SourceContext.getDefaultInstance() : sourceContext_; + } + } + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+     * The source context.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder> + getSourceContextFieldBuilder() { + if (sourceContextBuilder_ == null) { + sourceContextBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.SourceContext, com.google.protobuf.SourceContext.Builder, com.google.protobuf.SourceContextOrBuilder>( + getSourceContext(), + getParentForChildren(), + isClean()); + sourceContext_ = null; + } + return sourceContextBuilder_; + } + + private int syntax_ = 0; + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+     * The source syntax.
+     * 
+ */ + public int getSyntaxValue() { + return syntax_; + } + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+     * The source syntax.
+     * 
+ */ + public Builder setSyntaxValue(int value) { + syntax_ = value; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+     * The source syntax.
+     * 
+ */ + public com.google.protobuf.Syntax getSyntax() { + com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); + return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; + } + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+     * The source syntax.
+     * 
+ */ + public Builder setSyntax(com.google.protobuf.Syntax value) { + if (value == null) { + throw new NullPointerException(); + } + + syntax_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+     * The source syntax.
+     * 
+ */ + public Builder clearSyntax() { + + syntax_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.Enum) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Enum) + private static final com.google.protobuf.Enum DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Enum(); + } + + public static com.google.protobuf.Enum getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Enum parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Enum(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.Enum getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EnumOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EnumOrBuilder.java new file mode 100644 index 000000000000..b5e2686e6758 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EnumOrBuilder.java @@ -0,0 +1,157 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +public interface EnumOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Enum) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * Enum type name.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * Enum type name.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + java.util.List + getEnumvalueList(); + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + com.google.protobuf.EnumValue getEnumvalue(int index); + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + int getEnumvalueCount(); + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + java.util.List + getEnumvalueOrBuilderList(); + /** + * repeated .google.protobuf.EnumValue enumvalue = 2; + * + *
+   * Enum value definitions.
+   * 
+ */ + com.google.protobuf.EnumValueOrBuilder getEnumvalueOrBuilder( + int index); + + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + java.util.List + getOptionsList(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + com.google.protobuf.Option getOptions(int index); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + int getOptionsCount(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + java.util.List + getOptionsOrBuilderList(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index); + + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+   * The source context.
+   * 
+ */ + boolean hasSourceContext(); + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+   * The source context.
+   * 
+ */ + com.google.protobuf.SourceContext getSourceContext(); + /** + * optional .google.protobuf.SourceContext source_context = 4; + * + *
+   * The source context.
+   * 
+ */ + com.google.protobuf.SourceContextOrBuilder getSourceContextOrBuilder(); + + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+   * The source syntax.
+   * 
+ */ + int getSyntaxValue(); + /** + * optional .google.protobuf.Syntax syntax = 5; + * + *
+   * The source syntax.
+   * 
+ */ + com.google.protobuf.Syntax getSyntax(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EnumValue.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EnumValue.java new file mode 100644 index 000000000000..30403d2ad07c --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EnumValue.java @@ -0,0 +1,1019 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.EnumValue} + * + *
+ * Enum value definition.
+ * 
+ */ +public final class EnumValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.EnumValue) + EnumValueOrBuilder { + // Use EnumValue.newBuilder() to construct. + private EnumValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private EnumValue() { + name_ = ""; + number_ = 0; + options_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private EnumValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + number_ = input.readInt32(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + options_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + options_ = java.util.Collections.unmodifiableList(options_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.EnumValue.class, com.google.protobuf.EnumValue.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * Enum value name.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * Enum value name.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NUMBER_FIELD_NUMBER = 2; + private int number_; + /** + * optional int32 number = 2; + * + *
+   * Enum value number.
+   * 
+ */ + public int getNumber() { + return number_; + } + + public static final int OPTIONS_FIELD_NUMBER = 3; + private java.util.List options_; + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public java.util.List getOptionsList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public int getOptionsCount() { + return options_.size(); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + return options_.get(index); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + return options_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (number_ != 0) { + output.writeInt32(2, number_); + } + for (int i = 0; i < options_.size(); i++) { + output.writeMessage(3, options_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (number_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, number_); + } + for (int i = 0; i < options_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, options_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.EnumValue)) { + return super.equals(obj); + } + com.google.protobuf.EnumValue other = (com.google.protobuf.EnumValue) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && (getNumber() + == other.getNumber()); + result = result && getOptionsList() + .equals(other.getOptionsList()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getNumber(); + if (getOptionsCount() > 0) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.EnumValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.EnumValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.EnumValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.EnumValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.EnumValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.EnumValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.EnumValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.EnumValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.EnumValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.EnumValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.EnumValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.EnumValue} + * + *
+   * Enum value definition.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.EnumValue) + com.google.protobuf.EnumValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.EnumValue.class, com.google.protobuf.EnumValue.Builder.class); + } + + // Construct using com.google.protobuf.EnumValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getOptionsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + number_ = 0; + + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + optionsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_descriptor; + } + + public com.google.protobuf.EnumValue getDefaultInstanceForType() { + return com.google.protobuf.EnumValue.getDefaultInstance(); + } + + public com.google.protobuf.EnumValue build() { + com.google.protobuf.EnumValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.EnumValue buildPartial() { + com.google.protobuf.EnumValue result = new com.google.protobuf.EnumValue(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + result.number_ = number_; + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + options_ = java.util.Collections.unmodifiableList(options_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.EnumValue) { + return mergeFrom((com.google.protobuf.EnumValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.EnumValue other) { + if (other == com.google.protobuf.EnumValue.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getNumber() != 0) { + setNumber(other.getNumber()); + } + if (optionsBuilder_ == null) { + if (!other.options_.isEmpty()) { + if (options_.isEmpty()) { + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureOptionsIsMutable(); + options_.addAll(other.options_); + } + onChanged(); + } + } else { + if (!other.options_.isEmpty()) { + if (optionsBuilder_.isEmpty()) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000004); + optionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOptionsFieldBuilder() : null; + } else { + optionsBuilder_.addAllMessages(other.options_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.EnumValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.EnumValue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * Enum value name.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * Enum value name.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * Enum value name.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * Enum value name.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * Enum value name.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int number_ ; + /** + * optional int32 number = 2; + * + *
+     * Enum value number.
+     * 
+ */ + public int getNumber() { + return number_; + } + /** + * optional int32 number = 2; + * + *
+     * Enum value number.
+     * 
+ */ + public Builder setNumber(int value) { + + number_ = value; + onChanged(); + return this; + } + /** + * optional int32 number = 2; + * + *
+     * Enum value number.
+     * 
+ */ + public Builder clearNumber() { + + number_ = 0; + onChanged(); + return this; + } + + private java.util.List options_ = + java.util.Collections.emptyList(); + private void ensureOptionsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + options_ = new java.util.ArrayList(options_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; + + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public java.util.List getOptionsList() { + if (optionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(options_); + } else { + return optionsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public int getOptionsCount() { + if (optionsBuilder_ == null) { + return options_.size(); + } else { + return optionsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + if (optionsBuilder_ == null) { + return options_.get(index); + } else { + return optionsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.set(index, value); + onChanged(); + } else { + optionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.set(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions(com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(value); + onChanged(); + } else { + optionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(index, value); + onChanged(); + } else { + optionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions( + com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder addAllOptions( + java.lang.Iterable values) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, options_); + onChanged(); + } else { + optionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + optionsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public Builder removeOptions(int index) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.remove(index); + onChanged(); + } else { + optionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder getOptionsBuilder( + int index) { + return getOptionsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + if (optionsBuilder_ == null) { + return options_.get(index); } else { + return optionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(options_); + } + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder() { + return getOptionsFieldBuilder().addBuilder( + com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder( + int index) { + return getOptionsFieldBuilder().addBuilder( + index, com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 3; + * + *
+     * Protocol buffer options.
+     * 
+ */ + public java.util.List + getOptionsBuilderList() { + return getOptionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( + options_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.EnumValue) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.EnumValue) + private static final com.google.protobuf.EnumValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.EnumValue(); + } + + public static com.google.protobuf.EnumValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public EnumValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new EnumValue(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.EnumValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EnumValueOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EnumValueOrBuilder.java new file mode 100644 index 000000000000..580ca1116e27 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/EnumValueOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +public interface EnumValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.EnumValue) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * Enum value name.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * Enum value name.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional int32 number = 2; + * + *
+   * Enum value number.
+   * 
+ */ + int getNumber(); + + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + java.util.List + getOptionsList(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + com.google.protobuf.Option getOptions(int index); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + int getOptionsCount(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + java.util.List + getOptionsOrBuilderList(); + /** + * repeated .google.protobuf.Option options = 3; + * + *
+   * Protocol buffer options.
+   * 
+ */ + com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Field.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Field.java new file mode 100644 index 000000000000..ce6e5f426ae9 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Field.java @@ -0,0 +1,2413 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Field} + * + *
+ * A single field of a message type.
+ * 
+ */ +public final class Field extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Field) + FieldOrBuilder { + // Use Field.newBuilder() to construct. + private Field(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Field() { + kind_ = 0; + cardinality_ = 0; + number_ = 0; + name_ = ""; + typeUrl_ = ""; + oneofIndex_ = 0; + packed_ = false; + options_ = java.util.Collections.emptyList(); + jsonName_ = ""; + defaultValue_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Field( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + + kind_ = rawValue; + break; + } + case 16: { + int rawValue = input.readEnum(); + + cardinality_ = rawValue; + break; + } + case 24: { + + number_ = input.readInt32(); + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 50: { + String s = input.readStringRequireUtf8(); + + typeUrl_ = s; + break; + } + case 56: { + + oneofIndex_ = input.readInt32(); + break; + } + case 64: { + + packed_ = input.readBool(); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + options_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000080; + } + options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); + break; + } + case 82: { + String s = input.readStringRequireUtf8(); + + jsonName_ = s; + break; + } + case 90: { + String s = input.readStringRequireUtf8(); + + defaultValue_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + options_ = java.util.Collections.unmodifiableList(options_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Field.class, com.google.protobuf.Field.Builder.class); + } + + /** + * Protobuf enum {@code google.protobuf.Field.Kind} + * + *
+   * Basic field types.
+   * 
+ */ + public enum Kind + implements com.google.protobuf.ProtocolMessageEnum { + /** + * TYPE_UNKNOWN = 0; + * + *
+     * Field type unknown.
+     * 
+ */ + TYPE_UNKNOWN(0, 0), + /** + * TYPE_DOUBLE = 1; + * + *
+     * Field type double.
+     * 
+ */ + TYPE_DOUBLE(1, 1), + /** + * TYPE_FLOAT = 2; + * + *
+     * Field type float.
+     * 
+ */ + TYPE_FLOAT(2, 2), + /** + * TYPE_INT64 = 3; + * + *
+     * Field type int64.
+     * 
+ */ + TYPE_INT64(3, 3), + /** + * TYPE_UINT64 = 4; + * + *
+     * Field type uint64.
+     * 
+ */ + TYPE_UINT64(4, 4), + /** + * TYPE_INT32 = 5; + * + *
+     * Field type int32.
+     * 
+ */ + TYPE_INT32(5, 5), + /** + * TYPE_FIXED64 = 6; + * + *
+     * Field type fixed64.
+     * 
+ */ + TYPE_FIXED64(6, 6), + /** + * TYPE_FIXED32 = 7; + * + *
+     * Field type fixed32.
+     * 
+ */ + TYPE_FIXED32(7, 7), + /** + * TYPE_BOOL = 8; + * + *
+     * Field type bool.
+     * 
+ */ + TYPE_BOOL(8, 8), + /** + * TYPE_STRING = 9; + * + *
+     * Field type string.
+     * 
+ */ + TYPE_STRING(9, 9), + /** + * TYPE_GROUP = 10; + * + *
+     * Field type group. Proto2 syntax only, and deprecated.
+     * 
+ */ + TYPE_GROUP(10, 10), + /** + * TYPE_MESSAGE = 11; + * + *
+     * Field type message.
+     * 
+ */ + TYPE_MESSAGE(11, 11), + /** + * TYPE_BYTES = 12; + * + *
+     * Field type bytes.
+     * 
+ */ + TYPE_BYTES(12, 12), + /** + * TYPE_UINT32 = 13; + * + *
+     * Field type uint32.
+     * 
+ */ + TYPE_UINT32(13, 13), + /** + * TYPE_ENUM = 14; + * + *
+     * Field type enum.
+     * 
+ */ + TYPE_ENUM(14, 14), + /** + * TYPE_SFIXED32 = 15; + * + *
+     * Field type sfixed32.
+     * 
+ */ + TYPE_SFIXED32(15, 15), + /** + * TYPE_SFIXED64 = 16; + * + *
+     * Field type sfixed64.
+     * 
+ */ + TYPE_SFIXED64(16, 16), + /** + * TYPE_SINT32 = 17; + * + *
+     * Field type sint32.
+     * 
+ */ + TYPE_SINT32(17, 17), + /** + * TYPE_SINT64 = 18; + * + *
+     * Field type sint64.
+     * 
+ */ + TYPE_SINT64(18, 18), + UNRECOGNIZED(-1, -1), + ; + + /** + * TYPE_UNKNOWN = 0; + * + *
+     * Field type unknown.
+     * 
+ */ + public static final int TYPE_UNKNOWN_VALUE = 0; + /** + * TYPE_DOUBLE = 1; + * + *
+     * Field type double.
+     * 
+ */ + public static final int TYPE_DOUBLE_VALUE = 1; + /** + * TYPE_FLOAT = 2; + * + *
+     * Field type float.
+     * 
+ */ + public static final int TYPE_FLOAT_VALUE = 2; + /** + * TYPE_INT64 = 3; + * + *
+     * Field type int64.
+     * 
+ */ + public static final int TYPE_INT64_VALUE = 3; + /** + * TYPE_UINT64 = 4; + * + *
+     * Field type uint64.
+     * 
+ */ + public static final int TYPE_UINT64_VALUE = 4; + /** + * TYPE_INT32 = 5; + * + *
+     * Field type int32.
+     * 
+ */ + public static final int TYPE_INT32_VALUE = 5; + /** + * TYPE_FIXED64 = 6; + * + *
+     * Field type fixed64.
+     * 
+ */ + public static final int TYPE_FIXED64_VALUE = 6; + /** + * TYPE_FIXED32 = 7; + * + *
+     * Field type fixed32.
+     * 
+ */ + public static final int TYPE_FIXED32_VALUE = 7; + /** + * TYPE_BOOL = 8; + * + *
+     * Field type bool.
+     * 
+ */ + public static final int TYPE_BOOL_VALUE = 8; + /** + * TYPE_STRING = 9; + * + *
+     * Field type string.
+     * 
+ */ + public static final int TYPE_STRING_VALUE = 9; + /** + * TYPE_GROUP = 10; + * + *
+     * Field type group. Proto2 syntax only, and deprecated.
+     * 
+ */ + public static final int TYPE_GROUP_VALUE = 10; + /** + * TYPE_MESSAGE = 11; + * + *
+     * Field type message.
+     * 
+ */ + public static final int TYPE_MESSAGE_VALUE = 11; + /** + * TYPE_BYTES = 12; + * + *
+     * Field type bytes.
+     * 
+ */ + public static final int TYPE_BYTES_VALUE = 12; + /** + * TYPE_UINT32 = 13; + * + *
+     * Field type uint32.
+     * 
+ */ + public static final int TYPE_UINT32_VALUE = 13; + /** + * TYPE_ENUM = 14; + * + *
+     * Field type enum.
+     * 
+ */ + public static final int TYPE_ENUM_VALUE = 14; + /** + * TYPE_SFIXED32 = 15; + * + *
+     * Field type sfixed32.
+     * 
+ */ + public static final int TYPE_SFIXED32_VALUE = 15; + /** + * TYPE_SFIXED64 = 16; + * + *
+     * Field type sfixed64.
+     * 
+ */ + public static final int TYPE_SFIXED64_VALUE = 16; + /** + * TYPE_SINT32 = 17; + * + *
+     * Field type sint32.
+     * 
+ */ + public static final int TYPE_SINT32_VALUE = 17; + /** + * TYPE_SINT64 = 18; + * + *
+     * Field type sint64.
+     * 
+ */ + public static final int TYPE_SINT64_VALUE = 18; + + + public final int getNumber() { + if (index == -1) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + public static Kind valueOf(int value) { + switch (value) { + case 0: return TYPE_UNKNOWN; + case 1: return TYPE_DOUBLE; + case 2: return TYPE_FLOAT; + case 3: return TYPE_INT64; + case 4: return TYPE_UINT64; + case 5: return TYPE_INT32; + case 6: return TYPE_FIXED64; + case 7: return TYPE_FIXED32; + case 8: return TYPE_BOOL; + case 9: return TYPE_STRING; + case 10: return TYPE_GROUP; + case 11: return TYPE_MESSAGE; + case 12: return TYPE_BYTES; + case 13: return TYPE_UINT32; + case 14: return TYPE_ENUM; + case 15: return TYPE_SFIXED32; + case 16: return TYPE_SFIXED64; + case 17: return TYPE_SINT32; + case 18: return TYPE_SINT64; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Kind> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Kind findValueByNumber(int number) { + return Kind.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.protobuf.Field.getDescriptor().getEnumTypes().get(0); + } + + private static final Kind[] VALUES = values(); + + public static Kind valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Kind(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.protobuf.Field.Kind) + } + + /** + * Protobuf enum {@code google.protobuf.Field.Cardinality} + * + *
+   * Whether a field is optional, required, or repeated.
+   * 
+ */ + public enum Cardinality + implements com.google.protobuf.ProtocolMessageEnum { + /** + * CARDINALITY_UNKNOWN = 0; + * + *
+     * For fields with unknown cardinality.
+     * 
+ */ + CARDINALITY_UNKNOWN(0, 0), + /** + * CARDINALITY_OPTIONAL = 1; + * + *
+     * For optional fields.
+     * 
+ */ + CARDINALITY_OPTIONAL(1, 1), + /** + * CARDINALITY_REQUIRED = 2; + * + *
+     * For required fields. Proto2 syntax only.
+     * 
+ */ + CARDINALITY_REQUIRED(2, 2), + /** + * CARDINALITY_REPEATED = 3; + * + *
+     * For repeated fields.
+     * 
+ */ + CARDINALITY_REPEATED(3, 3), + UNRECOGNIZED(-1, -1), + ; + + /** + * CARDINALITY_UNKNOWN = 0; + * + *
+     * For fields with unknown cardinality.
+     * 
+ */ + public static final int CARDINALITY_UNKNOWN_VALUE = 0; + /** + * CARDINALITY_OPTIONAL = 1; + * + *
+     * For optional fields.
+     * 
+ */ + public static final int CARDINALITY_OPTIONAL_VALUE = 1; + /** + * CARDINALITY_REQUIRED = 2; + * + *
+     * For required fields. Proto2 syntax only.
+     * 
+ */ + public static final int CARDINALITY_REQUIRED_VALUE = 2; + /** + * CARDINALITY_REPEATED = 3; + * + *
+     * For repeated fields.
+     * 
+ */ + public static final int CARDINALITY_REPEATED_VALUE = 3; + + + public final int getNumber() { + if (index == -1) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + public static Cardinality valueOf(int value) { + switch (value) { + case 0: return CARDINALITY_UNKNOWN; + case 1: return CARDINALITY_OPTIONAL; + case 2: return CARDINALITY_REQUIRED; + case 3: return CARDINALITY_REPEATED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Cardinality> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Cardinality findValueByNumber(int number) { + return Cardinality.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.protobuf.Field.getDescriptor().getEnumTypes().get(1); + } + + private static final Cardinality[] VALUES = values(); + + public static Cardinality valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Cardinality(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.protobuf.Field.Cardinality) + } + + private int bitField0_; + public static final int KIND_FIELD_NUMBER = 1; + private int kind_; + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+   * The field type.
+   * 
+ */ + public int getKindValue() { + return kind_; + } + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+   * The field type.
+   * 
+ */ + public com.google.protobuf.Field.Kind getKind() { + com.google.protobuf.Field.Kind result = com.google.protobuf.Field.Kind.valueOf(kind_); + return result == null ? com.google.protobuf.Field.Kind.UNRECOGNIZED : result; + } + + public static final int CARDINALITY_FIELD_NUMBER = 2; + private int cardinality_; + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+   * The field cardinality.
+   * 
+ */ + public int getCardinalityValue() { + return cardinality_; + } + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+   * The field cardinality.
+   * 
+ */ + public com.google.protobuf.Field.Cardinality getCardinality() { + com.google.protobuf.Field.Cardinality result = com.google.protobuf.Field.Cardinality.valueOf(cardinality_); + return result == null ? com.google.protobuf.Field.Cardinality.UNRECOGNIZED : result; + } + + public static final int NUMBER_FIELD_NUMBER = 3; + private int number_; + /** + * optional int32 number = 3; + * + *
+   * The field number.
+   * 
+ */ + public int getNumber() { + return number_; + } + + public static final int NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object name_; + /** + * optional string name = 4; + * + *
+   * The field name.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 4; + * + *
+   * The field name.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_URL_FIELD_NUMBER = 6; + private volatile java.lang.Object typeUrl_; + /** + * optional string type_url = 6; + * + *
+   * The field type URL, without the scheme, for message or enumeration
+   * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+   * 
+ */ + public java.lang.String getTypeUrl() { + java.lang.Object ref = typeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeUrl_ = s; + return s; + } + } + /** + * optional string type_url = 6; + * + *
+   * The field type URL, without the scheme, for message or enumeration
+   * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+   * 
+ */ + public com.google.protobuf.ByteString + getTypeUrlBytes() { + java.lang.Object ref = typeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ONEOF_INDEX_FIELD_NUMBER = 7; + private int oneofIndex_; + /** + * optional int32 oneof_index = 7; + * + *
+   * The index of the field type in `Type.oneofs`, for message or enumeration
+   * types. The first type has index 1; zero means the type is not in the list.
+   * 
+ */ + public int getOneofIndex() { + return oneofIndex_; + } + + public static final int PACKED_FIELD_NUMBER = 8; + private boolean packed_; + /** + * optional bool packed = 8; + * + *
+   * Whether to use alternative packed wire representation.
+   * 
+ */ + public boolean getPacked() { + return packed_; + } + + public static final int OPTIONS_FIELD_NUMBER = 9; + private java.util.List options_; + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + public java.util.List getOptionsList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + public int getOptionsCount() { + return options_.size(); + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + return options_.get(index); + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + return options_.get(index); + } + + public static final int JSON_NAME_FIELD_NUMBER = 10; + private volatile java.lang.Object jsonName_; + /** + * optional string json_name = 10; + * + *
+   * The field JSON name.
+   * 
+ */ + public java.lang.String getJsonName() { + java.lang.Object ref = jsonName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonName_ = s; + return s; + } + } + /** + * optional string json_name = 10; + * + *
+   * The field JSON name.
+   * 
+ */ + public com.google.protobuf.ByteString + getJsonNameBytes() { + java.lang.Object ref = jsonName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jsonName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_VALUE_FIELD_NUMBER = 11; + private volatile java.lang.Object defaultValue_; + /** + * optional string default_value = 11; + * + *
+   * The string value of the default value of this field. Proto2 syntax only.
+   * 
+ */ + public java.lang.String getDefaultValue() { + java.lang.Object ref = defaultValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultValue_ = s; + return s; + } + } + /** + * optional string default_value = 11; + * + *
+   * The string value of the default value of this field. Proto2 syntax only.
+   * 
+ */ + public com.google.protobuf.ByteString + getDefaultValueBytes() { + java.lang.Object ref = defaultValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (kind_ != com.google.protobuf.Field.Kind.TYPE_UNKNOWN.getNumber()) { + output.writeEnum(1, kind_); + } + if (cardinality_ != com.google.protobuf.Field.Cardinality.CARDINALITY_UNKNOWN.getNumber()) { + output.writeEnum(2, cardinality_); + } + if (number_ != 0) { + output.writeInt32(3, number_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, name_); + } + if (!getTypeUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, typeUrl_); + } + if (oneofIndex_ != 0) { + output.writeInt32(7, oneofIndex_); + } + if (packed_ != false) { + output.writeBool(8, packed_); + } + for (int i = 0; i < options_.size(); i++) { + output.writeMessage(9, options_.get(i)); + } + if (!getJsonNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, jsonName_); + } + if (!getDefaultValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, defaultValue_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kind_ != com.google.protobuf.Field.Kind.TYPE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, kind_); + } + if (cardinality_ != com.google.protobuf.Field.Cardinality.CARDINALITY_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, cardinality_); + } + if (number_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, number_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, name_); + } + if (!getTypeUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, typeUrl_); + } + if (oneofIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, oneofIndex_); + } + if (packed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, packed_); + } + for (int i = 0; i < options_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, options_.get(i)); + } + if (!getJsonNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, jsonName_); + } + if (!getDefaultValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, defaultValue_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Field)) { + return super.equals(obj); + } + com.google.protobuf.Field other = (com.google.protobuf.Field) obj; + + boolean result = true; + result = result && kind_ == other.kind_; + result = result && cardinality_ == other.cardinality_; + result = result && (getNumber() + == other.getNumber()); + result = result && getName() + .equals(other.getName()); + result = result && getTypeUrl() + .equals(other.getTypeUrl()); + result = result && (getOneofIndex() + == other.getOneofIndex()); + result = result && (getPacked() + == other.getPacked()); + result = result && getOptionsList() + .equals(other.getOptionsList()); + result = result && getJsonName() + .equals(other.getJsonName()); + result = result && getDefaultValue() + .equals(other.getDefaultValue()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + hash = (37 * hash) + CARDINALITY_FIELD_NUMBER; + hash = (53 * hash) + cardinality_; + hash = (37 * hash) + NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getNumber(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_URL_FIELD_NUMBER; + hash = (53 * hash) + getTypeUrl().hashCode(); + hash = (37 * hash) + ONEOF_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getOneofIndex(); + hash = (37 * hash) + PACKED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPacked()); + if (getOptionsCount() > 0) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptionsList().hashCode(); + } + hash = (37 * hash) + JSON_NAME_FIELD_NUMBER; + hash = (53 * hash) + getJsonName().hashCode(); + hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Field parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Field parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Field parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Field parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Field parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Field parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Field parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Field parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Field parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.Field prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.Field} + * + *
+   * A single field of a message type.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Field) + com.google.protobuf.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Field.class, com.google.protobuf.Field.Builder.class); + } + + // Construct using com.google.protobuf.Field.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getOptionsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + kind_ = 0; + + cardinality_ = 0; + + number_ = 0; + + name_ = ""; + + typeUrl_ = ""; + + oneofIndex_ = 0; + + packed_ = false; + + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + } else { + optionsBuilder_.clear(); + } + jsonName_ = ""; + + defaultValue_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_descriptor; + } + + public com.google.protobuf.Field getDefaultInstanceForType() { + return com.google.protobuf.Field.getDefaultInstance(); + } + + public com.google.protobuf.Field build() { + com.google.protobuf.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Field buildPartial() { + com.google.protobuf.Field result = new com.google.protobuf.Field(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.kind_ = kind_; + result.cardinality_ = cardinality_; + result.number_ = number_; + result.name_ = name_; + result.typeUrl_ = typeUrl_; + result.oneofIndex_ = oneofIndex_; + result.packed_ = packed_; + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { + options_ = java.util.Collections.unmodifiableList(options_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + result.jsonName_ = jsonName_; + result.defaultValue_ = defaultValue_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Field) { + return mergeFrom((com.google.protobuf.Field)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Field other) { + if (other == com.google.protobuf.Field.getDefaultInstance()) return this; + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (other.cardinality_ != 0) { + setCardinalityValue(other.getCardinalityValue()); + } + if (other.getNumber() != 0) { + setNumber(other.getNumber()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getTypeUrl().isEmpty()) { + typeUrl_ = other.typeUrl_; + onChanged(); + } + if (other.getOneofIndex() != 0) { + setOneofIndex(other.getOneofIndex()); + } + if (other.getPacked() != false) { + setPacked(other.getPacked()); + } + if (optionsBuilder_ == null) { + if (!other.options_.isEmpty()) { + if (options_.isEmpty()) { + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureOptionsIsMutable(); + options_.addAll(other.options_); + } + onChanged(); + } + } else { + if (!other.options_.isEmpty()) { + if (optionsBuilder_.isEmpty()) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000080); + optionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOptionsFieldBuilder() : null; + } else { + optionsBuilder_.addAllMessages(other.options_); + } + } + } + if (!other.getJsonName().isEmpty()) { + jsonName_ = other.jsonName_; + onChanged(); + } + if (!other.getDefaultValue().isEmpty()) { + defaultValue_ = other.defaultValue_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.Field parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Field) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int kind_ = 0; + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+     * The field type.
+     * 
+ */ + public int getKindValue() { + return kind_; + } + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+     * The field type.
+     * 
+ */ + public Builder setKindValue(int value) { + kind_ = value; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+     * The field type.
+     * 
+ */ + public com.google.protobuf.Field.Kind getKind() { + com.google.protobuf.Field.Kind result = com.google.protobuf.Field.Kind.valueOf(kind_); + return result == null ? com.google.protobuf.Field.Kind.UNRECOGNIZED : result; + } + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+     * The field type.
+     * 
+ */ + public Builder setKind(com.google.protobuf.Field.Kind value) { + if (value == null) { + throw new NullPointerException(); + } + + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+     * The field type.
+     * 
+ */ + public Builder clearKind() { + + kind_ = 0; + onChanged(); + return this; + } + + private int cardinality_ = 0; + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+     * The field cardinality.
+     * 
+ */ + public int getCardinalityValue() { + return cardinality_; + } + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+     * The field cardinality.
+     * 
+ */ + public Builder setCardinalityValue(int value) { + cardinality_ = value; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+     * The field cardinality.
+     * 
+ */ + public com.google.protobuf.Field.Cardinality getCardinality() { + com.google.protobuf.Field.Cardinality result = com.google.protobuf.Field.Cardinality.valueOf(cardinality_); + return result == null ? com.google.protobuf.Field.Cardinality.UNRECOGNIZED : result; + } + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+     * The field cardinality.
+     * 
+ */ + public Builder setCardinality(com.google.protobuf.Field.Cardinality value) { + if (value == null) { + throw new NullPointerException(); + } + + cardinality_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+     * The field cardinality.
+     * 
+ */ + public Builder clearCardinality() { + + cardinality_ = 0; + onChanged(); + return this; + } + + private int number_ ; + /** + * optional int32 number = 3; + * + *
+     * The field number.
+     * 
+ */ + public int getNumber() { + return number_; + } + /** + * optional int32 number = 3; + * + *
+     * The field number.
+     * 
+ */ + public Builder setNumber(int value) { + + number_ = value; + onChanged(); + return this; + } + /** + * optional int32 number = 3; + * + *
+     * The field number.
+     * 
+ */ + public Builder clearNumber() { + + number_ = 0; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 4; + * + *
+     * The field name.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 4; + * + *
+     * The field name.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 4; + * + *
+     * The field name.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 4; + * + *
+     * The field name.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 4; + * + *
+     * The field name.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object typeUrl_ = ""; + /** + * optional string type_url = 6; + * + *
+     * The field type URL, without the scheme, for message or enumeration
+     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+     * 
+ */ + public java.lang.String getTypeUrl() { + java.lang.Object ref = typeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string type_url = 6; + * + *
+     * The field type URL, without the scheme, for message or enumeration
+     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+     * 
+ */ + public com.google.protobuf.ByteString + getTypeUrlBytes() { + java.lang.Object ref = typeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string type_url = 6; + * + *
+     * The field type URL, without the scheme, for message or enumeration
+     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+     * 
+ */ + public Builder setTypeUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + typeUrl_ = value; + onChanged(); + return this; + } + /** + * optional string type_url = 6; + * + *
+     * The field type URL, without the scheme, for message or enumeration
+     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+     * 
+ */ + public Builder clearTypeUrl() { + + typeUrl_ = getDefaultInstance().getTypeUrl(); + onChanged(); + return this; + } + /** + * optional string type_url = 6; + * + *
+     * The field type URL, without the scheme, for message or enumeration
+     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+     * 
+ */ + public Builder setTypeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + typeUrl_ = value; + onChanged(); + return this; + } + + private int oneofIndex_ ; + /** + * optional int32 oneof_index = 7; + * + *
+     * The index of the field type in `Type.oneofs`, for message or enumeration
+     * types. The first type has index 1; zero means the type is not in the list.
+     * 
+ */ + public int getOneofIndex() { + return oneofIndex_; + } + /** + * optional int32 oneof_index = 7; + * + *
+     * The index of the field type in `Type.oneofs`, for message or enumeration
+     * types. The first type has index 1; zero means the type is not in the list.
+     * 
+ */ + public Builder setOneofIndex(int value) { + + oneofIndex_ = value; + onChanged(); + return this; + } + /** + * optional int32 oneof_index = 7; + * + *
+     * The index of the field type in `Type.oneofs`, for message or enumeration
+     * types. The first type has index 1; zero means the type is not in the list.
+     * 
+ */ + public Builder clearOneofIndex() { + + oneofIndex_ = 0; + onChanged(); + return this; + } + + private boolean packed_ ; + /** + * optional bool packed = 8; + * + *
+     * Whether to use alternative packed wire representation.
+     * 
+ */ + public boolean getPacked() { + return packed_; + } + /** + * optional bool packed = 8; + * + *
+     * Whether to use alternative packed wire representation.
+     * 
+ */ + public Builder setPacked(boolean value) { + + packed_ = value; + onChanged(); + return this; + } + /** + * optional bool packed = 8; + * + *
+     * Whether to use alternative packed wire representation.
+     * 
+ */ + public Builder clearPacked() { + + packed_ = false; + onChanged(); + return this; + } + + private java.util.List options_ = + java.util.Collections.emptyList(); + private void ensureOptionsIsMutable() { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { + options_ = new java.util.ArrayList(options_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; + + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public java.util.List getOptionsList() { + if (optionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(options_); + } else { + return optionsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public int getOptionsCount() { + if (optionsBuilder_ == null) { + return options_.size(); + } else { + return optionsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + if (optionsBuilder_ == null) { + return options_.get(index); + } else { + return optionsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.set(index, value); + onChanged(); + } else { + optionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.set(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder addOptions(com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(value); + onChanged(); + } else { + optionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(index, value); + onChanged(); + } else { + optionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder addOptions( + com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder addAllOptions( + java.lang.Iterable values) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, options_); + onChanged(); + } else { + optionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + optionsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public Builder removeOptions(int index) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.remove(index); + onChanged(); + } else { + optionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder getOptionsBuilder( + int index) { + return getOptionsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + if (optionsBuilder_ == null) { + return options_.get(index); } else { + return optionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(options_); + } + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder() { + return getOptionsFieldBuilder().addBuilder( + com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder( + int index) { + return getOptionsFieldBuilder().addBuilder( + index, com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 9; + * + *
+     * The protocol buffer options.
+     * 
+ */ + public java.util.List + getOptionsBuilderList() { + return getOptionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( + options_, + ((bitField0_ & 0x00000080) == 0x00000080), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private java.lang.Object jsonName_ = ""; + /** + * optional string json_name = 10; + * + *
+     * The field JSON name.
+     * 
+ */ + public java.lang.String getJsonName() { + java.lang.Object ref = jsonName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string json_name = 10; + * + *
+     * The field JSON name.
+     * 
+ */ + public com.google.protobuf.ByteString + getJsonNameBytes() { + java.lang.Object ref = jsonName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jsonName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string json_name = 10; + * + *
+     * The field JSON name.
+     * 
+ */ + public Builder setJsonName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jsonName_ = value; + onChanged(); + return this; + } + /** + * optional string json_name = 10; + * + *
+     * The field JSON name.
+     * 
+ */ + public Builder clearJsonName() { + + jsonName_ = getDefaultInstance().getJsonName(); + onChanged(); + return this; + } + /** + * optional string json_name = 10; + * + *
+     * The field JSON name.
+     * 
+ */ + public Builder setJsonNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jsonName_ = value; + onChanged(); + return this; + } + + private java.lang.Object defaultValue_ = ""; + /** + * optional string default_value = 11; + * + *
+     * The string value of the default value of this field. Proto2 syntax only.
+     * 
+ */ + public java.lang.String getDefaultValue() { + java.lang.Object ref = defaultValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string default_value = 11; + * + *
+     * The string value of the default value of this field. Proto2 syntax only.
+     * 
+ */ + public com.google.protobuf.ByteString + getDefaultValueBytes() { + java.lang.Object ref = defaultValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string default_value = 11; + * + *
+     * The string value of the default value of this field. Proto2 syntax only.
+     * 
+ */ + public Builder setDefaultValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + defaultValue_ = value; + onChanged(); + return this; + } + /** + * optional string default_value = 11; + * + *
+     * The string value of the default value of this field. Proto2 syntax only.
+     * 
+ */ + public Builder clearDefaultValue() { + + defaultValue_ = getDefaultInstance().getDefaultValue(); + onChanged(); + return this; + } + /** + * optional string default_value = 11; + * + *
+     * The string value of the default value of this field. Proto2 syntax only.
+     * 
+ */ + public Builder setDefaultValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + defaultValue_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.Field) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Field) + private static final com.google.protobuf.Field DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Field(); + } + + public static com.google.protobuf.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Field parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Field(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FieldMask.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FieldMask.java new file mode 100644 index 000000000000..ec9e361e4426 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FieldMask.java @@ -0,0 +1,763 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/field_mask.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.FieldMask} + * + *
+ * `FieldMask` represents a set of symbolic field paths, for example:
+ *     paths: "f.a"
+ *     paths: "f.b.d"
+ * Here `f` represents a field in some root message, `a` and `b`
+ * fields in the message found in `f`, and `d` a field found in the
+ * message in `f.b`.
+ * Field masks are used to specify a subset of fields that should be
+ * returned by a get operation or modified by an update operation.
+ * Field masks also have a custom JSON encoding (see below).
+ * # Field Masks in Projections
+ * When used in the context of a projection, a response message or
+ * sub-message is filtered by the API to only contain those fields as
+ * specified in the mask. For example, if the mask in the previous
+ * example is applied to a response message as follows:
+ *     f {
+ *       a : 22
+ *       b {
+ *         d : 1
+ *         x : 2
+ *       }
+ *       y : 13
+ *     }
+ *     z: 8
+ * The result will not contain specific values for fields x,y and z
+ * (there value will be set to the default, and omitted in proto text
+ * output):
+ *     f {
+ *       a : 22
+ *       b {
+ *         d : 1
+ *       }
+ *     }
+ * A repeated field is not allowed except at the last position of a
+ * field mask.
+ * If a FieldMask object is not present in a get operation, the
+ * operation applies to all fields (as if a FieldMask of all fields
+ * had been specified).
+ * Note that a field mask does not necessarily applies to the
+ * top-level response message. In case of a REST get operation, the
+ * field mask applies directly to the response, but in case of a REST
+ * list operation, the mask instead applies to each individual message
+ * in the returned resource list. In case of a REST custom method,
+ * other definitions may be used. Where the mask applies will be
+ * clearly documented together with its declaration in the API.  In
+ * any case, the effect on the returned resource/resources is required
+ * behavior for APIs.
+ * # Field Masks in Update Operations
+ * A field mask in update operations specifies which fields of the
+ * targeted resource are going to be updated. The API is required
+ * to only change the values of the fields as specified in the mask
+ * and leave the others untouched. If a resource is passed in to
+ * describe the updated values, the API ignores the values of all
+ * fields not covered by the mask.
+ * In order to reset a field's value to the default, the field must
+ * be in the mask and set to the default value in the provided resource.
+ * Hence, in order to reset all fields of a resource, provide a default
+ * instance of the resource and set all fields in the mask, or do
+ * not provide a mask as described below.
+ * If a field mask is not present on update, the operation applies to
+ * all fields (as if a field mask of all fields has been specified).
+ * Note that in the presence of schema evolution, this may mean that
+ * fields the client does not know and has therefore not filled into
+ * the request will be reset to their default. If this is unwanted
+ * behavior, a specific service may require a client to always specify
+ * a field mask, producing an error if not.
+ * As with get operations, the location of the resource which
+ * describes the updated values in the request message depends on the
+ * operation kind. In any case, the effect of the field mask is
+ * required to be honored by the API.
+ * ## Considerations for HTTP REST
+ * The HTTP kind of an update operation which uses a field mask must
+ * be set to PATCH instead of PUT in order to satisfy HTTP semantics
+ * (PUT must only be used for full updates).
+ * # JSON Encoding of Field Masks
+ * In JSON, a field mask is encoded as a single string where paths are
+ * separated by a comma. Fields name in each path are converted
+ * to/from lower-camel naming conventions.
+ * As an example, consider the following message declarations:
+ *     message Profile {
+ *       User user = 1;
+ *       Photo photo = 2;
+ *     }
+ *     message User {
+ *       string display_name = 1;
+ *       string address = 2;
+ *     }
+ * In proto a field mask for `Profile` may look as such:
+ *     mask {
+ *       paths: "user.display_name"
+ *       paths: "photo"
+ *     }
+ * In JSON, the same mask is represented as below:
+ *     {
+ *       mask: "user.displayName,photo"
+ *     }
+ * 
+ */ +public final class FieldMask extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.FieldMask) + FieldMaskOrBuilder { + // Use FieldMask.newBuilder() to construct. + private FieldMask(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FieldMask() { + paths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private FieldMask( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + paths_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + paths_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + paths_ = paths_.getUnmodifiableView(); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.FieldMask.class, com.google.protobuf.FieldMask.Builder.class); + } + + public static final int PATHS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList paths_; + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + public com.google.protobuf.ProtocolStringList + getPathsList() { + return paths_; + } + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + public int getPathsCount() { + return paths_.size(); + } + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + public java.lang.String getPaths(int index) { + return paths_.get(index); + } + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + public com.google.protobuf.ByteString + getPathsBytes(int index) { + return paths_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < paths_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, paths_.getRaw(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < paths_.size(); i++) { + dataSize += computeStringSizeNoTag(paths_.getRaw(i)); + } + size += dataSize; + size += 1 * getPathsList().size(); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.FieldMask)) { + return super.equals(obj); + } + com.google.protobuf.FieldMask other = (com.google.protobuf.FieldMask) obj; + + boolean result = true; + result = result && getPathsList() + .equals(other.getPathsList()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getPathsCount() > 0) { + hash = (37 * hash) + PATHS_FIELD_NUMBER; + hash = (53 * hash) + getPathsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.FieldMask parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.FieldMask parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.FieldMask parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.FieldMask parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.FieldMask parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.FieldMask parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.FieldMask parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.FieldMask parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.FieldMask parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.FieldMask parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.FieldMask prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.FieldMask} + * + *
+   * `FieldMask` represents a set of symbolic field paths, for example:
+   *     paths: "f.a"
+   *     paths: "f.b.d"
+   * Here `f` represents a field in some root message, `a` and `b`
+   * fields in the message found in `f`, and `d` a field found in the
+   * message in `f.b`.
+   * Field masks are used to specify a subset of fields that should be
+   * returned by a get operation or modified by an update operation.
+   * Field masks also have a custom JSON encoding (see below).
+   * # Field Masks in Projections
+   * When used in the context of a projection, a response message or
+   * sub-message is filtered by the API to only contain those fields as
+   * specified in the mask. For example, if the mask in the previous
+   * example is applied to a response message as follows:
+   *     f {
+   *       a : 22
+   *       b {
+   *         d : 1
+   *         x : 2
+   *       }
+   *       y : 13
+   *     }
+   *     z: 8
+   * The result will not contain specific values for fields x,y and z
+   * (there value will be set to the default, and omitted in proto text
+   * output):
+   *     f {
+   *       a : 22
+   *       b {
+   *         d : 1
+   *       }
+   *     }
+   * A repeated field is not allowed except at the last position of a
+   * field mask.
+   * If a FieldMask object is not present in a get operation, the
+   * operation applies to all fields (as if a FieldMask of all fields
+   * had been specified).
+   * Note that a field mask does not necessarily applies to the
+   * top-level response message. In case of a REST get operation, the
+   * field mask applies directly to the response, but in case of a REST
+   * list operation, the mask instead applies to each individual message
+   * in the returned resource list. In case of a REST custom method,
+   * other definitions may be used. Where the mask applies will be
+   * clearly documented together with its declaration in the API.  In
+   * any case, the effect on the returned resource/resources is required
+   * behavior for APIs.
+   * # Field Masks in Update Operations
+   * A field mask in update operations specifies which fields of the
+   * targeted resource are going to be updated. The API is required
+   * to only change the values of the fields as specified in the mask
+   * and leave the others untouched. If a resource is passed in to
+   * describe the updated values, the API ignores the values of all
+   * fields not covered by the mask.
+   * In order to reset a field's value to the default, the field must
+   * be in the mask and set to the default value in the provided resource.
+   * Hence, in order to reset all fields of a resource, provide a default
+   * instance of the resource and set all fields in the mask, or do
+   * not provide a mask as described below.
+   * If a field mask is not present on update, the operation applies to
+   * all fields (as if a field mask of all fields has been specified).
+   * Note that in the presence of schema evolution, this may mean that
+   * fields the client does not know and has therefore not filled into
+   * the request will be reset to their default. If this is unwanted
+   * behavior, a specific service may require a client to always specify
+   * a field mask, producing an error if not.
+   * As with get operations, the location of the resource which
+   * describes the updated values in the request message depends on the
+   * operation kind. In any case, the effect of the field mask is
+   * required to be honored by the API.
+   * ## Considerations for HTTP REST
+   * The HTTP kind of an update operation which uses a field mask must
+   * be set to PATCH instead of PUT in order to satisfy HTTP semantics
+   * (PUT must only be used for full updates).
+   * # JSON Encoding of Field Masks
+   * In JSON, a field mask is encoded as a single string where paths are
+   * separated by a comma. Fields name in each path are converted
+   * to/from lower-camel naming conventions.
+   * As an example, consider the following message declarations:
+   *     message Profile {
+   *       User user = 1;
+   *       Photo photo = 2;
+   *     }
+   *     message User {
+   *       string display_name = 1;
+   *       string address = 2;
+   *     }
+   * In proto a field mask for `Profile` may look as such:
+   *     mask {
+   *       paths: "user.display_name"
+   *       paths: "photo"
+   *     }
+   * In JSON, the same mask is represented as below:
+   *     {
+   *       mask: "user.displayName,photo"
+   *     }
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.FieldMask) + com.google.protobuf.FieldMaskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.FieldMask.class, com.google.protobuf.FieldMask.Builder.class); + } + + // Construct using com.google.protobuf.FieldMask.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + paths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_descriptor; + } + + public com.google.protobuf.FieldMask getDefaultInstanceForType() { + return com.google.protobuf.FieldMask.getDefaultInstance(); + } + + public com.google.protobuf.FieldMask build() { + com.google.protobuf.FieldMask result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.FieldMask buildPartial() { + com.google.protobuf.FieldMask result = new com.google.protobuf.FieldMask(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + paths_ = paths_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.paths_ = paths_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.FieldMask) { + return mergeFrom((com.google.protobuf.FieldMask)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.FieldMask other) { + if (other == com.google.protobuf.FieldMask.getDefaultInstance()) return this; + if (!other.paths_.isEmpty()) { + if (paths_.isEmpty()) { + paths_ = other.paths_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePathsIsMutable(); + paths_.addAll(other.paths_); + } + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.FieldMask parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.FieldMask) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList paths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensurePathsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + paths_ = new com.google.protobuf.LazyStringArrayList(paths_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public com.google.protobuf.ProtocolStringList + getPathsList() { + return paths_.getUnmodifiableView(); + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public int getPathsCount() { + return paths_.size(); + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public java.lang.String getPaths(int index) { + return paths_.get(index); + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public com.google.protobuf.ByteString + getPathsBytes(int index) { + return paths_.getByteString(index); + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public Builder setPaths( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathsIsMutable(); + paths_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public Builder addPaths( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathsIsMutable(); + paths_.add(value); + onChanged(); + return this; + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public Builder addAllPaths( + java.lang.Iterable values) { + ensurePathsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, paths_); + onChanged(); + return this; + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public Builder clearPaths() { + paths_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string paths = 1; + * + *
+     * The set of field mask paths.
+     * 
+ */ + public Builder addPathsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePathsIsMutable(); + paths_.add(value); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.FieldMask) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.FieldMask) + private static final com.google.protobuf.FieldMask DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.FieldMask(); + } + + public static com.google.protobuf.FieldMask getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public FieldMask parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new FieldMask(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.FieldMask getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FieldMaskOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FieldMaskOrBuilder.java new file mode 100644 index 000000000000..b31a95584982 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FieldMaskOrBuilder.java @@ -0,0 +1,44 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/field_mask.proto + +package com.google.protobuf; + +public interface FieldMaskOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.FieldMask) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + com.google.protobuf.ProtocolStringList + getPathsList(); + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + int getPathsCount(); + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + java.lang.String getPaths(int index); + /** + * repeated string paths = 1; + * + *
+   * The set of field mask paths.
+   * 
+ */ + com.google.protobuf.ByteString + getPathsBytes(int index); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FieldMaskProto.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FieldMaskProto.java new file mode 100644 index 000000000000..6040f844ccd1 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FieldMaskProto.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/field_mask.proto + +package com.google.protobuf; + +public final class FieldMaskProto { + private FieldMaskProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_protobuf_FieldMask_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_protobuf_FieldMask_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n google/protobuf/field_mask.proto\022\017goog" + + "le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB" + + "3\n\023com.google.protobufB\016FieldMaskProtoP\001" + + "\240\001\001\242\002\003GPB\260\002\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_protobuf_FieldMask_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_protobuf_FieldMask_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_protobuf_FieldMask_descriptor, + new java.lang.String[] { "Paths", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FieldOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FieldOrBuilder.java new file mode 100644 index 000000000000..091a3cdd4ec4 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FieldOrBuilder.java @@ -0,0 +1,189 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +public interface FieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+   * The field type.
+   * 
+ */ + int getKindValue(); + /** + * optional .google.protobuf.Field.Kind kind = 1; + * + *
+   * The field type.
+   * 
+ */ + com.google.protobuf.Field.Kind getKind(); + + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+   * The field cardinality.
+   * 
+ */ + int getCardinalityValue(); + /** + * optional .google.protobuf.Field.Cardinality cardinality = 2; + * + *
+   * The field cardinality.
+   * 
+ */ + com.google.protobuf.Field.Cardinality getCardinality(); + + /** + * optional int32 number = 3; + * + *
+   * The field number.
+   * 
+ */ + int getNumber(); + + /** + * optional string name = 4; + * + *
+   * The field name.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 4; + * + *
+   * The field name.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional string type_url = 6; + * + *
+   * The field type URL, without the scheme, for message or enumeration
+   * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+   * 
+ */ + java.lang.String getTypeUrl(); + /** + * optional string type_url = 6; + * + *
+   * The field type URL, without the scheme, for message or enumeration
+   * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+   * 
+ */ + com.google.protobuf.ByteString + getTypeUrlBytes(); + + /** + * optional int32 oneof_index = 7; + * + *
+   * The index of the field type in `Type.oneofs`, for message or enumeration
+   * types. The first type has index 1; zero means the type is not in the list.
+   * 
+ */ + int getOneofIndex(); + + /** + * optional bool packed = 8; + * + *
+   * Whether to use alternative packed wire representation.
+   * 
+ */ + boolean getPacked(); + + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + java.util.List + getOptionsList(); + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + com.google.protobuf.Option getOptions(int index); + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + int getOptionsCount(); + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + java.util.List + getOptionsOrBuilderList(); + /** + * repeated .google.protobuf.Option options = 9; + * + *
+   * The protocol buffer options.
+   * 
+ */ + com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index); + + /** + * optional string json_name = 10; + * + *
+   * The field JSON name.
+   * 
+ */ + java.lang.String getJsonName(); + /** + * optional string json_name = 10; + * + *
+   * The field JSON name.
+   * 
+ */ + com.google.protobuf.ByteString + getJsonNameBytes(); + + /** + * optional string default_value = 11; + * + *
+   * The string value of the default value of this field. Proto2 syntax only.
+   * 
+ */ + java.lang.String getDefaultValue(); + /** + * optional string default_value = 11; + * + *
+   * The string value of the default value of this field. Proto2 syntax only.
+   * 
+ */ + com.google.protobuf.ByteString + getDefaultValueBytes(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FloatValue.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FloatValue.java new file mode 100644 index 000000000000..4ad1e2a3aaac --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FloatValue.java @@ -0,0 +1,430 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.FloatValue} + * + *
+ * Wrapper message for `float`.
+ * The JSON representation for `FloatValue` is JSON number.
+ * 
+ */ +public final class FloatValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.FloatValue) + FloatValueOrBuilder { + // Use FloatValue.newBuilder() to construct. + private FloatValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FloatValue() { + value_ = 0F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private FloatValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 13: { + + value_ = input.readFloat(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.FloatValue.class, com.google.protobuf.FloatValue.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private float value_; + /** + * optional float value = 1; + * + *
+   * The float value.
+   * 
+ */ + public float getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (value_ != 0F) { + output.writeFloat(1, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != 0F) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.FloatValue)) { + return super.equals(obj); + } + com.google.protobuf.FloatValue other = (com.google.protobuf.FloatValue) obj; + + boolean result = true; + result = result && ( + java.lang.Float.floatToIntBits(getValue()) + == java.lang.Float.floatToIntBits( + other.getValue())); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getValue()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.FloatValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.FloatValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.FloatValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.FloatValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.FloatValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.FloatValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.FloatValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.FloatValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.FloatValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.FloatValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.FloatValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.FloatValue} + * + *
+   * Wrapper message for `float`.
+   * The JSON representation for `FloatValue` is JSON number.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.FloatValue) + com.google.protobuf.FloatValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.FloatValue.class, com.google.protobuf.FloatValue.Builder.class); + } + + // Construct using com.google.protobuf.FloatValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + value_ = 0F; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_descriptor; + } + + public com.google.protobuf.FloatValue getDefaultInstanceForType() { + return com.google.protobuf.FloatValue.getDefaultInstance(); + } + + public com.google.protobuf.FloatValue build() { + com.google.protobuf.FloatValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.FloatValue buildPartial() { + com.google.protobuf.FloatValue result = new com.google.protobuf.FloatValue(this); + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.FloatValue) { + return mergeFrom((com.google.protobuf.FloatValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.FloatValue other) { + if (other == com.google.protobuf.FloatValue.getDefaultInstance()) return this; + if (other.getValue() != 0F) { + setValue(other.getValue()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.FloatValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.FloatValue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float value_ ; + /** + * optional float value = 1; + * + *
+     * The float value.
+     * 
+ */ + public float getValue() { + return value_; + } + /** + * optional float value = 1; + * + *
+     * The float value.
+     * 
+ */ + public Builder setValue(float value) { + + value_ = value; + onChanged(); + return this; + } + /** + * optional float value = 1; + * + *
+     * The float value.
+     * 
+ */ + public Builder clearValue() { + + value_ = 0F; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.FloatValue) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.FloatValue) + private static final com.google.protobuf.FloatValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.FloatValue(); + } + + public static com.google.protobuf.FloatValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public FloatValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new FloatValue(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.FloatValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FloatValueOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FloatValueOrBuilder.java new file mode 100644 index 000000000000..5e7b080689cf --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/FloatValueOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +public interface FloatValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.FloatValue) + com.google.protobuf.MessageOrBuilder { + + /** + * optional float value = 1; + * + *
+   * The float value.
+   * 
+ */ + float getValue(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Int32Value.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Int32Value.java new file mode 100644 index 000000000000..901fa3d17755 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Int32Value.java @@ -0,0 +1,427 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Int32Value} + * + *
+ * Wrapper message for `int32`.
+ * The JSON representation for `Int32Value` is JSON number.
+ * 
+ */ +public final class Int32Value extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Int32Value) + Int32ValueOrBuilder { + // Use Int32Value.newBuilder() to construct. + private Int32Value(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Int32Value() { + value_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Int32Value( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + value_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Int32Value.class, com.google.protobuf.Int32Value.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private int value_; + /** + * optional int32 value = 1; + * + *
+   * The int32 value.
+   * 
+ */ + public int getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (value_ != 0) { + output.writeInt32(1, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Int32Value)) { + return super.equals(obj); + } + com.google.protobuf.Int32Value other = (com.google.protobuf.Int32Value) obj; + + boolean result = true; + result = result && (getValue() + == other.getValue()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Int32Value parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Int32Value parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Int32Value parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Int32Value parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Int32Value parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Int32Value parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Int32Value parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Int32Value parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Int32Value parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Int32Value parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.Int32Value prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.Int32Value} + * + *
+   * Wrapper message for `int32`.
+   * The JSON representation for `Int32Value` is JSON number.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Int32Value) + com.google.protobuf.Int32ValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Int32Value.class, com.google.protobuf.Int32Value.Builder.class); + } + + // Construct using com.google.protobuf.Int32Value.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + value_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_descriptor; + } + + public com.google.protobuf.Int32Value getDefaultInstanceForType() { + return com.google.protobuf.Int32Value.getDefaultInstance(); + } + + public com.google.protobuf.Int32Value build() { + com.google.protobuf.Int32Value result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Int32Value buildPartial() { + com.google.protobuf.Int32Value result = new com.google.protobuf.Int32Value(this); + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Int32Value) { + return mergeFrom((com.google.protobuf.Int32Value)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Int32Value other) { + if (other == com.google.protobuf.Int32Value.getDefaultInstance()) return this; + if (other.getValue() != 0) { + setValue(other.getValue()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.Int32Value parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Int32Value) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int value_ ; + /** + * optional int32 value = 1; + * + *
+     * The int32 value.
+     * 
+ */ + public int getValue() { + return value_; + } + /** + * optional int32 value = 1; + * + *
+     * The int32 value.
+     * 
+ */ + public Builder setValue(int value) { + + value_ = value; + onChanged(); + return this; + } + /** + * optional int32 value = 1; + * + *
+     * The int32 value.
+     * 
+ */ + public Builder clearValue() { + + value_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.Int32Value) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Int32Value) + private static final com.google.protobuf.Int32Value DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Int32Value(); + } + + public static com.google.protobuf.Int32Value getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Int32Value parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Int32Value(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.Int32Value getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Int32ValueOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Int32ValueOrBuilder.java new file mode 100644 index 000000000000..ac465c771031 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Int32ValueOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +public interface Int32ValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Int32Value) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 value = 1; + * + *
+   * The int32 value.
+   * 
+ */ + int getValue(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Int64Value.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Int64Value.java new file mode 100644 index 000000000000..c17b2d50d9e2 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Int64Value.java @@ -0,0 +1,428 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Int64Value} + * + *
+ * Wrapper message for `int64`.
+ * The JSON representation for `Int64Value` is JSON string.
+ * 
+ */ +public final class Int64Value extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Int64Value) + Int64ValueOrBuilder { + // Use Int64Value.newBuilder() to construct. + private Int64Value(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Int64Value() { + value_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Int64Value( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + value_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Int64Value.class, com.google.protobuf.Int64Value.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private long value_; + /** + * optional int64 value = 1; + * + *
+   * The int64 value.
+   * 
+ */ + public long getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (value_ != 0L) { + output.writeInt64(1, value_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, value_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Int64Value)) { + return super.equals(obj); + } + com.google.protobuf.Int64Value other = (com.google.protobuf.Int64Value) obj; + + boolean result = true; + result = result && (getValue() + == other.getValue()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getValue()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Int64Value parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Int64Value parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Int64Value parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Int64Value parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Int64Value parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Int64Value parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Int64Value parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Int64Value parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Int64Value parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Int64Value parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.Int64Value prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.Int64Value} + * + *
+   * Wrapper message for `int64`.
+   * The JSON representation for `Int64Value` is JSON string.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Int64Value) + com.google.protobuf.Int64ValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Int64Value.class, com.google.protobuf.Int64Value.Builder.class); + } + + // Construct using com.google.protobuf.Int64Value.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + value_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_descriptor; + } + + public com.google.protobuf.Int64Value getDefaultInstanceForType() { + return com.google.protobuf.Int64Value.getDefaultInstance(); + } + + public com.google.protobuf.Int64Value build() { + com.google.protobuf.Int64Value result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Int64Value buildPartial() { + com.google.protobuf.Int64Value result = new com.google.protobuf.Int64Value(this); + result.value_ = value_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Int64Value) { + return mergeFrom((com.google.protobuf.Int64Value)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Int64Value other) { + if (other == com.google.protobuf.Int64Value.getDefaultInstance()) return this; + if (other.getValue() != 0L) { + setValue(other.getValue()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.Int64Value parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Int64Value) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long value_ ; + /** + * optional int64 value = 1; + * + *
+     * The int64 value.
+     * 
+ */ + public long getValue() { + return value_; + } + /** + * optional int64 value = 1; + * + *
+     * The int64 value.
+     * 
+ */ + public Builder setValue(long value) { + + value_ = value; + onChanged(); + return this; + } + /** + * optional int64 value = 1; + * + *
+     * The int64 value.
+     * 
+ */ + public Builder clearValue() { + + value_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.Int64Value) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Int64Value) + private static final com.google.protobuf.Int64Value DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Int64Value(); + } + + public static com.google.protobuf.Int64Value getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Int64Value parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Int64Value(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.Int64Value getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Int64ValueOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Int64ValueOrBuilder.java new file mode 100644 index 000000000000..1931f4b23992 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Int64ValueOrBuilder.java @@ -0,0 +1,18 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto + +package com.google.protobuf; + +public interface Int64ValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Int64Value) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 value = 1; + * + *
+   * The int64 value.
+   * 
+ */ + long getValue(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/ListValue.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/ListValue.java new file mode 100644 index 000000000000..d1810635e3ab --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/ListValue.java @@ -0,0 +1,789 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/struct.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.ListValue} + * + *
+ * `ListValue` is a wrapper around a repeated field of values.
+ * The JSON representation for `ListValue` is JSON array.
+ * 
+ */ +public final class ListValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.ListValue) + ListValueOrBuilder { + // Use ListValue.newBuilder() to construct. + private ListValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListValue() { + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private ListValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + values_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add(input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + values_ = java.util.Collections.unmodifiableList(values_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.ListValue.class, com.google.protobuf.ListValue.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private java.util.List values_; + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + public java.util.List getValuesList() { + return values_; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + public int getValuesCount() { + return values_.size(); + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + public com.google.protobuf.Value getValues(int index) { + return values_.get(index); + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + public com.google.protobuf.ValueOrBuilder getValuesOrBuilder( + int index) { + return values_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(1, values_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, values_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.ListValue)) { + return super.equals(obj); + } + com.google.protobuf.ListValue other = (com.google.protobuf.ListValue) obj; + + boolean result = true; + result = result && getValuesList() + .equals(other.getValuesList()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.ListValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.ListValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.ListValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.ListValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.ListValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.ListValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.ListValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.ListValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.ListValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.ListValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.ListValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.ListValue} + * + *
+   * `ListValue` is a wrapper around a repeated field of values.
+   * The JSON representation for `ListValue` is JSON array.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.ListValue) + com.google.protobuf.ListValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.ListValue.class, com.google.protobuf.ListValue.Builder.class); + } + + // Construct using com.google.protobuf.ListValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getValuesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + valuesBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_descriptor; + } + + public com.google.protobuf.ListValue getDefaultInstanceForType() { + return com.google.protobuf.ListValue.getDefaultInstance(); + } + + public com.google.protobuf.ListValue build() { + com.google.protobuf.ListValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.ListValue buildPartial() { + com.google.protobuf.ListValue result = new com.google.protobuf.ListValue(this); + int from_bitField0_ = bitField0_; + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.ListValue) { + return mergeFrom((com.google.protobuf.ListValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.ListValue other) { + if (other == com.google.protobuf.ListValue.getDefaultInstance()) return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValuesFieldBuilder() : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.ListValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.ListValue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List values_ = + java.util.Collections.emptyList(); + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> valuesBuilder_; + + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public com.google.protobuf.Value getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder setValues( + int index, com.google.protobuf.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder setValues( + int index, com.google.protobuf.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder addValues(com.google.protobuf.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder addValues( + int index, com.google.protobuf.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder addValues( + com.google.protobuf.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder addValues( + int index, com.google.protobuf.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public com.google.protobuf.Value.Builder getValuesBuilder( + int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public com.google.protobuf.ValueOrBuilder getValuesOrBuilder( + int index) { + if (valuesBuilder_ == null) { + return values_.get(index); } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public com.google.protobuf.Value.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder( + com.google.protobuf.Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public com.google.protobuf.Value.Builder addValuesBuilder( + int index) { + return getValuesFieldBuilder().addBuilder( + index, com.google.protobuf.Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Value values = 1; + * + *
+     * Repeated field of dynamically typed values.
+     * 
+ */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder>( + values_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + values_ = null; + } + return valuesBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.ListValue) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.ListValue) + private static final com.google.protobuf.ListValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.ListValue(); + } + + public static com.google.protobuf.ListValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ListValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ListValue(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.ListValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/ListValueOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/ListValueOrBuilder.java new file mode 100644 index 000000000000..f868e9d45082 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/ListValueOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/struct.proto + +package com.google.protobuf; + +public interface ListValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.ListValue) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + java.util.List + getValuesList(); + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + com.google.protobuf.Value getValues(int index); + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + int getValuesCount(); + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + java.util.List + getValuesOrBuilderList(); + /** + * repeated .google.protobuf.Value values = 1; + * + *
+   * Repeated field of dynamically typed values.
+   * 
+ */ + com.google.protobuf.ValueOrBuilder getValuesOrBuilder( + int index); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Method.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Method.java new file mode 100644 index 000000000000..5c4daaf3e7dc --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Method.java @@ -0,0 +1,1516 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Method} + * + *
+ * Method represents a method of an api.
+ * 
+ */ +public final class Method extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Method) + MethodOrBuilder { + // Use Method.newBuilder() to construct. + private Method(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Method() { + name_ = ""; + requestTypeUrl_ = ""; + requestStreaming_ = false; + responseTypeUrl_ = ""; + responseStreaming_ = false; + options_ = java.util.Collections.emptyList(); + syntax_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Method( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + requestTypeUrl_ = s; + break; + } + case 24: { + + requestStreaming_ = input.readBool(); + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + responseTypeUrl_ = s; + break; + } + case 40: { + + responseStreaming_ = input.readBool(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + options_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + options_.add(input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); + break; + } + case 56: { + int rawValue = input.readEnum(); + + syntax_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + options_ = java.util.Collections.unmodifiableList(options_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Method.class, com.google.protobuf.Method.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The simple name of this method.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * The simple name of this method.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_TYPE_URL_FIELD_NUMBER = 2; + private volatile java.lang.Object requestTypeUrl_; + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+   * A URL of the input message type.
+   * 
+ */ + public java.lang.String getRequestTypeUrl() { + java.lang.Object ref = requestTypeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestTypeUrl_ = s; + return s; + } + } + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+   * A URL of the input message type.
+   * 
+ */ + public com.google.protobuf.ByteString + getRequestTypeUrlBytes() { + java.lang.Object ref = requestTypeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestTypeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_STREAMING_FIELD_NUMBER = 3; + private boolean requestStreaming_; + /** + * optional bool request_streaming = 3; + * + *
+   * If true, the request is streamed.
+   * 
+ */ + public boolean getRequestStreaming() { + return requestStreaming_; + } + + public static final int RESPONSE_TYPE_URL_FIELD_NUMBER = 4; + private volatile java.lang.Object responseTypeUrl_; + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+   * The URL of the output message type.
+   * 
+ */ + public java.lang.String getResponseTypeUrl() { + java.lang.Object ref = responseTypeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseTypeUrl_ = s; + return s; + } + } + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+   * The URL of the output message type.
+   * 
+ */ + public com.google.protobuf.ByteString + getResponseTypeUrlBytes() { + java.lang.Object ref = responseTypeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + responseTypeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESPONSE_STREAMING_FIELD_NUMBER = 5; + private boolean responseStreaming_; + /** + * optional bool response_streaming = 5; + * + *
+   * If true, the response is streamed.
+   * 
+ */ + public boolean getResponseStreaming() { + return responseStreaming_; + } + + public static final int OPTIONS_FIELD_NUMBER = 6; + private java.util.List options_; + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + public java.util.List getOptionsList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + return options_; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + public int getOptionsCount() { + return options_.size(); + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + return options_.get(index); + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + return options_.get(index); + } + + public static final int SYNTAX_FIELD_NUMBER = 7; + private int syntax_; + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of this method.
+   * 
+ */ + public int getSyntaxValue() { + return syntax_; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of this method.
+   * 
+ */ + public com.google.protobuf.Syntax getSyntax() { + com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); + return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!getRequestTypeUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestTypeUrl_); + } + if (requestStreaming_ != false) { + output.writeBool(3, requestStreaming_); + } + if (!getResponseTypeUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, responseTypeUrl_); + } + if (responseStreaming_ != false) { + output.writeBool(5, responseStreaming_); + } + for (int i = 0; i < options_.size(); i++) { + output.writeMessage(6, options_.get(i)); + } + if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { + output.writeEnum(7, syntax_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!getRequestTypeUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestTypeUrl_); + } + if (requestStreaming_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, requestStreaming_); + } + if (!getResponseTypeUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, responseTypeUrl_); + } + if (responseStreaming_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, responseStreaming_); + } + for (int i = 0; i < options_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, options_.get(i)); + } + if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, syntax_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Method)) { + return super.equals(obj); + } + com.google.protobuf.Method other = (com.google.protobuf.Method) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && getRequestTypeUrl() + .equals(other.getRequestTypeUrl()); + result = result && (getRequestStreaming() + == other.getRequestStreaming()); + result = result && getResponseTypeUrl() + .equals(other.getResponseTypeUrl()); + result = result && (getResponseStreaming() + == other.getResponseStreaming()); + result = result && getOptionsList() + .equals(other.getOptionsList()); + result = result && syntax_ == other.syntax_; + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_TYPE_URL_FIELD_NUMBER; + hash = (53 * hash) + getRequestTypeUrl().hashCode(); + hash = (37 * hash) + REQUEST_STREAMING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getRequestStreaming()); + hash = (37 * hash) + RESPONSE_TYPE_URL_FIELD_NUMBER; + hash = (53 * hash) + getResponseTypeUrl().hashCode(); + hash = (37 * hash) + RESPONSE_STREAMING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getResponseStreaming()); + if (getOptionsCount() > 0) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptionsList().hashCode(); + } + hash = (37 * hash) + SYNTAX_FIELD_NUMBER; + hash = (53 * hash) + syntax_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Method parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Method parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Method parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Method parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Method parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Method parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Method parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Method parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Method parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Method parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.Method prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.Method} + * + *
+   * Method represents a method of an api.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Method) + com.google.protobuf.MethodOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Method.class, com.google.protobuf.Method.Builder.class); + } + + // Construct using com.google.protobuf.Method.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getOptionsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + requestTypeUrl_ = ""; + + requestStreaming_ = false; + + responseTypeUrl_ = ""; + + responseStreaming_ = false; + + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + optionsBuilder_.clear(); + } + syntax_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_descriptor; + } + + public com.google.protobuf.Method getDefaultInstanceForType() { + return com.google.protobuf.Method.getDefaultInstance(); + } + + public com.google.protobuf.Method build() { + com.google.protobuf.Method result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Method buildPartial() { + com.google.protobuf.Method result = new com.google.protobuf.Method(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + result.requestTypeUrl_ = requestTypeUrl_; + result.requestStreaming_ = requestStreaming_; + result.responseTypeUrl_ = responseTypeUrl_; + result.responseStreaming_ = responseStreaming_; + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { + options_ = java.util.Collections.unmodifiableList(options_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + result.syntax_ = syntax_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Method) { + return mergeFrom((com.google.protobuf.Method)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Method other) { + if (other == com.google.protobuf.Method.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRequestTypeUrl().isEmpty()) { + requestTypeUrl_ = other.requestTypeUrl_; + onChanged(); + } + if (other.getRequestStreaming() != false) { + setRequestStreaming(other.getRequestStreaming()); + } + if (!other.getResponseTypeUrl().isEmpty()) { + responseTypeUrl_ = other.responseTypeUrl_; + onChanged(); + } + if (other.getResponseStreaming() != false) { + setResponseStreaming(other.getResponseStreaming()); + } + if (optionsBuilder_ == null) { + if (!other.options_.isEmpty()) { + if (options_.isEmpty()) { + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureOptionsIsMutable(); + options_.addAll(other.options_); + } + onChanged(); + } + } else { + if (!other.options_.isEmpty()) { + if (optionsBuilder_.isEmpty()) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + options_ = other.options_; + bitField0_ = (bitField0_ & ~0x00000020); + optionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOptionsFieldBuilder() : null; + } else { + optionsBuilder_.addAllMessages(other.options_); + } + } + } + if (other.syntax_ != 0) { + setSyntaxValue(other.getSyntaxValue()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.Method parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Method) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The simple name of this method.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The simple name of this method.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The simple name of this method.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The simple name of this method.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The simple name of this method.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestTypeUrl_ = ""; + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+     * A URL of the input message type.
+     * 
+ */ + public java.lang.String getRequestTypeUrl() { + java.lang.Object ref = requestTypeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestTypeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+     * A URL of the input message type.
+     * 
+ */ + public com.google.protobuf.ByteString + getRequestTypeUrlBytes() { + java.lang.Object ref = requestTypeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestTypeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+     * A URL of the input message type.
+     * 
+ */ + public Builder setRequestTypeUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestTypeUrl_ = value; + onChanged(); + return this; + } + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+     * A URL of the input message type.
+     * 
+ */ + public Builder clearRequestTypeUrl() { + + requestTypeUrl_ = getDefaultInstance().getRequestTypeUrl(); + onChanged(); + return this; + } + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+     * A URL of the input message type.
+     * 
+ */ + public Builder setRequestTypeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestTypeUrl_ = value; + onChanged(); + return this; + } + + private boolean requestStreaming_ ; + /** + * optional bool request_streaming = 3; + * + *
+     * If true, the request is streamed.
+     * 
+ */ + public boolean getRequestStreaming() { + return requestStreaming_; + } + /** + * optional bool request_streaming = 3; + * + *
+     * If true, the request is streamed.
+     * 
+ */ + public Builder setRequestStreaming(boolean value) { + + requestStreaming_ = value; + onChanged(); + return this; + } + /** + * optional bool request_streaming = 3; + * + *
+     * If true, the request is streamed.
+     * 
+ */ + public Builder clearRequestStreaming() { + + requestStreaming_ = false; + onChanged(); + return this; + } + + private java.lang.Object responseTypeUrl_ = ""; + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+     * The URL of the output message type.
+     * 
+ */ + public java.lang.String getResponseTypeUrl() { + java.lang.Object ref = responseTypeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseTypeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+     * The URL of the output message type.
+     * 
+ */ + public com.google.protobuf.ByteString + getResponseTypeUrlBytes() { + java.lang.Object ref = responseTypeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + responseTypeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+     * The URL of the output message type.
+     * 
+ */ + public Builder setResponseTypeUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + responseTypeUrl_ = value; + onChanged(); + return this; + } + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+     * The URL of the output message type.
+     * 
+ */ + public Builder clearResponseTypeUrl() { + + responseTypeUrl_ = getDefaultInstance().getResponseTypeUrl(); + onChanged(); + return this; + } + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+     * The URL of the output message type.
+     * 
+ */ + public Builder setResponseTypeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + responseTypeUrl_ = value; + onChanged(); + return this; + } + + private boolean responseStreaming_ ; + /** + * optional bool response_streaming = 5; + * + *
+     * If true, the response is streamed.
+     * 
+ */ + public boolean getResponseStreaming() { + return responseStreaming_; + } + /** + * optional bool response_streaming = 5; + * + *
+     * If true, the response is streamed.
+     * 
+ */ + public Builder setResponseStreaming(boolean value) { + + responseStreaming_ = value; + onChanged(); + return this; + } + /** + * optional bool response_streaming = 5; + * + *
+     * If true, the response is streamed.
+     * 
+ */ + public Builder clearResponseStreaming() { + + responseStreaming_ = false; + onChanged(); + return this; + } + + private java.util.List options_ = + java.util.Collections.emptyList(); + private void ensureOptionsIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + options_ = new java.util.ArrayList(options_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_; + + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public java.util.List getOptionsList() { + if (optionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(options_); + } else { + return optionsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public int getOptionsCount() { + if (optionsBuilder_ == null) { + return options_.size(); + } else { + return optionsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public com.google.protobuf.Option getOptions(int index) { + if (optionsBuilder_ == null) { + return options_.get(index); + } else { + return optionsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.set(index, value); + onChanged(); + } else { + optionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder setOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.set(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder addOptions(com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(value); + onChanged(); + } else { + optionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionsIsMutable(); + options_.add(index, value); + onChanged(); + } else { + optionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder addOptions( + com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder addOptions( + int index, com.google.protobuf.Option.Builder builderForValue) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.add(index, builderForValue.build()); + onChanged(); + } else { + optionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder addAllOptions( + java.lang.Iterable values) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, options_); + onChanged(); + } else { + optionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + optionsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public Builder removeOptions(int index) { + if (optionsBuilder_ == null) { + ensureOptionsIsMutable(); + options_.remove(index); + onChanged(); + } else { + optionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public com.google.protobuf.Option.Builder getOptionsBuilder( + int index) { + return getOptionsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index) { + if (optionsBuilder_ == null) { + return options_.get(index); } else { + return optionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public java.util.List + getOptionsOrBuilderList() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(options_); + } + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder() { + return getOptionsFieldBuilder().addBuilder( + com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public com.google.protobuf.Option.Builder addOptionsBuilder( + int index) { + return getOptionsFieldBuilder().addBuilder( + index, com.google.protobuf.Option.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Option options = 6; + * + *
+     * Any metadata attached to the method.
+     * 
+ */ + public java.util.List + getOptionsBuilderList() { + return getOptionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>( + options_, + ((bitField0_ & 0x00000020) == 0x00000020), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private int syntax_ = 0; + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of this method.
+     * 
+ */ + public int getSyntaxValue() { + return syntax_; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of this method.
+     * 
+ */ + public Builder setSyntaxValue(int value) { + syntax_ = value; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of this method.
+     * 
+ */ + public com.google.protobuf.Syntax getSyntax() { + com.google.protobuf.Syntax result = com.google.protobuf.Syntax.valueOf(syntax_); + return result == null ? com.google.protobuf.Syntax.UNRECOGNIZED : result; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of this method.
+     * 
+ */ + public Builder setSyntax(com.google.protobuf.Syntax value) { + if (value == null) { + throw new NullPointerException(); + } + + syntax_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+     * The source syntax of this method.
+     * 
+ */ + public Builder clearSyntax() { + + syntax_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.Method) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Method) + private static final com.google.protobuf.Method DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Method(); + } + + public static com.google.protobuf.Method getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Method parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Method(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.Method getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/MethodOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/MethodOrBuilder.java new file mode 100644 index 000000000000..592dd33ad01c --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/MethodOrBuilder.java @@ -0,0 +1,142 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +public interface MethodOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Method) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The simple name of this method.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The simple name of this method.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+   * A URL of the input message type.
+   * 
+ */ + java.lang.String getRequestTypeUrl(); + /** + * optional string request_type_url = 2 [ctype = STRING_PIECE]; + * + *
+   * A URL of the input message type.
+   * 
+ */ + com.google.protobuf.ByteString + getRequestTypeUrlBytes(); + + /** + * optional bool request_streaming = 3; + * + *
+   * If true, the request is streamed.
+   * 
+ */ + boolean getRequestStreaming(); + + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+   * The URL of the output message type.
+   * 
+ */ + java.lang.String getResponseTypeUrl(); + /** + * optional string response_type_url = 4 [ctype = STRING_PIECE]; + * + *
+   * The URL of the output message type.
+   * 
+ */ + com.google.protobuf.ByteString + getResponseTypeUrlBytes(); + + /** + * optional bool response_streaming = 5; + * + *
+   * If true, the response is streamed.
+   * 
+ */ + boolean getResponseStreaming(); + + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + java.util.List + getOptionsList(); + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + com.google.protobuf.Option getOptions(int index); + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + int getOptionsCount(); + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + java.util.List + getOptionsOrBuilderList(); + /** + * repeated .google.protobuf.Option options = 6; + * + *
+   * Any metadata attached to the method.
+   * 
+ */ + com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( + int index); + + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of this method.
+   * 
+ */ + int getSyntaxValue(); + /** + * optional .google.protobuf.Syntax syntax = 7; + * + *
+   * The source syntax of this method.
+   * 
+ */ + com.google.protobuf.Syntax getSyntax(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Mixin.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Mixin.java new file mode 100644 index 000000000000..ef8aaf0e07d4 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Mixin.java @@ -0,0 +1,790 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Mixin} + * + *
+ * Declares an API to be included in this API. The including API must
+ * redeclare all the methods from the included API, but documentation
+ * and options are inherited as follows:
+ * - If after comment and whitespace stripping, the documentation
+ *   string of the redeclared method is empty, it will be inherited
+ *   from the original method.
+ * - Each annotation belonging to the service config (http,
+ *   visibility) which is not set in the redeclared method will be
+ *   inherited.
+ * - If an http annotation is inherited, the path pattern will be
+ *   modified as follows. Any version prefix will be replaced by the
+ *   version of the including API plus the [root][] path if specified.
+ * Example of a simple mixin:
+ *     package google.acl.v1;
+ *     service AccessControl {
+ *       // Get the underlying ACL object.
+ *       rpc GetAcl(GetAclRequest) returns (Acl) {
+ *         option (google.api.http).get = "/v1/{resource=**}:getAcl";
+ *       }
+ *     }
+ *     package google.storage.v2;
+ *     service Storage {
+ *       // (-- see AccessControl.GetAcl --)
+ *       rpc GetAcl(GetAclRequest) returns (Acl);
+ *       // Get a data record.
+ *       rpc GetData(GetDataRequest) returns (Data) {
+ *         option (google.api.http).get = "/v2/{resource=**}";
+ *       }
+ *     }
+ * Example of a mixin configuration:
+ *     apis:
+ *     - name: google.storage.v2.Storage
+ *       mixins:
+ *       - name: google.acl.v1.AccessControl
+ * The mixin construct implies that all methods in `AccessControl` are
+ * also declared with same name and request/response types in
+ * `Storage`. A documentation generator or annotation processor will
+ * see the effective `Storage.GetAcl` method after inherting
+ * documentation and annotations as follows:
+ *     service Storage {
+ *       // Get the underlying ACL object.
+ *       rpc GetAcl(GetAclRequest) returns (Acl) {
+ *         option (google.api.http).get = "/v2/{resource=**}:getAcl";
+ *       }
+ *       ...
+ *     }
+ * Note how the version in the path pattern changed from `v1` to `v2`.
+ * If the `root` field in the mixin is specified, it should be a
+ * relative path under which inherited HTTP paths are placed. Example:
+ *     apis:
+ *     - name: google.storage.v2.Storage
+ *       mixins:
+ *       - name: google.acl.v1.AccessControl
+ *         root: acls
+ * This implies the following inherited HTTP annotation:
+ *     service Storage {
+ *       // Get the underlying ACL object.
+ *       rpc GetAcl(GetAclRequest) returns (Acl) {
+ *         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
+ *       }
+ *       ...
+ *     }
+ * 
+ */ +public final class Mixin extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Mixin) + MixinOrBuilder { + // Use Mixin.newBuilder() to construct. + private Mixin(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Mixin() { + name_ = ""; + root_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Mixin( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + root_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Mixin.class, com.google.protobuf.Mixin.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The fully qualified name of the API which is included.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * The fully qualified name of the API which is included.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROOT_FIELD_NUMBER = 2; + private volatile java.lang.Object root_; + /** + * optional string root = 2; + * + *
+   * If non-empty specifies a path under which inherited HTTP paths
+   * are rooted.
+   * 
+ */ + public java.lang.String getRoot() { + java.lang.Object ref = root_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + root_ = s; + return s; + } + } + /** + * optional string root = 2; + * + *
+   * If non-empty specifies a path under which inherited HTTP paths
+   * are rooted.
+   * 
+ */ + public com.google.protobuf.ByteString + getRootBytes() { + java.lang.Object ref = root_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + root_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!getRootBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, root_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!getRootBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, root_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Mixin)) { + return super.equals(obj); + } + com.google.protobuf.Mixin other = (com.google.protobuf.Mixin) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && getRoot() + .equals(other.getRoot()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ROOT_FIELD_NUMBER; + hash = (53 * hash) + getRoot().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Mixin parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Mixin parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Mixin parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Mixin parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Mixin parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Mixin parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Mixin parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Mixin parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Mixin parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Mixin parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.Mixin prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.Mixin} + * + *
+   * Declares an API to be included in this API. The including API must
+   * redeclare all the methods from the included API, but documentation
+   * and options are inherited as follows:
+   * - If after comment and whitespace stripping, the documentation
+   *   string of the redeclared method is empty, it will be inherited
+   *   from the original method.
+   * - Each annotation belonging to the service config (http,
+   *   visibility) which is not set in the redeclared method will be
+   *   inherited.
+   * - If an http annotation is inherited, the path pattern will be
+   *   modified as follows. Any version prefix will be replaced by the
+   *   version of the including API plus the [root][] path if specified.
+   * Example of a simple mixin:
+   *     package google.acl.v1;
+   *     service AccessControl {
+   *       // Get the underlying ACL object.
+   *       rpc GetAcl(GetAclRequest) returns (Acl) {
+   *         option (google.api.http).get = "/v1/{resource=**}:getAcl";
+   *       }
+   *     }
+   *     package google.storage.v2;
+   *     service Storage {
+   *       // (-- see AccessControl.GetAcl --)
+   *       rpc GetAcl(GetAclRequest) returns (Acl);
+   *       // Get a data record.
+   *       rpc GetData(GetDataRequest) returns (Data) {
+   *         option (google.api.http).get = "/v2/{resource=**}";
+   *       }
+   *     }
+   * Example of a mixin configuration:
+   *     apis:
+   *     - name: google.storage.v2.Storage
+   *       mixins:
+   *       - name: google.acl.v1.AccessControl
+   * The mixin construct implies that all methods in `AccessControl` are
+   * also declared with same name and request/response types in
+   * `Storage`. A documentation generator or annotation processor will
+   * see the effective `Storage.GetAcl` method after inherting
+   * documentation and annotations as follows:
+   *     service Storage {
+   *       // Get the underlying ACL object.
+   *       rpc GetAcl(GetAclRequest) returns (Acl) {
+   *         option (google.api.http).get = "/v2/{resource=**}:getAcl";
+   *       }
+   *       ...
+   *     }
+   * Note how the version in the path pattern changed from `v1` to `v2`.
+   * If the `root` field in the mixin is specified, it should be a
+   * relative path under which inherited HTTP paths are placed. Example:
+   *     apis:
+   *     - name: google.storage.v2.Storage
+   *       mixins:
+   *       - name: google.acl.v1.AccessControl
+   *         root: acls
+   * This implies the following inherited HTTP annotation:
+   *     service Storage {
+   *       // Get the underlying ACL object.
+   *       rpc GetAcl(GetAclRequest) returns (Acl) {
+   *         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
+   *       }
+   *       ...
+   *     }
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Mixin) + com.google.protobuf.MixinOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Mixin.class, com.google.protobuf.Mixin.Builder.class); + } + + // Construct using com.google.protobuf.Mixin.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + root_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_descriptor; + } + + public com.google.protobuf.Mixin getDefaultInstanceForType() { + return com.google.protobuf.Mixin.getDefaultInstance(); + } + + public com.google.protobuf.Mixin build() { + com.google.protobuf.Mixin result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Mixin buildPartial() { + com.google.protobuf.Mixin result = new com.google.protobuf.Mixin(this); + result.name_ = name_; + result.root_ = root_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Mixin) { + return mergeFrom((com.google.protobuf.Mixin)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Mixin other) { + if (other == com.google.protobuf.Mixin.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRoot().isEmpty()) { + root_ = other.root_; + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.Mixin parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Mixin) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The fully qualified name of the API which is included.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of the API which is included.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of the API which is included.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of the API which is included.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The fully qualified name of the API which is included.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object root_ = ""; + /** + * optional string root = 2; + * + *
+     * If non-empty specifies a path under which inherited HTTP paths
+     * are rooted.
+     * 
+ */ + public java.lang.String getRoot() { + java.lang.Object ref = root_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + root_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string root = 2; + * + *
+     * If non-empty specifies a path under which inherited HTTP paths
+     * are rooted.
+     * 
+ */ + public com.google.protobuf.ByteString + getRootBytes() { + java.lang.Object ref = root_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + root_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string root = 2; + * + *
+     * If non-empty specifies a path under which inherited HTTP paths
+     * are rooted.
+     * 
+ */ + public Builder setRoot( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + root_ = value; + onChanged(); + return this; + } + /** + * optional string root = 2; + * + *
+     * If non-empty specifies a path under which inherited HTTP paths
+     * are rooted.
+     * 
+ */ + public Builder clearRoot() { + + root_ = getDefaultInstance().getRoot(); + onChanged(); + return this; + } + /** + * optional string root = 2; + * + *
+     * If non-empty specifies a path under which inherited HTTP paths
+     * are rooted.
+     * 
+ */ + public Builder setRootBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + root_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.Mixin) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Mixin) + private static final com.google.protobuf.Mixin DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Mixin(); + } + + public static com.google.protobuf.Mixin getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Mixin parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Mixin(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.protobuf.Mixin getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/MixinOrBuilder.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/MixinOrBuilder.java new file mode 100644 index 000000000000..1ffcb50e4e00 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/MixinOrBuilder.java @@ -0,0 +1,47 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto + +package com.google.protobuf; + +public interface MixinOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.protobuf.Mixin) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The fully qualified name of the API which is included.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The fully qualified name of the API which is included.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional string root = 2; + * + *
+   * If non-empty specifies a path under which inherited HTTP paths
+   * are rooted.
+   * 
+ */ + java.lang.String getRoot(); + /** + * optional string root = 2; + * + *
+   * If non-empty specifies a path under which inherited HTTP paths
+   * are rooted.
+   * 
+ */ + com.google.protobuf.ByteString + getRootBytes(); +} diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/NullValue.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/NullValue.java new file mode 100644 index 000000000000..5fcf0cc0d0da --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/NullValue.java @@ -0,0 +1,103 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/struct.proto + +package com.google.protobuf; + +/** + * Protobuf enum {@code google.protobuf.NullValue} + * + *
+ * `NullValue` is a singleton enumeration to represent the null value for the
+ * `Value` type union.
+ *  The JSON representation for `NullValue` is JSON `null`.
+ * 
+ */ +public enum NullValue + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NULL_VALUE = 0; + * + *
+   * Null value.
+   * 
+ */ + NULL_VALUE(0, 0), + UNRECOGNIZED(-1, -1), + ; + + /** + * NULL_VALUE = 0; + * + *
+   * Null value.
+   * 
+ */ + public static final int NULL_VALUE_VALUE = 0; + + + public final int getNumber() { + if (index == -1) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + public static NullValue valueOf(int value) { + switch (value) { + case 0: return NULL_VALUE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + NullValue> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NullValue findValueByNumber(int number) { + return NullValue.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.protobuf.StructProto.getDescriptor() + .getEnumTypes().get(0); + } + + private static final NullValue[] VALUES = values(); + + public static NullValue valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private NullValue(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.protobuf.NullValue) +} + diff --git a/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Option.java b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Option.java new file mode 100644 index 000000000000..b0504cc19557 --- /dev/null +++ b/gcloud-java-gax/src/generated/main/java/com/google/protobuf/Option.java @@ -0,0 +1,737 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto + +package com.google.protobuf; + +/** + * Protobuf type {@code google.protobuf.Option} + * + *
+ * A protocol buffer option, which can be attached to a message, field,
+ * enumeration, etc.
+ * 
+ */ +public final class Option extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.protobuf.Option) + OptionOrBuilder { + // Use Option.newBuilder() to construct. + private Option(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Option() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Option( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.protobuf.Any.Builder subBuilder = null; + if (value_ != null) { + subBuilder = value_.toBuilder(); + } + value_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(value_); + value_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Option.class, com.google.protobuf.Option.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The option's name. For example, `"java_package"`.
+   * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * optional string name = 1; + * + *
+   * The option's name. For example, `"java_package"`.
+   * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.Any value_; + /** + * optional .google.protobuf.Any value = 2; + * + *
+   * The option's value. For example, `"com.google.protobuf"`.
+   * 
+ */ + public boolean hasValue() { + return value_ != null; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+   * The option's value. For example, `"com.google.protobuf"`.
+   * 
+ */ + public com.google.protobuf.Any getValue() { + return value_ == null ? com.google.protobuf.Any.getDefaultInstance() : value_; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+   * The option's value. For example, `"com.google.protobuf"`.
+   * 
+ */ + public com.google.protobuf.AnyOrBuilder getValueOrBuilder() { + return getValue(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (value_ != null) { + output.writeMessage(2, getValue()); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getValue()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.protobuf.Option)) { + return super.equals(obj); + } + com.google.protobuf.Option other = (com.google.protobuf.Option) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && (hasValue() == other.hasValue()); + if (hasValue()) { + result = result && getValue() + .equals(other.getValue()); + } + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protobuf.Option parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Option parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Option parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.protobuf.Option parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.protobuf.Option parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Option parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.Option parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.Option parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.Option parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.Option parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.Option prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.protobuf.Option} + * + *
+   * A protocol buffer option, which can be attached to a message, field,
+   * enumeration, etc.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.protobuf.Option) + com.google.protobuf.OptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protobuf.Option.class, com.google.protobuf.Option.Builder.class); + } + + // Construct using com.google.protobuf.Option.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (valueBuilder_ == null) { + value_ = null; + } else { + value_ = null; + valueBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_descriptor; + } + + public com.google.protobuf.Option getDefaultInstanceForType() { + return com.google.protobuf.Option.getDefaultInstance(); + } + + public com.google.protobuf.Option build() { + com.google.protobuf.Option result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.protobuf.Option buildPartial() { + com.google.protobuf.Option result = new com.google.protobuf.Option(this); + result.name_ = name_; + if (valueBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = valueBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.protobuf.Option) { + return mergeFrom((com.google.protobuf.Option)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.protobuf.Option other) { + if (other == com.google.protobuf.Option.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasValue()) { + mergeValue(other.getValue()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.Option parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.protobuf.Option) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The option's name. For example, `"java_package"`.
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The option's name. For example, `"java_package"`.
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The option's name. For example, `"java_package"`.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The option's name. For example, `"java_package"`.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The option's name. For example, `"java_package"`.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Any value_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> valueBuilder_; + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public boolean hasValue() { + return valueBuilder_ != null || value_ != null; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public com.google.protobuf.Any getValue() { + if (valueBuilder_ == null) { + return value_ == null ? com.google.protobuf.Any.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public Builder setValue(com.google.protobuf.Any value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public Builder setValue( + com.google.protobuf.Any.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public Builder mergeValue(com.google.protobuf.Any value) { + if (valueBuilder_ == null) { + if (value_ != null) { + value_ = + com.google.protobuf.Any.newBuilder(value_).mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + valueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = null; + onChanged(); + } else { + value_ = null; + valueBuilder_ = null; + } + + return this; + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public com.google.protobuf.Any.Builder getValueBuilder() { + + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + public com.google.protobuf.AnyOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? + com.google.protobuf.Any.getDefaultInstance() : value_; + } + } + /** + * optional .google.protobuf.Any value = 2; + * + *
+     * The option's value. For example, `"com.google.protobuf"`.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getValue(), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:google.protobuf.Option) + } + + // @@protoc_insertion_point(class_scope:google.protobuf.Option) + private static final com.google.protobuf.Option DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.protobuf.Option(); + } + + public static com.google.protobuf.Option getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser