diff --git a/gcloud-java-examples/src/main/java/com/google/gcloud/examples/StorageExample.java b/gcloud-java-examples/src/main/java/com/google/gcloud/examples/StorageExample.java
index b71a51fe6ac6..fb207023203f 100644
--- a/gcloud-java-examples/src/main/java/com/google/gcloud/examples/StorageExample.java
+++ b/gcloud-java-examples/src/main/java/com/google/gcloud/examples/StorageExample.java
@@ -376,7 +376,7 @@ CopyRequest parse(String... args) {
if (args.length != 4) {
throw new IllegalArgumentException();
}
- return CopyRequest.of(args[0], args[1], BlobInfo.builder(args[2], args[3]).build());
+ return CopyRequest.of(args[0], args[1], BlobId.of(args[2], args[3]));
}
@Override
@@ -544,11 +544,14 @@ public static void main(String... args) throws Exception {
StorageOptions.Builder optionsBuilder =
StorageOptions.builder().retryParams(RetryParams.getDefaultInstance());
StorageAction action;
+ String actionName;
if (args.length >= 2 && !ACTIONS.containsKey(args[0])) {
+ actionName = args[1];
optionsBuilder.projectId(args[0]);
action = ACTIONS.get(args[1]);
args = Arrays.copyOfRange(args, 2, args.length);
} else {
+ actionName = args[0];
action = ACTIONS.get(args[0]);
args = Arrays.copyOfRange(args, 1, args.length);
}
@@ -562,7 +565,7 @@ public static void main(String... args) throws Exception {
try {
request = action.parse(args);
} catch (IllegalArgumentException ex) {
- System.out.println("Invalid input for action '" + args[1] + "'");
+ System.out.println("Invalid input for action '" + actionName + "'");
System.out.println("Expected: " + action.params());
return;
} catch (Exception ex) {
diff --git a/gcloud-java-gax/README.md b/gcloud-java-gax/README.md
new file mode 100644
index 000000000000..d3dfbdde1ca8
--- /dev/null
+++ b/gcloud-java-gax/README.md
@@ -0,0 +1,53 @@
+Google Cloud Java Client -- GAX
+=========================================
+
+This module provides common functionality required by service-specific modules of this library.
+
+[![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)
+[![Maven](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-gax.svg)](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-gax.svg)
+
+- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
+- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/package-summary.html)
+
+Quickstart
+----------
+Add this to your pom.xml file
+```xml
+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
repeated .google.api.ContextRule rules = 1;
+ *
+ * + * List of rules for context, applicable to methods. + *+ */ + public java.util.List
repeated .google.api.ContextRule rules = 1;
+ *
+ * + * List of rules for context, applicable to methods. + *+ */ + public java.util.List extends com.google.api.ContextRuleOrBuilder> + 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
repeated .google.api.ContextRule rules = 1;
+ *
+ * + * List of rules for context, applicable to methods. + *+ */ + public java.util.List
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 extends com.google.api.ContextRule> 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 extends com.google.api.ContextRuleOrBuilder> + 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
repeated .google.api.ContextRule rules = 1;
+ *
+ * + * List of rules for context, applicable to methods. + *+ */ + java.util.List
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 extends com.google.api.ContextRuleOrBuilder> + 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
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
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
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
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
repeated .google.api.CustomErrorRule rules = 1;
+ *
+ * + * The list of custom error rules to select to which messages this should + * apply. + *+ */ + public java.util.List
repeated .google.api.CustomErrorRule rules = 1;
+ *
+ * + * The list of custom error rules to select to which messages this should + * apply. + *+ */ + public java.util.List extends com.google.api.CustomErrorRuleOrBuilder> + 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
repeated .google.api.CustomErrorRule rules = 1;
+ *
+ * + * The list of custom error rules to select to which messages this should + * apply. + *+ */ + public java.util.List
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 extends com.google.api.CustomErrorRule> 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 extends com.google.api.CustomErrorRuleOrBuilder> + 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
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
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
repeated .google.api.CustomErrorRule rules = 1;
+ *
+ * + * The list of custom error rules to select to which messages this should + * apply. + *+ */ + java.util.List
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 extends com.google.api.CustomErrorRuleOrBuilder> + 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
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
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
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
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>[display text][fully.qualified.proto.name] + * [fully.qualified.proto.name][]</code></pre> + * Text can be excluded from doc using the following notation: + * <pre><code>(-- internal comment --)</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>(--BETA: comment for BETA users --)</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
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
repeated .google.api.Page pages = 5;
+ *
+ * + * The top level pages for the documentation set. + *+ */ + public java.util.List
repeated .google.api.Page pages = 5;
+ *
+ * + * The top level pages for the documentation set. + *+ */ + public java.util.List extends com.google.api.PageOrBuilder> + 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
repeated .google.api.DocumentationRule rules = 3;
+ *
+ * + * Documentation rules for individual elements of the service. + *+ */ + public java.util.List
repeated .google.api.DocumentationRule rules = 3;
+ *
+ * + * Documentation rules for individual elements of the service. + *+ */ + public java.util.List extends com.google.api.DocumentationRuleOrBuilder> + 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>[display text][fully.qualified.proto.name] + * [fully.qualified.proto.name][]</code></pre> + * Text can be excluded from doc using the following notation: + * <pre><code>(-- internal comment --)</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>(--BETA: comment for BETA users --)</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
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
repeated .google.api.Page pages = 5;
+ *
+ * + * The top level pages for the documentation set. + *+ */ + public java.util.List
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 extends com.google.api.Page> 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 extends com.google.api.PageOrBuilder> + 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
repeated .google.api.DocumentationRule rules = 3;
+ *
+ * + * Documentation rules for individual elements of the service. + *+ */ + public java.util.List
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 extends com.google.api.DocumentationRule> 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 extends com.google.api.DocumentationRuleOrBuilder> + 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
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
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
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 extends com.google.api.PageOrBuilder> + 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
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 extends com.google.api.DocumentationRuleOrBuilder> + 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
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
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
repeated .google.api.HttpRule rules = 1;
+ *
+ * + * A list of HTTP rules for configuring the HTTP REST API methods. + *+ */ + public java.util.List
repeated .google.api.HttpRule rules = 1;
+ *
+ * + * A list of HTTP rules for configuring the HTTP REST API methods. + *+ */ + public java.util.List extends com.google.api.HttpRuleOrBuilder> + 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
repeated .google.api.HttpRule rules = 1;
+ *
+ * + * A list of HTTP rules for configuring the HTTP REST API methods. + *+ */ + public java.util.List
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 extends com.google.api.HttpRule> 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 extends com.google.api.HttpRuleOrBuilder> + 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
repeated .google.api.HttpRule rules = 1;
+ *
+ * + * A list of HTTP rules for configuring the HTTP REST API methods. + *+ */ + java.util.List
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 extends com.google.api.HttpRuleOrBuilder> + 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¶m=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
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
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
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 extends com.google.api.HttpRuleOrBuilder> + 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¶m=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
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
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
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 extends com.google.api.HttpRule> 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 extends com.google.api.HttpRuleOrBuilder> + 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
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
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 extends com.google.api.HttpRuleOrBuilder> + 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
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
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
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
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
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 `(== include {path} ==)` + * 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 `(== include {path} ==)` + * 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
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
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 extends com.google.api.PageOrBuilder> + 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
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 `(== include {path} ==)` + * 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 `(== include {path} ==)` + * 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 `(== include {path} ==)` + * 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 `(== include {path} ==)` + * 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 `(== include {path} ==)` + * 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
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
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 extends com.google.api.Page> 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 extends com.google.api.PageOrBuilder> + 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
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 `(== include {path} ==)` + * to include content from a Markdown file. + *+ */ + java.lang.String getContent(); + /** + *
optional string content = 2;
+ *
+ * + * The Markdown content of the page. You can use `(== include {path} ==)` + * 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
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 extends com.google.api.PageOrBuilder> + 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
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
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
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 extends com.google.protobuf.ApiOrBuilder> + 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
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
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 extends com.google.protobuf.TypeOrBuilder> + 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
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
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 extends com.google.protobuf.EnumOrBuilder> + 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
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
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 extends com.google.protobuf.TypeOrBuilder> + 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
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
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
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 extends com.google.protobuf.Api> 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 extends com.google.protobuf.ApiOrBuilder> + 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
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
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 extends com.google.protobuf.Type> 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 extends com.google.protobuf.TypeOrBuilder> + 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
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
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 extends com.google.protobuf.Enum> 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 extends com.google.protobuf.EnumOrBuilder> + 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
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
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
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 extends com.google.protobuf.Type> 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 extends com.google.protobuf.TypeOrBuilder> + 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
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
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 extends com.google.protobuf.ApiOrBuilder> + 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
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 extends com.google.protobuf.TypeOrBuilder> + 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
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 extends com.google.protobuf.EnumOrBuilder> + 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
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 extends com.google.protobuf.TypeOrBuilder> + 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
repeated .google.api.VisibilityRule rules = 1;
+ *
+ * + * A list of visibility rules providing visibility configuration for + * individual API elements. + *+ */ + public java.util.List
repeated .google.api.VisibilityRule rules = 1;
+ *
+ * + * A list of visibility rules providing visibility configuration for + * individual API elements. + *+ */ + public java.util.List extends com.google.api.VisibilityRuleOrBuilder> + 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
repeated .google.api.VisibilityRule rules = 1;
+ *
+ * + * A list of visibility rules providing visibility configuration for + * individual API elements. + *+ */ + public java.util.List
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 extends com.google.api.VisibilityRule> 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 extends com.google.api.VisibilityRuleOrBuilder> + 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
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
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
repeated .google.api.VisibilityRule rules = 1;
+ *
+ * + * A list of visibility rules providing visibility configuration for + * individual API elements. + *+ */ + java.util.List
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 extends com.google.api.VisibilityRuleOrBuilder> + 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
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
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
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
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
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
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
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
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
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
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
repeated .google.longrunning.Operation operations = 1;
+ *
+ * + * A list of operations that match the specified filter in the request. + *+ */ + public java.util.List
repeated .google.longrunning.Operation operations = 1;
+ *
+ * + * A list of operations that match the specified filter in the request. + *+ */ + public java.util.List extends com.google.longrunning.OperationOrBuilder> + 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
repeated .google.longrunning.Operation operations = 1;
+ *
+ * + * A list of operations that match the specified filter in the request. + *+ */ + public java.util.List
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 extends com.google.longrunning.Operation> 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 extends com.google.longrunning.OperationOrBuilder> + 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
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
repeated .google.longrunning.Operation operations = 1;
+ *
+ * + * A list of operations that match the specified filter in the request. + *+ */ + java.util.List
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 extends com.google.longrunning.OperationOrBuilder> + 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
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
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
+ * 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
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
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
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
+ *
+ * + * Describes all violations in a client request. + *+ */ + public java.util.List
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
+ *
+ * + * Describes all violations in a client request. + *+ */ + public java.util.List extends com.google.rpc.BadRequest.FieldViolationOrBuilder> + 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
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
+ *
+ * + * Describes all violations in a client request. + *+ */ + public java.util.List
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 extends com.google.rpc.BadRequest.FieldViolation> 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 extends com.google.rpc.BadRequest.FieldViolationOrBuilder> + 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